summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-06-25 18:24:33 +0000
committertb <>2023-06-25 18:24:33 +0000
commit00a8f40a4141146dcf69a6d3d6bc5561b75a55a4 (patch)
tree83342f148922e9957e7456b1a2ec62b6969fdf61 /src
parent25c6f767aa1da36439a0be62f54faa244f747f8c (diff)
downloadopenbsd-00a8f40a4141146dcf69a6d3d6bc5561b75a55a4.tar.gz
openbsd-00a8f40a4141146dcf69a6d3d6bc5561b75a55a4.tar.bz2
openbsd-00a8f40a4141146dcf69a6d3d6bc5561b75a55a4.zip
Make {ECDH,ECDSA}_set_method() 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 used the ECDSA version, but thankfully op cleaned that up. ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ecdh/ech_lib.c16
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_lib.c17
2 files changed, 4 insertions, 29 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_lib.c b/src/lib/libcrypto/ecdh/ech_lib.c
index 15d7737c39..90e14e1108 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.16 2023/04/25 19:26:45 tb Exp $ */ 1/* $OpenBSD: ech_lib.c,v 1.17 2023/06/25 18:24:33 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -103,19 +103,7 @@ ECDH_get_default_method(void)
103int 103int
104ECDH_set_method(EC_KEY *eckey, const ECDH_METHOD *meth) 104ECDH_set_method(EC_KEY *eckey, const ECDH_METHOD *meth)
105{ 105{
106 ECDH_DATA *ecdh; 106 return 0;
107
108 ecdh = ecdh_check(eckey);
109
110 if (ecdh == NULL)
111 return 0;
112
113#ifndef OPENSSL_NO_ENGINE
114 ENGINE_finish(ecdh->engine);
115 ecdh->engine = NULL;
116#endif
117 ecdh->meth = meth;
118 return 1;
119} 107}
120 108
121static ECDH_DATA * 109static ECDH_DATA *
diff --git a/src/lib/libcrypto/ecdsa/ecs_lib.c b/src/lib/libcrypto/ecdsa/ecs_lib.c
index 9a35a030db..caebeeb1f9 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.17 2023/04/25 19:26:45 tb Exp $ */ 1/* $OpenBSD: ecs_lib.c,v 1.18 2023/06/25 18:24:33 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 *
@@ -90,20 +90,7 @@ ECDSA_get_default_method(void)
90int 90int
91ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth) 91ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth)
92{ 92{
93 ECDSA_DATA *ecdsa; 93 return 0;
94
95 ecdsa = ecdsa_check(eckey);
96
97 if (ecdsa == NULL)
98 return 0;
99
100#ifndef OPENSSL_NO_ENGINE
101 ENGINE_finish(ecdsa->engine);
102 ecdsa->engine = NULL;
103#endif
104 ecdsa->meth = meth;
105
106 return 1;
107} 94}
108 95
109static ECDSA_DATA * 96static ECDSA_DATA *