summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdsa
diff options
context:
space:
mode:
authortb <>2023-06-25 18:27:38 +0000
committertb <>2023-06-25 18:27:38 +0000
commit8a1e023c2ee64bb1a72ea63f269885a2176ecd76 (patch)
treebb6e356d1d375cfa880793f31be33367ff221d48 /src/lib/libcrypto/ecdsa
parentef4ac7f08f60f4cf212a5d0b9144b09a4be3a085 (diff)
downloadopenbsd-8a1e023c2ee64bb1a72ea63f269885a2176ecd76.tar.gz
openbsd-8a1e023c2ee64bb1a72ea63f269885a2176ecd76.tar.bz2
openbsd-8a1e023c2ee64bb1a72ea63f269885a2176ecd76.zip
Make ECDH and ECDSA ex_data handlers always fail
They will be removed in the next major bump. No port uses them. They use code that is in the way of upcoming surgery. Only libtls and smtpd used to use the ECDSA version. ok jsing
Diffstat (limited to 'src/lib/libcrypto/ecdsa')
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_lib.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_lib.c b/src/lib/libcrypto/ecdsa/ecs_lib.c
index caebeeb1f9..9ba5db2fca 100644
--- a/src/lib/libcrypto/ecdsa/ecs_lib.c
+++ b/src/lib/libcrypto/ecdsa/ecs_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_lib.c,v 1.18 2023/06/25 18:24:33 tb Exp $ */ 1/* $OpenBSD: ecs_lib.c,v 1.19 2023/06/25 18:27:38 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -219,26 +219,17 @@ int
219ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 219ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
220 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) 220 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
221{ 221{
222 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ECDSA, argl, argp, 222 return -1;
223 new_func, dup_func, free_func);
224} 223}
225 224
226int 225int
227ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg) 226ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg)
228{ 227{
229 ECDSA_DATA *ecdsa; 228 return 0;
230 ecdsa = ecdsa_check(d);
231 if (ecdsa == NULL)
232 return 0;
233 return (CRYPTO_set_ex_data(&ecdsa->ex_data, idx, arg));
234} 229}
235 230
236void * 231void *
237ECDSA_get_ex_data(EC_KEY *d, int idx) 232ECDSA_get_ex_data(EC_KEY *d, int idx)
238{ 233{
239 ECDSA_DATA *ecdsa; 234 return NULL;
240 ecdsa = ecdsa_check(d);
241 if (ecdsa == NULL)
242 return NULL;
243 return (CRYPTO_get_ex_data(&ecdsa->ex_data, idx));
244} 235}