EVP_PKEY & DH: Make DH EVP_PKEY_CTX parameter ctrls / setters more available
authorRichard Levitte <levitte@openssl.org>
Tue, 1 Dec 2020 18:11:59 +0000 (19:11 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 16 Dec 2020 10:55:39 +0000 (11:55 +0100)
commitc829c23b67308ad8e8ab677c78db1d5151106c3c
treea1b4b7aeb5cc3093db9df76e06e02ce18f1653ed
parentd33ab074ef9847b67d96961f85f4ad614395d2c2
EVP_PKEY & DH: Make DH EVP_PKEY_CTX parameter ctrls / setters more available

EVP_PKEY_CTX_set_dh_ functions were only available when DH was enabled
('no-dsa' not configured).  However, that makes it impossible to use
these functions with an engine or a provider that happens to implement
DH.  This change solves that problem by shuffling these functions to
more appropriate places.

By consequence, there are a number of places where we can remove the
check of OPENSSL_NO_DH.  This requires some re-arrangements of
internal tables to translate between numeric identities and names.

Partially fixes #13550

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13589)
16 files changed:
crypto/dh/build.info
crypto/dh/dh_group_params.c
crypto/evp/build.info
crypto/evp/dh_ctrl.c [moved from crypto/dh/dh_ctrl.c with 94% similarity]
crypto/evp/dh_support.c [new file with mode: 0644]
crypto/evp/p_lib.c
crypto/evp/pmeth_lib.c
crypto/ffc/build.info
crypto/ffc/ffc_backend.c
crypto/ffc/ffc_dh.c [new file with mode: 0644]
crypto/ffc/ffc_params.c
include/crypto/dh.h
include/internal/ffc.h
include/openssl/dh.h
providers/implementations/encode_decode/encode_key2text.c
providers/implementations/keymgmt/dh_kmgmt.c