[openssl-users] openssl-users Digest, Vol 28, Issue 21

Christian Adja christian_adja at yahoo.it
Wed Mar 22 19:18:40 UTC 2017


Ok, thanks but the key is not in DER but COER, there are ways to transform it in DER.
Thanks
Best regards
Christian Adja
 

    Il Mercoledì 22 Marzo 2017 20:08, Richard Levitte <levitte at openssl.org> ha scritto:
 

 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/


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20170322/9f2078e9/attachment.html>


More information about the openssl-users mailing list