#include <TBSRequest.h>
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 |
CPKIFTBSRequest::CPKIFTBSRequest | ( | ) |
Interface: External
Default constructor
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.
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.
Definition at line 256 of file TBSRequest.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.
int CPKIFTBSRequest::GetVersion | ( | ) | const |
Interface: External
This function returns the 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.
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.
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.
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.
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
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
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.
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
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 | ( | ) |
Interface: External
This function is used to encode a TBSRequest object.
Definition at line 393 of file TBSRequest.cpp.
References CACASNWRAPPER_CREATE, ConvertStringToASN1OBJID(), CopyGeneralName(), CopyOID(), g_nullParams, g_ocspNonce, GetNonce(), LOG_STRING_DEBUG, NEW_NEXT_AND_ADVANCE, NEW_NODE, PKIFOCSPMemoryHelper::pTBSRequest, SET_HEAD_TAIL_INCREMENT, and TOOLKIT_OCSP_ASN.
void CPKIFTBSRequest::GetExtension | ( | const CPKIFOID & | oid, | |
CPKIFX509ExtensionPtr & | ref | |||
) |
Interface: External
This function is used to get an extension associated with a CPKIFTBSRequest object
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.
CPKIFException(COMMON_INVALID_INPUT) | ||
CPKIFException(COMMON_ALREADY_INITIALIZED) |
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
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.
friend struct CPKIFTBSRequestImpl [friend] |
Definition at line 43 of file TBSRequest.h.