From 8c3482db610348be15fb633bb52b0511c2cabbcf 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/engine/eng_aesni.c | 7 +++---- src/lib/libcrypto/engine/eng_int.h | 4 +--- src/lib/libcrypto/engine/eng_list.c | 3 ++- src/lib/libcrypto/engine/eng_openssl.c | 16 ++++++++-------- src/lib/libcrypto/engine/eng_table.c | 4 ++-- 5 files changed, 16 insertions(+), 18 deletions(-) (limited to 'src/lib/libcrypto/engine') diff --git a/src/lib/libcrypto/engine/eng_aesni.c b/src/lib/libcrypto/engine/eng_aesni.c index 0bb558c1fd..94c4c1fb6a 100644 --- a/src/lib/libcrypto/engine/eng_aesni.c +++ b/src/lib/libcrypto/engine/eng_aesni.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eng_aesni.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */ +/* $OpenBSD: eng_aesni.c,v 1.7 2014/07/11 08:44:48 jsing Exp $ */ /* * Support for Intel AES-NI intruction set * Author: Huang Ying @@ -80,12 +80,11 @@ #if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_AES_NI) && !defined(OPENSSL_NO_AES) -#include "cryptlib.h" +#include #include #include -#include -#include #include +#include /* AES-NI is available *ONLY* on some x86 CPUs. Not only that it doesn't exist elsewhere, but it even can't be compiled on other diff --git a/src/lib/libcrypto/engine/eng_int.h b/src/lib/libcrypto/engine/eng_int.h index aa3751f267..f240411981 100644 --- a/src/lib/libcrypto/engine/eng_int.h +++ b/src/lib/libcrypto/engine/eng_int.h @@ -1,4 +1,4 @@ -/* $OpenBSD: eng_int.h,v 1.7 2014/07/10 22:45:57 jsing Exp $ */ +/* $OpenBSD: eng_int.h,v 1.8 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL * project 2000. */ @@ -64,8 +64,6 @@ #ifndef HEADER_ENGINE_INT_H #define HEADER_ENGINE_INT_H -#include "cryptlib.h" - /* Take public definitions from engine.h */ #include diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c index 35b45158e9..b84504102f 100644 --- a/src/lib/libcrypto/engine/eng_list.c +++ b/src/lib/libcrypto/engine/eng_list.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eng_list.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */ +/* $OpenBSD: eng_list.c,v 1.15 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL * project 2000. */ @@ -66,6 +66,7 @@ #include +#include "cryptlib.h" #include "eng_int.h" /* The linked-list of pointers to engine types. engine_list_head diff --git a/src/lib/libcrypto/engine/eng_openssl.c b/src/lib/libcrypto/engine/eng_openssl.c index ecc560eb26..f1a58df857 100644 --- a/src/lib/libcrypto/engine/eng_openssl.c +++ b/src/lib/libcrypto/engine/eng_openssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eng_openssl.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */ +/* $OpenBSD: eng_openssl.c,v 1.9 2014/07/11 08:44:48 jsing Exp $ */ /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL * project 2000. */ @@ -67,20 +67,20 @@ #include #include -#include "cryptlib.h" -#include #include -#include +#include #include +#include #include -#ifndef OPENSSL_NO_RSA -#include + +#ifndef OPENSSL_NO_DH +#include #endif #ifndef OPENSSL_NO_DSA #include #endif -#ifndef OPENSSL_NO_DH -#include +#ifndef OPENSSL_NO_RSA +#include #endif /* This testing gunk is implemented (and explained) lower down. It also assumes diff --git a/src/lib/libcrypto/engine/eng_table.c b/src/lib/libcrypto/engine/eng_table.c index 44f3e892b8..9d52075a76 100644 --- a/src/lib/libcrypto/engine/eng_table.c +++ b/src/lib/libcrypto/engine/eng_table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eng_table.c,v 1.6 2014/06/22 12:05:09 jsing Exp $ */ +/* $OpenBSD: eng_table.c,v 1.7 2014/07/11 08:44:48 jsing Exp $ */ /* ==================================================================== * Copyright (c) 2001 The OpenSSL Project. All rights reserved. * @@ -53,9 +53,9 @@ * */ -#include "cryptlib.h" #include #include + #include "eng_int.h" /* The type of the items in the table */ -- cgit v1.2.3-55-g6feb