]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto/dsa: Remove ENGINE usage
authorNorbert Pocs <norbertp@openssl.org>
Tue, 16 Sep 2025 11:18:53 +0000 (13:18 +0200)
committerNeil Horman <nhorman@openssl.org>
Fri, 3 Oct 2025 17:00:27 +0000 (13:00 -0400)
Resolves: https://github.com/openssl/project/issues/1614

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28566)

crypto/dsa/dsa_lib.c

index 18b747e3613b9854cc44d9350c0b308ac898035f..396169122792d4ef271cdd64e45fee81c6602dc4 100644 (file)
@@ -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