> From: owner-openssl-us...@openssl.org On Behalf Of sarym binome
> Sent: Monday, 13 April, 2009 15:19
> i want to extract the the serial number or the subject name from an
X509 certificate
> i used X509_get_serialNumber but i don't know how can i use it ,
hi all
i want to extract the the serial number or the subject name from an X509
certificate
i used X509_get_serialNumber but i don't know how can i use it , i can't print
it cause it's a struct
this is my certificate
Certificate:
Data:
Version: 1 (0x0)
Serial
Hi, I have the following code
char serial[300];
i2a_ASN1_INTEGER(bio, X509_get_serialNumber(x509));
n = BIO_read(bio, serial, min(BIO_pending(bio), 299));
n = max(n, 0);
serial[n] = 0;
BIO_flush(bio);
And I get the following result inside serial
3030303031303030303030303030303030313134
So