IPKIFPkiArtifact.h

Go to the documentation of this file.
00001 
00009 #ifndef __IPKIFPKIARTIFACT_H__
00010 #define __IPKIFPKIARTIFACT_H__
00011 
00012 #include "PKIFdll.h"
00013 #include "PKIFEnums.h"
00014 
00015 #include <vector>
00016 #include <string>
00017 
00018 FD_SMART_PTR(CPKIFTime);
00019 FD_SMART_PTR(CPKIFSubjectPublicKeyInfo);
00020 FD_SMART_PTR(CPKIFAlgorithmIdentifier);
00021 FD_NODE_LIST_PTR(CPKIFCertificateNodeEntry);
00022 FD_CRL_NODE_LIST_PTR(CPKIFCRLNodeEntry);
00023 
00032 enum PKIArtifactState
00033 {
00034     PAS_PENDING = 0,
00035     PAS_AVAILABLE,
00036     PAS_UNAVAILABLE
00037 };
00038 
00039 struct IPKIFPkiArtifactImpl;
00040 
00048 class CAC_API IPKIFPkiArtifact
00049 {
00050 public:
00051     IPKIFPkiArtifact();
00052     virtual ~IPKIFPkiArtifact();
00053 
00055     void AddSource(std::string& sourceURI);
00056 
00058     void AddSource(std::string& sourceURI, CPKIFTimePtr& retrievalTime);
00059 
00061     void GetSources(std::vector<std::string>& sourceURIs) const;
00062 
00064     void GetSources(std::vector<std::pair<std::string, CPKIFTimePtr> >& sourceURIs) const;
00065 
00067     CPKIFTimePtr GetLatestRetrievalTime() const;
00068     
00070     void SetVerificationPublicKey(CPKIFSubjectPublicKeyInfoPtr& spki);
00071 
00073     CPKIFSubjectPublicKeyInfoPtr SetVerificationPublicKey() const;
00074 
00076     void SetVerificationParameters(CPKIFAlgorithmIdentifierPtr& params);
00077 
00079     CPKIFAlgorithmIdentifierPtr GetVerificationPublicKey() const;
00080 
00082     PKIArtifactState GetState() const;
00083 
00085     void SetState(PKIArtifactState state) const;
00086 
00087 private:
00089     IPKIFPkiArtifact(const IPKIFPkiArtifact& copy);
00091     IPKIFPkiArtifact& operator=(const IPKIFPkiArtifact& rhs);
00092 
00093     struct IPKIFPkiArtifactImpl* m_impl;
00094 };
00095 DECLARE_SMART_POINTERS(IPKIFPkiArtifact);
00101 class CPKIFCertificateSource : public IPKIFPkiArtifact
00102 {
00103 public:
00104     CPKIFCertificateSource();
00105     ~CPKIFCertificateSource();
00106 
00107     virtual void GetCertificates(CPKIFCertificateNodeList& certNodeList, PathBuildingDirection pbd) = 0;
00108 
00109     bool operator==(const CPKIFCertificateSource& rhs);
00110 private:
00112     CPKIFCertificateSource(const CPKIFCertificateSource& copy);
00114     CPKIFCertificateSource& operator=(const CPKIFCertificateSource& rhs);
00115 };
00116 DECLARE_SMART_POINTERS(CPKIFCertificateSource);
00117 typedef std::vector<CPKIFCertificateSourcePtr, PKIFAlloc<CPKIFCertificateSourcePtr> > CPKIFCertificateSourceList;
00118 DECLARE_SMART_POINTERS(CPKIFCertificateSourceList);
00124 class CPKIFCrlSource : public IPKIFPkiArtifact
00125 {
00126 public:
00127     CPKIFCrlSource();
00128     ~CPKIFCrlSource();
00129 
00130     virtual void GetCrls(CPKIFCRLNodeList& crlNodeList);
00131 private:
00133     CPKIFCrlSource(const CPKIFCrlSource& copy);
00135     CPKIFCrlSource& operator=(const CPKIFCrlSource& rhs);
00136 };
00137 DECLARE_SMART_POINTERS(CPKIFCrlSource);
00138 typedef std::vector<CPKIFCrlSourcePtr, PKIFAlloc<CPKIFCrlSourcePtr> > CPKIFCrlSourceList;
00139 DECLARE_SMART_POINTERS(CPKIFCrlSourceList);
00140 
00141 
00142 #endif
00143 

Generated on Mon Nov 15 11:15:51 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6