Yes, it does take a while to dig through the docs to find things...

         ASN1_INTEGER * val = X509_get_serialNumber(x);
         int len = ASN1_STRING_length(val);
         unsigned char * p = ASN1_STRING_data(val);

Then, you can go through the character string to build up as you want.

----- Original Message -----
> Hello,
> I 'd like to retrieve serial number from X509 certificate, then store
> this sn in a memory pointed by char* sn ( in PEM or DER format). I did
> not find any function...
> Is there any combination of some functions to obtain it ?
> Thanks for your help.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to