diff options
author | tb <> | 2023-11-19 15:46:10 +0000 |
---|---|---|
committer | tb <> | 2023-11-19 15:46:10 +0000 |
commit | 9e356d4225ee2dcd3e3eebabf384851ee547ec95 (patch) | |
tree | 9a8bf5329015d40f6a79820880c1ca7bb820bf58 /src/lib/libcrypto/evp/p_lib.c | |
parent | fea63fbd7eeaebeff6720b8ec754575f90e8eb77 (diff) | |
download | openbsd-9e356d4225ee2dcd3e3eebabf384851ee547ec95.tar.gz openbsd-9e356d4225ee2dcd3e3eebabf384851ee547ec95.tar.bz2 openbsd-9e356d4225ee2dcd3e3eebabf384851ee547ec95.zip |
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 'src/lib/libcrypto/evp/p_lib.c')
-rw-r--r-- | src/lib/libcrypto/evp/p_lib.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c index 23ec8e6031..eaeb456cbb 100644 --- a/src/lib/libcrypto/evp/p_lib.c +++ b/src/lib/libcrypto/evp/p_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p_lib.c,v 1.37 2023/09/10 17:32:17 tb Exp $ */ | 1 | /* $OpenBSD: p_lib.c,v 1.38 2023/11/19 15:46:10 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -77,10 +77,6 @@ | |||
77 | #include <openssl/rsa.h> | 77 | #include <openssl/rsa.h> |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #ifndef OPENSSL_NO_ENGINE | ||
81 | #include <openssl/engine.h> | ||
82 | #endif | ||
83 | |||
84 | #include "asn1_local.h" | 80 | #include "asn1_local.h" |
85 | #include "evp_local.h" | 81 | #include "evp_local.h" |
86 | 82 | ||
@@ -245,19 +241,11 @@ pkey_set_type(EVP_PKEY *pkey, ENGINE *e, int type, const char *str, int len) | |||
245 | */ | 241 | */ |
246 | if ((type == pkey->save_type) && pkey->ameth) | 242 | if ((type == pkey->save_type) && pkey->ameth) |
247 | return 1; | 243 | return 1; |
248 | #ifndef OPENSSL_NO_ENGINE | ||
249 | ENGINE_finish(pkey->engine); | ||
250 | pkey->engine = NULL; | ||
251 | #endif | ||
252 | } | 244 | } |
253 | if (str) | 245 | if (str) |
254 | ameth = EVP_PKEY_asn1_find_str(eptr, str, len); | 246 | ameth = EVP_PKEY_asn1_find_str(eptr, str, len); |
255 | else | 247 | else |
256 | ameth = EVP_PKEY_asn1_find(eptr, type); | 248 | ameth = EVP_PKEY_asn1_find(eptr, type); |
257 | #ifndef OPENSSL_NO_ENGINE | ||
258 | if (pkey == NULL && eptr != NULL) | ||
259 | ENGINE_finish(e); | ||
260 | #endif | ||
261 | if (!ameth) { | 249 | if (!ameth) { |
262 | EVPerror(EVP_R_UNSUPPORTED_ALGORITHM); | 250 | EVPerror(EVP_R_UNSUPPORTED_ALGORITHM); |
263 | return 0; | 251 | return 0; |
@@ -583,9 +571,6 @@ EVP_PKEY_type(int type) | |||
583 | ret = ameth->pkey_id; | 571 | ret = ameth->pkey_id; |
584 | else | 572 | else |
585 | ret = NID_undef; | 573 | ret = NID_undef; |
586 | #ifndef OPENSSL_NO_ENGINE | ||
587 | ENGINE_finish(e); | ||
588 | #endif | ||
589 | return ret; | 574 | return ret; |
590 | } | 575 | } |
591 | 576 | ||
@@ -626,10 +611,6 @@ EVP_PKEY_free_it(EVP_PKEY *x) | |||
626 | x->ameth->pkey_free(x); | 611 | x->ameth->pkey_free(x); |
627 | x->pkey.ptr = NULL; | 612 | x->pkey.ptr = NULL; |
628 | } | 613 | } |
629 | #ifndef OPENSSL_NO_ENGINE | ||
630 | ENGINE_finish(x->engine); | ||
631 | x->engine = NULL; | ||
632 | #endif | ||
633 | } | 614 | } |
634 | 615 | ||
635 | static int | 616 | static int |