Hi,

I wrote one C program to read the X509 certificate using OPENSSL
functions.
And I was trying access the different extensions and their values from
certificate.
First I am getting the NID of the extension using the below function.

-----------------------
nid=OBJ_sn2nid(trimmedExtensionName);
-----------------------

After getting the NID and am retrieving the value of the extension using
the above NID

The problem is if I give the name of the extension given as in the
certificate, the OBJ_sn2nid function is throwing NULL value that means
it is unable to find the extension.

If I write the same extension name which is given in the obj_mac.h then
the function is returning the value.

For example if I am trying to retrieve the value of the
subjectalternativename from the certificate. In the certificate this
extension name is written as "SubjectAlternativeName" where as in the
obj_mac.h it is there as "subjectAltName". If I pass this value then I
am getting the correct result.

At the sametime all the extensions in the certificate are not present in
the
obj_mac.h.

What is the link between this function and obj_mac.h?

Can I add any extensions to this file obj_mac.h?
If yes How to give the number of the NID?

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

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to