Re: How to retrieve serial number

2011-04-14 Thread Steven Friedman
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.

How to retrieve serial number

2011-04-14 Thread ikuzar
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.