CPKIFRevocationStatusMediator2 Class Reference

#include <CPKIFRevocationStatusMediator2.h>

Inheritance diagram for CPKIFRevocationStatusMediator2:

Inheritance graph
[legend]
Collaboration diagram for CPKIFRevocationStatusMediator2:

Collaboration graph
[legend]

List of all members.


Detailed Description

CPKIFRevocationStatusMediator2 implements a single functional interface: IPKIFRevocationStatus.
    class CPKIFRevocationStatusMediator2 : public IPKIFMediator, 
	public IPKIFRevocationStatus

This interface permits applications to determine the revocation status of a single certificate 
or of the certificates that comprise a certification path. PKIF provides two colleague 
objects for use with this class:


Typically, applications do not directly interface with instances of CPKIFRevocationStatusMediator2. 
Instead, an instance of CPKIFRevocationStatusMediator2 is associated (either directly or 
indirectly) with an instance of CPKIFPathProcessingMediator2, which uses the available 
revocation status interfaces during certificate path validation. See "Associating an 
LDAP Directory with a CMS Object" and "Enabling OCSP" for details on adding colleagues at 
runtime.

TSP-enforcing: No

Definition at line 57 of file CPKIFRevocationStatusMediator2.h.


Public Member Functions

 CPKIFRevocationStatusMediator2 (bool addDefaultColleagues=false)
virtual ~CPKIFRevocationStatusMediator2 ()
void InitializeMediator (std::vector< CPKIFException * > *errorInfo)
void Terminate ()
void Initialize ()
void GetColleagues (std::vector< IPKIFColleaguePtr > &v) const
void AddColleague (IPKIFColleaguePtr &module)
void SetCacheCertStatus (bool bCacheCertStatus)
bool GetCacheCertStatus () const
bool CheckStatus (const CPKIFCertificatePtr &cert, const CPKIFCertificatePtr &issuersCert, RevocationStatus &status, CPKIFCertStatusPtr &certStatus)
bool CheckStatusPath (CPKIFCertificatePath &path, RevocationStatus &status)

Constructor & Destructor Documentation

CPKIFRevocationStatusMediator2::CPKIFRevocationStatusMediator2 ( bool  addDefaultColleagues = false  ) 

Interface: External

This function creates CPKIFRevocationStatusMediator2 objects. If the addDefaultColleagues parameter is set to true the following colleagues CPKIFOCSPChecker and CPKIFX509CRLChecker will be added to the mediator upon initialization. Following construction, CPKIFRevocationStatusMediator2 instances are not ready for use. It is necessary to call Initialize prior to exercising any functionality.

Returns:
None
Parameters:
addDefaultColleagues  [in] Boolean value, if true will force Initialize to add default colleagues to the mediator.

Definition at line 114 of file CPKIFRevocationStatusMediator2.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_PATH_MEDIATOR.

CPKIFRevocationStatusMediator2::~CPKIFRevocationStatusMediator2 ( void   )  [virtual]

Interface: External

This function destroys CPKIFRevocationStatusMediator2 objects.

Returns:
None

Definition at line 131 of file CPKIFRevocationStatusMediator2.cpp.

References LOG_STRING_DEBUG, Terminate(), and TOOLKIT_PATH_MEDIATOR.


Member Function Documentation

void CPKIFRevocationStatusMediator2::InitializeMediator ( std::vector< CPKIFException * > *  errorInfo  )  [virtual]

Interface: External

Initialize prepares an instance of CPKIFRevocationStatusMediator2 for use, including initialization of all runtime-associated mediators and colleagues. If a boolean true was passed to CPKIFRevocationStatusMediator2 constructor default colleagues CPKIFOCSPChecker and CPKIFX509CRLChecker will be added. By default, all mediators catch and discard these exceptions and ignore the offending colleague. Applications can review the list of exceptions that occurred during initialization by passing a non-NULL pointer to a vector of CPKIFException objects. Any exception objects returned in the vector must be freed by the application.

Returns:
None
Exceptions:
CPKIFPathException(COMMON_ALREADY_INITIALIZED) 
Parameters:
errorInfo  [in/out] Pointer to a vector to receive exceptions thrown by colleagues

Reimplemented from IPKIFColleague.

Definition at line 223 of file CPKIFRevocationStatusMediator2.cpp.

References AddColleague(), COMMON_ALREADY_INITIALIZED, LOG_STRING_DEBUG, and TOOLKIT_PATH_MEDIATOR.

Referenced by Initialize().

void CPKIFRevocationStatusMediator2::Terminate (  )  [virtual]

Interface: External

Terminate de-initializes an instance of CPKIFRevocationStatusMediator2 rendering it unusable until after a subsequent call to Initialize. Terminate will remove all mediator and colleague associations and will destroy any colleagues associated at runtime via AddColleague with transfer of ownership.

Returns:
None

Reimplemented from IPKIFColleague.

Definition at line 151 of file CPKIFRevocationStatusMediator2.cpp.

