diff options
author | tb <> | 2023-06-25 19:04:35 +0000 |
---|---|---|
committer | tb <> | 2023-06-25 19:04:35 +0000 |
commit | 500ba3bf943245ebd4fb77b8691fdb06e51a615d (patch) | |
tree | af87b42bf5227888532aa40b6a65f2a288988c84 /src/lib/libcrypto/ecdh/ech_lib.c | |
parent | 70d8987d04d28fe256835167778ab28f3e6bdd3c (diff) | |
download | openbsd-500ba3bf943245ebd4fb77b8691fdb06e51a615d.tar.gz openbsd-500ba3bf943245ebd4fb77b8691fdb06e51a615d.tar.bz2 openbsd-500ba3bf943245ebd4fb77b8691fdb06e51a615d.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/ecdh/ech_lib.c')
-rw-r--r-- | src/lib/libcrypto/ecdh/ech_lib.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_lib.c b/src/lib/libcrypto/ecdh/ech_lib.c index f062ec3fdc..d968793208 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.19 2023/06/25 18:45:56 tb Exp $ */ | 1 | /* $OpenBSD: ech_lib.c,v 1.20 2023/06/25 19:04:35 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
4 | * | 4 | * |
@@ -81,6 +81,17 @@ | |||
81 | 81 | ||
82 | static const ECDH_METHOD *default_ECDH_method = NULL; | 82 | static const ECDH_METHOD *default_ECDH_method = NULL; |
83 | 83 | ||
84 | static const ECDH_METHOD openssl_ecdh_meth = { | ||
85 | .name = "OpenSSL ECDH method", | ||
86 | .compute_key = ossl_ecdh_compute_key, | ||
87 | }; | ||
88 | |||
89 | const ECDH_METHOD * | ||
90 | ECDH_OpenSSL(void) | ||
91 | { | ||
92 | return &openssl_ecdh_meth; | ||
93 | } | ||
94 | |||
84 | void | 95 | void |
85 | ECDH_set_default_method(const ECDH_METHOD *meth) | 96 | ECDH_set_default_method(const ECDH_METHOD *meth) |
86 | { | 97 | { |