#include <PKIFNSSRepository.h>
Typically, this class is not used directly by applications and is primarily intended for as a colleague associated with a cache mediator used by the path builder.
TSP-enforcing: No
Definition at line 28 of file PKIFNSSRepository.h.
Public Member Functions | |
CPKIFNSSRepository (const std::string &dbdir="") | |
~CPKIFNSSRepository () | |
void | GetCRLs (const CPKIFCertificatePtr &cert, CPKIFCRLList &crlList, PKIInfoSource source=ALL) |
void | GetCertificates (const CPKIFNamePtr &subDN, CPKIFCertificateList &certList, PKIInfoSource source=ALL) |
void | Initialize (void) |
PKIInfoSource | GetSourceType () |
void | FindCertificates (IPKIFSearchCriteria *searchCriteria, CPKIFCertificateList &certList, PKIInfoSource source=ALL) |
CPKIFNSSRepository::CPKIFNSSRepository | ( | const std::string & | dbdir = "" |
) |
Interface: External
This function creates and initializes CPKIFNSSRepository objects. The parameters determine which NSS database is associated with an instance of CPKIFNSSRepository.
If no dbdir is apecified an already open database is used. An exception is thrown if the database already been opened with a different directory.
dbdir | [in] Path to the NSS database directory |
Definition at line 63 of file PKIFNSSRepository.cpp.
References CPKIFNSSDatabase::GetInstance(), LOG_STRING_DEBUG, and TOOLKIT_SR_NSSREPOSITORY.
CPKIFNSSRepository::~CPKIFNSSRepository | ( | void | ) |
Interface: External
This function destroys CPKIFNSSRepository objects.
Definition at line 89 of file PKIFNSSRepository.cpp.
References LOG_STRING_DEBUG, PKIFDelete(), and TOOLKIT_SR_NSSREPOSITORY.
void CPKIFNSSRepository::GetCRLs | ( | const CPKIFCertificatePtr & | cert, | |
CPKIFCRLList & | crlList, | |||
PKIInfoSource | source = ALL | |||
) | [virtual] |
Interface: External
This function appends pointers to CRLs that may be applicable to the certificate identified by cert to crlList. This function does not ensure that all CRLs are applicable to the specified certificate. The function simply returns without searching when source is equal to REMOTE.
CPKIFCacheException(COMMON_INVALID_INPUT) |
cert | [in] Pointer to a certificate for which revocation status is to be checked |
crlList | [out] Reference to a CRL list to receive CRLs that may be associated with the specified certificate |
source | [in] PKIInfoSource indicating the locations to search for CRLs |
Implements IPKIFCRLRepository.
Definition at line 178 of file PKIFNSSRepository.cpp.
References CACHE_PARSE_ERROR, COMMON_NOT_INITIALIZED, LOG_STRING_DEBUG, LOG_STRING_ERROR, RAISE_CACHE_EXCEPTION, PKIFENUMS::REMOTE, GottaMatch< T >::SetRHS(), and TOOLKIT_SR_NSSREPOSITORY.
void CPKIFNSSRepository::GetCertificates | ( | const CPKIFNamePtr & | subDN, | |
CPKIFCertificateList & | certList, | |||
PKIInfoSource | source = ALL | |||
) | [virtual] |
Interface: External
This function appends pointers to certificates that are issued to the entity identified by subDN to certList. The function simply returns without searching when source is equal to REMOTE. This function may generate an exception containing the following error code COMMON_NOT_INITIALIZED.
CPKIFCacheException(COMMON_NOT_INITIALIZED) |
subDN | [in] Pointer to a distinguished name corresponding to the subject distinguished name in the desired certificates |
certList | [out] List of pointers to certificates with a subject distinguished name equal to the value passed via the subDN parameter |
source | [in] PKIInfoSource value indicating the types of locations that should be searched for certificates |
Implements IPKIFCertRepository.
Definition at line 106 of file PKIFNSSRepository.cpp.
References CACHE_PARSE_ERROR, COMMON_NOT_INITIALIZED, LOG_STRING_DEBUG, LOG_STRING_ERROR, RAISE_CACHE_EXCEPTION, PKIFENUMS::REMOTE, GottaMatch< T >::SetRHS(), and TOOLKIT_SR_NSSREPOSITORY.
void CPKIFNSSRepository::Initialize | ( | void | ) | [virtual] |
Interface: External
This function initializes an instance for use in a collection of IPKIFColleague objects held by a mediator.
Reimplemented from IPKIFColleague.
Definition at line 228 of file PKIFNSSRepository.cpp.
References LOG_STRING_DEBUG, CPKIFNSSHelper::NSSAvaliable(), PKIFNSS_INIT_FAILED, RAISE_CACHE_EXCEPTION, and TOOLKIT_SR_NSSREPOSITORY.
PKIInfoSource CPKIFNSSRepository::GetSourceType | ( | ) | [inline, virtual] |
Implements IPKIFCertRepository.
Definition at line 39 of file PKIFNSSRepository.h.
References PKIFENUMS::LOCAL.
void CPKIFNSSRepository::FindCertificates | ( | IPKIFSearchCriteria * | searchCriteria, | |
CPKIFCertificateList & | certList, | |||
PKIInfoSource | source = ALL | |||
) | [virtual] |
searchCriteria | [in] Pointer to a searchCriteria interface |
certList | [out] List of certificates that match the specified search criteria |
source | [in] PKIInfoSource value indicating the locations to search |
Implements IPKIFCertSearch.
Definition at line 238 of file PKIFNSSRepository.cpp.
References ALLCERTS, atob(), CACHE_PARSE_ERROR, COMMON_INVALID_INPUT, COMMON_NOT_INITIALIZED, CPKIFIssuerNameAndSerialNumberBasedSearch::GetIssuerName(), CPKIFKeyIDBasedSearch::GetKeyID(), CPKIFNameBasedSearch::GetName(), IPKIFSearchCriteria::GetSearchType(), CPKIFIssuerNameAndSerialNumberBasedSearch::GetSerialNumber(), ISSUERNAME, ISSUERSERIAL, KEYID, LOG_STRING_DEBUG, LOG_STRING_ERROR, RAISE_CACHE_EXCEPTION, PKIFENUMS::REMOTE, GottaMatch< T >::SetRHS(), SUBJECTNAME, TOOLKIT_SR_CAPIUSERREPOSITORY, and TOOLKIT_SR_NSSREPOSITORY.