Aftab Alam wrote:
Hi All,

I’ve been finding it difficult to manage memory while using OpenSSL d2i functions.





I have written the following function to Sign OCSP request.



      unsigned char *in = new unsigned char[OCSPRequestData.GetLength()];

      memcpy(in, OCSPRequestData.GetData(), OCSPRequestData.GetLength());

pOCSPRequest = d2i_OCSP_REQUEST(NULL, &in, OCSPRequestData.GetLength());



now when I try to use

if(in)

delete[] in;

please read the FAQ "How do I read or write a DER encoded buffer using the ASN1 functions?"


Nils
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to