I want to have OCSP_CERTID field from the OCSP_REQUEST in binary format. I tried to get it using i2d_OCSP_CERTID(bp,certID). When i call this function my program segfaults. I also tried ASN1_i2d_bio(i2d_OCSP_CERTID,bp,unsigned char *) and got same segmentation fault.

I am using openssl-0.9.7c on Windows 2000.

My code is something like this.

OCSP_REQUEST *req;
OCSP_CERTID *id = NULL;
BIO *bp = NULL,*bio = NULL;

req = OCSP_REQUEST_new();
ok = OCSP_create_request_new(ctx,&req,&id);
i2d_OCSP_REQUEST_bio(bio,req); --------This function works fine.
         //ANS1_i2d_bio(i2d_OCSP_CERTID,bp,(unsigned char *)id);
       i2d_OCSP_CERTID(bp,id);

Can someone tell me what am i doing wrong?

Amar

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to