From 1e2ac2fca21d596cb8875b234f13a5af9f5bfe7b Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 14 Jan 2022 08:31:03 +0000 Subject: [PATCH] Move ECDSA_SIG to ecs_locl.h We can't make ECDSA_METHOD opaque since it is still used in smtpd(8) ok inoguchi jsing --- lib/libcrypto/ecdsa/ecdsa.h | 11 +---------- lib/libcrypto/ecdsa/ecs_locl.h | 7 ++++++- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/libcrypto/ecdsa/ecdsa.h b/lib/libcrypto/ecdsa/ecdsa.h index 7b57f534eff..eccca65b5a2 100644 --- a/lib/libcrypto/ecdsa/ecdsa.h +++ b/lib/libcrypto/ecdsa/ecdsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ecdsa.h,v 1.10 2022/01/14 07:49:49 tb Exp $ */ +/* $OpenBSD: ecdsa.h,v 1.11 2022/01/14 08:31:03 tb Exp $ */ /** * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions * \author Written by Nils Larsch for the OpenSSL project @@ -85,10 +85,6 @@ struct ecdsa_method { BIGNUM **r); int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey); -#if 0 - int (*init)(EC_KEY *eckey); - int (*finish)(EC_KEY *eckey); -#endif int flags; char *app_data; }; @@ -101,11 +97,6 @@ struct ecdsa_method { #define ECDSA_FLAG_FIPS_METHOD 0x1 -struct ECDSA_SIG_st { - BIGNUM *r; - BIGNUM *s; -}; - /** Allocates and initialize a ECDSA_SIG structure * \return pointer to a ECDSA_SIG structure or NULL if an error occurred */ diff --git a/lib/libcrypto/ecdsa/ecs_locl.h b/lib/libcrypto/ecdsa/ecs_locl.h index 0a9f17908ba..a53ec379ea2 100644 --- a/lib/libcrypto/ecdsa/ecs_locl.h +++ b/lib/libcrypto/ecdsa/ecs_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ecs_locl.h,v 1.6 2019/01/19 01:07:00 tb Exp $ */ +/* $OpenBSD: ecs_locl.h,v 1.7 2022/01/14 08:31:03 tb Exp $ */ /* * Written by Nils Larsch for the OpenSSL project */ @@ -73,6 +73,11 @@ typedef struct ecdsa_data_st { CRYPTO_EX_DATA ex_data; } ECDSA_DATA; +struct ECDSA_SIG_st { + BIGNUM *r; + BIGNUM *s; +}; + /** ecdsa_check * checks whether ECKEY->meth_data is a pointer to a ECDSA_DATA structure * and if not it removes the old meth_data and creates a ECDSA_DATA structure. -- 2.20.1