PKIFLDAPRepository.h
Go to the documentation of this file.00001
00009 #ifndef __PKIFLDAPREPOSITORY_H__
00010 #define __PKIFLDAPREPOSITORY_H__
00011
00012 #include "PKIFdll.h"
00013 #include "components.h"
00014 #include "IPKIFColleague.h"
00015 #include "IPKIFPKIRepository.h"
00016 #include "IPKIFSupportsSynonymousSources.h"
00017
00018 #include <vector>
00019
00020
00021 FD_LIST_PTR(CPKIFCertificate);
00022 FD_LIST_PTR(CPKIFCRL);
00023 FD_SMART_PTR(CPKIFName);
00024 FD_SMART_PTR(CPKIFGeneralSubtree);
00025 FD_LIST_PTR(CPKIFGeneralSubtree);
00026 struct CPKIFLDAPRepositoryImpl;
00027
00028
00057 class CAC_API CPKIFLDAPRepository : public IPKIFPKIRepository, public IPKIFColleague,
00058 public IPKIFSupportsSynonymousCRLSources, public IPKIFSupportsSynonymousCertSources
00059 {
00060 public:
00061 CPKIFLDAPRepository(void);
00062 virtual ~CPKIFLDAPRepository(void);
00063
00064
00065 void Initialize();
00066
00067 void GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateList& certList, PKIInfoSource source = ALL);
00068 void GetCertificates(const CPKIFCertificatePtr& cert, CPKIFCertificateList& certList, PKIInfoSource source = ALL, PathBuildingDirection pbd = PBD_FORWARD);
00069 void GetCRLs(const CPKIFCertificatePtr& cert, CPKIFCRLList& crlList, PKIInfoSource source = ALL);
00070
00071 int GetPort() const;
00072 void Set_Port(int port);
00073
00074 const char* GetHost() const;
00075 void SetHost(const char* host);
00076
00077 const char* GetUsername() const;
00078 void SetUsername(const char* username);
00079
00080 void SetPassword(const char* password);
00081
00082 void SetSuppressConnectionErrors(bool b);
00083 bool GetSuppressConnectionErrors() const;
00084
00085
00086 void GetCRLSources(const CPKIFCertificatePtr& cert, CPKIFCrlSourceList& crlNodeList, PKIInfoSource source = ALL);
00087
00088
00089 void GetCertificateSources(const CPKIFCertificatePtr& cert, CPKIFCertificateSourceList& certs, PathBuildingDirection pbd = PBD_FORWARD);
00090
00091
00092 void GetCRLs(const CPKIFNamePtr& entry, std::vector<std::string>& attributes, CPKIFCRLNodeList& crlList);
00093 void GetCertificates(const CPKIFNamePtr& entry, std::vector<std::string>& attributes, CPKIFCertificateNodeList& certList, PathBuildingDirection pbd);
00094
00095 void AddNamespace(CPKIFGeneralSubtreePtr& name);
00096 CPKIFGeneralSubtreeList GetNamespaces();
00097
00098 PKIInfoSource GetSourceType() {return REMOTE;}
00099
00100 private:
00102 CPKIFLDAPRepository(const CPKIFLDAPRepository& copy);
00104 CPKIFLDAPRepository& operator=(const CPKIFLDAPRepository& rhs);
00105
00106 void _GetCertificates(const CPKIFNamePtr& subDN, CPKIFCertificateList& certList, PKIInfoSource source = ALL, PathBuildingDirection pbd = PBD_FORWARD);
00107
00108 enum {thisComponent=TOOLKIT_SR_LDAPREPOSITORY};
00109
00110 struct CPKIFLDAPRepositoryImpl * m_impl;
00111 };
00112 DECLARE_SMART_POINTERS(CPKIFLDAPRepository);
00113
00114 CAC_API CPKIFLDAPRepositoryPtr MakeLDAPRepository();
00115 CAC_API void FreeLDAPRepository(CPKIFLDAPRepository* ldap);
00116
00117 #endif