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/dh/dh_ameth.c | 10 ++++++---- src/lib/libcrypto/dh/dh_asn1.c | 6 +++--- src/lib/libcrypto/dh/dh_check.c | 4 ++-- src/lib/libcrypto/dh/dh_depr.c | 3 +-- src/lib/libcrypto/dh/dh_gen.c | 5 +++-- src/lib/libcrypto/dh/dh_key.c | 7 ++++--- src/lib/libcrypto/dh/dh_lib.c | 4 ++-- src/lib/libcrypto/dh/dh_pmeth.c | 11 ++++++----- src/lib/libcrypto/dh/dh_prn.c | 7 ++++--- 9 files changed, 31 insertions(+), 26 deletions(-) (limited to 'src/lib/libcrypto/dh') diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c index 21714bb748..91178a92b0 100644 --- a/src/lib/libcrypto/dh/dh_ameth.c +++ b/src/lib/libcrypto/dh/dh_ameth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_ameth.c,v 1.10 2014/07/09 22:55:17 tedu Exp $ */ +/* $OpenBSD: dh_ameth.c,v 1.11 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -57,11 +57,13 @@ */ #include -#include "cryptlib.h" -#include + #include -#include #include +#include +#include +#include + #include "asn1_locl.h" static void diff --git a/src/lib/libcrypto/dh/dh_asn1.c b/src/lib/libcrypto/dh/dh_asn1.c index ed3a015279..ee478c7958 100644 --- a/src/lib/libcrypto/dh/dh_asn1.c +++ b/src/lib/libcrypto/dh/dh_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_asn1.c,v 1.5 2014/07/09 13:26:47 miod Exp $ */ +/* $OpenBSD: dh_asn1.c,v 1.6 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -57,11 +57,11 @@ */ #include -#include "cryptlib.h" + +#include #include #include #include -#include /* Override the default free and new methods */ static int diff --git a/src/lib/libcrypto/dh/dh_check.c b/src/lib/libcrypto/dh/dh_check.c index 070a33081a..01b9531a44 100644 --- a/src/lib/libcrypto/dh/dh_check.c +++ b/src/lib/libcrypto/dh/dh_check.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_check.c,v 1.12 2014/07/09 13:30:00 miod Exp $ */ +/* $OpenBSD: dh_check.c,v 1.13 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,7 +57,7 @@ */ #include -#include "cryptlib.h" + #include #include diff --git a/src/lib/libcrypto/dh/dh_depr.c b/src/lib/libcrypto/dh/dh_depr.c index 13f2029a59..0b75b0be5e 100644 --- a/src/lib/libcrypto/dh/dh_depr.c +++ b/src/lib/libcrypto/dh/dh_depr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: dh_depr.c,v 1.6 2014/07/11 08:44:48 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -59,7 +59,6 @@ #include -#include "cryptlib.h" #include #include diff --git a/src/lib/libcrypto/dh/dh_gen.c b/src/lib/libcrypto/dh/dh_gen.c index 453ea3e8e4..6a884eff9e 100644 --- a/src/lib/libcrypto/dh/dh_gen.c +++ b/src/lib/libcrypto/dh/dh_gen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_gen.c,v 1.12 2014/07/09 13:26:47 miod Exp $ */ +/* $OpenBSD: dh_gen.c,v 1.13 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -62,9 +62,10 @@ */ #include -#include "cryptlib.h" + #include #include +#include static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb); diff --git a/src/lib/libcrypto/dh/dh_key.c b/src/lib/libcrypto/dh/dh_key.c index 4fbedd8daa..6d90816122 100644 --- a/src/lib/libcrypto/dh/dh_key.c +++ b/src/lib/libcrypto/dh/dh_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_key.c,v 1.19 2014/07/09 13:26:47 miod Exp $ */ +/* $OpenBSD: dh_key.c,v 1.20 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,10 +57,11 @@ */ #include -#include "cryptlib.h" + #include -#include #include +#include +#include static int generate_key(DH *dh); static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c index 1cf14061c9..0a956e5416 100644 --- a/src/lib/libcrypto/dh/dh_lib.c +++ b/src/lib/libcrypto/dh/dh_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_lib.c,v 1.18 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: dh_lib.c,v 1.19 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,9 +60,9 @@ #include -#include "cryptlib.h" #include #include + #ifndef OPENSSL_NO_ENGINE #include #endif diff --git a/src/lib/libcrypto/dh/dh_pmeth.c b/src/lib/libcrypto/dh/dh_pmeth.c index aa681add06..6d750eb30d 100644 --- a/src/lib/libcrypto/dh/dh_pmeth.c +++ b/src/lib/libcrypto/dh/dh_pmeth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_pmeth.c,v 1.8 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: dh_pmeth.c,v 1.9 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -60,12 +60,13 @@ #include #include -#include "cryptlib.h" #include -#include -#include -#include #include +#include +#include +#include +#include + #include "evp_locl.h" /* DH pkey context structure */ diff --git a/src/lib/libcrypto/dh/dh_prn.c b/src/lib/libcrypto/dh/dh_prn.c index 846419691e..73d0476e21 100644 --- a/src/lib/libcrypto/dh/dh_prn.c +++ b/src/lib/libcrypto/dh/dh_prn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_prn.c,v 1.4 2014/07/09 13:26:47 miod Exp $ */ +/* $OpenBSD: dh_prn.c,v 1.5 2014/07/11 08:44:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,9 +57,10 @@ */ #include -#include "cryptlib.h" -#include + #include +#include +#include int DHparams_print_fp(FILE *fp, const DH *x) -- cgit v1.2.3-55-g6feb