[openssl-users] reading DER format public keys

Michael Richardson mcr at sandelman.ca
Fri Sep 15 15:57:17 UTC 2017

The PEM_* routines, as documented at:
do not claim to read DER format input. (Actually they don't say anything about DER).
Ruby's library uses:
    pkey = PEM_read_bio_PUBKEY(bio, NULL, ossl_pem_passwd_cb, (void *)pass);

It's documentation claims it read DER, which either it's wrong, or the
underlying ruby extension or SSL code has changed.

There must be a way to read DER format public keys.
I'm suspecting that maybe the magic is in the way the BIO is created?
(FAQ question PROG03, hints this for PKCS7 processing).

Going to read the source code.

]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        | network architect  [
]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20170915/1541afd4/attachment.sig>

More information about the openssl-users mailing list