From 99144c3b59f3da0244dbdb769927a21bc35dec76 Mon Sep 17 00:00:00 2001 From: Norbert Pocs Date: Tue, 16 Sep 2025 13:18:53 +0200 Subject: [PATCH] crypto/dsa: Remove ENGINE usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Saša Nedvědický Reviewed-by: Eugene Syromiatnikov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/29305) --- crypto/dsa/dsa_lib.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 -- 2.47.3