#include <PKIFOCSPMemoryHelper.h>
//declare an instance of PKIFOCSPMemoryHelper in support //of creating an encoded OCSP request PKIFOCSPMemoryHelper mhOCSPRequest; mhOCSPRequest.pTBSRequest = new TBSRequest; //populate members of pTBSRequest //create a CPKIFASNWrapper object to encode the structure //help by mhOCSPRequest CACASNWRAPPER_CREATE(TBSRequest, objPDU); ASN1OpenType* data1 = objPDU.Encode(mhOCSPRequest.pTBSRequest); CPKIFBufferPtr tmp(new CPKIFBuffer(data1->data, data1->numocts)); delete data1;
In the above example, note that memory is automatically deleted when mhOCSPRequest falls out of scope.
TSP-enforcing: No
Definition at line 47 of file PKIFOCSPMemoryHelper.h.
Public Member Functions | |
PKIFOCSPMemoryHelper () | |
virtual | ~PKIFOCSPMemoryHelper () |
Public Attributes | |
OCSPRequest * | pRequest |
OCSPResponse * | pResponse |
TBSRequest * | pTBSRequest |
PKIFOCSPMemoryHelper::PKIFOCSPMemoryHelper | ( | ) |
Interface: External
This function creates and initializes an instance of PKIFOCSPMemoryHelp. All public member variables are initialized to NULL. Member variables that are non-NULL when the destructor is invoked will be deleted, along with selected fields within the member variables.
Definition at line 176 of file PKIFOCSPMemoryHelper.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.
PKIFOCSPMemoryHelper::~PKIFOCSPMemoryHelper | ( | ) | [virtual] |
Interface: External
This function destroys PKIFOCSPMemoryHelp objects including the clean-up of the public member variables.
Definition at line 187 of file PKIFOCSPMemoryHelper.cpp.
References FreeRequestMembers(), FreeTBSRequestMembers(), LOG_STRING_DEBUG, pRequest, pResponse, pTBSRequest, and TOOLKIT_OCSP_ASN.
OCSPRequest* PKIFOCSPMemoryHelper::pRequest |
Definition at line 54 of file PKIFOCSPMemoryHelper.h.
Referenced by CPKIFOCSPRequest::Encode(), and ~PKIFOCSPMemoryHelper().
OCSPResponse* PKIFOCSPMemoryHelper::pResponse |
TBSRequest* PKIFOCSPMemoryHelper::pTBSRequest |
Definition at line 56 of file PKIFOCSPMemoryHelper.h.
Referenced by CPKIFTBSRequest::Encode(), and ~PKIFOCSPMemoryHelper().