CPKIFCapiCRL Class Reference

#include <CapiCRL.h>

Inheritance diagram for CPKIFCapiCRL:

Inheritance graph
[legend]
Collaboration diagram for CPKIFCapiCRL:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFCapiCRL class provides an interface to X.509 CRL objects that reside in an Microsoft CAPI certificate store. The ASN.1 definition used by PKIF is given below:
CertificateList ::= SIGNED { UnsignedCertificateList }

UnsignedCertificateList ::= SEQUENCE 
{
      version              Version OPTIONAL, 
      signature            AlgorithmIdentifier,
      issuer               Name,
      thisUpdate           Time,
      nextUpdate           Time OPTIONAL,
      revokedCertificates  RevokedCertificates OPTIONAL,
      crlExtensions        [0] Extensions OPTIONAL 
}
The SignatureValidityCache interface is currently not used. In future versions of PKIF, it may be used to cache signature verification status for a CRL.

The CPKIFCapiCRL member functions provide access to the contents of the CRL, but it is not normally necessary for an application to access these contents directly. PKIF does not provide a means for creating CRL, i.e. PKIF can not currently be used to implement a certification authority.

TSP-enforcing: No

Definition at line 91 of file CapiCRL.h.


Public Member Functions

virtual ~CPKIFCapiCRL (void)
virtual void Decode (const unsigned char *cert, int certLen)
virtual CPKIFBufferPtr Encoded () const
virtual int Version () const
virtual CPKIFNamePtr Issuer () const
virtual CPKIFBufferPtr Signature () const
virtual CPKIFTimePtr NextUpdate () const
virtual CPKIFTimePtr ThisUpdate () const
virtual CPKIFAlgorithmIdentifierPtr SignatureAlgorithm () const
virtual bool operator== (const CPKIFCRL &rhs) const
virtual bool CertOnThisCRL (const CPKIFCertificatePtr &cert, CPKIFCRLEntryPtr &crlEntry)
virtual bool AreThereAnyUnprocessedCriticalExtensions (std::vector< CPKIFX509ExtensionPtr > &processedExts)
virtual void GetEncodedExtensions (CPKIFBufferPtr &buf)
virtual void GetExtensionByOID (const CPKIFOID &oid, CPKIFX509ExtensionPtr &ref)

Friends

class CPKIFCAPIRepository2

Constructor & Destructor Documentation

CPKIFCapiCRL::~CPKIFCapiCRL ( void   )  [virtual]

Interface: External

The function destroys an instance of CPKIFCapiCRL.

Returns:
None

Definition at line 228 of file CapiCRL.cpp.


Member Function Documentation

void CPKIFCapiCRL::Decode ( const unsigned char *  cert,
int  certLen 
) [virtual]

Interface: External

This function is used to decode an encoded CRL. A copy of the encoded CRL is maintained and is accessible via a call to Encoded.

Returns:
None
Parameters:
cert  [in] The encoded CRL to decode.
certLen  [in] The length of the crl parameter.

Reimplemented from CPKIFCRL.

Definition at line 251 of file CapiCRL.cpp.

CPKIFBufferPtr CPKIFCapiCRL::Encoded (  )  const [virtual]

Interface: External

This function is used to retrieve an encoded certificate in the form of a smart pointer to a CPKIFBuffer object, which may contain NULL if Decode has not been successfully called. As PKIF is a toolkit intended for use enabling client applications, PKIF does not support creation of CRLs and does not feature an Encode function. The value returned from this function is a copy of the buffer passed to Decode.

Returns:
A smart pointer to CPKIFBuffer object which contains the encoded CRL

Reimplemented from CPKIFCRL.

Definition at line 319 of file CapiCRL.cpp.

Referenced by operator==().

int CPKIFCapiCRL::Version (  )  const [virtual]

Interface: External

This function returns the version number from a CRL object. PKIF supports version 1 and version 2 CRLs

Returns:
The version number from a CRL object
Exceptions:
CPKIFException(COMMON_INVALID_INPUT) 
CPKIFException(COMMON_UNSUPPORTED_VERSION) 

Reimplemented from CPKIFCRL.

Definition at line 270 of file CapiCRL.cpp.

References COMMON_UNSUPPORTED_VERSION, and TOOLKIT_ASN.

CPKIFNamePtr CPKIFCapiCRL::Issuer (  )  const [virtual]

Interface: External

This function returns a smart pointer to a CPKIFName object containing the issuer name from a CRL object.

Returns:
A smart pointer to a CPKIFName object containing the issuer name from a CRL object.
Exceptions:
CPKIFException(COMMON_INVALID_INPUT) 

Reimplemented from CPKIFCRL.

Definition at line 293 of file CapiCRL.cpp.

References m_impl.

CPKIFBufferPtr CPKIFCapiCRL::Signature (  )  const [virtual]

Interface: External

