CPKIFValPolRequest Class Reference

#include <ValPolRequest.h>

Collaboration diagram for CPKIFValPolRequest:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFValPolRequest class provides an interface to SCVP ValPolRequest object.

TSP-enforcing: No

Definition at line 30 of file ValPolRequest.h.


Public Member Functions

 CPKIFValPolRequest ()
 CPKIFValPolRequest (const CPKIFBufferPtr &)
virtual ~CPKIFValPolRequest (void)
int GetVersion () const
void SetVersion (int v)
void SetNonce (CPKIFBufferPtr &nonce)
const CPKIFBufferPtr GetNonce () const
void SetGenerateNonce (bool generateNonce)
void SetGenerateNonce (bool generateNonce, IPKIFMediatorPtr &m)
bool GetGenerateNonce () const
CPKIFBufferPtr Encode () const
void Decode (CPKIFBufferPtr &msg)

Constructor & Destructor Documentation

CPKIFValPolRequest::CPKIFValPolRequest (  ) 

Interface: External

This function is used to create and initialize CPKIFValPolRequest object.

Returns:
None

Definition at line 169 of file ValPolRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.

CPKIFValPolRequest::CPKIFValPolRequest ( const CPKIFBufferPtr &   ) 

CPKIFValPolRequest::~CPKIFValPolRequest ( void   )  [virtual]

Interface: External

This function destroys instances of CPKIFValPolRequest.

Returns:
None

Definition at line 187 of file ValPolRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.


Member Function Documentation

int CPKIFValPolRequest::GetVersion (  )  const

Interface: External

This function is returns the SCVP version of a ValPolRequest. PKIF only supports version 1 requests.

Returns:
The version of SCVP ValPolRequest.

Definition at line 329 of file ValPolRequest.cpp.

void CPKIFValPolRequest::SetVersion ( int  v  ) 

Interface: External

This function sets the version. Default version is 1

Returns:
None

Definition at line 341 of file ValPolRequest.cpp.

void CPKIFValPolRequest::SetNonce ( CPKIFBufferPtr &  nonce  ) 

Interface: External

This function is used to set the nonce associated with a CPKIFValPolRequest instance.

Returns:
None
Parameters:
nonce  [in] Reference to a CPKIFStringPtr object containing a NULL terminated ASCII Hex representation of a nonce value to include in a TimeStampRequest

Definition at line 203 of file ValPolRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.

const CPKIFBufferPtr CPKIFValPolRequest::GetNonce (  )  const

Interface: External

This function is used to get the nonce associated with a CPKIFValPolRequest instance.

Returns:
Smart pointer to CPKIFBuffer object containing the nonce

Definition at line 219 of file ValPolRequest.cpp.

Referenced by Encode().

void CPKIFValPolRequest::SetGenerateNonce ( bool  generateNonce  ) 

Interface: External

This function is used to set an indicator that is used to turn on/off automatic nonce generation.

Returns:
None
Parameters:
generateNonce  [in] Boolean value indicating whether a nonce value should be randomly generated when the TimeStampRequest is encoded

Definition at line 237 of file ValPolRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.

Referenced by IPKIFScvpClient::FetchValPol().

void CPKIFValPolRequest::SetGenerateNonce ( bool  generateNonce,
IPKIFMediatorPtr m 
)

Interface: External

This function is used to set an indicator that is used to turn on/off automatic nonce generation. The optional m parameter to SetGenerateNonce can be used to pass a mediator containing the IPKIFCryptoMisc interface to use when generating the nonce value. Automatic nonce generation is disabled by default.

Returns:
None
Parameters:
generateNonce  [in] Boolean value indicating whether a nonce value should be randomly generated when the TimeStampRequest is encoded
m  [in] Reference to a smart pointer to a IPKIFMediator to use when generating the random nonce value

Definition at line 255 of file ValPolRequest.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.

bool CPKIFValPolRequest::GetGenerateNonce (  )  const

Interface: External

This function is used to get an indicator that is used to turn on/off automatic nonce generation.

Returns:
The GetGenerateNonce function returns true if nonces are randomly generated at Encode-time and false otherwise.

Definition at line 274 of file ValPolRequest.cpp.

CPKIFBufferPtr CPKIFValPolRequest::Encode (  )  const

Interface: External

This function is used to generate an encoded a ValPolRequest. If auto-nonce generation is enabled, a randomly generated nonce value will be included in the request.

Returns:
A buffer that contains the encoded CVRequest
Exceptions:
CPKIFSCVPException(SCVP_MISSING_REQUIRED_FIELD) 
CPKIFSCVPException(COMMON_NOT_IMPLEMENTED) 

Definition at line 356 of file ValPolRequest.cpp.

References CACASNWRAPPER_CREATE, GetNonce(), PKIFSCVPMemoryHelper::pValPolRequest, and TOOLKIT_SCVP.

Referenced by IPKIFScvpClient::FetchValPol().

void CPKIFValPolRequest::Decode ( CPKIFBufferPtr &  msg  ) 

Interface: External

This function is used to decode an encoded cvrequest request.

Returns:
None
Exceptions:
CPKIFSCVPException(COMMON_INVALID_INPUT) 
CPKIFSCVPException(MSG_DECODE_FAILED) 
Parameters:
msg  [in] Reference to a smart pointer to a CPKIFBuffer object containing a ValPolRequest to decode

Definition at line 289 of file ValPolRequest.cpp.

References COMMON_INVALID_INPUT, MSG_DECODE_FAILED, and TOOLKIT_SCVP_ASN.


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

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