Hello,
David Schwartz wrote:
If you want to compare the DER encodings, you need to get the DER encoding,
not the number. If you want to compare the numbers, '03' should compare
equal to '3' anyway. What are you trying to do?
DS
I just want to extract the public key to store it in another place
> Thank's for the answer, but i still got a little problem,
> when i run this code :
> EVP_PKEY *key2 = X509_get_pubkey(certif.getX509Certificate());
> cout << BN_bn2hex(key2->pkey.rsa->n);
> I miss the first 00 of the public key...
> How can i get them ?
The leading '00' is part of the DER enc
Hello,
Thank's for the answer, but i still got a little problem, when i run
this code :
EVP_PKEY *key2 = X509_get_pubkey(certif.getX509Certificate());
cout << BN_bn2hex(key2->pkey.rsa->n);
I miss the first 00 of the public key...
How can i get them ?
[EMAIL PROTECTED] wrote:
Hello,
[EMAI
Hello,
[EMAIL PROTECTED] wrote on 04/15/2008 06:30:10 PM:
> 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 hex