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/asn1 | |
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/asn1')
-rw-r--r-- | src/lib/libcrypto/asn1/a_pkey.c | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/ameth_lib.c | 29 |
2 files changed, 2 insertions, 37 deletions
diff --git a/src/lib/libcrypto/asn1/a_pkey.c b/src/lib/libcrypto/asn1/a_pkey.c index 6e715d4f9e..1e8ebc913f 100644 --- a/src/lib/libcrypto/asn1/a_pkey.c +++ b/src/lib/libcrypto/asn1/a_pkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_pkey.c,v 1.6 2023/07/07 19:37:52 beck Exp $ */ | 1 | /* $OpenBSD: a_pkey.c,v 1.7 2023/11/19 15:46:09 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 | * |
@@ -67,10 +67,6 @@ | |||
67 | #include <openssl/objects.h> | 67 | #include <openssl/objects.h> |
68 | #include <openssl/x509.h> | 68 | #include <openssl/x509.h> |
69 | 69 | ||
70 | #ifndef OPENSSL_NO_ENGINE | ||
71 | #include <openssl/engine.h> | ||
72 | #endif | ||
73 | |||
74 | #include "asn1_local.h" | 70 | #include "asn1_local.h" |
75 | #include "evp_local.h" | 71 | #include "evp_local.h" |
76 | 72 | ||
@@ -87,10 +83,6 @@ d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) | |||
87 | } | 83 | } |
88 | } else { | 84 | } else { |
89 | ret = *a; | 85 | ret = *a; |
90 | #ifndef OPENSSL_NO_ENGINE | ||
91 | ENGINE_finish(ret->engine); | ||
92 | ret->engine = NULL; | ||
93 | #endif | ||
94 | } | 86 | } |
95 | 87 | ||
96 | if (!EVP_PKEY_set_type(ret, type)) { | 88 | if (!EVP_PKEY_set_type(ret, type)) { |
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c index 153ad21a81..42f2f6fd52 100644 --- a/src/lib/libcrypto/asn1/ameth_lib.c +++ b/src/lib/libcrypto/asn1/ameth_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ameth_lib.c,v 1.32 2023/07/07 19:37:52 beck Exp $ */ | 1 | /* $OpenBSD: ameth_lib.c,v 1.33 2023/11/19 15:46:09 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -64,10 +64,6 @@ | |||
64 | #include <openssl/asn1t.h> | 64 | #include <openssl/asn1t.h> |
65 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
66 | 66 | ||
67 | #ifndef OPENSSL_NO_ENGINE | ||
68 | #include <openssl/engine.h> | ||
69 | #endif | ||
70 | |||
71 | #include "asn1_local.h" | 67 | #include "asn1_local.h" |
72 | #include "evp_local.h" | 68 | #include "evp_local.h" |
73 | 69 | ||
@@ -170,15 +166,6 @@ EVP_PKEY_asn1_find(ENGINE **pe, int type) | |||
170 | type = mp->pkey_base_id; | 166 | type = mp->pkey_base_id; |
171 | } | 167 | } |
172 | if (pe) { | 168 | if (pe) { |
173 | #ifndef OPENSSL_NO_ENGINE | ||
174 | ENGINE *e; | ||
175 | /* type will contain the final unaliased type */ | ||
176 | e = ENGINE_get_pkey_asn1_meth_engine(type); | ||
177 | if (e) { | ||
178 | *pe = e; | ||
179 | return ENGINE_get_pkey_asn1_meth(e, type); | ||
180 | } | ||
181 | #endif | ||
182 | *pe = NULL; | 169 | *pe = NULL; |
183 | } | 170 | } |
184 | return mp; | 171 | return mp; |
@@ -193,20 +180,6 @@ EVP_PKEY_asn1_find_str(ENGINE **pe, const char *str, int len) | |||
193 | if (len == -1) | 180 | if (len == -1) |
194 | len = strlen(str); | 181 | len = strlen(str); |
195 | if (pe) { | 182 | if (pe) { |
196 | #ifndef OPENSSL_NO_ENGINE | ||
197 | ENGINE *e; | ||
198 | ameth = ENGINE_pkey_asn1_find_str(&e, str, len); | ||
199 | if (ameth) { | ||
200 | /* Convert structural into | ||
201 | * functional reference | ||
202 | */ | ||
203 | if (!ENGINE_init(e)) | ||
204 | ameth = NULL; | ||
205 | ENGINE_free(e); | ||
206 | *pe = e; | ||
207 | return ameth; | ||
208 | } | ||
209 | #endif | ||
210 | *pe = NULL; | 183 | *pe = NULL; |
211 | } | 184 | } |
212 | for (i = EVP_PKEY_asn1_get_count() - 1; i >= 0; i--) { | 185 | for (i = EVP_PKEY_asn1_get_count() - 1; i >= 0; i--) { |