summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/ecdh/ech_lib.c17
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_lib.c17
2 files changed, 8 insertions, 26 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
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}