CLEANUP: ssl: make inclusion of openssl headers safe
It's always a pain to have to stuff lots of #ifdef USE_OPENSSL around
ssl headers, it even results in some of them appearing in a random order
and multiple times just to benefit form an existing ifdef block. Let's
make these headers safe for inclusion when USE_OPENSSL is not defined,
they now perform the test themselves and do nothing if USE_OPENSSL is
not defined. This allows to remove no less than 8 such ifdef blocks
and make include blocks more readable.
diff --git a/include/proto/ssl_sock.h b/include/proto/ssl_sock.h
index f3d3ff8..23507ca 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 <common/openssl-compat.h>
#include <types/connection.h>
@@ -28,6 +30,8 @@
#include <types/proxy.h>
#include <types/stream_interface.h>
+#include <proto/connection.h>
+
extern int sslconns;
extern int totalsslconns;
@@ -99,6 +103,7 @@
#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 */
/*