This function returns a smart pointer to a CPKIFBuffer object containing the signature from a CRL object.

Returns:
A smart pointer to a CPKIFBuffer object containing the signature from a CRL object.

Reimplemented from CPKIFCRL.

Definition at line 386 of file CapiCRL.cpp.

References CACASNWRAPPER_CREATE, and m_impl.

CPKIFTimePtr CPKIFCapiCRL::NextUpdate (  )  const [virtual]

Interface: External

This function returns a smart pointer to a CPKIFTime object containing the next update time from a CRL object.

Returns:
A smart pointer to a CPKIFTime object containing the next update time from a CRL object.
Exceptions:
CPKIFException(COMMON_INVALID_INPUT) 

Reimplemented from CPKIFCRL.

Definition at line 408 of file CapiCRL.cpp.

References CACASNWRAPPER_CREATE, CPKIFTime, GENERALIZEDTIME, m_impl, and UTCTIME.

CPKIFTimePtr CPKIFCapiCRL::ThisUpdate (  )  const [virtual]

Interface: External

This function returns a smart pointer to a CPKIFTime object containing the this update time from a CRL object.

Returns:
A smart pointer to a CPKIFTime object containing the this update time from a CRL object.
Exceptions:
CPKIFException(COMMON_INVALID_INPUT) 

Reimplemented from CPKIFCRL.

Definition at line 454 of file CapiCRL.cpp.

References CACASNWRAPPER_CREATE, CPKIFTime, GENERALIZEDTIME, m_impl, and UTCTIME.

CPKIFAlgorithmIdentifierPtr CPKIFCapiCRL::SignatureAlgorithm (  )  const [virtual]

Interface: External

This function returns a smart pointer to a CPKIFAlgorithmIdentifier object containing te signature algorithm from a CRL object.

Returns:
A smart pointer to a CPKIFAlgorithmIdentifier object containing te signature algorithm from a CRL object.
Exceptions:
CPKIFException(COMMON_INVALID_INPUT) 

Reimplemented from CPKIFCRL.

Definition at line 500 of file CapiCRL.cpp.

References m_impl.

bool CPKIFCapiCRL::operator== ( const CPKIFCRL rhs  )  const [virtual]

Interface: External

This function returns true if each CPKICRL points to the same encoded buffer and false otherwise.

Returns:
True if each CPKICRL points to the same encoded buffer and false otherwise

Reimplemented from CPKIFCRL.

Definition at line 555 of file CapiCRL.cpp.

References CPKIFCRL::Encoded(), and Encoded().

bool CPKIFCapiCRL::CertOnThisCRL ( const CPKIFCertificatePtr &  cert,
CPKIFCRLEntryPtr &  crlEntry 
) [virtual]

Interface: External

This function is used to determine if a specified certificate is listed on the CRL. If the certificate does appear on the CRL, true is returned and the crlEntry parameter points to the entry on the CRL related to the certificate.

Returns:
True ff the certificate does appear on the CRL, false otherwise
Exceptions:
CPKIFException(COMMON_INVALID_INPUT) 
Parameters:
cert  [in] The certificate to look for.
crlEntry  [out] The CRL entry for the certificate, if present.

Reimplemented from CPKIFCRL.

Definition at line 340 of file CapiCRL.cpp.

References COMMON_INVALID_INPUT, and TOOLKIT_ASN_SUBCOMPONENT.

bool CPKIFCapiCRL::AreThereAnyUnprocessedCriticalExtensions ( std::vector< CPKIFX509ExtensionPtr > &  processedExts  )  [virtual]

Interface: External

This function is used to determine if the CRL holds any unprocessed critical extensions. Process extensions are passed via the processedExts function.

Returns:
True if there are unprocessed critical extensions, false otherwise
Parameters:
processedExts  [in] A vector of the currently processed extensions.

Reimplemented from CPKIFCRL.

Definition at line 530 of file CapiCRL.cpp.

References ExtensionsMatch::SetRHS().

void CPKIFCapiCRL::GetEncodedExtensions ( CPKIFBufferPtr &  buf  )  [virtual]

Interface: External

This function retrives all the encoded extension

Returns:
None
Parameters:
buf  [in] A smart pointer to CPKIFBuffer object which will contain all the extensions

Reimplemented from CPKIFCRL.

Definition at line 171 of file CapiCRL.cpp.

void CPKIFCapiCRL::GetExtensionByOID ( const CPKIFOID oid,
CPKIFX509ExtensionPtr &  ref 
) [virtual]

Interface: External

This function retrives the extension identified by CPKIFOID object

Returns:
None
Parameters:
oid  [in] Identifies the extension sought
ref  [out] The extension (if present).

Reimplemented from CPKIFCRL.

Definition at line 143 of file CapiCRL.cpp.


Friends And Related Function Documentation

friend class CPKIFCAPIRepository2 [friend]

Definition at line 93 of file CapiCRL.h.


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

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