]> git.ipfire.org Git - thirdparty/openssl.git/commit - crypto/dh/dh_ameth.c
Fix EVP todata and fromdata when used with selection of EVP_PKEY_PUBLIC_KEY.
authorslontis <shane.lontis@oracle.com>
Sun, 5 Dec 2021 23:27:12 +0000 (09:27 +1000)
committerTomas Mraz <tomas@openssl.org>
Thu, 3 Feb 2022 12:48:42 +0000 (13:48 +0100)
commit944f822aadc88b2e25f7695366810c73a53a00c8
treeea49ec6185e737796fb25637d8d1e3b5703acf22
parent13a53fbf13bc6fa09c95ad4bdc6ec70fa15aa16d
Fix EVP todata and fromdata when used with selection of EVP_PKEY_PUBLIC_KEY.

The private key for rsa, dsa, dh and ecx was being included when the
selector was just the public key. (ec was working correctly).
This matches the documented behaviour.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17200)
14 files changed:
crypto/dh/dh_ameth.c
crypto/dh/dh_backend.c
crypto/dsa/dsa_ameth.c
crypto/dsa/dsa_backend.c
crypto/rsa/rsa_ameth.c
crypto/rsa/rsa_backend.c
include/crypto/dh.h
include/crypto/dsa.h
include/crypto/rsa.h
providers/implementations/keymgmt/dh_kmgmt.c
providers/implementations/keymgmt/dsa_kmgmt.c
providers/implementations/keymgmt/ecx_kmgmt.c
providers/implementations/keymgmt/rsa_kmgmt.c
test/evp_extra_test2.c