00001 00009 #ifndef __IPKIFTrustAnchor_H__ 00010 #define __IPKIFTrustAnchor_H__ 00011 00012 #if _MSC_VER > 1000 00013 #pragma once 00014 #endif // _MSC_VER > 1000 00015 00016 #include "PKIFdll.h" 00017 #include "IPKIFNameAndKey.h" 00018 #include <vector> 00019 00020 FD_SMART_PTR(CPKIFCertificate); 00021 FD_SMART_PTR(CPKIFSubjectKeyIdentifier); 00022 00028 class CAC_API IPKIFTrustAnchor : public IPKIFNameAndKey 00029 { 00030 public: 00031 IPKIFTrustAnchor(); 00032 virtual ~IPKIFTrustAnchor(); 00033 00034 virtual bool operator==(const IPKIFTrustAnchor& rhs) = 0; 00035 virtual CPKIFBufferPtr Encoded() = 0; 00036 00037 virtual CPKIFCertificatePtr GetCertificate() const = 0; 00038 virtual CPKIFSubjectKeyIdentifierPtr GetKeyIdentifier() const = 0; 00039 00040 private: 00041 IPKIFTrustAnchor(const IPKIFTrustAnchor&); 00042 }; 00043 DECLARE_SMART_POINTERS(IPKIFTrustAnchor); 00044 typedef std::vector<IPKIFTrustAnchorPtr, PKIFAlloc<IPKIFTrustAnchorPtr> > IPKIFTrustAnchorList; 00045 DECLARE_SMART_POINTERS(IPKIFTrustAnchorList); 00046 00047 #define TRUST_ANCHOR_CAST(item) *((shared_ptr<IPKIFTrustAnchor>*)&(item)) 00048 00049 #endif