EVP: when setting the operation to EVP_PKEY_OP_UNDEFINED, clean up!
authorRichard Levitte <levitte@openssl.org>
Wed, 6 May 2020 18:48:25 +0000 (20:48 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 8 May 2020 13:15:16 +0000 (15:15 +0200)
commitc7fa92979c5964966efa298bf2a40ff451ee7482
tree7bfdf9e74ccde00fce0c976be3f01600e47b3aff
parent73d6b4efe6835a6c97ce61df6bf339b0903e5b7a
EVP: when setting the operation to EVP_PKEY_OP_UNDEFINED, clean up!

There were a few instances where we set the EVP_PKEY_CTX operation to
EVP_PKEY_OP_UNDEFINED, but forgot to clean up first.  After the
operation is made undefined, there's no way to know what should be
cleaned away, so that must be done first, in all spots.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11750)
crypto/evp/exchange.c
crypto/evp/pmeth_fn.c
crypto/evp/pmeth_gn.c
crypto/evp/signature.c