CPKIFNSSCertUpdate Class Reference

#include <PKIFNSSCertUpdate.h>

Inheritance diagram for CPKIFNSSCertUpdate:

Inheritance graph
[legend]
Collaboration diagram for CPKIFNSSCertUpdate:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFNSSCertUpdate class can be used to add certificates to a NSS certificate store. It implements one PKI-related interface: IPKIFCertRepositoryUpdate.

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 26 of file PKIFNSSCertUpdate.h.


Public Member Functions

 CPKIFNSSCertUpdate (const std::string &dbdir="")
virtual ~CPKIFNSSCertUpdate (void)
void Initialize (void)
void AddCertificate (CertType certType, const CPKIFCertificatePtr &cert)

Constructor & Destructor Documentation

CPKIFNSSCertUpdate::CPKIFNSSCertUpdate ( const std::string &  dbdir = ""  ) 

Interface: External

This function creates and initializes CPKIFNSSCertUpdate objects. The parameters determine which NSS database is associated with an instance to CPKIFNSSCertUpdate.

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.

Returns:
None
Parameters:
dbdir  [in] Path to the NSS database directory

Definition at line 48 of file PKIFNSSCertUpdate.cpp.

References CPKIFNSSDatabase::GetInstance(), LOG_STRING_DEBUG, and TOOLKIT_SR_NSSCERTUPDATE.

CPKIFNSSCertUpdate::~CPKIFNSSCertUpdate ( void   )  [virtual]

Interface: External

This function destroys CPKIFNSSCertUpdate objects.

Returns:
None

Definition at line 74 of file PKIFNSSCertUpdate.cpp.

References LOG_STRING_DEBUG, PKIFDelete(), and TOOLKIT_SR_NSSCERTUPDATE.


Member Function Documentation

void CPKIFNSSCertUpdate::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 192 of file PKIFNSSCertUpdate.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SR_NSSCERTUPDATE.

void CPKIFNSSCertUpdate::AddCertificate ( CertType  certType,
const CPKIFCertificatePtr &  cert 
) [virtual]

Interface: External

This class takes a certificate type and a pointer to a certificate. The certificate type value is ignored by this class (there is no CAPI storage of such information). If the certificate is not successfully added no error is returned. (The lack of an error return is due to the intended use of this class, i.e. as a non-critical facilitator of efficient path building). This function may generate exceptions containing the following error codes COMMON_NOT_INITIALIZED and COMMON_MEMORY_ALLOC_FAILURE.

This function first checks if the certificate is already present in the database and if so nothing is done.

Returns:
None
Exceptions:
CPKIFCacheException(COMMON_NOT_INITIALIZED) 
CPKIFCacheException(COMMON_MEMORY_ALLOC_FAILURE) 

Implements IPKIFCertRepositoryUpdate.

Definition at line 97 of file PKIFNSSCertUpdate.cpp.

References CACHE_UPDATE_FAILED, COMMON_MEMORY_ALLOC_FAILURE, COMMON_NOT_INITIALIZED, LOG_STRING_DEBUG, LOG_STRING_INFO, RAISE_CACHE_EXCEPTION, and TOOLKIT_SR_NSSCERTUPDATE.


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

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