EVP: clear error when falling back from failed EVP_KEYMGMT_fetch()
authorRichard Levitte <levitte@openssl.org>
Fri, 10 Jan 2020 16:50:03 +0000 (17:50 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 21 Jan 2020 13:05:39 +0000 (14:05 +0100)
commit0b9dd3842f9bbe7a7c290187056a96827d848f52
tree9f693c50a02aedffdc2e0090aa5287917dd57453
parent967ef73013becef2aec3439f8c45204b24121018
EVP: clear error when falling back from failed EVP_KEYMGMT_fetch()

Since we're falling back to legacy, this isn't an error any more.
Among others the failed EVP_KEYMGMT_fetch() error shadows other errors
produced by the legacy code, which disrupts our test/evp_test runs.

We use the error stack mark to restore the error stack just right,
i.e. ERR_set_mark(), ERR_clear_last_mark() and ERR_pop_to_mark()

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/10803)
crypto/evp/exchange.c
crypto/evp/m_sigver.c
crypto/evp/pmeth_fn.c
crypto/evp/signature.c