Hi and thanks for your continued help!

Meanwhile I did indeed define the syntax of the extension and get my way 
through to the leaf being an ASN1_OBJECT representing the professionOID. Now my 
lack of knowledge strikes back:

I want to check, whether a professionOID of "1.2.276.0.76.4.88" is included in 
the extension. What I get from i2d_ASN1_OBJECT(profoid, NULL) is plain and 
simple "9". I still fail to find the method that will present this notation of 
an OID...

Mit freundlichen Grüßen / Kind regards
 Natanael Mignon

________________________________________
Von: owner-openssl-us...@openssl.org [owner-openssl-us...@openssl.org] im 
Auftrag von Dr. Stephen Henson [st...@openssl.org]
Gesendet: Samstag, 22. August 2009 13:50
An: openssl-users@openssl.org
Betreff: Re: Accessing unknown certificate extensions by OID

Yes you can call X509_EXTENSION_get_data() to get the encoded extension as an
ASN1_OCTET_STRING structure. From that ASN1_STRING_length() and
ASN1_STRING_data() will get you the data itself.

Then it is ASN1 parsing time... there are numerous examples in the OpenSSL
code itself, see crypto/cms/cms_asn1.c for a more recent one. Once you have an
appropriate ASN1 module you can use d2i_foo() (or whatever you call it) to
decode the data you extracted above.

Steve.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to