CPKIFTBSRequest Class Reference

#include <TBSRequest.h>

Inheritance diagram for CPKIFTBSRequest:

Inheritance graph
[legend]
Collaboration diagram for CPKIFTBSRequest:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFTBSRequest class provides an interface to TBSRequest objects. The ASN.1 definition for TBSRequest is given below:

  TBSRequest ::= SEQUENCE {
    version [0] EXPLICIT Version DEFAULT v1,
    requestorName [1] EXPLICIT GeneralName OPTIONAL,
    requestList SEQUENCE OF Request,
    requestExtensions [2] EXPLICIT Extensions OPTIONAL
  }

TSP-enforcing: No

Definition at line 41 of file TBSRequest.h.


Public Member Functions

 CPKIFTBSRequest ()
 CPKIFTBSRequest (const CPKIFBufferPtr &r)
virtual ~CPKIFTBSRequest ()
int GetVersion () const
void SetRequestorName (CPKIFGeneralNamePtr &gn)
CPKIFGeneralNamePtr GetRequestorName () const
void AddRequest (CPKIFRequestPtr &req)
void GetRequests (CPKIFRequestList &reqs)
void SetNonce (CPKIFBufferPtr &nonce)
CPKIFBufferPtr GetNonce () const
void SetGenerateNonce (bool generateNonce, IPKIFMediator *m=NULL)
bool GetGenerateNonce () const
CPKIFBufferPtr Encode ()
void GetExtension (const CPKIFOID &oid, CPKIFX509ExtensionPtr &ref)
void GetExtensionByOID (const CPKIFOID &oid, CPKIFX509ExtensionPtr &ref)
void GetEncodedExtensions (CPKIFBufferPtr &buf)

Friends

struct CPKIFTBSRequestImpl

Constructor & Destructor Documentation

CPKIFTBSRequest::CPKIFTBSRequest (  ) 

Interface: External

Default constructor

Returns:
None

Definition at line 98 of file TBSRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.

CPKIFTBSRequest::CPKIFTBSRequest ( const CPKIFBufferPtr &  r  ) 

Interface: External

This function is used to create and initialize CPKIFTBSRequest objects. It is used internally by PKIF when parsing OCSP objects. It is not used by applications.

Returns:
None
Parameters:
r  [in] Reference to a TBSRequest structure

Definition at line 119 of file TBSRequest.cpp.

References CACASNWRAPPER_CREATE, LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.

CPKIFTBSRequest::~CPKIFTBSRequest (  )  [virtual]

Interface: External

This function destroys CPKIFTBSRequest objects.

Returns:
None

Definition at line 256 of file TBSRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.


Member Function Documentation

int CPKIFTBSRequest::GetVersion (  )  const

Interface: External

This function returns the integer value representing the version of the corresponding TBSRequest object.

Returns:
Integer value representing the version of the corresponding TBSRequest object

Definition at line 272 of file TBSRequest.cpp.

void CPKIFTBSRequest::SetRequestorName ( CPKIFGeneralNamePtr &  gn  ) 

Interface: External

This function is used to set the requestor name associated with a CPKIFTBSRequest object.

Returns:
None
Parameters:
gn  [in] Reference to a smart pointer to a CPKIFGeneralName object

Definition at line 285 of file TBSRequest.cpp.

CPKIFGeneralNamePtr CPKIFTBSRequest::GetRequestorName (  )  const

Interface: External

This function is used to get the requestor name associated with a CPKIFTBSRequest object.

Returns:
A smart pointer to CPKIFGeneralName object

Definition at line 298 of file TBSRequest.cpp.

void CPKIFTBSRequest::AddRequest ( CPKIFRequestPtr &  request  ) 

Interface: External

This function is used to get add a request to the collection of requests associated with a CPKIFTBSRequest object.

Returns:
None
Parameters:
request  [in] Reference to a smart pointer to a CPKIFRequest object.

Definition at line 309 of file TBSRequest.cpp.

void CPKIFTBSRequest::GetRequests ( CPKIFRequestList reqs  ) 

Interface: External

This function populates returns request list.

Returns:
None
Parameters:
reqs  [out] Request list

Definition at line 188 of file TBSRequest.cpp.

void CPKIFTBSRequest::SetNonce ( CPKIFBufferPtr &  nonce  ) 

Interface: External

This function is used to set the nonce associated with a CPKIFTBSRequest object

Returns:
None
Parameters:
nonce  [in] Reference to a smart pointer to a CPKIFBuffer object

Definition at line 324 of file TBSRequest.cpp.

CPKIFBufferPtr CPKIFTBSRequest::GetNonce (  )  const

Interface: External

This function is used to get the nonce associated with a CPKIFTBSRequest object

Returns:
A smart pointer to CPKIFBuffer object

Definition at line 337 of file TBSRequest.cpp.

Referenced by Encode().

void CPKIFTBSRequest::SetGenerateNonce ( bool  generateNonce,
IPKIFMediator m = NULL 
)

Interface: External

This function is used to turn on/off the auto-nonce generation feature of a CPKIFTBSRequest object.

When the generateNonce parameter is set to true, a 20 byte nonce will be generated automatically and included in the encoded request. In cases where an IPKIFMediator pointer is not passed via SetGenerateNonce or when the IPKIFMediator pointer passed via SetGenerateNonce does not provide access to the IPKIFCryptoMisc interface, a temporary instance of CPKIFCAPIRaw will be created and used to generate a random nonce value. Otherwise, the application-provided interface to IPKIFCryptoMisc will be used.

When the generateNonce parameter is set to false, a nonce is not generated automatically. In these cases a nonce value will appear in the resulting request only if the calling application passes a nonce value via the SetNonce function.

By default, the GenerateNonce property is set to true. Nonce values generated automatically are always 20 bytes in size.

Returns:
None
Parameters:
generateNonce  [in] Boolean value that indicates whether or not a nonce value should be randomly generated
m  [in] Pointers to a mediator object that contains an implementation of IPKIFCryptoMisc to use when generating a nonce value

Definition at line 365 of file TBSRequest.cpp.

bool CPKIFTBSRequest::GetGenerateNonce (  )  const

Interface: External

This function indicates if auto-nonce generation feature is on or off

Return values:
True if auto-nonce generation feature is on
True if auto-nonce generation feature is off

Definition at line 382 of file TBSRequest.cpp.

CPKIFBufferPtr CPKIFTBSRequest::Encode (  ) 

void CPKIFTBSRequest::GetExtension ( const CPKIFOID oid,
CPKIFX509ExtensionPtr &  ref 
)

Interface: External

This function is used to get an extension associated with a CPKIFTBSRequest object

Returns:
None
Parameters:
oid  [in] Reference to a CPKIFOID object containing the object identifier of the extension to retrieve
ref  [out] Reference to a smart pointer to a CPKIFX509Extension object

Definition at line 230 of file TBSRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.

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

Interface: External

This function is used to retrieve an extension from a TBSRequest object.

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

Implements IPKIFHasExtensions.

Definition at line 598 of file TBSRequest.cpp.

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

Interface: External

This function returns a smart pointer to CPKIFBuffer object which will contain the encoded extension

Returns:
A smart pointer to CPKIFBuffer object which will contain the encoded extension
Parameters:
buf  [out] A reference to a smart pointer to CPKIFBuffer object which will contain the encoded extension

Implements IPKIFHasExtensions.

Definition at line 562 of file TBSRequest.cpp.

References CACASNWRAPPER_CREATE.


Friends And Related Function Documentation

friend struct CPKIFTBSRequestImpl [friend]

Definition at line 43 of file TBSRequest.h.


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

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