#include <CAPICRLUpdate2.h>
CERT_SYSTEM_STORE_CURRENT_USER "CA".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 CAPICRLUpdate2.h.
Public Member Functions | |
CPKIFCAPICRLUpdate2 (int sysStoRegLoc=CERT_SYSTEM_STORE_CURRENT_USER, const char *store=g_defCACCAPIStore) | |
virtual | ~CPKIFCAPICRLUpdate2 (void) |
void | Initialize (void) |
void | AddCRL (const CPKIFCRLPtr &crl, const CPKIFGeneralNamePtr &dp) |
void | SetSuppressUpdateErrors (bool b) |
bool | GetSuppressUpdateErrors () const |
CPKIFCAPICRLUpdate2::CPKIFCAPICRLUpdate2 | ( | int | sysStoRegLoc = CERT_SYSTEM_STORE_CURRENT_USER , |
|
const char * | store = g_defCACCAPIStore | |||
) |
Interface: External
This function creates and initializes CPKIFCAPICRLUpdate2 objects. The parameters determine which certificate store is associated with an instance of CPKIFCAPICRLUpdate2. The default certificate store is the "CA" 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 CPKIFCAPICRLUpdate2 is passed to the AddColleague function of a mediator class (presumably the CPKIFCacheMediator2 class).
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 51 of file CAPICRLUpdate2.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_SR_CAPICRLUPDATE.
CPKIFCAPICRLUpdate2::~CPKIFCAPICRLUpdate2 | ( | void | ) | [virtual] |
Interface: External
This function destroys CPKIFCAPICRLUpdate2 objects
Definition at line 83 of file CAPICRLUpdate2.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_SR_CAPICRLUPDATE.
void CPKIFCAPICRLUpdate2::Initialize | ( | void | ) | [virtual] |
Interface: External
This function initializes an instance for use in a collection of IPKIFColleague objects held by a mediator. This function may generate an exception containing the following error code CACHE_CERT_STORE_OPEN_FAILED.
CPKIFCacheException(CACHE_CERT_STORE_OPEN_FAILED) |
Reimplemented from IPKIFColleague.
Definition at line 109 of file CAPICRLUpdate2.cpp.
References CACHE_CERT_STORE_OPEN_FAILED, COMMON_ALREADY_INITIALIZED, LOG_STRING_DEBUG, LOG_STRING_WARN, RAISE_CACHE_EXCEPTION, TOOLKIT_SR_CAPICRLUPDATE, and TOOLKIT_SR_CAPIREPOSITORY.
void CPKIFCAPICRLUpdate2::AddCRL | ( | const CPKIFCRLPtr & | crl, | |
const CPKIFGeneralNamePtr & | dp | |||
) | [virtual] |
Interface: External
This class takes a distribution point and a pointer to a CRL. The distribution point value is ignored by this class (there is no CAPI storage of such information). If the CRL 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). Older CRLs present in the store are replaced by newer CRLs.
CPKIFCacheException(COMMON_NOT_INITIALIZED) | ||
CPKIFCacheException(COMMON_INVALID_INPUT) |
crl | [in] Pointer to the CRL being added to the CRL store |
dp | [in] Pointer to a GeneralName identifying the distribution point of the CRL |
Implements IPKIFCRLRepositoryUpdate.
Definition at line 144 of file CAPICRLUpdate2.cpp.
References COMMON_INVALID_INPUT, COMMON_NOT_INITIALIZED, IPKIFTrustCache::GetTrustRoots(), LOG_STRING_DEBUG, LOG_STRING_INFO, LOG_STRING_WARN, RAISE_CACHE_EXCEPTION, stricmp, and TOOLKIT_SR_CAPICRLUPDATE.
void CPKIFCAPICRLUpdate2::SetSuppressUpdateErrors | ( | bool | b | ) |
Interface: External
This function is used to set suppress CRL Update errors flag. It the flag is set to true an exception will be thrown during path processing if an error occurs during CAPI store update. If the flag is set to false the update error will be ignored and path building and validation will continue.
b | [in] Boolean value to which SuppressUpdateErrors will be set |
Definition at line 224 of file CAPICRLUpdate2.cpp.
bool CPKIFCAPICRLUpdate2::GetSuppressUpdateErrors | ( | ) | const |
Interface: External
This function is used to get suppress CRL Update errors flag. It the flag is set to true an exception will be thrown during path processing if an error occurs during CAPI store update. If the flag is set to false the update error will be ignored and path building and validation will continue.
Definition at line 239 of file CAPICRLUpdate2.cpp.