diff options
| author | tb <> | 2023-07-28 09:22:26 +0000 |
|---|---|---|
| committer | tb <> | 2023-07-28 09:22:26 +0000 |
| commit | d5a81d6e35ae60f515d5705afb9c2f871823721a (patch) | |
| tree | 4eb57ae2fdd0f6dff20d00655e0d117dcf61415d /src | |
| parent | a90aeb58faecc32cf7d4158977677efa3db85477 (diff) | |
| download | openbsd-d5a81d6e35ae60f515d5705afb9c2f871823721a.tar.gz openbsd-d5a81d6e35ae60f515d5705afb9c2f871823721a.tar.bz2 openbsd-d5a81d6e35ae60f515d5705afb9c2f871823721a.zip | |
Excise ECDH_METHOD
Unlike ECDSA_METHOD, this has been unused forever but kind of needed to
stay for symmetry with ECDSA_METHOD. Now we can finally take it behind
the barn and remove its tendrils into ENGINE.
ok jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/Makefile | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/Symbols.list | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/ecdh/ecdh.h | 13 | ||||
| -rw-r--r-- | src/lib/libcrypto/ecdh/ech_lib.c | 147 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/eng_fat.c | 11 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/eng_int.h | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/eng_list.c | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/eng_openssl.c | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/engine.h | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/tb_ecdh.c | 141 | ||||
| -rw-r--r-- | src/lib/libcrypto/hidden/openssl/ecdh.h | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/ossl_typ.h | 4 |
13 files changed, 9 insertions, 369 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index 030efb14c1..5018157934 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.142 2023/07/28 09:19:58 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.143 2023/07/28 09:22:26 tb Exp $ |
| 2 | 2 | ||
| 3 | LIB= crypto | 3 | LIB= crypto |
| 4 | LIBREBUILD=y | 4 | LIBREBUILD=y |
| @@ -353,7 +353,6 @@ SRCS+= ecx_methods.c | |||
| 353 | 353 | ||
| 354 | # ecdh/ | 354 | # ecdh/ |
| 355 | SRCS+= ecdh.c | 355 | SRCS+= ecdh.c |
| 356 | SRCS+= ech_lib.c | ||
| 357 | 356 | ||
| 358 | # ecdsa/ | 357 | # ecdsa/ |
| 359 | SRCS+= ecdsa.c | 358 | SRCS+= ecdsa.c |
| @@ -377,7 +376,6 @@ SRCS+= tb_cipher.c | |||
| 377 | SRCS+= tb_dh.c | 376 | SRCS+= tb_dh.c |
| 378 | SRCS+= tb_digest.c | 377 | SRCS+= tb_digest.c |
| 379 | SRCS+= tb_dsa.c | 378 | SRCS+= tb_dsa.c |
| 380 | SRCS+= tb_ecdh.c | ||
| 381 | SRCS+= tb_eckey.c | 379 | SRCS+= tb_eckey.c |
| 382 | SRCS+= tb_pkmeth.c | 380 | SRCS+= tb_pkmeth.c |
| 383 | SRCS+= tb_rand.c | 381 | SRCS+= tb_rand.c |
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index b9338fee67..c16a178cf7 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
| @@ -1010,14 +1010,7 @@ DSO_set_filename | |||
| 1010 | DSO_set_method | 1010 | DSO_set_method |
| 1011 | DSO_set_name_converter | 1011 | DSO_set_name_converter |
| 1012 | DSO_up_ref | 1012 | DSO_up_ref |
| 1013 | ECDH_OpenSSL | ||
| 1014 | ECDH_compute_key | 1013 | ECDH_compute_key |
| 1015 | ECDH_get_default_method | ||
| 1016 | ECDH_get_ex_data | ||
| 1017 | ECDH_get_ex_new_index | ||
| 1018 | ECDH_set_default_method | ||
| 1019 | ECDH_set_ex_data | ||
| 1020 | ECDH_set_method | ||
| 1021 | ECDH_size | 1014 | ECDH_size |
| 1022 | ECDSA_SIG_free | 1015 | ECDSA_SIG_free |
| 1023 | ECDSA_SIG_get0 | 1016 | ECDSA_SIG_get0 |
| @@ -1180,7 +1173,6 @@ ENGINE_free | |||
| 1180 | ENGINE_get_DH | 1173 | ENGINE_get_DH |
| 1181 | ENGINE_get_DSA | 1174 | ENGINE_get_DSA |
| 1182 | ENGINE_get_EC | 1175 | ENGINE_get_EC |
| 1183 | ENGINE_get_ECDH | ||
| 1184 | ENGINE_get_RAND | 1176 | ENGINE_get_RAND |
| 1185 | ENGINE_get_RSA | 1177 | ENGINE_get_RSA |
| 1186 | ENGINE_get_STORE | 1178 | ENGINE_get_STORE |
| @@ -1192,7 +1184,6 @@ ENGINE_get_ctrl_function | |||
| 1192 | ENGINE_get_default_DH | 1184 | ENGINE_get_default_DH |
| 1193 | ENGINE_get_default_DSA | 1185 | ENGINE_get_default_DSA |
| 1194 | ENGINE_get_default_EC | 1186 | ENGINE_get_default_EC |
| 1195 | ENGINE_get_default_ECDH | ||
| 1196 | ENGINE_get_default_RAND | 1187 | ENGINE_get_default_RAND |
| 1197 | ENGINE_get_default_RSA | 1188 | ENGINE_get_default_RSA |
| 1198 | ENGINE_get_destroy_function | 1189 | ENGINE_get_destroy_function |
| @@ -1234,14 +1225,12 @@ ENGINE_pkey_asn1_find_str | |||
| 1234 | ENGINE_register_DH | 1225 | ENGINE_register_DH |
| 1235 | ENGINE_register_DSA | 1226 | ENGINE_register_DSA |
| 1236 | ENGINE_register_EC | 1227 | ENGINE_register_EC |
| 1237 | ENGINE_register_ECDH | ||
| 1238 | ENGINE_register_RAND | 1228 | ENGINE_register_RAND |
| 1239 | ENGINE_register_RSA | 1229 | ENGINE_register_RSA |
| 1240 | ENGINE_register_STORE | 1230 | ENGINE_register_STORE |
| 1241 | ENGINE_register_all_DH | 1231 | ENGINE_register_all_DH |
| 1242 | ENGINE_register_all_DSA | 1232 | ENGINE_register_all_DSA |
| 1243 | ENGINE_register_all_EC | 1233 | ENGINE_register_all_EC |
| 1244 | ENGINE_register_all_ECDH | ||
| 1245 | ENGINE_register_all_RAND | 1234 | ENGINE_register_all_RAND |
| 1246 | ENGINE_register_all_RSA | 1235 | ENGINE_register_all_RSA |
| 1247 | ENGINE_register_all_STORE | 1236 | ENGINE_register_all_STORE |
| @@ -1259,7 +1248,6 @@ ENGINE_remove | |||
| 1259 | ENGINE_set_DH | 1248 | ENGINE_set_DH |
| 1260 | ENGINE_set_DSA | 1249 | ENGINE_set_DSA |
| 1261 | ENGINE_set_EC | 1250 | ENGINE_set_EC |
| 1262 | ENGINE_set_ECDH | ||
| 1263 | ENGINE_set_RAND | 1251 | ENGINE_set_RAND |
| 1264 | ENGINE_set_RSA | 1252 | ENGINE_set_RSA |
| 1265 | ENGINE_set_STORE | 1253 | ENGINE_set_STORE |
| @@ -1270,7 +1258,6 @@ ENGINE_set_default | |||
| 1270 | ENGINE_set_default_DH | 1258 | ENGINE_set_default_DH |
| 1271 | ENGINE_set_default_DSA | 1259 | ENGINE_set_default_DSA |
| 1272 | ENGINE_set_default_EC | 1260 | ENGINE_set_default_EC |
| 1273 | ENGINE_set_default_ECDH | ||
| 1274 | ENGINE_set_default_RAND | 1261 | ENGINE_set_default_RAND |
| 1275 | ENGINE_set_default_RSA | 1262 | ENGINE_set_default_RSA |
| 1276 | ENGINE_set_default_ciphers | 1263 | ENGINE_set_default_ciphers |
| @@ -1295,7 +1282,6 @@ ENGINE_set_table_flags | |||
| 1295 | ENGINE_unregister_DH | 1282 | ENGINE_unregister_DH |
| 1296 | ENGINE_unregister_DSA | 1283 | ENGINE_unregister_DSA |
| 1297 | ENGINE_unregister_EC | 1284 | ENGINE_unregister_EC |
| 1298 | ENGINE_unregister_ECDH | ||
| 1299 | ENGINE_unregister_RAND | 1285 | ENGINE_unregister_RAND |
| 1300 | ENGINE_unregister_RSA | 1286 | ENGINE_unregister_RSA |
| 1301 | ENGINE_unregister_STORE | 1287 | ENGINE_unregister_STORE |
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index 9ad2aa2c21..9dd16a93f2 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
| @@ -1636,15 +1636,8 @@ _libre_SM4_encrypt | |||
| 1636 | _libre_CRYPTO_poly1305_init | 1636 | _libre_CRYPTO_poly1305_init |
| 1637 | _libre_CRYPTO_poly1305_update | 1637 | _libre_CRYPTO_poly1305_update |
| 1638 | _libre_CRYPTO_poly1305_finish | 1638 | _libre_CRYPTO_poly1305_finish |
| 1639 | _libre_ECDH_OpenSSL | ||
| 1640 | _libre_ECDH_set_default_method | ||
| 1641 | _libre_ECDH_get_default_method | ||
| 1642 | _libre_ECDH_set_method | ||
| 1643 | _libre_ECDH_size | 1639 | _libre_ECDH_size |
| 1644 | _libre_ECDH_compute_key | 1640 | _libre_ECDH_compute_key |
| 1645 | _libre_ECDH_get_ex_new_index | ||
| 1646 | _libre_ECDH_set_ex_data | ||
| 1647 | _libre_ECDH_get_ex_data | ||
| 1648 | _libre_PEM_get_EVP_CIPHER_INFO | 1641 | _libre_PEM_get_EVP_CIPHER_INFO |
| 1649 | _libre_PEM_do_header | 1642 | _libre_PEM_do_header |
| 1650 | _libre_PEM_read_bio | 1643 | _libre_PEM_read_bio |
diff --git a/src/lib/libcrypto/ecdh/ecdh.h b/src/lib/libcrypto/ecdh/ecdh.h index a5e32bea48..3163b9ea2e 100644 --- a/src/lib/libcrypto/ecdh/ecdh.h +++ b/src/lib/libcrypto/ecdh/ecdh.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecdh.h,v 1.8 2023/07/28 09:19:59 tb Exp $ */ | 1 | /* $OpenBSD: ecdh.h,v 1.9 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
| 4 | * | 4 | * |
| @@ -83,22 +83,11 @@ | |||
| 83 | extern "C" { | 83 | extern "C" { |
| 84 | #endif | 84 | #endif |
| 85 | 85 | ||
| 86 | const ECDH_METHOD *ECDH_OpenSSL(void); | ||
| 87 | |||
| 88 | void ECDH_set_default_method(const ECDH_METHOD *); | ||
| 89 | const ECDH_METHOD *ECDH_get_default_method(void); | ||
| 90 | int ECDH_set_method(EC_KEY *, const ECDH_METHOD *); | ||
| 91 | |||
| 92 | int ECDH_size(const EC_KEY *ecdh); | 86 | int ECDH_size(const EC_KEY *ecdh); |
| 93 | int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, | 87 | int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, |
| 94 | EC_KEY *ecdh, | 88 | EC_KEY *ecdh, |
| 95 | void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); | 89 | void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); |
| 96 | 90 | ||
| 97 | int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new | ||
| 98 | *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); | ||
| 99 | int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg); | ||
| 100 | void *ECDH_get_ex_data(EC_KEY *d, int idx); | ||
| 101 | |||
| 102 | #ifdef __cplusplus | 91 | #ifdef __cplusplus |
| 103 | } | 92 | } |
| 104 | #endif | 93 | #endif |
diff --git a/src/lib/libcrypto/ecdh/ech_lib.c b/src/lib/libcrypto/ecdh/ech_lib.c deleted file mode 100644 index c8e5744c0a..0000000000 --- a/src/lib/libcrypto/ecdh/ech_lib.c +++ /dev/null | |||
| @@ -1,147 +0,0 @@ | |||
| 1 | /* $OpenBSD: ech_lib.c,v 1.24 2023/07/07 13:54:45 beck Exp $ */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | ||
| 4 | * | ||
| 5 | * The Elliptic Curve Public-Key Crypto Library (ECC Code) included | ||
| 6 | * herein is developed by SUN MICROSYSTEMS, INC., and is contributed | ||
| 7 | * to the OpenSSL project. | ||
| 8 | * | ||
| 9 | * The ECC Code is licensed pursuant to the OpenSSL open source | ||
| 10 | * license provided below. | ||
| 11 | * | ||
| 12 | * The ECDH software is originally written by Douglas Stebila of | ||
| 13 | * Sun Microsystems Laboratories. | ||
| 14 | * | ||
| 15 | */ | ||
| 16 | /* ==================================================================== | ||
| 17 | * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. | ||
| 18 | * | ||
| 19 | * Redistribution and use in source and binary forms, with or without | ||
| 20 | * modification, are permitted provided that the following conditions | ||
| 21 | * are met: | ||
| 22 | * | ||
| 23 | * 1. Redistributions of source code must retain the above copyright | ||
| 24 | * notice, this list of conditions and the following disclaimer. | ||
| 25 | * | ||
| 26 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer in | ||
| 28 | * the documentation and/or other materials provided with the | ||
| 29 | * distribution. | ||
| 30 | * | ||
| 31 | * 3. All advertising materials mentioning features or use of this | ||
| 32 | * software must display the following acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 35 | * | ||
| 36 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 37 | * endorse or promote products derived from this software without | ||
| 38 | * prior written permission. For written permission, please contact | ||
| 39 | * openssl-core@OpenSSL.org. | ||
| 40 | * | ||
| 41 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 42 | * nor may "OpenSSL" appear in their names without prior written | ||
| 43 | * permission of the OpenSSL Project. | ||
| 44 | * | ||
| 45 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 46 | * acknowledgment: | ||
| 47 | * "This product includes software developed by the OpenSSL Project | ||
| 48 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 49 | * | ||
| 50 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 51 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 53 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 54 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 56 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 57 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 58 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 59 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 60 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 61 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 62 | * ==================================================================== | ||
| 63 | * | ||
| 64 | * This product includes cryptographic software written by Eric Young | ||
| 65 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 66 | * Hudson (tjh@cryptsoft.com). | ||
| 67 | * | ||
| 68 | */ | ||
| 69 | |||
| 70 | #include <string.h> | ||
| 71 | |||
| 72 | #include <openssl/opensslconf.h> | ||
| 73 | |||
| 74 | #ifndef OPENSSL_NO_ENGINE | ||
| 75 | #include <openssl/engine.h> | ||
| 76 | #endif | ||
| 77 | #include <openssl/err.h> | ||
| 78 | |||
| 79 | #include "ec_local.h" | ||
| 80 | |||
| 81 | struct ecdh_method { | ||
| 82 | const char *name; | ||
| 83 | int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, | ||
| 84 | void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); | ||
| 85 | int flags; | ||
| 86 | char *app_data; | ||
| 87 | }; | ||
| 88 | |||
| 89 | static const ECDH_METHOD *default_ECDH_method = NULL; | ||
| 90 | |||
| 91 | static const ECDH_METHOD openssl_ecdh_meth = { | ||
| 92 | .name = "OpenSSL ECDH method", | ||
| 93 | .compute_key = ecdh_compute_key, | ||
| 94 | }; | ||
| 95 | |||
| 96 | const ECDH_METHOD * | ||
| 97 | ECDH_OpenSSL(void) | ||
| 98 | { | ||
| 99 | return &openssl_ecdh_meth; | ||
| 100 | } | ||
| 101 | LCRYPTO_ALIAS(ECDH_OpenSSL); | ||
| 102 | |||
| 103 | void | ||
| 104 | ECDH_set_default_method(const ECDH_METHOD *meth) | ||
| 105 | { | ||
| 106 | default_ECDH_method = meth; | ||
| 107 | } | ||
| 108 | LCRYPTO_ALIAS(ECDH_set_default_method); | ||
| 109 | |||
| 110 | const ECDH_METHOD * | ||
| 111 | ECDH_get_default_method(void) | ||
| 112 | { | ||
| 113 | if (!default_ECDH_method) { | ||
| 114 | default_ECDH_method = ECDH_OpenSSL(); | ||
| 115 | } | ||
| 116 | return default_ECDH_method; | ||
| 117 | } | ||
| 118 | LCRYPTO_ALIAS(ECDH_get_default_method); | ||
| 119 | |||
| 120 | int | ||
| 121 | ECDH_set_method(EC_KEY *eckey, const ECDH_METHOD *meth) | ||
| 122 | { | ||
| 123 | return 0; | ||
| 124 | } | ||
| 125 | LCRYPTO_ALIAS(ECDH_set_method); | ||
| 126 | |||
| 127 | int | ||
| 128 | ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | ||
| 129 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) | ||
| 130 | { | ||
| 131 | return -1; | ||
| 132 | } | ||
| 133 | LCRYPTO_ALIAS(ECDH_get_ex_new_index); | ||
| 134 | |||
| 135 | int | ||
| 136 | ECDH_set_ex_data(EC_KEY *d, int idx, void *arg) | ||
| 137 | { | ||
| 138 | return 0; | ||
| 139 | } | ||
| 140 | LCRYPTO_ALIAS(ECDH_set_ex_data); | ||
| 141 | |||
| 142 | void * | ||
| 143 | ECDH_get_ex_data(EC_KEY *d, int idx) | ||
| 144 | { | ||
| 145 | return NULL; | ||
| 146 | } | ||
| 147 | LCRYPTO_ALIAS(ECDH_get_ex_data); | ||
diff --git a/src/lib/libcrypto/engine/eng_fat.c b/src/lib/libcrypto/engine/eng_fat.c index cf49c99bb4..f0b57722ff 100644 --- a/src/lib/libcrypto/engine/eng_fat.c +++ b/src/lib/libcrypto/engine/eng_fat.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: eng_fat.c,v 1.18 2023/07/28 09:08:31 tb Exp $ */ | 1 | /* $OpenBSD: eng_fat.c,v 1.19 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -85,10 +85,6 @@ ENGINE_set_default(ENGINE *e, unsigned int flags) | |||
| 85 | if ((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e)) | 85 | if ((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e)) |
| 86 | return 0; | 86 | return 0; |
| 87 | #endif | 87 | #endif |
| 88 | #ifndef OPENSSL_NO_ECDH | ||
| 89 | if ((flags & ENGINE_METHOD_ECDH) && !ENGINE_set_default_ECDH(e)) | ||
| 90 | return 0; | ||
| 91 | #endif | ||
| 92 | #ifndef OPENSSL_NO_EC | 88 | #ifndef OPENSSL_NO_EC |
| 93 | if ((flags & ENGINE_METHOD_EC) && !ENGINE_set_default_EC(e)) | 89 | if ((flags & ENGINE_METHOD_EC) && !ENGINE_set_default_EC(e)) |
| 94 | return 0; | 90 | return 0; |
| @@ -117,8 +113,6 @@ int_def_cb(const char *alg, int len, void *arg) | |||
| 117 | *pflags |= ENGINE_METHOD_RSA; | 113 | *pflags |= ENGINE_METHOD_RSA; |
| 118 | else if (!strncmp(alg, "DSA", len)) | 114 | else if (!strncmp(alg, "DSA", len)) |
| 119 | *pflags |= ENGINE_METHOD_DSA; | 115 | *pflags |= ENGINE_METHOD_DSA; |
| 120 | else if (!strncmp(alg, "ECDH", len)) | ||
| 121 | *pflags |= ENGINE_METHOD_ECDH; | ||
| 122 | else if (!strncmp(alg, "DH", len)) | 116 | else if (!strncmp(alg, "DH", len)) |
| 123 | *pflags |= ENGINE_METHOD_DH; | 117 | *pflags |= ENGINE_METHOD_DH; |
| 124 | else if (strncmp(alg, "EC", len) == 0) | 118 | else if (strncmp(alg, "EC", len) == 0) |
| @@ -168,9 +162,6 @@ ENGINE_register_complete(ENGINE *e) | |||
| 168 | #ifndef OPENSSL_NO_DH | 162 | #ifndef OPENSSL_NO_DH |
| 169 | ENGINE_register_DH(e); | 163 | ENGINE_register_DH(e); |
| 170 | #endif | 164 | #endif |
| 171 | #ifndef OPENSSL_NO_ECDH | ||
| 172 | ENGINE_register_ECDH(e); | ||
| 173 | #endif | ||
| 174 | #ifndef OPENSSL_NO_EC | 165 | #ifndef OPENSSL_NO_EC |
| 175 | ENGINE_register_EC(e); | 166 | ENGINE_register_EC(e); |
| 176 | #endif | 167 | #endif |
diff --git a/src/lib/libcrypto/engine/eng_int.h b/src/lib/libcrypto/engine/eng_int.h index ad504a5a2b..2b0ba22aaf 100644 --- a/src/lib/libcrypto/engine/eng_int.h +++ b/src/lib/libcrypto/engine/eng_int.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: eng_int.h,v 1.11 2023/07/28 09:08:31 tb Exp $ */ | 1 | /* $OpenBSD: eng_int.h,v 1.12 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -157,7 +157,6 @@ struct engine_st { | |||
| 157 | const RSA_METHOD *rsa_meth; | 157 | const RSA_METHOD *rsa_meth; |
| 158 | const DSA_METHOD *dsa_meth; | 158 | const DSA_METHOD *dsa_meth; |
| 159 | const DH_METHOD *dh_meth; | 159 | const DH_METHOD *dh_meth; |
| 160 | const ECDH_METHOD *ecdh_meth; | ||
| 161 | const EC_KEY_METHOD *ec_meth; | 160 | const EC_KEY_METHOD *ec_meth; |
| 162 | const RAND_METHOD *rand_meth; | 161 | const RAND_METHOD *rand_meth; |
| 163 | const STORE_METHOD *store_meth; | 162 | const STORE_METHOD *store_meth; |
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c index e460e71136..eaa0d228f9 100644 --- a/src/lib/libcrypto/engine/eng_list.c +++ b/src/lib/libcrypto/engine/eng_list.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: eng_list.c,v 1.26 2023/07/28 09:08:31 tb Exp $ */ | 1 | /* $OpenBSD: eng_list.c,v 1.27 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -310,9 +310,6 @@ engine_cpy(ENGINE *dest, const ENGINE *src) | |||
| 310 | #ifndef OPENSSL_NO_DH | 310 | #ifndef OPENSSL_NO_DH |
| 311 | dest->dh_meth = src->dh_meth; | 311 | dest->dh_meth = src->dh_meth; |
| 312 | #endif | 312 | #endif |
| 313 | #ifndef OPENSSL_NO_ECDH | ||
| 314 | dest->ecdh_meth = src->ecdh_meth; | ||
| 315 | #endif | ||
| 316 | #ifndef OPENSSL_NO_EC | 313 | #ifndef OPENSSL_NO_EC |
| 317 | dest->ec_meth = src->ec_meth; | 314 | dest->ec_meth = src->ec_meth; |
| 318 | #endif | 315 | #endif |
diff --git a/src/lib/libcrypto/engine/eng_openssl.c b/src/lib/libcrypto/engine/eng_openssl.c index 7abb6114bc..6162b715f0 100644 --- a/src/lib/libcrypto/engine/eng_openssl.c +++ b/src/lib/libcrypto/engine/eng_openssl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: eng_openssl.c,v 1.18 2023/07/28 09:08:31 tb Exp $ */ | 1 | /* $OpenBSD: eng_openssl.c,v 1.19 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -146,9 +146,6 @@ bind_helper(ENGINE *e) | |||
| 146 | #ifndef OPENSSL_NO_DSA | 146 | #ifndef OPENSSL_NO_DSA |
| 147 | || !ENGINE_set_DSA(e, DSA_get_default_method()) | 147 | || !ENGINE_set_DSA(e, DSA_get_default_method()) |
| 148 | #endif | 148 | #endif |
| 149 | #ifndef OPENSSL_NO_ECDH | ||
| 150 | || !ENGINE_set_ECDH(e, ECDH_OpenSSL()) | ||
| 151 | #endif | ||
| 152 | #ifndef OPENSSL_NO_DH | 149 | #ifndef OPENSSL_NO_DH |
| 153 | || !ENGINE_set_DH(e, DH_get_default_method()) | 150 | || !ENGINE_set_DH(e, DH_get_default_method()) |
| 154 | #endif | 151 | #endif |
diff --git a/src/lib/libcrypto/engine/engine.h b/src/lib/libcrypto/engine/engine.h index dbc3718dca..ef5878a5d3 100644 --- a/src/lib/libcrypto/engine/engine.h +++ b/src/lib/libcrypto/engine/engine.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: engine.h,v 1.40 2023/07/28 09:08:31 tb Exp $ */ | 1 | /* $OpenBSD: engine.h,v 1.41 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -76,9 +76,6 @@ | |||
| 76 | #ifndef OPENSSL_NO_EC | 76 | #ifndef OPENSSL_NO_EC |
| 77 | #include <openssl/ec.h> | 77 | #include <openssl/ec.h> |
| 78 | #endif | 78 | #endif |
| 79 | #ifndef OPENSSL_NO_ECDH | ||
| 80 | #include <openssl/ecdh.h> | ||
| 81 | #endif | ||
| 82 | #include <openssl/err.h> | 79 | #include <openssl/err.h> |
| 83 | #ifndef OPENSSL_NO_RSA | 80 | #ifndef OPENSSL_NO_RSA |
| 84 | #include <openssl/rsa.h> | 81 | #include <openssl/rsa.h> |
| @@ -98,7 +95,6 @@ extern "C" { | |||
| 98 | #define ENGINE_METHOD_DSA (unsigned int)0x0002 | 95 | #define ENGINE_METHOD_DSA (unsigned int)0x0002 |
| 99 | #define ENGINE_METHOD_DH (unsigned int)0x0004 | 96 | #define ENGINE_METHOD_DH (unsigned int)0x0004 |
| 100 | #define ENGINE_METHOD_RAND (unsigned int)0x0008 | 97 | #define ENGINE_METHOD_RAND (unsigned int)0x0008 |
| 101 | #define ENGINE_METHOD_ECDH (unsigned int)0x0010 | ||
| 102 | #define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 | 98 | #define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 |
| 103 | #define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 | 99 | #define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 |
| 104 | #define ENGINE_METHOD_STORE (unsigned int)0x0100 | 100 | #define ENGINE_METHOD_STORE (unsigned int)0x0100 |
| @@ -375,10 +371,6 @@ int ENGINE_register_DSA(ENGINE *e); | |||
| 375 | void ENGINE_unregister_DSA(ENGINE *e); | 371 | void ENGINE_unregister_DSA(ENGINE *e); |
| 376 | void ENGINE_register_all_DSA(void); | 372 | void ENGINE_register_all_DSA(void); |
| 377 | 373 | ||
| 378 | int ENGINE_register_ECDH(ENGINE *e); | ||
| 379 | void ENGINE_unregister_ECDH(ENGINE *e); | ||
| 380 | void ENGINE_register_all_ECDH(void); | ||
| 381 | |||
| 382 | int ENGINE_register_EC(ENGINE *e); | 374 | int ENGINE_register_EC(ENGINE *e); |
| 383 | void ENGINE_unregister_EC(ENGINE *e); | 375 | void ENGINE_unregister_EC(ENGINE *e); |
| 384 | void ENGINE_register_all_EC(void); | 376 | void ENGINE_register_all_EC(void); |
| @@ -475,7 +467,6 @@ int ENGINE_set_id(ENGINE *e, const char *id); | |||
| 475 | int ENGINE_set_name(ENGINE *e, const char *name); | 467 | int ENGINE_set_name(ENGINE *e, const char *name); |
| 476 | int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); | 468 | int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); |
| 477 | int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); | 469 | int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); |
| 478 | int ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth); | ||
| 479 | int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ec_meth); | 470 | int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ec_meth); |
| 480 | int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); | 471 | int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); |
| 481 | int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); | 472 | int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); |
| @@ -514,7 +505,6 @@ const char *ENGINE_get_id(const ENGINE *e); | |||
| 514 | const char *ENGINE_get_name(const ENGINE *e); | 505 | const char *ENGINE_get_name(const ENGINE *e); |
| 515 | const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); | 506 | const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); |
| 516 | const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); | 507 | const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); |
| 517 | const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e); | ||
| 518 | const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e); | 508 | const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e); |
| 519 | const DH_METHOD *ENGINE_get_DH(const ENGINE *e); | 509 | const DH_METHOD *ENGINE_get_DH(const ENGINE *e); |
| 520 | const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); | 510 | const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); |
| @@ -581,7 +571,6 @@ int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, | |||
| 581 | ENGINE *ENGINE_get_default_RSA(void); | 571 | ENGINE *ENGINE_get_default_RSA(void); |
| 582 | /* Same for the other "methods" */ | 572 | /* Same for the other "methods" */ |
| 583 | ENGINE *ENGINE_get_default_DSA(void); | 573 | ENGINE *ENGINE_get_default_DSA(void); |
| 584 | ENGINE *ENGINE_get_default_ECDH(void); | ||
| 585 | ENGINE *ENGINE_get_default_EC(void); | 574 | ENGINE *ENGINE_get_default_EC(void); |
| 586 | ENGINE *ENGINE_get_default_DH(void); | 575 | ENGINE *ENGINE_get_default_DH(void); |
| 587 | ENGINE *ENGINE_get_default_RAND(void); | 576 | ENGINE *ENGINE_get_default_RAND(void); |
| @@ -600,7 +589,6 @@ int ENGINE_set_default_RSA(ENGINE *e); | |||
| 600 | int ENGINE_set_default_string(ENGINE *e, const char *def_list); | 589 | int ENGINE_set_default_string(ENGINE *e, const char *def_list); |
| 601 | /* Same for the other "methods" */ | 590 | /* Same for the other "methods" */ |
| 602 | int ENGINE_set_default_DSA(ENGINE *e); | 591 | int ENGINE_set_default_DSA(ENGINE *e); |
| 603 | int ENGINE_set_default_ECDH(ENGINE *e); | ||
| 604 | int ENGINE_set_default_EC(ENGINE *e); | 592 | int ENGINE_set_default_EC(ENGINE *e); |
| 605 | int ENGINE_set_default_DH(ENGINE *e); | 593 | int ENGINE_set_default_DH(ENGINE *e); |
| 606 | int ENGINE_set_default_RAND(ENGINE *e); | 594 | int ENGINE_set_default_RAND(ENGINE *e); |
diff --git a/src/lib/libcrypto/engine/tb_ecdh.c b/src/lib/libcrypto/engine/tb_ecdh.c deleted file mode 100644 index a67877addd..0000000000 --- a/src/lib/libcrypto/engine/tb_ecdh.c +++ /dev/null | |||
| @@ -1,141 +0,0 @@ | |||
| 1 | /* $OpenBSD: tb_ecdh.c,v 1.4 2014/06/12 15:49:29 deraadt Exp $ */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | ||
| 4 | * | ||
| 5 | * The Elliptic Curve Public-Key Crypto Library (ECC Code) included | ||
| 6 | * herein is developed by SUN MICROSYSTEMS, INC., and is contributed | ||
| 7 | * to the OpenSSL project. | ||
| 8 | * | ||
| 9 | * The ECC Code is licensed pursuant to the OpenSSL open source | ||
| 10 | * license provided below. | ||
| 11 | * | ||
| 12 | * The ECDH engine software is originally written by Nils Gura and | ||
| 13 | * Douglas Stebila of Sun Microsystems Laboratories. | ||
| 14 | * | ||
| 15 | */ | ||
| 16 | /* ==================================================================== | ||
| 17 | * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. | ||
| 18 | * | ||
| 19 | * Redistribution and use in source and binary forms, with or without | ||
| 20 | * modification, are permitted provided that the following conditions | ||
| 21 | * are met: | ||
| 22 | * | ||
| 23 | * 1. Redistributions of source code must retain the above copyright | ||
| 24 | * notice, this list of conditions and the following disclaimer. | ||
| 25 | * | ||
| 26 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer in | ||
| 28 | * the documentation and/or other materials provided with the | ||
| 29 | * distribution. | ||
| 30 | * | ||
| 31 | * 3. All advertising materials mentioning features or use of this | ||
| 32 | * software must display the following acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 35 | * | ||
| 36 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 37 | * endorse or promote products derived from this software without | ||
| 38 | * prior written permission. For written permission, please contact | ||
| 39 | * licensing@OpenSSL.org. | ||
| 40 | * | ||
| 41 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 42 | * nor may "OpenSSL" appear in their names without prior written | ||
| 43 | * permission of the OpenSSL Project. | ||
| 44 | * | ||
| 45 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 46 | * acknowledgment: | ||
| 47 | * "This product includes software developed by the OpenSSL Project | ||
| 48 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 49 | * | ||
| 50 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 51 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 53 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 54 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 56 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 57 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 58 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 59 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 60 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 61 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 62 | * ==================================================================== | ||
| 63 | * | ||
| 64 | * This product includes cryptographic software written by Eric Young | ||
| 65 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 66 | * Hudson (tjh@cryptsoft.com). | ||
| 67 | * | ||
| 68 | */ | ||
| 69 | |||
| 70 | #include "eng_int.h" | ||
| 71 | |||
| 72 | /* If this symbol is defined then ENGINE_get_default_ECDH(), the function that is | ||
| 73 | * used by ECDH to hook in implementation code and cache defaults (etc), will | ||
| 74 | * display brief debugging summaries to stderr with the 'nid'. */ | ||
| 75 | /* #define ENGINE_ECDH_DEBUG */ | ||
| 76 | |||
| 77 | static ENGINE_TABLE *ecdh_table = NULL; | ||
| 78 | static const int dummy_nid = 1; | ||
| 79 | |||
| 80 | void | ||
| 81 | ENGINE_unregister_ECDH(ENGINE *e) | ||
| 82 | { | ||
| 83 | engine_table_unregister(&ecdh_table, e); | ||
| 84 | } | ||
| 85 | |||
| 86 | static void | ||
| 87 | engine_unregister_all_ECDH(void) | ||
| 88 | { | ||
| 89 | engine_table_cleanup(&ecdh_table); | ||
| 90 | } | ||
| 91 | |||
| 92 | int | ||
| 93 | ENGINE_register_ECDH(ENGINE *e) | ||
| 94 | { | ||
| 95 | if (e->ecdh_meth) | ||
| 96 | return engine_table_register(&ecdh_table, | ||
| 97 | engine_unregister_all_ECDH, e, &dummy_nid, 1, 0); | ||
| 98 | return 1; | ||
| 99 | } | ||
| 100 | |||
| 101 | void | ||
| 102 | ENGINE_register_all_ECDH(void) | ||
| 103 | { | ||
| 104 | ENGINE *e; | ||
| 105 | |||
| 106 | for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) | ||
| 107 | ENGINE_register_ECDH(e); | ||
| 108 | } | ||
| 109 | |||
| 110 | int | ||
| 111 | ENGINE_set_default_ECDH(ENGINE *e) | ||
| 112 | { | ||
| 113 | if (e->ecdh_meth) | ||
| 114 | return engine_table_register(&ecdh_table, | ||
| 115 | engine_unregister_all_ECDH, e, &dummy_nid, 1, 1); | ||
| 116 | return 1; | ||
| 117 | } | ||
| 118 | |||
| 119 | /* Exposed API function to get a functional reference from the implementation | ||
| 120 | * table (ie. try to get a functional reference from the tabled structural | ||
| 121 | * references). */ | ||
| 122 | ENGINE * | ||
| 123 | ENGINE_get_default_ECDH(void) | ||
| 124 | { | ||
| 125 | return engine_table_select(&ecdh_table, dummy_nid); | ||
| 126 | } | ||
| 127 | |||
| 128 | /* Obtains an ECDH implementation from an ENGINE functional reference */ | ||
| 129 | const ECDH_METHOD * | ||
| 130 | ENGINE_get_ECDH(const ENGINE *e) | ||
| 131 | { | ||
| 132 | return e->ecdh_meth; | ||
| 133 | } | ||
| 134 | |||
| 135 | /* Sets an ECDH implementation in an ENGINE structure */ | ||
| 136 | int | ||
| 137 | ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth) | ||
| 138 | { | ||
| 139 | e->ecdh_meth = ecdh_meth; | ||
| 140 | return 1; | ||
| 141 | } | ||
diff --git a/src/lib/libcrypto/hidden/openssl/ecdh.h b/src/lib/libcrypto/hidden/openssl/ecdh.h index db56f8a588..aff95893f0 100644 --- a/src/lib/libcrypto/hidden/openssl/ecdh.h +++ b/src/lib/libcrypto/hidden/openssl/ecdh.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecdh.h,v 1.1 2023/07/08 06:04:33 beck Exp $ */ | 1 | /* $OpenBSD: ecdh.h,v 1.2 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -25,15 +25,7 @@ | |||
| 25 | #endif | 25 | #endif |
| 26 | #include "crypto_namespace.h" | 26 | #include "crypto_namespace.h" |
| 27 | 27 | ||
| 28 | LCRYPTO_USED(ECDH_OpenSSL); | ||
| 29 | LCRYPTO_USED(ECDH_set_default_method); | ||
| 30 | LCRYPTO_USED(ECDH_get_default_method); | ||
| 31 | LCRYPTO_USED(ECDH_set_method); | ||
| 32 | LCRYPTO_USED(ECDH_size); | 28 | LCRYPTO_USED(ECDH_size); |
| 33 | LCRYPTO_USED(ECDH_compute_key); | 29 | LCRYPTO_USED(ECDH_compute_key); |
| 34 | LCRYPTO_USED(ECDH_get_ex_new_index); | ||
| 35 | LCRYPTO_USED(ECDH_set_ex_data); | ||
| 36 | LCRYPTO_USED(ECDH_get_ex_data); | ||
| 37 | LCRYPTO_USED(ERR_load_ECDH_strings); | ||
| 38 | 30 | ||
| 39 | #endif /* _LIBCRYPTO_ECDH_H */ | 31 | #endif /* _LIBCRYPTO_ECDH_H */ |
diff --git a/src/lib/libcrypto/ossl_typ.h b/src/lib/libcrypto/ossl_typ.h index 8ff3779636..b58888de3b 100644 --- a/src/lib/libcrypto/ossl_typ.h +++ b/src/lib/libcrypto/ossl_typ.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ossl_typ.h,v 1.26 2023/07/28 09:08:31 tb Exp $ */ | 1 | /* $OpenBSD: ossl_typ.h,v 1.27 2023/07/28 09:22:26 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -124,8 +124,6 @@ typedef struct rsa_pss_params_st RSA_PSS_PARAMS; | |||
| 124 | 124 | ||
| 125 | typedef struct rand_meth_st RAND_METHOD; | 125 | typedef struct rand_meth_st RAND_METHOD; |
| 126 | 126 | ||
| 127 | typedef struct ecdh_method ECDH_METHOD; | ||
| 128 | |||
| 129 | typedef struct x509_st X509; | 127 | typedef struct x509_st X509; |
| 130 | typedef struct X509_algor_st X509_ALGOR; | 128 | typedef struct X509_algor_st X509_ALGOR; |
| 131 | typedef struct X509_crl_st X509_CRL; | 129 | typedef struct X509_crl_st X509_CRL; |
