summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rsa
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-11-19 15:46:11 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-11-19 15:46:11 +0000
commit262ab13b8848734595f30f669ed9d9798c69f577 (patch)
treeecc5c2141b111fc5f3726cdf0740fee4b9c96a47 /lib/libcrypto/rsa
parent4ef3ce35c94603c216b74510017ea54572776d98 (diff)
Unifdef OPENSSL_NO_ENGINE in libcrypto
This is mechanical apart from a few manual edits to avoid doubled empty lines. ok jsing
Diffstat (limited to 'lib/libcrypto/rsa')
-rw-r--r--lib/libcrypto/rsa/rsa_lib.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/lib/libcrypto/rsa/rsa_lib.c b/lib/libcrypto/rsa/rsa_lib.c
index fbd2c2274c3..b379cddc078 100644
--- a/lib/libcrypto/rsa/rsa_lib.c
+++ b/lib/libcrypto/rsa/rsa_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_lib.c,v 1.48 2023/07/28 10:05:16 tb Exp $ */
+/* $OpenBSD: rsa_lib.c,v 1.49 2023/11/19 15:46:10 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -71,10 +71,6 @@
#include "evp_local.h"
#include "rsa_local.h"
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif
-
static const RSA_METHOD *default_RSA_meth = NULL;
RSA *
@@ -122,10 +118,6 @@ RSA_set_method(RSA *rsa, const RSA_METHOD *meth)
mtmp = rsa->meth;
if (mtmp->finish)
mtmp->finish(rsa);
-#ifndef OPENSSL_NO_ENGINE
- ENGINE_finish(rsa->engine);
- rsa->engine = NULL;
-#endif
rsa->meth = meth;
if (meth->init)
meth->init(rsa);
@@ -145,25 +137,6 @@ RSA_new_method(ENGINE *engine)
ret->meth = RSA_get_default_method();
-#ifndef OPENSSL_NO_ENGINE
- if (engine != NULL) {
- if (!ENGINE_init(engine)) {
- RSAerror(ERR_R_ENGINE_LIB);
- goto err;
- }
- ret->engine = engine;
- } else {
- ret->engine = ENGINE_get_default_RSA();
- }
-
- if (ret->engine != NULL) {
- if ((ret->meth = ENGINE_get_RSA(ret->engine)) == NULL) {
- RSAerror(ERR_R_ENGINE_LIB);
- goto err;
- }
- }
-#endif
-
ret->references = 1;
ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
@@ -178,9 +151,6 @@ RSA_new_method(ENGINE *engine)
return ret;
err:
-#ifndef OPENSSL_NO_ENGINE
- ENGINE_finish(ret->engine);
-#endif
free(ret);
return NULL;
@@ -201,9 +171,6 @@ RSA_free(RSA *r)
if (r->meth->finish)
r->meth->finish(r);
-#ifndef OPENSSL_NO_ENGINE
- ENGINE_finish(r->engine);
-#endif
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);