From 593d97e74cc873d99aced677883cf55625efe62d Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 19 Nov 2023 15:46:10 +0000 Subject: Unifdef OPENSSL_NO_ENGINE in libcrypto This is mechanical apart from a few manual edits to avoid doubled empty lines. ok jsing --- src/lib/libcrypto/dsa/dsa_lib.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/lib/libcrypto/dsa/dsa_lib.c') diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c index a9d2179aeb..5c01c20255 100644 --- a/src/lib/libcrypto/dsa/dsa_lib.c +++ b/src/lib/libcrypto/dsa/dsa_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_lib.c,v 1.44 2023/08/12 06:14:36 tb Exp $ */ +/* $OpenBSD: dsa_lib.c,v 1.45 2023/11/19 15:46:09 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -70,9 +70,6 @@ #ifndef OPENSSL_NO_DH #include #endif -#ifndef OPENSSL_NO_ENGINE -#include -#endif #include "dh_local.h" #include "dsa_local.h" @@ -113,10 +110,6 @@ DSA_set_method(DSA *dsa, const DSA_METHOD *meth) mtmp = dsa->meth; if (mtmp->finish) mtmp->finish(dsa); -#ifndef OPENSSL_NO_ENGINE - ENGINE_finish(dsa->engine); - dsa->engine = NULL; -#endif dsa->meth = meth; if (meth->init) meth->init(dsa); @@ -138,24 +131,6 @@ DSA_new_method(ENGINE *engine) dsa->flags = dsa->meth->flags & ~DSA_FLAG_NON_FIPS_ALLOW; dsa->references = 1; -#ifndef OPENSSL_NO_ENGINE - if (engine) { - if (!ENGINE_init(engine)) { - DSAerror(ERR_R_ENGINE_LIB); - goto err; - } - dsa->engine = engine; - } else - dsa->engine = ENGINE_get_default_DSA(); - if (dsa->engine != NULL) { - if ((dsa->meth = ENGINE_get_DSA(dsa->engine)) == NULL) { - DSAerror(ERR_R_ENGINE_LIB); - goto err; - } - dsa->flags = dsa->meth->flags & ~DSA_FLAG_NON_FIPS_ALLOW; - } -#endif - if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_DSA, dsa, &dsa->ex_data)) goto err; if (dsa->meth->init != NULL && !dsa->meth->init(dsa)) @@ -184,9 +159,6 @@ DSA_free(DSA *r) if (r->meth != NULL && r->meth->finish != NULL) r->meth->finish(r); -#ifndef OPENSSL_NO_ENGINE - ENGINE_finish(r->engine); -#endif CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data); -- cgit v1.2.3-55-g6feb