References _ASSERT, COMMON_TERMINATION_ERROR, LOG_STRING_DEBUG, LOG_STRING_ERROR, LOG_STRING_FATAL, IPKIFColleague::RemoveMediatorAssociations(), RemoveParentRelationships(), IPKIFColleague::Terminate(), and TOOLKIT_PATH_MEDIATOR.

Referenced by ~CPKIFRevocationStatusMediator2().

void CPKIFRevocationStatusMediator2::Initialize ( void   )  [virtual]

Interface: External

Initialize prepares an instance of CPKIFRevocationStatusMediator2 for use, including initialization of all runtime-associated mediators and colleagues. If a boolean true was passed to CPKIFRevocationStatusMediator2 constructor default colleagues CPKIFOCSPChecker and CPKIFX509CRLChecker will be added.

Returns:
None
Exceptions:
CPKIFPathException(COMMON_ALREADY_INITIALIZED) 

Reimplemented from IPKIFColleague.

Definition at line 201 of file CPKIFRevocationStatusMediator2.cpp.

References InitializeMediator().

void CPKIFRevocationStatusMediator2::GetColleagues ( std::vector< IPKIFColleaguePtr > &  v  )  const

Interface: External

This function is used retrive all the colleagues associated with this instance

Returns:
None
Parameters:
v  [out] std::vector that will contain all the colleagues assosiated with this instance

Definition at line 450 of file CPKIFRevocationStatusMediator2.cpp.

Referenced by CPKIFLdapAndOcspPanel::OnInitDialog(), and SaveRevocationStatusComponents().

void CPKIFRevocationStatusMediator2::AddColleague ( IPKIFColleaguePtr &  module  ) 

Interface: External

This function associates a colleague at runtime. When invoked with transferOwnership equal to true, the colleague specified by the module parameter will be destroyed when Terminate is invoked.

Only colleagues that implement at least one interface of the associated mediator should be passed to AddColleague. Adding unrelated colleagues to a collection held by a mediator will decrease performance.

Returns:
None
Parameters:
module  [in] Pointer to an IPKIFColleague object

Definition at line 258 of file CPKIFRevocationStatusMediator2.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_PATH_MEDIATOR.

Referenced by InitializeMediator(), and LoadRevocationStatusComponents().

void CPKIFRevocationStatusMediator2::SetCacheCertStatus ( bool  bCacheCertStatus  ) 

Definition at line 80 of file CPKIFRevocationStatusMediator2.cpp.

Referenced by LoadRevocationStatusComponents().

bool CPKIFRevocationStatusMediator2::GetCacheCertStatus (  )  const

Definition at line 98 of file CPKIFRevocationStatusMediator2.cpp.

Referenced by SaveRevocationStatusComponents().

bool CPKIFRevocationStatusMediator2::CheckStatus ( const CPKIFCertificatePtr &  cert,
const CPKIFCertificatePtr &  issuersCert,
RevocationStatus status,
CPKIFCertStatusPtr &  certStatus 
) [virtual]

Interface: External

This function may be used to check the revocation status of a single certificate. It is not typically used.

Returns:
True if the revocation status could be determined and false otherwise.
Exceptions:
CPKIFPathException(COMMON_OPERATION_NOT_HANDLED) 
Parameters:
cert  [in] Reference to a smart pointer to a CPKIFCertificate object containing the certificate for which revocation status is sought
issuersCert  [in] Reference to a smart pointer to a CPKIFCertificate object containing the certificate of the issuer of the certificate passed via the cert parameter
status  [out] Reference to a RevocationStatus variable to receive the revocation status
certStatus  [out] Reference to a smart pointer to a CPKIFCertStatus object containing status information about target certificate

Implements IPKIFRevocationStatus.

Definition at line 314 of file CPKIFRevocationStatusMediator2.cpp.

References AuditString, CAT_PKIF_PATH, COMMON_OPERATION_NOT_HANDLED, COMMON_UNKNOWN_ERROR, LOG_STRING_DEBUG, PKIF_UNEXPECTED_EXCEPTION, CPKIFException::print(), and TOOLKIT_PATH_MEDIATOR.

bool CPKIFRevocationStatusMediator2::CheckStatusPath ( CPKIFCertificatePath path,
RevocationStatus status 
) [virtual]

Interface: External

This function is used to check the revocation status of each certificate in a certification path. It is invoked during path validation to determine the revocation status of each certificate in a certificate path.

Returns:
True if the revocation status could be determined and false otherwise.
Exceptions:
CPKIFPathException(COMMON_OPERATION_NOT_HANDLED) 
Parameters:
path  [in/out] Reference to a CPKIFCertificatePath object containing the certificates for which revocation status is sought; status information is directly associated with each entry in the path
status  [out] Reference to a RevocationStatus object to receive the least successful revocation status value assigned to a certificate passed via the path parameter

Implements IPKIFRevocationStatus.

Definition at line 387 of file CPKIFRevocationStatusMediator2.cpp.

References AuditString, CAT_PKIF_PATH, COMMON_OPERATION_NOT_HANDLED, COMMON_UNKNOWN_ERROR, LOG_STRING_DEBUG, PKIF_UNEXPECTED_EXCEPTION, CPKIFException::print(), and TOOLKIT_PATH_MEDIATOR.


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

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