Fix PKCS12_create() so that a fetch error is not added to the error stack.
authorShane Lontis <shane.lontis@oracle.com>
Wed, 26 May 2021 00:26:27 +0000 (10:26 +1000)
committerTomas Mraz <tomas@openssl.org>
Fri, 28 May 2021 11:54:19 +0000 (13:54 +0200)
commitda5f770ae31e0df17b1b8a143d13fee805d8deb3
treeafdbfaad00cf99fa4180a98e7161ba108ddef5d2
parent6c014da0b2d84f657a6ea5145b5e90ddc9913ebe
Fix PKCS12_create() so that a fetch error is not added to the error stack.

Fixes #15392

PBE algorithms such as NID_pbe_WithSHA1And3_Key_TripleDES_CBC will
currently always fail to the EVP_CIPHER_fetch() call, so the fallback to
a legacy algorithm always happens. In this case the error stack should
ignore the fetch error.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15473)
crypto/pkcs12/p12_sbag.c
test/pkcs12_format_test.c