including the local header where it will be needed.
discussed with jsing
-# $OpenBSD: Makefile,v 1.65 2022/01/07 09:27:13 tb Exp $
+# $OpenBSD: Makefile,v 1.66 2022/01/07 09:35:36 tb Exp $
LIB= crypto
LIBREBUILD=y
CFLAGS+= -I${LCRYPTO_SRC}/bn
CFLAGS+= -I${LCRYPTO_SRC}/bytestring
CFLAGS+= -I${LCRYPTO_SRC}/dh
+CFLAGS+= -I${LCRYPTO_SRC}/dsa
CFLAGS+= -I${LCRYPTO_SRC}/ec
CFLAGS+= -I${LCRYPTO_SRC}/ecdh
CFLAGS+= -I${LCRYPTO_SRC}/ecdsa
-/* $OpenBSD: dsa_ameth.c,v 1.29 2021/12/12 21:30:13 tb Exp $ */
+/* $OpenBSD: dsa_ameth.c,v 1.30 2022/01/07 09:35:36 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
#include "asn1_locl.h"
#include "bn_lcl.h"
+#include "dsa_locl.h"
#include "evp_locl.h"
static int
-/* $OpenBSD: dsa_asn1.c,v 1.22 2018/06/14 17:03:19 jsing Exp $ */
+/* $OpenBSD: dsa_asn1.c,v 1.23 2022/01/07 09:35:36 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
#include <openssl/dsa.h>
#include <openssl/err.h>
+#include "dsa_locl.h"
+
/* Override the default new methods */
static int
sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
-/* $OpenBSD: dsa_key.c,v 1.29 2018/11/09 23:45:19 tb Exp $ */
+/* $OpenBSD: dsa_key.c,v 1.30 2022/01/07 09:35:36 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/bn.h>
#include <openssl/dsa.h>
+
#include "bn_lcl.h"
+#include "dsa_locl.h"
static int dsa_builtin_keygen(DSA *dsa);
-/* $OpenBSD: dsa_lib.c,v 1.32 2022/01/07 09:27:13 tb Exp $ */
+/* $OpenBSD: dsa_lib.c,v 1.33 2022/01/07 09:35:36 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#endif
#include "dh_local.h"
+#include "dsa_locl.h"
static const DSA_METHOD *default_DSA_method = NULL;
-/* $OpenBSD: dsa_meth.c,v 1.1 2018/03/17 15:19:12 tb Exp $ */
+/* $OpenBSD: dsa_meth.c,v 1.2 2022/01/07 09:35:36 tb Exp $ */
/*
* Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
*
#include <openssl/dsa.h>
#include <openssl/err.h>
+#include "dsa_locl.h"
+
DSA_METHOD *
DSA_meth_new(const char *name, int flags)
{
-/* $OpenBSD: dsa_ossl.c,v 1.42 2019/06/04 18:12:26 tb Exp $ */
+/* $OpenBSD: dsa_ossl.c,v 1.43 2022/01/07 09:35:36 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/sha.h>
#include "bn_lcl.h"
+#include "dsa_locl.h"
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
-/* $OpenBSD: dsa_sign.c,v 1.20 2018/06/14 17:01:49 jsing Exp $ */
+/* $OpenBSD: dsa_sign.c,v 1.21 2022/01/07 09:35:36 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/bn.h>
#include <openssl/dsa.h>
+#include "dsa_locl.h"
+
DSA_SIG *
DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
-/* $OpenBSD: dsa_vrf.c,v 1.16 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: dsa_vrf.c,v 1.17 2022/01/07 09:35:36 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/dsa.h>
+#include "dsa_locl.h"
+
int
DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa)
{
-/* $OpenBSD: pvkfmt.c,v 1.23 2021/12/12 21:30:14 tb Exp $ */
+/* $OpenBSD: pvkfmt.c,v 1.24 2022/01/07 09:35:36 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2005.
*/
#include <openssl/rsa.h>
#include "bn_lcl.h"
+#include "dsa_locl.h"
#include "evp_locl.h"
/* Utility function: read a DWORD (4 byte unsigned integer) in little endian