Closed
Description
- Version: master
- Platform: N/A
- Subsystem: crypto
I noticed today when working with public keys and verifying signatures that I would get generic error messages when there was a problem reading a public key, for example: PEM_read_bio_PUBKEY failed
Whereas if I check the OpenSSL error stack, I find more detailed/useful error strings, for example:
error:10067066:elliptic curve routines:ec_GFp_simple_oct2point:invalid encoding
error:10098010:elliptic curve routines:o2i_ECPublicKey:EC lib
error:100D708E:elliptic curve routines:ECKEY_PUB_DECODE:decode error
error:0B07707D:x509 certificate routines:X509_PUBKEY_get:public key decode error
error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 lib
(The first being the most useful probably)
It would be great to have at least the first error message instead of the more generic one.