From 74e2c009c83ad374bd6acdcfc376a384e25ab007 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 11 Jul 2014 08:44:49 +0000 Subject: Only import cryptlib.h in the four source files that actually need it. Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@ --- src/lib/libcrypto/dsa/dsa_ameth.c | 10 ++++++---- src/lib/libcrypto/dsa/dsa_asn1.c | 7 ++++--- src/lib/libcrypto/dsa/dsa_depr.c | 5 ++--- src/lib/libcrypto/dsa/dsa_gen.c | 6 +++--- src/lib/libcrypto/dsa/dsa_key.c | 4 ++-- src/lib/libcrypto/dsa/dsa_lib.c | 12 ++++++------ src/lib/libcrypto/dsa/dsa_ossl.c | 9 +++++---- src/lib/libcrypto/dsa/dsa_pmeth.c | 11 ++++++----- src/lib/libcrypto/dsa/dsa_prn.c | 7 ++++--- src/lib/libcrypto/dsa/dsa_sign.c | 5 ++--- src/lib/libcrypto/dsa/dsa_vrf.c | 3 +-- 11 files changed, 41 insertions(+), 38 deletions(-) (limited to 'src/lib/libcrypto/dsa') diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index 1f08585e5f..73c58ec94c 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_ameth.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: dsa_ameth.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -60,14 +60,16 @@ #include -#include "cryptlib.h" -#include #include -#include #include +#include +#include +#include + #ifndef OPENSSL_NO_CMS #include #endif + #include "asn1_locl.h" static int diff --git a/src/lib/libcrypto/dsa/dsa_asn1.c b/src/lib/libcrypto/dsa/dsa_asn1.c index cc03f29823..bbe091b928 100644 --- a/src/lib/libcrypto/dsa/dsa_asn1.c +++ b/src/lib/libcrypto/dsa/dsa_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_asn1.c,v 1.11 2014/07/09 10:16:24 miod Exp $ */ +/* $OpenBSD: dsa_asn1.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -57,10 +57,11 @@ */ #include -#include "cryptlib.h" -#include + #include #include +#include +#include #include /* Override the default new methods */ diff --git a/src/lib/libcrypto/dsa/dsa_depr.c b/src/lib/libcrypto/dsa/dsa_depr.c index d8ac6f9d92..472e329207 100644 --- a/src/lib/libcrypto/dsa/dsa_depr.c +++ b/src/lib/libcrypto/dsa/dsa_depr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: dsa_depr.c,v 1.6 2014/07/11 08:44:48 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -63,10 +63,9 @@ #ifndef OPENSSL_NO_SHA -#include "cryptlib.h" -#include #include #include +#include #include #include diff --git a/src/lib/libcrypto/dsa/dsa_gen.c b/src/lib/libcrypto/dsa/dsa_gen.c index 491b4de5f9..d41e7562e1 100644 --- a/src/lib/libcrypto/dsa/dsa_gen.c +++ b/src/lib/libcrypto/dsa/dsa_gen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_gen.c,v 1.14 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: dsa_gen.c,v 1.15 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,11 +63,11 @@ #include #include -#include "cryptlib.h" -#include #include +#include #include #include + #include "dsa_locl.h" int diff --git a/src/lib/libcrypto/dsa/dsa_key.c b/src/lib/libcrypto/dsa/dsa_key.c index 723e1888df..4573ecbcce 100644 --- a/src/lib/libcrypto/dsa/dsa_key.c +++ b/src/lib/libcrypto/dsa/dsa_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_key.c,v 1.17 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: dsa_key.c,v 1.18 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,8 +61,8 @@ #include -#include "cryptlib.h" #ifndef OPENSSL_NO_SHA + #include #include #include diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c index 3bf8427d4c..97307134cd 100644 --- a/src/lib/libcrypto/dsa/dsa_lib.c +++ b/src/lib/libcrypto/dsa/dsa_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_lib.c,v 1.19 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: dsa_lib.c,v 1.20 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -62,16 +62,16 @@ #include -#include "cryptlib.h" +#include #include #include -#include -#ifndef OPENSSL_NO_ENGINE -#include -#endif + #ifndef OPENSSL_NO_DH #include #endif +#ifndef OPENSSL_NO_ENGINE +#include +#endif static const DSA_METHOD *default_DSA_method = NULL; diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c index 17119eb187..5bff836c50 100644 --- a/src/lib/libcrypto/dsa/dsa_ossl.c +++ b/src/lib/libcrypto/dsa/dsa_ossl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_ossl.c,v 1.19 2014/07/09 10:16:24 miod Exp $ */ +/* $OpenBSD: dsa_ossl.c,v 1.20 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -59,12 +59,13 @@ /* Original version from Steven Schoch */ #include -#include "cryptlib.h" + +#include #include -#include #include +#include #include -#include +#include 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/src/lib/libcrypto/dsa/dsa_pmeth.c b/src/lib/libcrypto/dsa/dsa_pmeth.c index 2e44e8d5dd..c7a2edfc94 100644 --- a/src/lib/libcrypto/dsa/dsa_pmeth.c +++ b/src/lib/libcrypto/dsa/dsa_pmeth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_pmeth.c,v 1.9 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: dsa_pmeth.c,v 1.10 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -60,13 +60,14 @@ #include #include -#include "cryptlib.h" #include -#include -#include #include -#include "evp_locl.h" +#include +#include +#include + #include "dsa_locl.h" +#include "evp_locl.h" /* DSA pkey context structure */ diff --git a/src/lib/libcrypto/dsa/dsa_prn.c b/src/lib/libcrypto/dsa/dsa_prn.c index 5a7423c831..60f4e6c760 100644 --- a/src/lib/libcrypto/dsa/dsa_prn.c +++ b/src/lib/libcrypto/dsa/dsa_prn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_prn.c,v 1.4 2014/07/09 10:16:24 miod Exp $ */ +/* $OpenBSD: dsa_prn.c,v 1.5 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -57,9 +57,10 @@ */ #include -#include "cryptlib.h" -#include + #include +#include +#include int DSA_print_fp(FILE *fp, const DSA *x, int off) diff --git a/src/lib/libcrypto/dsa/dsa_sign.c b/src/lib/libcrypto/dsa/dsa_sign.c index 40223a1d59..efeb35477c 100644 --- a/src/lib/libcrypto/dsa/dsa_sign.c +++ b/src/lib/libcrypto/dsa/dsa_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_sign.c,v 1.16 2014/07/09 10:16:24 miod Exp $ */ +/* $OpenBSD: dsa_sign.c,v 1.17 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,10 +58,9 @@ /* Original version from Steven Schoch */ -#include "cryptlib.h" +#include #include #include -#include DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) diff --git a/src/lib/libcrypto/dsa/dsa_vrf.c b/src/lib/libcrypto/dsa/dsa_vrf.c index b82fa41259..1965338f1f 100644 --- a/src/lib/libcrypto/dsa/dsa_vrf.c +++ b/src/lib/libcrypto/dsa/dsa_vrf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_vrf.c,v 1.15 2014/07/09 10:16:24 miod Exp $ */ +/* $OpenBSD: dsa_vrf.c,v 1.16 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,7 +58,6 @@ /* Original version from Steven Schoch */ -#include "cryptlib.h" #include int -- cgit v1.2.3-55-g6feb