summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdh
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/ecdh
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/ecdh')
-rw-r--r--src/lib/libcrypto/ecdh/ech_lib.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_lib.c b/src/lib/libcrypto/ecdh/ech_lib.c
index 90e14e1108..6e12126034 100644
--- a/src/lib/libcrypto/ecdh/ech_lib.c
+++ b/src/lib/libcrypto/ecdh/ech_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_lib.c,v 1.17 2023/06/25 18:24:33 tb Exp $ */ 1/* $OpenBSD: ech_lib.c,v 1.18 2023/06/25 18:27:38 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -201,28 +201,19 @@ int
201ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 201ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
202 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) 202 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
203{ 203{
204 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ECDH, argl, argp, 204 return -1;
205 new_func, dup_func, free_func);
206} 205}
207 206
208int 207int
209ECDH_set_ex_data(EC_KEY *d, int idx, void *arg) 208ECDH_set_ex_data(EC_KEY *d, int idx, void *arg)
210{ 209{
211 ECDH_DATA *ecdh; 210 return 0;
212 ecdh = ecdh_check(d);
213 if (ecdh == NULL)
214 return 0;
215 return (CRYPTO_set_ex_data(&ecdh->ex_data, idx, arg));
216} 211}
217 212
218void * 213void *
219ECDH_get_ex_data(EC_KEY *d, int idx) 214ECDH_get_ex_data(EC_KEY *d, int idx)
220{ 215{
221 ECDH_DATA *ecdh; 216 return NULL;
222 ecdh = ecdh_check(d);
223 if (ecdh == NULL)
224 return NULL;
225 return (CRYPTO_get_ex_data(&ecdh->ex_data, idx));
226} 217}
227 218
228int 219int