From: Norbert Pocs Date: Tue, 16 Sep 2025 11:18:53 +0000 (+0200) Subject: crypto/dsa: Remove ENGINE usage X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3eecd693de3fe85c8b6676207bcf4656b1553225;p=thirdparty%2Fopenssl.git crypto/dsa: Remove ENGINE usage Resolves: https://github.com/openssl/project/issues/1614 Signed-off-by: Norbert Pocs Reviewed-by: Richard Levitte Reviewed-by: Paul Dale Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28566) --- diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c index 18b747e3613..39616912279 100644 --- a/crypto/dsa/dsa_lib.c +++ b/crypto/dsa/dsa_lib.c @@ -23,7 +23,7 @@ #include "crypto/dh.h" /* required by DSA_dup_DH() */ #include "dsa_local.h" -static DSA *dsa_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx); +static DSA *dsa_new_intern(OSSL_LIB_CTX *libctx); #ifndef FIPS_MODULE @@ -126,7 +126,7 @@ const DSA_METHOD *DSA_get_method(DSA *d) return d->meth; } -static DSA *dsa_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx) +static DSA *dsa_new_intern(OSSL_LIB_CTX *libctx) { DSA *ret = OPENSSL_zalloc(sizeof(*ret)); @@ -171,20 +171,22 @@ static DSA *dsa_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx) return NULL; } -DSA *DSA_new_method(ENGINE *engine) +DSA *DSA_new_method(ossl_unused ENGINE *engine) { - return dsa_new_intern(engine, NULL); + if (engine != NULL) + return NULL; + return dsa_new_intern(NULL); } DSA *ossl_dsa_new(OSSL_LIB_CTX *libctx) { - return dsa_new_intern(NULL, libctx); + return dsa_new_intern(libctx); } #ifndef FIPS_MODULE DSA *DSA_new(void) { - return dsa_new_intern(NULL, NULL); + return dsa_new_intern(NULL); } #endif