Fix potential problems with EVP_PKEY_CTX_new() with engine set
authorTomas Mraz <tomas@openssl.org>
Thu, 22 Jul 2021 13:01:53 +0000 (15:01 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 23 Jul 2021 14:38:46 +0000 (16:38 +0200)
commit4d4de19e9c77f36cc5ab71df77a6eb1253031d4c
tree7b738ad98bc24759d6b94b0abcb79fab54995b4d
parent4bd60d486cbe59cc7d086985d42a5220fd12ce32
Fix potential problems with EVP_PKEY_CTX_new() with engine set

If an engine is non-NULL in EVP_PKEY_CTX_new() call an assert might
have been incorrectly triggered or the engine might be finished
without being inited.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16137)
crypto/evp/pmeth_lib.c