summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2023-06-25 19:17:43 +0000
committertb <>2023-06-25 19:17:43 +0000
commit62f8cce22ec5250bff3d4aaa540494f06de9d7a6 (patch)
tree3e1da56422a5caf503ca50ae4916f50566512306 /src/lib
parent4ca5d704e4e9a4c2fe630db0434fe7e077bfc189 (diff)
downloadopenbsd-62f8cce22ec5250bff3d4aaa540494f06de9d7a6.tar.gz
openbsd-62f8cce22ec5250bff3d4aaa540494f06de9d7a6.tar.bz2
openbsd-62f8cce22ec5250bff3d4aaa540494f06de9d7a6.zip
Move ECDH_size() to ech_key.c
This way the public ECDH API that will remain in libcrypto is in one file and the public ECDH API that will go is in the other one.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/ecdh/ech_key.c8
-rw-r--r--src/lib/libcrypto/ecdh/ech_lib.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c
index 5f68b01860..208a4b328e 100644
--- a/src/lib/libcrypto/ecdh/ech_key.c
+++ b/src/lib/libcrypto/ecdh/ech_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_key.c,v 1.16 2023/06/25 19:04:35 tb Exp $ */ 1/* $OpenBSD: ech_key.c,v 1.17 2023/06/25 19:17:43 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -199,3 +199,9 @@ ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
199 ECerror(EC_R_NOT_IMPLEMENTED); 199 ECerror(EC_R_NOT_IMPLEMENTED);
200 return 0; 200 return 0;
201} 201}
202
203int
204ECDH_size(const EC_KEY *d)
205{
206 return ((EC_GROUP_get_degree(EC_KEY_get0_group(d)) + 7) / 8);
207}
diff --git a/src/lib/libcrypto/ecdh/ech_lib.c b/src/lib/libcrypto/ecdh/ech_lib.c
index c537ba00bf..eb1b6bfebc 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.21 2023/06/25 19:14:14 tb Exp $ */ 1/* $OpenBSD: ech_lib.c,v 1.22 2023/06/25 19:17:43 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -138,9 +138,3 @@ ECDH_get_ex_data(EC_KEY *d, int idx)
138{ 138{
139 return NULL; 139 return NULL;
140} 140}
141
142int
143ECDH_size(const EC_KEY *d)
144{
145 return ((EC_GROUP_get_degree(EC_KEY_get0_group(d)) + 7) / 8);
146}