diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-28 16:14:14 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-30 20:49:44 +0200 |
commit | 66066e1bba041459c2f879666b79e4a2158f5905 (patch) | |
tree | 3ad2f2014c9a05cd720746fe601dc6500c8b6946 /crypto/evp/evp_pkey.c | |
parent | 9032c2c11b2f14dcdbd253b470abc595a07a6c51 (diff) |
Prune low-level ASN.1 parse errors from error queue in der2key_decode() etc.
Also adds error output tests on loading key files with unsupported algorithms to 30-test_evp.t
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13023)
Diffstat (limited to 'crypto/evp/evp_pkey.c')
-rw-r--r-- | crypto/evp/evp_pkey.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index f31d1d68f8..45666a2c42 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -41,10 +41,8 @@ EVP_PKEY *EVP_PKCS82PKEY_with_libctx(const PKCS8_PRIV_KEY_INFO *p8, } if (pkey->ameth->priv_decode_with_libctx != NULL) { - if (!pkey->ameth->priv_decode_with_libctx(pkey, p8, libctx, propq)) { - EVPerr(0, EVP_R_PRIVATE_KEY_DECODE_ERROR); + if (!pkey->ameth->priv_decode_with_libctx(pkey, p8, libctx, propq)) goto error; - } } else if (pkey->ameth->priv_decode != NULL) { if (!pkey->ameth->priv_decode(pkey, p8)) { EVPerr(0, EVP_R_PRIVATE_KEY_DECODE_ERROR); |