CPKIFCAPITrustRootCRLRepository2 Class Reference

#include <CAPITrustRootCRLRepository2.h>

Inheritance diagram for CPKIFCAPITrustRootCRLRepository2:

Inheritance graph
[legend]
Collaboration diagram for CPKIFCAPITrustRootCRLRepository2:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFCAPITrustRootCRLRepository2 class can be used to retrieve trust anchors from a Microsoft CAPI certificate store. It implements one PKI-related interface: IPKIFCRLRepository. Each instance of this class is associated with a specific Microsoft CAPI certificate store. The constructor takes two parameters that are used to specify which certificate store is associated with an instance of this class. The default constructor parameters are:
	CERT_SYSTEM_STORE_CURRENT_USER
	"Root"
These parameters are passed to the Windows CertOpenStore function upon initialization. Consult Microsoft MSDN documentation for details on various options that may be used to target an alternative 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 38 of file CAPITrustRootCRLRepository2.h.


Public Member Functions

 CPKIFCAPITrustRootCRLRepository2 (int sysStoRegLoc=CERT_SYSTEM_STORE_CURRENT_USER, const char *store=g_defCACCAPITrustStore)
virtual ~CPKIFCAPITrustRootCRLRepository2 (void)
void Initialize (void)
void GetCRLs (const CPKIFCertificatePtr &cert, CPKIFCRLList &crlList, PKIInfoSource source=ALL)

Constructor & Destructor Documentation

CPKIFCAPITrustRootCRLRepository2::CPKIFCAPITrustRootCRLRepository2 ( int  sysStoRegLoc = CERT_SYSTEM_STORE_CURRENT_USER,
const char *  store = g_defCACCAPITrustStore 
)

Interface: External

This function creates and initializes CPKIFCAPITrustRootCRLRepository2 objects. The parameters determine which certificate store is associated with an instance of CPKIFCAPITrustRootCRLRepository2. The default certificate store is the "Root" store associated with the current Windows user. For Windows services using PKIF, the sysStoRegLoc parameter should be set to CERT_SYSTEM_STORE_LOCA_MACHINE and the store parameter can be left to the default value. Consult Microsoft MSDN documentation for details on various options that may be used to target an alternative certificate store.

This function does not attempt to open the certificate store identified by the parameters. An attempt to open the store will be made when the Initialize function is called, which occurs when an instance of CPKIFCAPITrustRootCRLRepository2 is passed to the AddColleague function of a mediator class (presumably the CPKIFCacheMediator2 class).

Returns:
None
Parameters:
sysStoRegLoc  [in] An integer indicating which certificate store is associated with an instance of CPKIFCAPITrustRootCRLRepository2.
store  [in] An NULL terminated string indicating which certificate store is associated with an instance of CPKIFCAPITrustRootCRLRepository2.

Definition at line 50 of file CAPITrustRootCRLRepository2.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SR_CAPITRUSTROOTCRLSTORE.

CPKIFCAPITrustRootCRLRepository2::~CPKIFCAPITrustRootCRLRepository2 ( void   )  [virtual]

Interface: External

This function destroys CPKIFCAPITrustRootCRLRepository2 objects.

Returns:
None

Definition at line 80 of file CAPITrustRootCRLRepository2.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SR_CAPITRUSTROOTCRLSTORE.


Member Function Documentation

void CPKIFCAPITrustRootCRLRepository2::Initialize ( void   )  [virtual]

Interface: External

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

Returns:
None
Exceptions:
CPKIFCacheException(CACHE_CERT_STORE_OPEN_FAILED) 

Reimplemented from IPKIFColleague.

Definition at line 104 of file CAPITrustRootCRLRepository2.cpp.

References CACHE_CERT_STORE_OPEN_FAILED, COMMON_ALREADY_INITIALIZED, LOG_STRING_DEBUG, LOG_STRING_WARN, RAISE_CACHE_EXCEPTION, TOOLKIT_SR_CAPIREPOSITORY, and TOOLKIT_SR_CAPITRUSTROOTCRLSTORE.

void CPKIFCAPITrustRootCRLRepository2::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. This function will search the certificate store identified by the template parameters. This function may generate an exception containing the following error code CACHE_PARSE_ERROR.

Returns:
None
Exceptions:
CPKIFCacheException(CACHE_PARSE_ERROR) 
CPKIFCacheException(COMMON_NOT_INITIALIZED) 
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 140 of file CAPITrustRootCRLRepository2.cpp.

References CACHE_PARSE_ERROR, COMMON_INVALID_INPUT, COMMON_NOT_INITIALIZED, LOG_STRING_DEBUG, LOG_STRING_ERROR, LOG_STRING_INFO, RAISE_CACHE_EXCEPTION, PKIFENUMS::REMOTE, and TOOLKIT_SR_CAPITRUSTROOTCRLSTORE.


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

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