SimpleRootStore Class Reference

#include <SimpleRootStore.h>

Inheritance diagram for SimpleRootStore:

Inheritance graph
[legend]
Collaboration diagram for SimpleRootStore:

Collaboration graph
[legend]

List of all members.


Detailed Description

The SimpleRootStore class provides a very simple implementation of the IPKIFTrustCache and IPKIFTrustCacheUpdate interfaces using a std::vector to provide an in-memory cache alternative. The class is intended as an alternative to using the CPKIFCAPITrustStore2 interface to the (potentially) large CAPI root store.

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 ()

Constructor & Destructor Documentation

SimpleRootStore::SimpleRootStore ( void   ) 

Interface: External

This function creates and initializes a SimpleRootStore objects

Returns:
None

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

Returns:
None

Definition at line 178 of file SimpleRootStore.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SR_SIMPLEROOTSTORE.


Member Function Documentation

void SimpleRootStore::Initialize ( void   )  [virtual]

Interface: External

This function initializes an instance for use in a collection of IPKIFColleague objects held by a mediator

Returns:
None

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]

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.

Returns:
True if at least one trust anchor was found matching the specific distinguished name; false if no trust anchors were found

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.

Returns:
None
Parameters:
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.

Returns:
None

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

Returns:
None

Definition at line 206 of file SimpleRootStore.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SR_SIMPLEROOTSTORE.


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:21:09 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6