EVP: Don't shadow EVP_PKEY_CTX_new* error records
authorRichard Levitte <levitte@openssl.org>
Thu, 3 Sep 2020 10:42:43 +0000 (12:42 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 8 Sep 2020 04:26:19 +0000 (06:26 +0200)
commit20d56d6d62d98c3b2649afd2d20e0c2cc39afce1
tree598ebd2de51c49109cc1e7bcff41a8abf0e204ff
parent509144964ba69b69a90269da52a2dc3acb3149e6
EVP: Don't shadow EVP_PKEY_CTX_new* error records

There are places that add an ERR_R_MALLOC_FAILURE record when any of
EVP_PKEY_CTX_new*() return NULL, which is 1) inaccurate, and 2)
shadows the more accurate error record generated when trying to create
the EVP_PKEY_CTX.

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
(Merged from https://github.com/openssl/openssl/pull/12785)
crypto/evp/p_lib.c