diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ecdh/ech_key.c | 13 | ||||
| -rw-r--r-- | src/lib/libcrypto/ecdh/ech_lib.c | 13 | ||||
| -rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_lib.c | 15 | ||||
| -rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_ossl.c | 15 |
4 files changed, 28 insertions, 28 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c index 108a5ff8f6..5f68b01860 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.15 2023/06/25 18:41:36 tb Exp $ */ | 1 | /* $OpenBSD: ech_key.c,v 1.16 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 | * |
| @@ -189,17 +189,6 @@ err: | |||
| 189 | return (ret); | 189 | return (ret); |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | static ECDH_METHOD openssl_ecdh_meth = { | ||
| 193 | .name = "OpenSSL ECDH method", | ||
| 194 | .compute_key = ossl_ecdh_compute_key, | ||
| 195 | }; | ||
| 196 | |||
| 197 | const ECDH_METHOD * | ||
| 198 | ECDH_OpenSSL(void) | ||
| 199 | { | ||
| 200 | return &openssl_ecdh_meth; | ||
| 201 | } | ||
| 202 | |||
| 203 | int | 192 | int |
| 204 | ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, | 193 | ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, |
| 205 | EC_KEY *eckey, | 194 | EC_KEY *eckey, |
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 | { |
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 | ||
| 69 | static const ECDSA_METHOD *default_ECDSA_method = NULL; | 69 | static const ECDSA_METHOD *default_ECDSA_method = NULL; |
| 70 | 70 | ||
| 71 | static 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 | |||
| 78 | const ECDSA_METHOD * | ||
| 79 | ECDSA_OpenSSL(void) | ||
| 80 | { | ||
| 81 | return &openssl_ecdsa_meth; | ||
| 82 | } | ||
| 83 | |||
| 71 | void | 84 | void |
| 72 | ECDSA_set_default_method(const ECDSA_METHOD *meth) | 85 | ECDSA_set_default_method(const ECDSA_METHOD *meth) |
| 73 | { | 86 | { |
diff --git a/src/lib/libcrypto/ecdsa/ecs_ossl.c b/src/lib/libcrypto/ecdsa/ecs_ossl.c index 5df87f224b..547d3b59e1 100644 --- a/src/lib/libcrypto/ecdsa/ecs_ossl.c +++ b/src/lib/libcrypto/ecdsa/ecs_ossl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecs_ossl.c,v 1.35 2023/06/25 18:41:36 tb Exp $ */ | 1 | /* $OpenBSD: ecs_ossl.c,v 1.36 2023/06/25 19:04:35 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project | 3 | * Written by Nils Larsch for the OpenSSL project |
| 4 | */ | 4 | */ |
| @@ -72,19 +72,6 @@ | |||
| 72 | static int ecdsa_prepare_digest(const unsigned char *dgst, int dgst_len, | 72 | static int ecdsa_prepare_digest(const unsigned char *dgst, int dgst_len, |
| 73 | BIGNUM *order, BIGNUM *ret); | 73 | BIGNUM *order, BIGNUM *ret); |
| 74 | 74 | ||
| 75 | static ECDSA_METHOD openssl_ecdsa_meth = { | ||
| 76 | .name = "OpenSSL ECDSA method", | ||
| 77 | .ecdsa_do_sign = ossl_ecdsa_sign_sig, | ||
| 78 | .ecdsa_sign_setup = ossl_ecdsa_sign_setup, | ||
| 79 | .ecdsa_do_verify = ossl_ecdsa_verify_sig, | ||
| 80 | }; | ||
| 81 | |||
| 82 | const ECDSA_METHOD * | ||
| 83 | ECDSA_OpenSSL(void) | ||
| 84 | { | ||
| 85 | return &openssl_ecdsa_meth; | ||
| 86 | } | ||
| 87 | |||
| 88 | static int | 75 | static int |
| 89 | ecdsa_prepare_digest(const unsigned char *dgst, int dgst_len, BIGNUM *order, | 76 | ecdsa_prepare_digest(const unsigned char *dgst, int dgst_len, BIGNUM *order, |
| 90 | BIGNUM *ret) | 77 | BIGNUM *ret) |
