diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/ec/ec_kmeth.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/lib/libcrypto/ec/ec_kmeth.c b/src/lib/libcrypto/ec/ec_kmeth.c index 38aca0028e..856afc89dc 100644 --- a/src/lib/libcrypto/ec/ec_kmeth.c +++ b/src/lib/libcrypto/ec/ec_kmeth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_kmeth.c,v 1.12 2023/07/28 09:28:37 tb Exp $ */ | 1 | /* $OpenBSD: ec_kmeth.c,v 1.13 2023/11/19 15:46:09 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
4 | * project. | 4 | * project. |
@@ -53,9 +53,6 @@ | |||
53 | */ | 53 | */ |
54 | 54 | ||
55 | #include <openssl/ec.h> | 55 | #include <openssl/ec.h> |
56 | #ifndef OPENSSL_NO_ENGINE | ||
57 | #include <openssl/engine.h> | ||
58 | #endif | ||
59 | #include <openssl/err.h> | 56 | #include <openssl/err.h> |
60 | 57 | ||
61 | #include "bn_local.h" | 58 | #include "bn_local.h" |
@@ -126,11 +123,6 @@ EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) | |||
126 | if (finish != NULL) | 123 | if (finish != NULL) |
127 | finish(key); | 124 | finish(key); |
128 | 125 | ||
129 | #ifndef OPENSSL_NO_ENGINE | ||
130 | ENGINE_finish(key->engine); | ||
131 | key->engine = NULL; | ||
132 | #endif | ||
133 | |||
134 | key->meth = meth; | 126 | key->meth = meth; |
135 | if (meth->init != NULL) | 127 | if (meth->init != NULL) |
136 | return meth->init(key); | 128 | return meth->init(key); |
@@ -148,23 +140,6 @@ EC_KEY_new_method(ENGINE *engine) | |||
148 | return NULL; | 140 | return NULL; |
149 | } | 141 | } |
150 | ret->meth = EC_KEY_get_default_method(); | 142 | ret->meth = EC_KEY_get_default_method(); |
151 | #ifndef OPENSSL_NO_ENGINE | ||
152 | if (engine != NULL) { | ||
153 | if (!ENGINE_init(engine)) { | ||
154 | ECerror(ERR_R_ENGINE_LIB); | ||
155 | goto err; | ||
156 | } | ||
157 | ret->engine = engine; | ||
158 | } else | ||
159 | ret->engine = ENGINE_get_default_EC(); | ||
160 | if (ret->engine) { | ||
161 | ret->meth = ENGINE_get_EC(ret->engine); | ||
162 | if (ret->meth == NULL) { | ||
163 | ECerror(ERR_R_ENGINE_LIB); | ||
164 | goto err; | ||
165 | } | ||
166 | } | ||
167 | #endif | ||
168 | ret->version = 1; | 143 | ret->version = 1; |
169 | ret->flags = 0; | 144 | ret->flags = 0; |
170 | ret->group = NULL; | 145 | ret->group = NULL; |