SimpleCertCache.h
Go to the documentation of this file.00001
00009 #ifndef __SIMPLECERTCACHE_H__
00010 #define __SIMPLECERTCACHE_H__
00011
00012 #include "PKIFdll.h"
00013 #include "components.h"
00014 #include "IPKIFCertRepository.h"
00015 #include "IPKIFCertRepositoryUpdate.h"
00016 #include "IPKIFColleague.h"
00017 #include "IPKIFCertSearch.h"
00018
00019 #include <vector>
00020
00021 FD_SMART_PTR(CPKIFName);
00022 FD_LIST_PTR(CPKIFCertificate);
00023
00037 class CAC_API SimpleCertCache : public IPKIFCertRepository, public IPKIFCertRepositoryUpdate,
00038 public IPKIFColleague, public IPKIFCertSearch
00039 {
00040 public:
00041 SimpleCertCache(void);
00042 virtual ~SimpleCertCache(void);
00043
00044
00045 void Initialize(void);
00046
00047
00048 void GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateList& certList, PKIInfoSource source = ALL);
00049 void GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateNodeList& certNodeList, PKIInfoSource source = ALL);
00050 void GetCertificates(const CPKIFCertificatePtr& cert, CPKIFCertificateList& certList, PKIInfoSource source = ALL, PathBuildingDirection pbd = PBD_FORWARD);
00051 void GetCertificates(const CPKIFCertificatePtr& cert, CPKIFCertificateNodeList& certNodeList, PKIInfoSource source = ALL, PathBuildingDirection pbd = PBD_FORWARD);
00052
00053
00054 void AddCertificate(CertType certType, const CPKIFCertificatePtr& cert);
00055 void AddCertificate(CertType certType, const CPKIFCertificateNodeEntryPtr& certNode);
00056
00057 void GetCertificates(std::vector<CPKIFCertificatePtr>& v);
00058
00059 void WriteCertsToDirectory(const char* path);
00060 void ReadCertsFromDirectory(const char* path);
00061
00062 PKIInfoSource GetSourceType() {return LOCAL;}
00063
00064 void FindCertificates(IPKIFSearchCriteria* searchCriteria, CPKIFCertificateList& certList, PKIInfoSource source = ALL);
00065 void FindKeys(IPKIFSearchCriteria* searchCriteria, IPKIFNameAndKeyList& keyList, PKIInfoSource source = ALL);
00066
00067 void Clear();
00068 int size();
00069
00070 private:
00072 SimpleCertCache(const SimpleCertCache& copy);
00074 SimpleCertCache& operator=(const SimpleCertCache& rhs);
00075
00076 enum { thisComponent = TOOLKIT_SR_SIMPLECERTCACHE };
00077
00078 struct SimpleCertCacheImpl *m_impl;
00079 };
00080 DECLARE_SMART_POINTERS(SimpleCertCache);
00081
00082
00083 CAC_API SimpleCertCache* MakeSimpleCertCache();
00084 CAC_API void FreeSimpleCertCache(SimpleCertCache* ldap);
00085
00086 #endif
00087