CPKIFCRL Class Reference

#include <CRL.h>

Inheritance diagram for CPKIFCRL:

Inheritance graph
[legend]
Collaboration diagram for CPKIFCRL:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFCRL class provides an interface to X.509 CRL objects. 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 CPKIFCRL 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 55 of file CRL.h.


Public Member Functions

 CPKIFCRL (void)
virtual ~CPKIFCRL (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 void PopulateEntryMap ()
virtual std::vector< std::pair
< CPKIFNamePtr, std::map
< std::string,
CPKIFCRLEntryPtr > > > 
GetCRLEntryMap ()
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)

Constructor & Destructor Documentation

CPKIFCRL::CPKIFCRL ( void   ) 

Interface: External

This function constructs a new CPKIFCRL object.

Returns:
None

Definition at line 280 of file CRL.cpp.

CPKIFCRL::~CPKIFCRL ( void   )  [virtual]

Interface: External

The function destroys an instance of CPKIFCRL.

Returns:
None

Definition at line 291 of file CRL.cpp.


Member Function Documentation

void CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 308 of file CRL.cpp.

References PEMDecode_l(), and Version().

CPKIFBufferPtr CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 442 of file CRL.cpp.

Referenced by operator==(), and CPKIFCapiCRL::operator==().

int CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 373 of file CRL.cpp.

References COMMON_INVALID_INPUT, COMMON_UNSUPPORTED_VERSION, TOOLKIT_ASN, and TOOLKIT_X509_ASN.

Referenced by Decode().

CPKIFNamePtr CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 407 of file CRL.cpp.

References CACASNWRAPPER_CREATE, COMMON_INVALID_INPUT, m_impl, and TOOLKIT_X509_ASN.

Referenced by CertOnThisCRL().

CPKIFBufferPtr CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 562 of file CRL.cpp.

CPKIFTimePtr CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 576 of file CRL.cpp.

References COMMON_INVALID_INPUT, CPKIFTime, GENERALIZEDTIME, m_impl, TOOLKIT_X509_ASN, and UTCTIME.

CPKIFTimePtr CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 609 of file CRL.cpp.

References COMMON_INVALID_INPUT, CPKIFTime, GENERALIZEDTIME, m_impl, TOOLKIT_X509_ASN, and UTCTIME.

CPKIFAlgorithmIdentifierPtr CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 642 of file CRL.cpp.

References COMMON_INVALID_INPUT, m_impl, and TOOLKIT_X509_ASN.

bool CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 708 of file CRL.cpp.

References Encoded().

void CPKIFCRL::PopulateEntryMap (  )  [virtual]

Interface: External

This function forces the population of the crl entries map

Returns:
None

Definition at line 733 of file CRL.cpp.

std::vector< pair< CPKIFNamePtr, std::map< std::string, CPKIFCRLEntryPtr > > > CPKIFCRL::GetCRLEntryMap (  )  [virtual]

Interface: External

This function is used to retrive map of CRL entries.

Returns:
A map of CRL Entries on this CRL

Definition at line 721 of file CRL.cpp.

bool CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 457 of file CRL.cpp.

References Issuer(), and stricmp.

bool CPKIFCRL::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 in CPKIFCapiCRL.

Definition at line 677 of file CRL.cpp.

References ExtensionsMatch::SetRHS().

void CPKIFCRL::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

Implements IPKIFHasExtensions.

Reimplemented in CPKIFCapiCRL.

Definition at line 248 of file CRL.cpp.

References CACASNWRAPPER_CREATE, and data.

void CPKIFCRL::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).

Implements IPKIFHasExtensions.

Reimplemented in CPKIFCapiCRL.

Definition at line 220 of file CRL.cpp.


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

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