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.

-- 
View this message in context: 
http://www.nabble.com/Regarding-the-obj_mac.h-tp14710890p14710890.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

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

Reply via email to