]> git.ipfire.org Git - thirdparty/openssl.git/commit
EVP: Preserve the EVP_PKEY id in a few more spots
authorRichard Levitte <levitte@openssl.org>
Wed, 2 Sep 2020 07:30:42 +0000 (09:30 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 8 Sep 2020 04:25:27 +0000 (06:25 +0200)
commit509144964ba69b69a90269da52a2dc3acb3149e6
tree0dacf1c9eb45dd8bf460288ef08f2b410b1f8ae7
parent884baafba4a5fec6502b828a73188d7133b9179b
EVP: Preserve the EVP_PKEY id in a few more spots

As long as there are internal legacy keys for EVP_PKEY, we need to preserve
the EVP_PKEY numeric identity when generating a key, and when creating the
EVP_PKEY_CTX.

For added consistency, the EVP_PKEY_CTX contructor tries a little
harder to find a EVP_PKEY_METHOD.  Otherwise, we may run into
situations where the EVP_PKEY_CTX ends up having no associated methods
at all.

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