diff --git a/include/common/openssl-compat.h b/include/common/openssl-compat.h index 0ceca0837..55d874d84 100644 --- a/include/common/openssl-compat.h +++ b/include/common/openssl-compat.h @@ -1,5 +1,6 @@ #ifndef _COMMON_OPENSSL_COMPAT_H #define _COMMON_OPENSSL_COMPAT_H +#ifdef USE_OPENSSL #include #include @@ -233,4 +234,5 @@ static inline int EVP_PKEY_base_id(EVP_PKEY *pkey) #define TLS_TICKET_HASH_FUNCT EVP_sha256 #endif /* OPENSSL_NO_SHA256 */ +#endif /* USE_OPENSSL */ #endif /* _COMMON_OPENSSL_COMPAT_H */ diff --git a/include/proto/ssl_sock.h b/include/proto/ssl_sock.h index f3d3ff8f5..23507ca5e 100644 --- a/include/proto/ssl_sock.h +++ b/include/proto/ssl_sock.h @@ -21,6 +21,8 @@ #ifndef _PROTO_SSL_SOCK_H #define _PROTO_SSL_SOCK_H +#ifdef USE_OPENSSL + #include #include @@ -28,6 +30,8 @@ #include #include +#include + extern int sslconns; extern int totalsslconns; @@ -99,6 +103,7 @@ void ssl_async_fd_free(int fd); #define sh_ssl_sess_tree_lookup(k) (struct sh_ssl_sess_hdr *)ebmb_lookup(sh_ssl_sess_tree, \ (k), SSL_MAX_SSL_SESSION_ID_LENGTH); +#endif /* USE_OPENSSL */ #endif /* _PROTO_SSL_SOCK_H */ /* diff --git a/include/types/server.h b/include/types/server.h index 2951cf68f..0d53d2600 100644 --- a/include/types/server.h +++ b/include/types/server.h @@ -25,14 +25,10 @@ #include #include -#ifdef USE_OPENSSL -#include -#include -#endif - #include #include #include +#include #include @@ -43,6 +39,7 @@ #include #include #include +#include #include #include diff --git a/include/types/ssl_sock.h b/include/types/ssl_sock.h index 45f89c9b8..0c863572a 100644 --- a/include/types/ssl_sock.h +++ b/include/types/ssl_sock.h @@ -21,6 +21,7 @@ #ifndef _TYPES_SSL_SOCK_H #define _TYPES_SSL_SOCK_H +#ifdef USE_OPENSSL #include @@ -84,4 +85,5 @@ struct sh_ssl_sess_hdr { unsigned char key_data[SSL_MAX_SSL_SESSION_ID_LENGTH]; }; +#endif /* USE_OPENSSL */ #endif /* _TYPES_SSL_SOCK_H */ diff --git a/src/backend.c b/src/backend.c index b7894f8a2..467ef57a9 100644 --- a/src/backend.c +++ b/src/backend.c @@ -57,11 +57,8 @@ #include #include #include -#include - -#ifdef USE_OPENSSL #include -#endif /* USE_OPENSSL */ +#include int be_lastsession(const struct proxy *be) { diff --git a/src/checks.c b/src/checks.c index 63d9e0340..d264aecf8 100644 --- a/src/checks.c +++ b/src/checks.c @@ -60,10 +60,7 @@ #include #include #include - -#ifdef USE_OPENSSL #include -#endif /* USE_OPENSSL */ static int httpchk_expect(struct server *s, int done); static int tcpcheck_get_step_id(struct check *); diff --git a/src/cli.c b/src/cli.c index fe50d9d17..3aa5f230b 100644 --- a/src/cli.c +++ b/src/cli.c @@ -66,12 +66,10 @@ #include #include #include +#include #include #include #include -#ifdef USE_OPENSSL -#include -#endif #define PAYLOAD_PATTERN "<<" diff --git a/src/connection.c b/src/connection.c index 2a66996b2..adedb411d 100644 --- a/src/connection.c +++ b/src/connection.c @@ -25,10 +25,7 @@ #include #include #include - -#ifdef USE_OPENSSL #include -#endif DECLARE_POOL(pool_head_connection, "connection", sizeof(struct connection)); DECLARE_POOL(pool_head_connstream, "conn_stream", sizeof(struct conn_stream)); diff --git a/src/haproxy.c b/src/haproxy.c index e085ce2c2..a47b7dd32 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -83,6 +83,7 @@ #include #include #include +#include #include #include #include @@ -125,10 +126,7 @@ #include #include #include -#ifdef USE_OPENSSL -#include #include -#endif /* array of init calls for older platforms */ DECLARE_INIT_STAGES; diff --git a/src/log.c b/src/log.c index a075b85e4..7e14d89e2 100644 --- a/src/log.c +++ b/src/log.c @@ -39,11 +39,9 @@ #include #include #include +#include #include #include -#ifdef USE_OPENSSL -#include -#endif struct log_fmt { char *name; diff --git a/src/stats.c b/src/stats.c index 6965ad247..dc57e857e 100644 --- a/src/stats.c +++ b/src/stats.c @@ -66,17 +66,13 @@ #include #include #include +#include #include #include #include #include #include -#ifdef USE_OPENSSL -#include -#include -#endif - /* status codes available for the stats admin page (strictly 4 chars length) */ const char *stat_status_codes[STAT_STATUS_SIZE] = {