On Wed, Jul 25, 2012, Puneet Khunteta wrote:

> Hello,
> 
> I am an user of openssl library.
> I am seeking for a method to get the "Extended Key Usage" field from the
> X509 certificate .
> I will be grateful if you can provide me a sample code in c.
> 

You can retrieve a structure representing any supported extension using the
function X509_get_ext_d2i. In the case of EKU you get back a
STACK_OF(ASN1_OBJECT) which you can then examine.

Have a look in the function x509v3_cache_extension in crypto/x509v3/v3_purp.c
for an example.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to