00001
00009 #ifndef __PKIFCACHEMEDIATOR2_H__
00010 #define __PKIFCACHEMEDIATOR2_H__
00011
00012
00013 #include "PKIFdll.h"
00014
00015 #include "PKIFMediators.h"
00016 #include "IPKIFTrustCache.h"
00017 #include "IPKIFPKIRepositoryFull.h"
00018 #include "IPKIFCertSearch.h"
00019 #include "IPKIFSupportsSynonymousSources.h"
00020 #include "IPKIFSynonymousSourceStore.h"
00021 #include "components.h"
00022
00023 #include <vector>
00024
00025 class CPKIFException;
00026 FD_LIST_PTR(CPKIFCertificate);
00027 FD_LIST_PTR(CPKIFCRL);
00028 FD_SMART_PTR(CPKIFName);
00029 FD_SMART_PTR(CPKIFGeneralName);
00030 class IPKIFSearchCriteria;
00031 struct CPKIFCacheMediator2Impl;
00032
00033
00034
00077 class CAC_API CPKIFCacheMediator2 : public IPKIFMediator, public IPKIFTrustCache,
00078 public IPKIFPKIRepositoryFull, public IPKIFCertSearch,
00079 public IPKIFSupportsSynonymousCertSources
00080 {
00081 public:
00082 CPKIFCacheMediator2(bool addDefaultColleagues = false);
00083 virtual ~CPKIFCacheMediator2(void);
00084
00085
00086 void InitializeMediator(std::vector<CPKIFException*>* errorInfo);
00087 void Terminate();
00088
00089
00090 void Initialize();
00091
00092 void GetColleagues(std::vector<IPKIFColleaguePtr>& v) const;
00093
00094
00095 void AddColleague(IPKIFColleaguePtr& module);
00096
00097
00098 void GetCRLs(const CPKIFCertificatePtr& cert, CPKIFCRLList& crlList, PKIInfoSource source = ALL);
00099 void GetCRLs(const CPKIFCertificatePtr& cert, CPKIFCRLNodeList& crlNodeList, PKIInfoSource source = ALL);
00100 void GetCRLs(const CPKIFCertificatePtr& cert, CPKIFCRLList& crlList, PKIInfoSource source, CPKIFPathSettingsPtr& ps);
00101 void GetCRLs(const CPKIFCertificatePtr& cert, CPKIFCRLNodeList& crlNodeList, PKIInfoSource source, CPKIFPathSettingsPtr& ps);
00102
00103 void GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateList& certList, PKIInfoSource source = ALL);
00104 void GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateNodeList& certNodeList, PKIInfoSource source = ALL);
00105
00106 void GetCertificates(const CPKIFCertificatePtr& cert, CPKIFCertificateList& certList, PKIInfoSource source = ALL, PathBuildingDirection pbd = PBD_FORWARD);
00107 void GetCertificates(const CPKIFCertificatePtr& cert, CPKIFCertificateNodeList& certNodeList, PKIInfoSource source = ALL, PathBuildingDirection pbd = PBD_FORWARD);
00108
00109 void GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateList& certList, PKIInfoSource source, CPKIFPathSettingsPtr& ps);
00110 void GetCertificates(const CPKIFCertificatePtr& cert, CPKIFCertificateList& certList, PKIInfoSource source, PathBuildingDirection pbd, CPKIFPathSettingsPtr& ps);
00111 void GetCertificates(const CPKIFCertificatePtr& cert, CPKIFCertificateNodeList& certNodeList, PKIInfoSource source, PathBuildingDirection pbd, CPKIFPathSettingsPtr& ps);
00112 void GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateNodeList& certNodeList, PKIInfoSource source, CPKIFPathSettingsPtr& ps);
00113
00114 void AddCRL(const CPKIFCRLPtr& crl, const CPKIFGeneralNamePtr& dp);
00115 void AddCertificate(CertType certType, const CPKIFCertificatePtr& cert);
00116 void AddCertificate(CertType certType, const CPKIFCertificateNodeEntryPtr& certNode);
00117
00118
00119 bool GetTrustRoots(const CPKIFNamePtr& subDN, IPKIFTrustAnchorList& rootList);
00120
00121
00122 void FindCertificates(IPKIFSearchCriteria* searchCriteria, CPKIFCertificateList& certList, PKIInfoSource source = ALL);
00123 void FindKeys(IPKIFSearchCriteria* searchCriteria, IPKIFNameAndKeyList& keyList, PKIInfoSource source = ALL);
00124
00125 void GetCertificateSources(const CPKIFCertificatePtr& cert, CPKIFCertificateSourceList& certs, PathBuildingDirection pbd = PBD_FORWARD);
00126
00127 PKIInfoSource GetSourceType() {return REMOTE;}
00128
00129 private:
00131 CPKIFCacheMediator2(const CPKIFCacheMediator2& alg);
00133 CPKIFCacheMediator2& operator=(const CPKIFCacheMediator2& rhs);
00134
00135 enum { thisComponent = TOOLKIT_SR_MEDIATOR };
00136
00137 struct CPKIFCacheMediator2Impl *m_impl;
00138 };
00139 DECLARE_SMART_POINTERS(CPKIFCacheMediator2);
00140
00141
00142 #endif