Don't (re-)initialize the FFC_PARAMs in dh_init and dsa_init
authorMatthias St. Pierre <matthias.st.pierre@ncp-e.com>
Mon, 2 Oct 2023 10:10:01 +0000 (12:10 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 4 Oct 2023 10:23:00 +0000 (12:23 +0200)
commit16546f439b68324994deb3621774cc078780f7fc
tree4168dc58dd6a28861c6fad5334eceb52adcf7fc2
parentd40ccbc09ed8f391389287142c27a37c7d7f702a
Don't (re-)initialize the FFC_PARAMs in dh_init and dsa_init

The initialization was introduced in commit dc8de3e6f1ee and
changes the behaviour of the `init` method for DSA and DH
between 1.1.1 and 3.0, while the behaviour for RSA and EC_KEY
remains unchanged.

The initialization is not necessary in 3.x and master imho and
breaks the use-case of intercepting the methods of an existing
key.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22185)

(cherry picked from commit 706512ecbc31585d447b53c3aa89acdf6951f996)
crypto/dh/dh_key.c
crypto/dh/dh_lib.c
crypto/dsa/dsa_lib.c
crypto/dsa/dsa_ossl.c