Fix Segfault in EVP_PKEY_CTX_dup when the ctx has an undefined operation.
authorShane Lontis <shane.lontis@oracle.com>
Wed, 25 Nov 2020 05:21:52 +0000 (15:21 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Mon, 14 Dec 2020 01:30:40 +0000 (11:30 +1000)
commitac7750bb5ec4238c4f6514eb174c1bd584728f05
tree083ed5760cb7fae98291f8f615e6b5f484b9386a
parentc739222b5ad68fa23bfdf4807106769f9428506c
Fix Segfault in EVP_PKEY_CTX_dup when the ctx has an undefined operation.

Fixes #12438

Note: This worked in 1.1.1 so just returning an error is not valid.

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/13505)
crypto/evp/pmeth_lib.c
doc/man3/EVP_PKEY_CTX_new.pod
test/evp_pkey_provided_test.c