[openssl-users] openssl-users Digest, Vol 28, Issue 21
Richard Levitte
levitte at openssl.org
Wed Mar 22 19:08:37 UTC 2017
In message <787239451.2530096.1490206287248 at mail.yahoo.com> on Wed, 22 Mar 2017 18:11:27 +0000 (UTC), Christian Adja <christian_adja at yahoo.it> said:
christian_adja> Thanks for the response, but haven't the evp_pkey struct of the public
christian_adja> key. I' ve only the an bytes string that i retrieved from IEEE cert
christian_adja> with "PEM_bytes_read_bio()". Now in want to form the ec_key struct and
christian_adja> then the evp_pkey struct.
I'm not sure how IEEE certs differ from X.509 certs... if they don't,
you're better off reading the cert with PEM_read_bio_X509() and
extracting the public key with X509_get0_pubkey() or X509_get0_pubkey().
If IEEE certs differ in format, you must first know the exact byte
content, where the public key is in there, make sure it's encoded in
DER, and use d2i_EC_PUBKEY() to make a EC_KEY from those bytes.
Cheers,
Richard
--
Richard Levitte levitte at openssl.org
OpenSSL Project http://www.openssl.org/~levitte/
More information about the openssl-users
mailing list