CPKIFNSSRepository Class Reference

#include <PKIFNSSRepository.h>

Inheritance diagram for CPKIFNSSRepository:

Inheritance graph
[legend]
Collaboration diagram for CPKIFNSSRepository:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFNSSRepository class can be used to retrieve certificates and CRLs from a NSS certificate store.

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)

Constructor & Destructor Documentation

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.

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

Returns:
None

Definition at line 89 of file PKIFNSSRepository.cpp.

References LOG_STRING_DEBUG, PKIFDelete(), and TOOLKIT_SR_NSSREPOSITORY.


Member Function Documentation

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.

Returns:
None
Exceptions:
CPKIFCacheException(COMMON_INVALID_INPUT) 
Parameters:
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.

Returns:
None
Exceptions:
CPKIFCacheException(COMMON_NOT_INITIALIZED) 
Parameters:
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.

Returns:
None

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]


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

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