CPKIFSCVPCertID Class Reference

#include <SCVPCertID.h>

Collaboration diagram for CPKIFSCVPCertID:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFSCVPCertID class provides an interface to SCVP SCVPCertID object.

TSP-enforcing: No

Definition at line 31 of file SCVPCertID.h.


Public Member Functions

 CPKIFSCVPCertID ()
 CPKIFSCVPCertID (const CPKIFBufferPtr &)
virtual ~CPKIFSCVPCertID (void)
void CalculateCertHash (CPKIFBufferPtr &check)
const CPKIFBufferPtr GetCertHash () const
void SetHashAlgorithm (CPKIFAlgorithmIdentifierPtr &value)
const CPKIFAlgorithmIdentifierPtr GetHashAlgorithm () const
void SetSerialNumber (const char *serialNumber)
const char * GetSerialNumber () const
void SetIssuerName (CPKIFGeneralNameListPtr &issuerName)
void GetIssuerName (CPKIFGeneralNameListPtr &issuerName) const
void SetMediator (IPKIFMediatorPtr &med)

Constructor & Destructor Documentation

CPKIFSCVPCertID::CPKIFSCVPCertID (  ) 

Interface: External

This function is used to create and initialize CPKIFQuery object.

Returns:
None

Definition at line 44 of file SCVPCertID.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.

CPKIFSCVPCertID::CPKIFSCVPCertID ( const CPKIFBufferPtr &  pkcRef  ) 

Interface: External

This constructor is internally invoked; it will throw a std::bad_alloc exception if allocation of memory fails or ASN.1 decoding errors if the extension cannot be parsed.

Returns:
None
Exceptions:
std::bad_alloc 
Parameters:
pkcRef  [in] A reference to a smart pointer to CPKIFBuffer object containing der encoded PKCReference

Definition at line 59 of file SCVPCertID.cpp.

References CACASNWRAPPER_CREATE, COMMON_INVALID_INPUT, and TOOLKIT_SCVP_ASN.

CPKIFSCVPCertID::~CPKIFSCVPCertID ( void   )  [virtual]

Interface: External

This function destroys instances of CPKIFSCVPCertID.

Returns:
None

Definition at line 119 of file SCVPCertID.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.


Member Function Documentation

void CPKIFSCVPCertID::CalculateCertHash ( CPKIFBufferPtr &  cert  ) 

Interface: External

This function calculates the hash of the certificate.

Returns:
Smart pointer to CPKIFBuffer object containing the calculated hash
Parameters:
cert  [in] A smart pointer to CPKIFBuffer object containinga DER encoded certificate for which the hash will be calculated.

Definition at line 197 of file SCVPCertID.cpp.

References g_md5, g_sha256, g_sha384, g_sha512, CPKIFCryptoMediator2::HashFinal(), CPKIFCryptoMediator2::HashInit(), CPKIFCryptoMediator2::HashUpdate(), MAXHASH, PKIFCRYPTO::MD5, PKIFCRYPTO::SHA1, PKIFCRYPTO::SHA256, PKIFCRYPTO::SHA384, PKIFCRYPTO::SHA512, and TOOLKIT_SCVP.

const CPKIFBufferPtr CPKIFSCVPCertID::GetCertHash (  )  const

Interface: External

This function retrived the certificate hash

Returns:
Smart pointer to CPKIFBuffer object containing certificate hash

Definition at line 186 of file SCVPCertID.cpp.

void CPKIFSCVPCertID::SetHashAlgorithm ( CPKIFAlgorithmIdentifierPtr &  hashAlg  ) 

Interface: External

This function sets the hash oid

Returns:
None

Definition at line 262 of file SCVPCertID.cpp.

const CPKIFAlgorithmIdentifierPtr CPKIFSCVPCertID::GetHashAlgorithm (  )  const

Interface: External

This function retrived the hash oid

Returns:
Smart pointer to CPKIFAlgorithmIdentifier object identifying the hash.

Definition at line 273 of file SCVPCertID.cpp.

void CPKIFSCVPCertID::SetSerialNumber ( const char *  issuerSerialNumber  ) 

Interface: External

This function gets the issuer serial number.

Returns:
None
Parameters:
issuerSerialNumber  [in] A pointer to a NULL-terminated buffer containing the serial number from the issuer certificate.

Definition at line 161 of file SCVPCertID.cpp.

const char * CPKIFSCVPCertID::GetSerialNumber (  )  const

Interface: External

This function gets the issuer serial number. The issuer serial number is retrived from the issuer certificate.

Returns:
A pointer to a NULL-terminated buffer containing the serial number from the issuer certificate.

Definition at line 175 of file SCVPCertID.cpp.

void CPKIFSCVPCertID::SetIssuerName ( CPKIFGeneralNameListPtr &  issuerName  ) 

Interface: External

This function sets issuer name.

Returns:
None
Parameters:
issuerName  [in] Smart pointer to CPKIFGeneralNameList object containing issuer name

Definition at line 134 of file SCVPCertID.cpp.

void CPKIFSCVPCertID::GetIssuerName ( CPKIFGeneralNameListPtr &  issuerName  )  const

Interface: External

This function gets issuer name.

Returns:
None
Parameters:
issuerName  [out] Smart pointer to CPKIFGeneralNameList object containing issuer name

Definition at line 147 of file SCVPCertID.cpp.

void CPKIFSCVPCertID::SetMediator ( IPKIFMediatorPtr med  ) 

Interface: External

This function sets the mediator that will be used to calculate the hash

Returns:
None

Definition at line 285 of file SCVPCertID.cpp.


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