`EVP_PKEY_CTX_dup` segmentation fault fix
authorafshinpir <afshinpir@users.noreply.github.com>
Wed, 22 Mar 2023 23:25:45 +0000 (12:25 +1300)
committerTomas Mraz <tomas@openssl.org>
Mon, 27 Mar 2023 10:53:25 +0000 (12:53 +0200)
commit864c70e43ea5f1d7fe20bfea457e53e79fd46b6e
tree202d0cb33f27ecf08940f2e2a411f903d6e057a9
parent1ffb6e19eeee95784456831da329cbccaa59fbcf
`EVP_PKEY_CTX_dup` segmentation fault fix

CLA: trivial
The the provider, context duplication method for signature, key
exchange, asymmetric cipher, and key encapsulation is optional. But if
they are missing, we will get a segmentation fault in `EVP_PKEY_CTX_dup`
because they are called without null pointer checking.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20581)
crypto/evp/pmeth_lib.c