Hi,
In an application we are using the certificate authentication to validate the
user and am using X509 certificates for this authentication. To read these
certificates am using the open-ssl functions in my code.
My requirement is to get the value of the extension from the configuration file
for each CA (certificate authority). That's the reason am using the below
function to get the value of the extension and my code looks like as below.
============================
STACK_OF(GENERAL_NAME) *altnames;
int nid=0;
nid=OBJ_sn2nid(trimmedExtensionName);
altnames = (STACK_OF(GENERAL_NAME) *)X509_get_ext_d2i(cert, nid, NULL, NULL);
================================================
In some cases the function X509_get_ext_d2i function is executing
successfully and in some case it is failing and when it fails the total system
is crashing. We are unable to decide why it is failing sometimes. Please let me
know if anybody faced the same problems or anybody aware of this function.
Regards
Sunil.
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