#include <SimpleRootStore.h>
This class is typically associated with short-lived mediators at run-time (then reused as necessary with different mediator instances).
This cache will grow without bound. It is only populated by applications (i.e. no PKIF components update the root store). For cases where tighter cache control is required, custom implementations of the appropriate interfaces should be developed.
TSP-enforcing: No
Definition at line 37 of file SimpleRootStore.h.
Public Member Functions | |
SimpleRootStore (void) | |
virtual | ~SimpleRootStore (void) |
void | Initialize (void) |
void | FindCertificates (IPKIFSearchCriteria *searchCriteria, CPKIFCertificateList &certList, PKIInfoSource source=ALL) |
void | FindKeys (IPKIFSearchCriteria *searchCriteria, IPKIFNameAndKeyList &keyList, PKIInfoSource source=ALL) |
bool | GetTrustRoots (const CPKIFNamePtr &subDN, IPKIFTrustAnchorList &root) |
void | GetTrustRoots (IPKIFTrustAnchorList &v) |
void | AddTrustRoot (const IPKIFTrustAnchorPtr &root) |
void | Clear () |
SimpleRootStore::SimpleRootStore | ( | void | ) |
Interface: External
This function creates and initializes a SimpleRootStore objects
Definition at line 166 of file SimpleRootStore.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_SR_SIMPLEROOTSTORE.
SimpleRootStore::~SimpleRootStore | ( | void | ) | [virtual] |
Interface: External
This function destroys SimpleRootStore objects
Definition at line 178 of file SimpleRootStore.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_SR_SIMPLEROOTSTORE.
void SimpleRootStore::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 194 of file SimpleRootStore.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_SR_SIMPLEROOTSTORE.
void SimpleRootStore::FindCertificates | ( | IPKIFSearchCriteria * | searchCriteria, | |
CPKIFCertificateList & | certList, | |||
PKIInfoSource | source = ALL | |||
) | [virtual] |
Implements IPKIFCertSearch.
Definition at line 338 of file SimpleRootStore.cpp.
References FindKeys().
void SimpleRootStore::FindKeys | ( | IPKIFSearchCriteria * | searchCriteria, | |
IPKIFNameAndKeyList & | keyList, | |||
PKIInfoSource | source = ALL | |||
) | [virtual] |
Reimplemented from IPKIFCertSearch.
Definition at line 356 of file SimpleRootStore.cpp.
References ALLCERTS, CPKIFIssuerNameAndSerialNumberBasedSearch::GetIssuerName(), CPKIFKeyIDBasedSearch::GetKeyID(), CPKIFNameBasedSearch::GetName(), IPKIFSearchCriteria::GetSearchType(), CPKIFIssuerNameAndSerialNumberBasedSearch::GetSerialNumber(), ISSUERNAME, ISSUERSERIAL, KEYID, and SUBJECTNAME.
Referenced by FindCertificates().
bool SimpleRootStore::GetTrustRoots | ( | const CPKIFNamePtr & | subDN, | |
IPKIFTrustAnchorList & | trustList | |||
) | [virtual] |
Interface: External
Cache is searched for trust roots with a DN matching the presented distinguished name. Certificates with a matching subject DN are appended to the vector passed as the trustList parameter. If the subDN parameter is NULL, then all trust roots in the cache are appended to the trustList.
Implements IPKIFTrustCache.
Definition at line 228 of file SimpleRootStore.cpp.
References LOG_STRING_DEBUG, GottaMatch< T >::SetRHS(), TOOLKIT_SR_SIMPLEROOTSTORE, and CPKIFName::ToString().
void SimpleRootStore::GetTrustRoots | ( | IPKIFTrustAnchorList & | v | ) |
Interface: External
This function comes returns a vector containing pointers to certificates. Applications seeking to obtain all crls in SimpleCRLCache should use this function.
v | [in] std::vector which will contain the retrieved crl pointers |
Definition at line 326 of file SimpleRootStore.cpp.
void SimpleRootStore::AddTrustRoot | ( | const IPKIFTrustAnchorPtr & | cert | ) | [virtual] |
Interface: External
This function is used to add trusted roots to the cache. This function does not screen for duplicates. Applications must ensure that duplicates are not added if duplicates are not desired.
Implements IPKIFTrustCacheUpdate.
Definition at line 298 of file SimpleRootStore.cpp.
References LOG_STRING_DEBUG, GottaMatch< T >::SetRHS(), and TOOLKIT_SR_SIMPLEROOTSTORE.
void SimpleRootStore::Clear | ( | ) |
Interface: External
This function may be used to empty the cache
Definition at line 206 of file SimpleRootStore.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_SR_SIMPLEROOTSTORE.