From: tb Date: Fri, 7 Jan 2022 09:35:36 +0000 (+0000) Subject: Prepare the move of DSA_SIG, DSA_METHOD and DSA to dsa_locl.h by X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f69303b6d2bf6045bb3b1b50ffa147b2a2b2c78c;p=openbsd Prepare the move of DSA_SIG, DSA_METHOD and DSA to dsa_locl.h by including the local header where it will be needed. discussed with jsing --- diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile index ed98dcc134c..71e16cc2b0e 100644 --- a/lib/libcrypto/Makefile +++ b/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -33,6 +33,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/bio 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 diff --git a/lib/libcrypto/dsa/dsa_ameth.c b/lib/libcrypto/dsa/dsa_ameth.c index af9ebaddde2..3c7644d2516 100644 --- a/lib/libcrypto/dsa/dsa_ameth.c +++ b/lib/libcrypto/dsa/dsa_ameth.c @@ -1,4 +1,4 @@ -/* $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. */ @@ -69,6 +69,7 @@ #include "asn1_locl.h" #include "bn_lcl.h" +#include "dsa_locl.h" #include "evp_locl.h" static int diff --git a/lib/libcrypto/dsa/dsa_asn1.c b/lib/libcrypto/dsa/dsa_asn1.c index 23f08bb1f98..3bf044665f1 100644 --- a/lib/libcrypto/dsa/dsa_asn1.c +++ b/lib/libcrypto/dsa/dsa_asn1.c @@ -1,4 +1,4 @@ -/* $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. */ @@ -64,6 +64,8 @@ #include #include +#include "dsa_locl.h" + /* Override the default new methods */ static int sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) diff --git a/lib/libcrypto/dsa/dsa_key.c b/lib/libcrypto/dsa/dsa_key.c index a0487e98b8c..a5053ec29a7 100644 --- a/lib/libcrypto/dsa/dsa_key.c +++ b/lib/libcrypto/dsa/dsa_key.c @@ -1,4 +1,4 @@ -/* $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. * @@ -65,7 +65,9 @@ #include #include + #include "bn_lcl.h" +#include "dsa_locl.h" static int dsa_builtin_keygen(DSA *dsa); diff --git a/lib/libcrypto/dsa/dsa_lib.c b/lib/libcrypto/dsa/dsa_lib.c index e910e340a91..7a7986b1f7e 100644 --- a/lib/libcrypto/dsa/dsa_lib.c +++ b/lib/libcrypto/dsa/dsa_lib.c @@ -1,4 +1,4 @@ -/* $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. * @@ -75,6 +75,7 @@ #endif #include "dh_local.h" +#include "dsa_locl.h" static const DSA_METHOD *default_DSA_method = NULL; diff --git a/lib/libcrypto/dsa/dsa_meth.c b/lib/libcrypto/dsa/dsa_meth.c index e6f043f8301..f8ed0352a0a 100644 --- a/lib/libcrypto/dsa/dsa_meth.c +++ b/lib/libcrypto/dsa/dsa_meth.c @@ -1,4 +1,4 @@ -/* $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 * @@ -21,6 +21,8 @@ #include #include +#include "dsa_locl.h" + DSA_METHOD * DSA_meth_new(const char *name, int flags) { diff --git a/lib/libcrypto/dsa/dsa_ossl.c b/lib/libcrypto/dsa/dsa_ossl.c index ecf26624679..ec11a08b5c0 100644 --- a/lib/libcrypto/dsa/dsa_ossl.c +++ b/lib/libcrypto/dsa/dsa_ossl.c @@ -1,4 +1,4 @@ -/* $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. * @@ -67,6 +67,7 @@ #include #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, diff --git a/lib/libcrypto/dsa/dsa_sign.c b/lib/libcrypto/dsa/dsa_sign.c index 0f55ea1868c..b1fc1dbb493 100644 --- a/lib/libcrypto/dsa/dsa_sign.c +++ b/lib/libcrypto/dsa/dsa_sign.c @@ -1,4 +1,4 @@ -/* $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. * @@ -61,6 +61,8 @@ #include #include +#include "dsa_locl.h" + DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) { diff --git a/lib/libcrypto/dsa/dsa_vrf.c b/lib/libcrypto/dsa/dsa_vrf.c index 1965338f1fa..38f8450e725 100644 --- a/lib/libcrypto/dsa/dsa_vrf.c +++ b/lib/libcrypto/dsa/dsa_vrf.c @@ -1,4 +1,4 @@ -/* $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. * @@ -60,6 +60,8 @@ #include +#include "dsa_locl.h" + int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) { diff --git a/lib/libcrypto/pem/pvkfmt.c b/lib/libcrypto/pem/pvkfmt.c index 9d758ab2895..7437eeba618 100644 --- a/lib/libcrypto/pem/pvkfmt.c +++ b/lib/libcrypto/pem/pvkfmt.c @@ -1,4 +1,4 @@ -/* $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. */ @@ -74,6 +74,7 @@ #include #include "bn_lcl.h" +#include "dsa_locl.h" #include "evp_locl.h" /* Utility function: read a DWORD (4 byte unsigned integer) in little endian