The "openssl" command line tool works fine. However, I have to use this in a
C program. Therefore I was asking the API function name which can extract
these information from within the C code.



-----Original Message-----
From: Brian Candler [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 01, 2006 6:02 PM
To: Ambarish Mitra
Cc: openssl-users@openssl.org
Subject: Re: Extract Issuer / Subject from X509 certificate


On Wed, Mar 01, 2006 at 05:38:36PM +0530, Ambarish Mitra wrote:
>    Given such an input, I have to extract the subject and the issuer (and
>    possibly serial number). Is there any API for this? If anyone can at
>    least give me the initial first steps, it will be helpful.

Try using the openssl command line tool first:

    openssl x509 -in foo.pem -noout -subject -issuer -serial

If that works for you, then you can use the source code of the x509 tool
itself as your guide to using the openssl API. Or if you're really lazy, you
can shell out to 'openssl' and parse the response you get back.

HTH,

Brian.

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

Reply via email to