-/* $OpenBSD: ech_key.c,v 1.15 2023/06/25 18:41:36 tb Exp $ */
+/* $OpenBSD: ech_key.c,v 1.16 2023/06/25 19:04:35 tb Exp $ */
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
*
return (ret);
}
-static ECDH_METHOD openssl_ecdh_meth = {
- .name = "OpenSSL ECDH method",
- .compute_key = ossl_ecdh_compute_key,
-};
-
-const ECDH_METHOD *
-ECDH_OpenSSL(void)
-{
- return &openssl_ecdh_meth;
-}
-
int
ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
EC_KEY *eckey,
-/* $OpenBSD: ech_lib.c,v 1.19 2023/06/25 18:45:56 tb Exp $ */
+/* $OpenBSD: ech_lib.c,v 1.20 2023/06/25 19:04:35 tb Exp $ */
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
*
static const ECDH_METHOD *default_ECDH_method = NULL;
+static const ECDH_METHOD openssl_ecdh_meth = {
+ .name = "OpenSSL ECDH method",
+ .compute_key = ossl_ecdh_compute_key,
+};
+
+const ECDH_METHOD *
+ECDH_OpenSSL(void)
+{
+ return &openssl_ecdh_meth;
+}
+
void
ECDH_set_default_method(const ECDH_METHOD *meth)
{
-/* $OpenBSD: ecs_lib.c,v 1.20 2023/06/25 18:45:56 tb Exp $ */
+/* $OpenBSD: ecs_lib.c,v 1.21 2023/06/25 19:04:35 tb Exp $ */
/* ====================================================================
* Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
*
static const ECDSA_METHOD *default_ECDSA_method = NULL;
+static const ECDSA_METHOD openssl_ecdsa_meth = {
+ .name = "OpenSSL ECDSA method",
+ .ecdsa_do_sign = ossl_ecdsa_sign_sig,
+ .ecdsa_sign_setup = ossl_ecdsa_sign_setup,
+ .ecdsa_do_verify = ossl_ecdsa_verify_sig,
+};
+
+const ECDSA_METHOD *
+ECDSA_OpenSSL(void)
+{
+ return &openssl_ecdsa_meth;
+}
+
void
ECDSA_set_default_method(const ECDSA_METHOD *meth)
{
-/* $OpenBSD: ecs_ossl.c,v 1.35 2023/06/25 18:41:36 tb Exp $ */
+/* $OpenBSD: ecs_ossl.c,v 1.36 2023/06/25 19:04:35 tb Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project
*/
static int ecdsa_prepare_digest(const unsigned char *dgst, int dgst_len,
BIGNUM *order, BIGNUM *ret);
-static ECDSA_METHOD openssl_ecdsa_meth = {
- .name = "OpenSSL ECDSA method",
- .ecdsa_do_sign = ossl_ecdsa_sign_sig,
- .ecdsa_sign_setup = ossl_ecdsa_sign_setup,
- .ecdsa_do_verify = ossl_ecdsa_verify_sig,
-};
-
-const ECDSA_METHOD *
-ECDSA_OpenSSL(void)
-{
- return &openssl_ecdsa_meth;
-}
-
static int
ecdsa_prepare_digest(const unsigned char *dgst, int dgst_len, BIGNUM *order,
BIGNUM *ret)