summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdsa/ecs_lib.c
diff options
context:
space:
mode:
authortb <>2023-06-25 19:04:35 +0000
committertb <>2023-06-25 19:04:35 +0000
commitee47cbc9921c1d9c4e8fbbf947e18302394c28d0 (patch)
treeaf87b42bf5227888532aa40b6a65f2a288988c84 /src/lib/libcrypto/ecdsa/ecs_lib.c
parentb60bbdf8219ec24f77b8e7e83287a5eaab014cc3 (diff)
downloadopenbsd-ee47cbc9921c1d9c4e8fbbf947e18302394c28d0.tar.gz
openbsd-ee47cbc9921c1d9c4e8fbbf947e18302394c28d0.tar.bz2
openbsd-ee47cbc9921c1d9c4e8fbbf947e18302394c28d0.zip
Move ECDH_OpenSSL() ECDSA_OpenSSL() to *_lib.c
Now that they no longer use static methods, they can move where they belong. Also make the static method const, as it should have been all along.
Diffstat (limited to 'src/lib/libcrypto/ecdsa/ecs_lib.c')
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_lib.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_lib.c b/src/lib/libcrypto/ecdsa/ecs_lib.c
index 11e707dd55..477f49a6c2 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.20 2023/06/25 18:45:56 tb Exp $ */ 1/* $OpenBSD: ecs_lib.c,v 1.21 2023/06/25 19:04:35 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 *
@@ -68,6 +68,19 @@
68 68
69static const ECDSA_METHOD *default_ECDSA_method = NULL; 69static const ECDSA_METHOD *default_ECDSA_method = NULL;
70 70
71static const ECDSA_METHOD openssl_ecdsa_meth = {
72 .name = "OpenSSL ECDSA method",
73 .ecdsa_do_sign = ossl_ecdsa_sign_sig,
74 .ecdsa_sign_setup = ossl_ecdsa_sign_setup,
75 .ecdsa_do_verify = ossl_ecdsa_verify_sig,
76};
77
78const ECDSA_METHOD *
79ECDSA_OpenSSL(void)
80{
81 return &openssl_ecdsa_meth;
82}
83
71void 84void
72ECDSA_set_default_method(const ECDSA_METHOD *meth) 85ECDSA_set_default_method(const ECDSA_METHOD *meth)
73{ 86{