Hello,

I'm looking to get back the public key from a x509 v3 certificate.

I use the function ASN1_BIT_STRING * key = 509_get0_pubkey_bitstr(x509* certificate); but i don't get what i want : I get (from a conversion to hexadecimal thanks to : cout << setw(2) << setfill('0') << right << hex << (int) key->data[c]; )
30:82:01:0A:02:82:01:01:___the_public_key___:02:03:01:00:01

How can i get only the public key ?

Thank's in advance,
Have a nice day

Pierre delcour
[EMAIL PROTECTED]

ps : 30:82:01:0A:02:82:01:01 appears for a 2048 bit key. 01:00:01 seems to be the exponent.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to