Hi, I am using openssl 0.9.8b.
I am doing CRL validation. In that process, I got the CRL status thru the following API: API: sk_X509_REVOKED_find(crl->crl->revoked, &rtmp). After that, I need find out the reason for revocation. I am using the API X509_REVOKED_get_ext_d2i(&rtmp, NID_crl_reason,NULL,NULL); But it is giving segmentation fault. Am I missing something? Could you please let me know your thoughts on how retrieve the crl revocation reason? I am using the following code snippet to retrieve the CRL revocation reason: **********************STARTS ********************** X509_REVOKED rtmp; rtmp.serialNumber = X509_get_serialNumber(cert); If (revoked ==1) { int reason = -1; char crl_rev_reason[256]; memset(crl_rev_reason, 0, 256); if (rtmp.extensions) { ASN1_ENUMERATED *asn= NULL; asn = X509_REVOKED_get_ext_d2i(&rtmp, NID_crl_reason,NULL,NULL); //It is giving probelm. Any wrong in this? if(asn != NULL) { reason = ASN1_ENUMERATED_get(asn); if (reason != -1) strcpy(crl_rev_reason, (char*) asn->data); } } } **********************ENDS ********************** Thanks a lot, -Surendra The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]