]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: replace USE_SSL wrapper macro with USE_OPENSSL
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 30 Mar 2014 12:00:34 +0000 (05:00 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 30 Mar 2014 12:00:34 +0000 (05:00 -0700)
Squid-3 currently only supports OpenSSL for SSL/TLS components. This
makes the support type explicit and prepares for alternative SSL
libraries to be added in future with different macro wrappers.

49 files changed:
configure.ac
squid3.dox
src/AccessLogEntry.cc
src/AccessLogEntry.h
src/AclRegs.cc
src/CachePeer.h
src/ClientRequestContext.h
src/FwdState.cc
src/FwdState.h
src/HttpHeader.h
src/HttpHeaderTools.cc
src/SquidConfig.h
src/acl/Certificate.cc
src/acl/FilledChecklist.cc
src/acl/FilledChecklist.h
src/acl/ServerCertificate.cc
src/adaptation/icap/History.h
src/adaptation/icap/ModXact.cc
src/anyp/PortCfg.cc
src/anyp/PortCfg.h
src/cache_cf.cc
src/cf.data.pre
src/cf_gen_defines
src/client_side.cc
src/client_side.h
src/client_side_request.cc
src/client_side_request.h
src/comm.cc
src/errorpage.cc
src/errorpage.h
src/external_acl.cc
src/fde.h
src/format/ByteCode.h
src/format/Format.cc
src/format/Token.cc
src/log/FormatSquidIcap.cc
src/log/FormatSquidNative.cc
src/main.cc
src/redirect.cc
src/ssl/ProxyCerts.h
src/ssl/context_storage.cc
src/ssl/context_storage.h
src/ssl/gadgets.cc
src/ssl/support.cc
src/stat.cc
src/tests/stub_client_side.cc
src/tests/stub_libsslsquid.cc
src/tools.cc
src/url.cc

index 2e3fb52864ce64c79aea61a7f61d537e728036d4..1383cfcadc96fcad340c204d46d1ed32d236be78 100644 (file)
@@ -1224,7 +1224,7 @@ case "$with_openssl" in
     with_openssl=yes
   esac
 ])
-AH_TEMPLATE(USE_SSL,[OpenSSL support is available])
+AH_TEMPLATE(USE_OPENSSL,[OpenSSL support is available])
 ## OpenSSL is default disable due to licensing issues on some OS
 if test "x$with_openssl" = "xyes"; then
   AC_CHECK_HEADERS( \
@@ -1262,7 +1262,7 @@ if test "x$with_openssl" = "xyes"; then
   if test "x$LIBOPENSSL_LIBS" != "x" ; then
     CXXFLAGS="$LIBOPENSSL_CFLAGS $CXXFLAGS"
     SSLLIB="$LIBOPENSSL_LIBS $SSLLIB"
-    AC_DEFINE(USE_SSL,1,[OpenSSL support is available])
+    AC_DEFINE(USE_OPENSSL,1,[OpenSSL support is available])
 
     # check for other specific broken implementations
     SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS
index bb2e735027837a5015ff880d8fdaf7201de87bb1..49dca8225a7137264dda6910d5f8704686649ce7 100644 (file)
@@ -1282,7 +1282,7 @@ PREDEFINED             = __cplusplus \
                          USE_SELECT \
                          USE_SELECT_WIN32 \
                          USE_SQUID_ESI \
-                         USE_SSL \
+                         USE_OPENSSL \
                          USE_LINUX_TPROXY2 \
                          USE_LINUX_TPROXY4 \
                          USE_UNLINKD \
index 45cf014e02ac5d83f27ec18a2ac162c16041a900..003eb29703332614c2751b685a1f1b6f15a512b4 100644 (file)
@@ -4,13 +4,13 @@
 #include "HttpRequest.h"
 #include "SquidConfig.h"
 
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 
 AccessLogEntry::SslDetails::SslDetails(): user(NULL), bumpMode(::Ssl::bumpEnd)
 {
 }
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
 
 void
 AccessLogEntry::getLogClientIp(char *buf, size_t bufsz) const
index 73da24e3ea36a1a8ee79f00793c1fe7c415c0c24..53a922ee1de37cd937606dea78f5fa9538ccc2e3 100644 (file)
@@ -45,7 +45,7 @@
 #if ICAP_CLIENT
 #include "adaptation/icap/Elements.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/gadgets.h"
 #endif
 
@@ -137,7 +137,7 @@ public:
         const char *opcode;
     } htcp;
 
-#if USE_SSL
+#if USE_OPENSSL
     /// logging information specific to the SSL protocol
     class SslDetails
     {
@@ -165,7 +165,7 @@ public:
                 msec(0),
                 rfc931 (NULL),
                 extuser(NULL),
-#if USE_SSL
+#if USE_OPENSSL
                 ssluser(NULL),
 #endif
                 port(NULL) {
@@ -180,7 +180,7 @@ public:
         int msec;
         const char *rfc931;
         const char *extuser;
-#if USE_SSL
+#if USE_OPENSSL
 
         const char *ssluser;
         Ssl::X509_Pointer sslClientCert; ///< cert received from the client
index 548450440f9634f3f082465d3fe5ebd1a71359d0..b0700b939a0b7d2bbeb5c5fa295abe74172a3c89 100644 (file)
@@ -57,7 +57,7 @@
 #include "acl/SourceAsn.h"
 #include "acl/SourceDomain.h"
 #include "acl/SourceIp.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "acl/Certificate.h"
 #include "acl/CertificateData.h"
 #include "acl/SslError.h"
@@ -66,7 +66,7 @@
 #include "acl/Strategised.h"
 #include "acl/Strategy.h"
 #include "acl/StringData.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "acl/ServerCertificate.h"
 #endif
 #include "acl/Tag.h"
@@ -151,7 +151,7 @@ ACLStrategised<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrl
 ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
 ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
 
-#if USE_SSL
+#if USE_OPENSSL
 ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
 ACLStrategised<const Ssl::CertErrors *> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
 ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
index 67aebfb26dcca1569736152cfd320d98d77239c6..13c2b5558d37fd09e5c049d2cf29d93e179693c2 100644 (file)
@@ -37,7 +37,7 @@
 //TODO: remove, it is unconditionally defined and always used.
 #define PEER_MULTICAST_SIBLINGS 1
 
-#if USE_SSL
+#if HAVE_OPENSSL_SSL_H
 #include <openssl/ssl.h>
 #endif
 
@@ -187,7 +187,7 @@ public:
     int connect_fail_limit;
     int max_conn;
     char *domain;       /* Forced domain */
-#if USE_SSL
+#if USE_OPENSSL
 
     int use_ssl;
     char *sslcert;
index 3d3c0eb86750eeb5b0029373676f10d7c31e3e44..a292bc2513e9b80f361eb0cb9bd2360a0229815c 100644 (file)
@@ -40,7 +40,7 @@ public:
 
     void adaptationAccessCheck();
 #endif
-#if USE_SSL
+#if USE_OPENSSL
     /**
      * Initiates and start the acl checklist to check if the a CONNECT
      * request must be bumped.
@@ -77,7 +77,7 @@ public:
     bool interpreted_req_hdrs;
     bool tosToClientDone;
     bool nfmarkToClientDone;
-#if USE_SSL
+#if USE_OPENSSL
     bool sslBumpCheckDone;
 #endif
     ErrorState *error; ///< saved error page for centralized/delayed processing
index 3a8d11e82b90dbf07404562ad9a00499ad9d8eed..38d3270834bd0c793e2077d421d619b9c325de31 100644 (file)
@@ -71,7 +71,7 @@
 #include "StoreClient.h"
 #include "urn.h"
 #include "whois.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/cert_validate_message.h"
 #include "ssl/Config.h"
 #include "ssl/ErrorDetail.h"
@@ -85,7 +85,7 @@
 
 static PSC fwdPeerSelectionCompleteWrapper;
 static CLCB fwdServerClosedWrapper;
-#if USE_SSL
+#if USE_OPENSSL
 static PF fwdNegotiateSSLWrapper;
 #endif
 static CNCB fwdConnectDoneWrapper;
@@ -229,7 +229,7 @@ FwdState::completed()
             assert(err);
             errorAppendEntry(entry, err);
             err = NULL;
-#if USE_SSL
+#if USE_OPENSSL
             if (request->flags.sslPeek && request->clientConnectionManager.valid()) {
                 CallJobHere1(17, 4, request->clientConnectionManager, ConnStateData,
                              ConnStateData::httpsPeeked, Comm::ConnectionPointer(NULL));
@@ -508,7 +508,7 @@ fwdServerClosedWrapper(const CommCloseCbParams &params)
     fwd->serverClosed(params.fd);
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 static void
 fwdNegotiateSSLWrapper(int fd, void *data)
 {
@@ -646,7 +646,7 @@ FwdState::handleUnregisteredServerEnd()
     retryOrBail();
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 void
 FwdState::negotiateSSL(int fd)
 {
@@ -1032,7 +1032,7 @@ FwdState::connectDone(const Comm::ConnectionPointer &conn, comm_err_t status, in
     if (serverConnection()->getPeer())
         peerConnectSucceded(serverConnection()->getPeer());
 
-#if USE_SSL
+#if USE_OPENSSL
     if (!request->flags.pinned) {
         if ((serverConnection()->getPeer() && serverConnection()->getPeer()->use_ssl) ||
                 (!serverConnection()->getPeer() && request->protocol == AnyP::PROTO_HTTPS) ||
@@ -1258,7 +1258,7 @@ FwdState::dispatch()
     }
 #endif
 
-#if USE_SSL
+#if USE_OPENSSL
     if (request->flags.sslPeek) {
         CallJobHere1(17, 4, request->clientConnectionManager, ConnStateData,
                      ConnStateData::httpsPeeked, serverConnection());
@@ -1279,7 +1279,7 @@ FwdState::dispatch()
         request->peer_domain = NULL;
 
         switch (request->protocol) {
-#if USE_SSL
+#if USE_OPENSSL
 
         case AnyP::PROTO_HTTPS:
             httpStart(this);
index 88b577508899df9b3d1057adc719518f8a1ba0f3..d19aea6d8a45b1cf992894a84dbdc26814a3b024 100644 (file)
@@ -8,7 +8,7 @@
 #include "fde.h"
 #include "http/StatusCode.h"
 #include "ip/Address.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
@@ -19,7 +19,7 @@ typedef RefCount<AccessLogEntry> AccessLogEntryPointer;
 class ErrorState;
 class HttpRequest;
 
-#if USE_SSL
+#if USE_OPENSSL
 namespace Ssl
 {
 class ErrorDetail;
@@ -83,7 +83,7 @@ public:
     /** return a ConnectionPointer to the current server connection (may or may not be open) */
     Comm::ConnectionPointer const & serverConnection() const { return serverConn; };
 
-#if USE_SSL
+#if USE_OPENSSL
     /// Callback function called when squid receive message from cert validator helper
     static void sslCrtvdHandleReplyWrapper(void *data, Ssl::CertValidationResponse const &);
     /// Process response from cert validator helper
index 7f08ee8a01245746be57c1190c107ba87cb0367a..8000dd50c6f2ee0f876c58d4c2ed0c5350a7caff 100644 (file)
@@ -176,7 +176,7 @@ typedef enum {
 #endif
     hoRequest,
     hoReply,
-#if USE_SSL
+#if USE_OPENSSL
     hoErrorDetail,
 #endif
     hoEnd
index 0f6a2646073f365f9745e6dec69b5829db49c1a4..16fe5e34e9907427caff7f8302b3aa3341e913a2 100644 (file)
@@ -50,7 +50,7 @@
 #include "Store.h"
 #include "StrList.h"
 
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
index aa92d3825434ab6ede0cecff9ce8b870428eb1d0..9c336f198b9e32e7a43f79711e95b331997029e3 100644 (file)
 #include "Notes.h"
 #include "YesNoNone.h"
 
-#if USE_SSL
+#if USE_OPENSSL
+#if HAVE_OPENSSL_SSL_H
 #include <openssl/ssl.h>
+#endif
+
 class sslproxy_cert_sign;
 class sslproxy_cert_adapt;
 #endif
@@ -135,7 +138,7 @@ public:
 
     struct {
         AnyP::PortCfg *http;
-#if USE_SSL
+#if USE_OPENSSL
         AnyP::PortCfg *https;
 #endif
     } Sockaddr;
@@ -199,7 +202,7 @@ public:
 #endif
 
         char *diskd;
-#if USE_SSL
+#if USE_OPENSSL
 
         char *ssl_password;
 #endif
@@ -385,7 +388,7 @@ public:
         acl_access *htcp_clr;
 #endif
 
-#if USE_SSL
+#if USE_OPENSSL
         acl_access *ssl_bump;
 #endif
 #if FOLLOW_X_FORWARDED_FOR
@@ -487,7 +490,7 @@ public:
         int rebuild_chunk_percentage;
     } digest;
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 
     struct {
         int unclean_shutdown;
@@ -509,7 +512,7 @@ public:
     time_t minimum_expiry_time; /* seconds */
     external_acl *externalAclHelperList;
 
-#if USE_SSL
+#if USE_OPENSSL
 
     struct {
         char *cert;
index 74a27b061609d9d0bd17726f400b63a4de6cfcca..424eed599511f3f2797c1fa71f7fc3f69e22d2db 100644 (file)
@@ -37,7 +37,7 @@
 /* MS Visual Studio Projects are monolithic, so we need the following
  * #if to exclude the SSL code from compile process when not needed.
  */
-#if USE_SSL
+#if USE_OPENSSL
 
 #include "acl/Certificate.h"
 #include "acl/CertificateData.h"
@@ -67,4 +67,4 @@ ACLCertificateStrategy::Instance()
 
 ACLCertificateStrategy ACLCertificateStrategy::Instance_;
 
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
index c02f799a4a1dde7f0d4fffb40d23fe256f49d2a5..4298244c1f21b72fd1a973f5537bdaa5b12e0953 100644 (file)
@@ -24,7 +24,7 @@ ACLFilledChecklist::ACLFilledChecklist() :
 #if SQUID_SNMP
         snmp_community(NULL),
 #endif
-#if USE_SSL
+#if USE_OPENSSL
         sslErrors(NULL),
 #endif
         extacl_entry (NULL),
@@ -54,7 +54,7 @@ ACLFilledChecklist::~ACLFilledChecklist()
 
     cbdataReferenceDone(conn_);
 
-#if USE_SSL
+#if USE_OPENSSL
     cbdataReferenceDone(sslErrors);
 #endif
 
@@ -140,7 +140,7 @@ ACLFilledChecklist::ACLFilledChecklist(const acl_access *A, HttpRequest *http_re
 #if SQUID_SNMP
         snmp_community(NULL),
 #endif
-#if USE_SSL
+#if USE_OPENSSL
         sslErrors(NULL),
 #endif
         extacl_entry (NULL),
index 23b69b4f9ade516f00bfe4a3bfbee10511d38f94..41ce6bda444fa45aebc79ad5b6a86463fafc839f 100644 (file)
@@ -8,7 +8,7 @@
 #if USE_AUTH
 #include "auth/UserRequest.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
@@ -69,7 +69,7 @@ public:
     char *snmp_community;
 #endif
 
-#if USE_SSL
+#if USE_OPENSSL
     /// SSL [certificate validation] errors, in undefined order
     Ssl::CertErrors *sslErrors;
     /// The peer certificate
index 5d5e73ec2919cd67986fc69ae340aa19206e08f2..d3af828181addd32e18c359910d20f76afd7d704 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "squid.h"
 
-#if USE_SSL
+#if USE_OPENSSL
 
 #include "acl/CertificateData.h"
 #include "acl/Checklist.h"
@@ -35,4 +35,4 @@ ACLServerCertificateStrategy::Instance()
 
 ACLServerCertificateStrategy ACLServerCertificateStrategy::Instance_;
 
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
index 3c3c35c8b2f90545d301e0495dd73b6bbb3216e9..fcb4efa18cef96b1a61ae7960a2892546a2f283f 100644 (file)
@@ -28,7 +28,7 @@ public:
     int processingTime() const;
 
     String rfc931; ///< the username from ident
-#if USE_SSL
+#if USE_OPENSSL
     String ssluser; ///< the username from SSL
 #endif
     LogTags logType; ///< the squid request status (TCP_MISS etc)
index dbe94b3725c8be64cfdc24d4c5b0aabc652d415e..6b677a7f9fecbdf7accd202b7b3b019e4289635b 100644 (file)
@@ -1285,7 +1285,7 @@ void Adaptation::Icap::ModXact::finalizeLogInfo()
     if (h->rfc931.size())
         al.cache.rfc931 = h->rfc931.termedBuf();
 
-#if USE_SSL
+#if USE_OPENSSL
     if (h->ssluser.size())
         al.cache.ssluser = h->ssluser.termedBuf();
 #endif
index f72117d27cbc171900356ada8fccdd95f02c1b69..ca810cc7ece925243315cd753468de222e2250bd 100644 (file)
@@ -2,7 +2,7 @@
 #include "anyp/PortCfg.h"
 #include "comm.h"
 #include "fatal.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
@@ -29,7 +29,7 @@ AnyP::PortCfg::PortCfg() :
         vport(0),
         disable_pmtu_discovery(0),
         listenConn()
-#if USE_SSL
+#if USE_OPENSSL
         ,cert(NULL),
         key(NULL),
         version(0),
@@ -71,7 +71,7 @@ AnyP::PortCfg::~PortCfg()
     safe_free(name);
     safe_free(defaultsite);
 
-#if USE_SSL
+#if USE_OPENSSL
     safe_free(cert);
     safe_free(key);
     safe_free(options);
@@ -106,7 +106,7 @@ AnyP::PortCfg::clone() const
 #if 0
     // TODO: AYJ: 2009-07-18: for now SSL does not clone. Configure separate ports with IPs and SSL settings
 
-#if USE_SSL
+#if USE_OPENSSL
     char *cert;
     char *key;
     int version;
@@ -127,7 +127,7 @@ AnyP::PortCfg::clone() const
     return b;
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 void
 AnyP::PortCfg::configureSslServerContext()
 {
index c47ba32d942239f99f67a16d90c8fac689619006..594196026ed5e2484d610d359f9507c7c5b6902d 100644 (file)
@@ -6,7 +6,7 @@
 #include "anyp/TrafficMode.h"
 #include "comm/Connection.h"
 
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/gadgets.h"
 #endif
 
@@ -19,7 +19,7 @@ public:
     PortCfg();
     ~PortCfg();
     AnyP::PortCfg *clone() const;
-#if USE_SSL
+#if USE_OPENSSL
     /// creates, configures, and validates SSL context and related port options
     void configureSslServerContext();
 #endif
@@ -64,7 +64,7 @@ public:
      */
     Comm::ConnectionPointer listenConn;
 
-#if USE_SSL
+#if USE_OPENSSL
     char *cert;
     char *key;
     int version;
index caf65c1ad46485780a5769a257b1ca32ece53515..db08f99061419b33f3545b3bf07abaa964f2b425 100644 (file)
@@ -91,7 +91,7 @@
 #if USE_ECAP
 #include "adaptation/ecap/Config.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/Config.h"
 #include "ssl/support.h"
 #endif
 #include <sys/stat.h>
 #endif
 
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/gadgets.h"
 #endif
 
@@ -190,7 +190,7 @@ static void defaults_postscriptum(void);
 static int parse_line(char *);
 static void parse_obsolete(const char *);
 static void parseBytesLine(size_t * bptr, const char *units);
-#if USE_SSL
+#if USE_OPENSSL
 static void parseBytesOptionValue(size_t * bptr, const char *units, char const * value);
 #endif
 static void parseBytesLineSigned(ssize_t * bptr, const char *units);
@@ -231,7 +231,7 @@ static void parsePortCfg(AnyP::PortCfg **, const char *protocol);
 static void dump_PortCfg(StoreEntry *, const char *, const AnyP::PortCfg *);
 static void free_PortCfg(AnyP::PortCfg **);
 
-#if USE_SSL
+#if USE_OPENSSL
 static void parse_sslproxy_cert_sign(sslproxy_cert_sign **cert_sign);
 static void dump_sslproxy_cert_sign(StoreEntry *entry, const char *name, sslproxy_cert_sign *cert_sign);
 static void free_sslproxy_cert_sign(sslproxy_cert_sign **cert_sign);
@@ -241,7 +241,7 @@ static void free_sslproxy_cert_adapt(sslproxy_cert_adapt **cert_adapt);
 static void parse_sslproxy_ssl_bump(acl_access **ssl_bump);
 static void dump_sslproxy_ssl_bump(StoreEntry *entry, const char *name, acl_access *ssl_bump);
 static void free_sslproxy_ssl_bump(acl_access **ssl_bump);
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
 
 static void parse_b_size_t(size_t * var);
 static void parse_b_int64_t(int64_t * var);
@@ -913,7 +913,7 @@ configDoConfigure(void)
         Config2.effectiveGroupID = grp->gr_gid;
     }
 
-#if USE_SSL
+#if USE_OPENSSL
 
     debugs(3, DBG_IMPORTANT, "Initializing https proxy context");
 
@@ -2285,7 +2285,7 @@ parse_peer(CachePeer ** head)
             if (token[13])
                 p->domain = xstrdup(token + 13);
 
-#if USE_SSL
+#if USE_OPENSSL
 
         } else if (strcmp(token, "ssl") == 0) {
             p->use_ssl = 1;
@@ -3717,7 +3717,7 @@ parse_port_option(AnyP::PortCfg * s, char *token)
             ++t;
             s->tcp_keepalive.timeout = xatoui(t);
         }
-#if USE_SSL
+#if USE_OPENSSL
     } else if (strcmp(token, "sslBump") == 0) {
         debugs(3, DBG_CRITICAL, "WARNING: '" << token << "' is deprecated " <<
                "in http_port. Use 'ssl-bump' instead.");
@@ -3819,7 +3819,7 @@ parsePortCfg(AnyP::PortCfg ** head, const char *optionName)
         parse_port_option(s, token);
     }
 
-#if USE_SSL
+#if USE_OPENSSL
     if (s->transport.protocol == AnyP::PROTO_HTTPS) {
         /* ssl-bump on https_port configuration requires either tproxy or intercept, and vice versa */
         const bool hijacked = s->flags.isIntercepted();
@@ -3926,7 +3926,7 @@ dump_generic_port(StoreEntry * e, const char *n, const AnyP::PortCfg * s)
         }
     }
 
-#if USE_SSL
+#if USE_OPENSSL
     if (s->flags.tunnelSslBumping)
         storeAppendPrintf(e, " ssl-bump");
 
@@ -3996,7 +3996,7 @@ void
 configFreeMemory(void)
 {
     free_all();
-#if USE_SSL
+#if USE_OPENSSL
     SSL_CTX_free(Config.ssl_client.sslContext);
 #endif
 }
@@ -4479,7 +4479,7 @@ static void free_icap_service_failure_limit(Adaptation::Icap::Config *cfg)
 }
 #endif
 
-#if USE_SSL
+#if USE_OPENSSL
 static void parse_sslproxy_cert_adapt(sslproxy_cert_adapt **cert_adapt)
 {
     char *al;
index dd10acc2d3694c35f88de780e068f2b3b38bd9c1..b3ef7464671cc0f14957533219d64c367cba881a 100644 (file)
@@ -842,7 +842,7 @@ DOC_END
 NAME: acl
 TYPE: acl
 LOC: Config.aclList
-IF USE_SSL
+IF USE_OPENSSL
 DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED
 DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID
 DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
@@ -1107,7 +1107,7 @@ DOC_START
          # adaptation_meta because it starts matching immediately after
          # the service has been selected for adaptation.
 
-IF USE_SSL
+IF USE_OPENSSL
        acl aclname ssl_error errorname
          # match against SSL certificate validation error [fast]
          #
@@ -1838,7 +1838,7 @@ NOCOMMENT_END
 DOC_END
 
 NAME: https_port
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 TYPE: PortCfg
 DEFAULT: none
 LOC: Config.Sockaddr.https
@@ -2282,7 +2282,7 @@ COMMENT_START
 COMMENT_END
 
 NAME: ssl_unclean_shutdown
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 TYPE: onoff
 DEFAULT: off
 LOC: Config.SSL.unclean_shutdown
@@ -2292,7 +2292,7 @@ DOC_START
 DOC_END
 
 NAME: ssl_engine
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 TYPE: string
 LOC: Config.SSL.ssl_engine
 DEFAULT: none
@@ -2302,7 +2302,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_client_certificate
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.ssl_client.cert
 TYPE: string
@@ -2311,7 +2311,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_client_key
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.ssl_client.key
 TYPE: string
@@ -2320,7 +2320,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_version
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: 1
 DEFAULT_DOC: automatic SSL/TLS version negotiation
 LOC: Config.ssl_client.version
@@ -2339,7 +2339,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_options
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.ssl_client.options
 TYPE: string
@@ -2369,7 +2369,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_cipher
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.ssl_client.cipher
 TYPE: string
@@ -2380,7 +2380,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_cafile
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.ssl_client.cafile
 TYPE: string
@@ -2390,7 +2390,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_capath
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.ssl_client.capath
 TYPE: string
@@ -2400,7 +2400,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_session_ttl
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: 300
 LOC: Config.SSL.session_ttl
 TYPE: int
@@ -2409,7 +2409,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_session_cache_size
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: 2 MB
 LOC: Config.SSL.sessionCacheSize
 TYPE: b_size_t
@@ -2418,7 +2418,7 @@ DOC_START
 DOC_END
 
 NAME: ssl_bump
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 TYPE: sslproxy_ssl_bump
 LOC: Config.accessList.ssl_bump
 DEFAULT_DOC: Does not bump unless rules are present in squid.conf
@@ -2477,7 +2477,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_flags
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.ssl_client.flags
 TYPE: string
@@ -2490,7 +2490,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_cert_error
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 DEFAULT_DOC: Server certificate errors terminate the transaction.
 LOC: Config.ssl_client.cert_error
@@ -2525,7 +2525,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_cert_sign
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 POSTSCRIPTUM: signUntrusted ssl::certUntrusted
 POSTSCRIPTUM: signSelf ssl::certSelfSigned
@@ -2571,7 +2571,7 @@ DOC_START
 DOC_END
 
 NAME: sslproxy_cert_adapt
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 TYPE: sslproxy_cert_adapt
 LOC: Config.ssl_client.cert_adapt
@@ -2614,7 +2614,7 @@ DOC_START
 DOC_END
 
 NAME: sslpassword_program
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Config.Program.ssl_password
 TYPE: string
@@ -2679,7 +2679,7 @@ DOC_END
 
 NAME: sslcrtvalidator_program
 TYPE: eol
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: none
 LOC: Ssl::TheConfig.ssl_crt_validator
 DOC_START
@@ -2695,7 +2695,7 @@ DOC_END
 
 NAME: sslcrtvalidator_children
 TYPE: HelperChildConfig
-IFDEF: USE_SSL
+IFDEF: USE_OPENSSL
 DEFAULT: 32 startup=5 idle=1 concurrency=1
 LOC: Ssl::TheConfig.ssl_crt_validator_Children
 DOC_START
index 2844928f4481d7a5caa8f3534568f9fc486d5707..7896b76a0ba31579e7802909d700b4cbb27684f9 100644 (file)
@@ -25,7 +25,7 @@ BEGIN {
        define["USE_SQUID_ESI"]="--enable-esi"
        define["USE_SQUID_EUI"]="--enable-eui"
        define["USE_SSL_CRTD"]="--enable-ssl-crtd"
-       define["USE_SSL"]="--enable-ssl"
+       define["USE_OPENSSL"]="--with-openssl"
        define["USE_UNLINKD"]="--enable-unlinkd"
        define["USE_WCCP"]="--enable-wccp"
        define["USE_WCCPv2"]="--enable-wccpv2"
index 4d44cf0b8821b09e0b171239d78e1d88dd818943..3975b748ca6523da8bcb25e30ef272d9d5683339 100644 (file)
 #if USE_DELAY_POOLS
 #include "ClientInfo.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/context_storage.h"
 #include "ssl/gadgets.h"
 #include "ssl/helper.h"
@@ -191,7 +191,7 @@ CBDATA_CLASS_INIT(ClientSocketContext);
 static IOCB clientWriteComplete;
 static IOCB clientWriteBodyComplete;
 static IOACB httpAccept;
-#if USE_SSL
+#if USE_OPENSSL
 static IOACB httpsAccept;
 #endif
 static CTCB clientLifetimeTimeout;
@@ -635,7 +635,7 @@ ClientHttpRequest::logRequest()
     if (getConn() != NULL && getConn()->clientConnection != NULL && getConn()->clientConnection->rfc931[0])
         al->cache.rfc931 = getConn()->clientConnection->rfc931;
 
-#if USE_SSL && 0
+#if USE_OPENSSL && 0
 
     /* This is broken. Fails if the connection has been closed. Needs
      * to snarf the ssl details some place earlier..
@@ -882,7 +882,7 @@ ConnStateData::~ConnStateData()
     if (bodyPipe != NULL)
         stopProducingFor(bodyPipe, false);
 
-#if USE_SSL
+#if USE_OPENSSL
     delete sslServerBump;
 #endif
 }
@@ -2512,7 +2512,7 @@ ConnStateData::quitAfterError(HttpRequest *request)
     debugs(33,4, HERE << "Will close after error: " << clientConnection);
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 bool ConnStateData::serveDelayedError(ClientSocketContext *context)
 {
     ClientHttpRequest *http = context->http;
@@ -2596,7 +2596,7 @@ bool ConnStateData::serveDelayedError(ClientSocketContext *context)
 
     return false;
 }
-#endif // USE_SSL
+#endif // USE_OPENSSL
 
 static void
 clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *context, const HttpRequestMethod& method, Http::ProtocolVersion http_ver)
@@ -2814,7 +2814,7 @@ clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *c
         conn->flags.readMore = false;
     }
 
-#if USE_SSL
+#if USE_OPENSSL
     if (conn->switchedToHttps() && conn->serveDelayedError(context))
         goto finish;
 #endif
@@ -3262,7 +3262,7 @@ clientLifetimeTimeout(const CommTimeoutCbParams &io)
 
 ConnStateData::ConnStateData(const MasterXaction::Pointer &xact) :
         AsyncJob("ConnStateData"),
-#if USE_SSL
+#if USE_OPENSSL
         sslBumpMode(Ssl::bumpEnd),
         switchedToHttps_(false),
         sslServerBump(NULL),
@@ -3406,7 +3406,7 @@ httpAccept(const CommAcceptCbParams &params)
 #endif
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 
 /** Create SSL connection structure and update fd_table */
 static SSL *
@@ -3996,7 +3996,7 @@ ConnStateData::httpsPeeked(Comm::ConnectionPointer serverConnection)
     getSslContextStart();
 }
 
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
 
 /// check FD after clientHttp[s]ConnectionOpened, adjust HttpSockets as needed
 static bool
@@ -4039,7 +4039,7 @@ clientHttpConnectionsOpen(void)
             continue;
         }
 
-#if USE_SSL
+#if USE_OPENSSL
         if (s->flags.tunnelSslBumping && !Config.accessList.ssl_bump) {
             debugs(33, DBG_IMPORTANT, "WARNING: No ssl_bump configured. Disabling ssl-bump on " << AnyP::UriScheme(s->transport.protocol) << "_port " << s->s);
             s->flags.tunnelSslBumping = false;
@@ -4077,7 +4077,7 @@ clientHttpConnectionsOpen(void)
     }
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 static void
 clientHttpsConnectionsOpen(void)
 {
@@ -4161,7 +4161,7 @@ void
 clientOpenListenSockets(void)
 {
     clientHttpConnectionsOpen();
-#if USE_SSL
+#if USE_OPENSSL
     clientHttpsConnectionsOpen();
 #endif
 
@@ -4180,7 +4180,7 @@ clientHttpConnectionsClose(void)
         }
     }
 
-#if USE_SSL
+#if USE_OPENSSL
     for (AnyP::PortCfg *s = Config.Sockaddr.https; s; s = s->next) {
         if (s->listenConn != NULL) {
             debugs(1, DBG_IMPORTANT, "Closing HTTPS port " << s->listenConn->local);
index 5429525f079b0ed275c9c2745e8fc7059db8a337..7ec69f182b567b62d766c7ba7cdb1176bd8a291e 100644 (file)
@@ -40,7 +40,7 @@
 #if USE_AUTH
 #include "auth/UserRequest.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
@@ -162,7 +162,7 @@ private:
 };
 
 class ConnectionDetail;
-#if USE_SSL
+#if USE_OPENSSL
 namespace Ssl
 {
 class ServerBump;
@@ -334,7 +334,7 @@ public:
     /// The caller assumes responsibility for connection closure detection.
     void stopPinnedConnectionMonitoring();
 
-#if USE_SSL
+#if USE_OPENSSL
     /// called by FwdState when it is done bumping the server
     void httpsPeeked(Comm::ConnectionPointer serverConnection);
 
@@ -399,7 +399,7 @@ private:
 
     // XXX: CBDATA plays with public/private and leaves the following 'private' fields all public... :(
 
-#if USE_SSL
+#if USE_OPENSSL
     bool switchedToHttps_;
     /// The SSL server host name appears in CONNECT request or the server ip address for the intercepted requests
     String sslConnectHostOrIp; ///< The SSL server host name as passed in the CONNECT request
index b2f2beb8f2d82887d6bf9d533344b2ea4e7fa3ce..48400d7bb61bd7d11c585c0efddae2c8bfb100c9 100644 (file)
@@ -88,7 +88,7 @@
 #include "adaptation/icap/History.h"
 #endif
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/ServerBump.h"
 #include "ssl/support.h"
 #endif
@@ -110,7 +110,7 @@ CBDATA_CLASS_INIT(ClientRequestContext);
 /* Local functions */
 /* other */
 static void clientAccessCheckDoneWrapper(allow_t, void *);
-#if USE_SSL
+#if USE_OPENSSL
 static void sslBumpAccessCheckDoneWrapper(allow_t, void *);
 #endif
 static int clientHierarchical(ClientHttpRequest * http);
@@ -146,7 +146,7 @@ ClientRequestContext::ClientRequestContext(ClientHttpRequest *anHttp) : http(cbd
     store_id_fail_count = 0;
     no_cache_done = false;
     interpreted_req_hdrs = false;
-#if USE_SSL
+#if USE_OPENSSL
     sslBumpCheckDone = false;
 #endif
     debugs(85,3, HERE << this << " ClientRequestContext constructed");
@@ -167,7 +167,7 @@ ClientHttpRequest::ClientHttpRequest(ConnStateData * aConn) :
     al->cache.port =  cbdataReference(aConn->port);
     al->cache.caddr = aConn->log_addr;
 
-#if USE_SSL
+#if USE_OPENSSL
     if (aConn->clientConnection != NULL && aConn->clientConnection->isOpen()) {
         if (SSL *ssl = fd_table[aConn->clientConnection->fd].ssl)
             al->cache.sslClientCert.reset(SSL_get_peer_certificate(ssl));
@@ -177,7 +177,7 @@ ClientHttpRequest::ClientHttpRequest(ConnStateData * aConn) :
 #if USE_ADAPTATION
     request_satisfaction_mode = false;
 #endif
-#if USE_SSL
+#if USE_OPENSSL
     sslBumpNeed_ = Ssl::bumpEnd;
 #endif
 }
@@ -855,7 +855,7 @@ ClientHttpRequest::noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer g)
     if (ih != NULL) {
         if (getConn() != NULL && getConn()->clientConnection != NULL) {
             ih->rfc931 = getConn()->clientConnection->rfc931;
-#if USE_SSL
+#if USE_OPENSSL
             if (getConn()->clientConnection->isOpen()) {
                 ih->ssluser = sslGetUserEmail(fd_table[getConn()->clientConnection->fd].ssl);
             }
@@ -1438,7 +1438,7 @@ ClientRequestContext::checkNoCacheDone(const allow_t &answer)
     http->doCallouts();
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 bool
 ClientRequestContext::sslBumpAccessCheck()
 {
@@ -1519,7 +1519,7 @@ ClientHttpRequest::processRequest()
     debugs(85, 4, "clientProcessRequest: " << RequestMethodStr(request->method) << " '" << uri << "'");
 
     if (request->method == Http::METHOD_CONNECT && !redirect.status) {
-#if USE_SSL
+#if USE_OPENSSL
         if (sslBumpNeeded()) {
             sslBumpStart();
             return;
@@ -1549,7 +1549,7 @@ ClientHttpRequest::httpStart()
     PROF_stop(httpStart);
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 
 void
 ClientHttpRequest::sslBumpNeed(Ssl::BumpMode mode)
@@ -1789,7 +1789,7 @@ ClientHttpRequest::doCallouts()
         }
     }
 
-#if USE_SSL
+#if USE_OPENSSL
     // We need to check for SslBump even if the calloutContext->error is set
     // because bumping may require delaying the error until after CONNECT.
     if (!calloutContext->sslBumpCheckDone) {
@@ -1803,7 +1803,7 @@ ClientHttpRequest::doCallouts()
     if (calloutContext->error) {
         const char *storeUri = request->storeId();
         StoreEntry *e= storeCreateEntry(storeUri, storeUri, request->flags, request->method);
-#if USE_SSL
+#if USE_OPENSSL
         if (sslBumpNeeded()) {
             // set final error but delay sending until we bump
             Ssl::ServerBump *srvBump = new Ssl::ServerBump(request, e);
index e34a2c76ca7d7e870af3d1e4adec948ffd2bf677..3d6e2b1cd26afa04419f9b124c28eae975c04694 100644 (file)
@@ -142,7 +142,7 @@ private:
     StoreEntry *loggingEntry_;
     ConnStateData * conn_;
 
-#if USE_SSL
+#if USE_OPENSSL
     /// whether (and how) the request needs to be bumped
     Ssl::BumpMode sslBumpNeed_;
 
index 34bbd91d53b725ac10679e2f0f8d8e526a2430c6..ae1498bccdb084bd6358db978cb9de078c6ba293 100644 (file)
@@ -60,7 +60,7 @@
 #include "StoreIOBuffer.h"
 #include "tools.h"
 
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
@@ -1009,7 +1009,7 @@ commLingerTimeout(const FdeCbParams &params)
 void
 comm_lingering_close(int fd)
 {
-#if USE_SSL
+#if USE_OPENSSL
     if (fd_table[fd].ssl)
         ssl_shutdown_method(fd_table[fd].ssl);
 #endif
@@ -1068,7 +1068,7 @@ old_comm_reset_close(int fd)
     comm_close(fd);
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 void
 commStartSslClose(const FdeCbParams &params)
 {
@@ -1080,7 +1080,7 @@ commStartSslClose(const FdeCbParams &params)
 void
 comm_close_complete(const FdeCbParams &params)
 {
-#if USE_SSL
+#if USE_OPENSSL
     fde *F = &fd_table[params.fd];
 
     if (F->ssl) {
@@ -1143,7 +1143,7 @@ _comm_close(int fd, char const *file, int line)
 
     F->flags.close_request = true;
 
-#if USE_SSL
+#if USE_OPENSSL
     if (F->ssl) {
         AsyncCall::Pointer startCall=commCbCall(5,4, "commStartSslClose",
                                                 FdeCbPtrFun(commStartSslClose, NULL));
index c93ffd9d0d50fdbd4311d61b3d048db2b7a53a9e..1630f9e8fa91f5a172da60ed768bc341b50697d6 100644 (file)
@@ -54,7 +54,7 @@
 #include "auth/UserRequest.h"
 #endif
 #include "SquidTime.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/ErrorDetailManager.h"
 #endif
 
@@ -228,7 +228,7 @@ errorInitialize(void)
         error_stylesheet.Printf("%s",tmpl.text());
     }
 
-#if USE_SSL
+#if USE_OPENSSL
     Ssl::errorDetailInitialize();
 #endif
 }
@@ -252,7 +252,7 @@ errorClean(void)
 
     error_page_count = 0;
 
-#if USE_SSL
+#if USE_OPENSSL
     Ssl::errorDetailClean();
 #endif
 }
@@ -588,7 +588,7 @@ ErrorState::ErrorState(err_type t, Http::StatusCode status, HttpRequest * req) :
         callback_data(NULL),
         request_hdrs(NULL),
         err_msg(NULL),
-#if USE_SSL
+#if USE_OPENSSL
         detail(NULL),
 #endif
         detailCode(ERR_DETAIL_NONE)
@@ -708,7 +708,7 @@ ErrorState::~ErrorState()
     if (err_language != Config.errorDefaultLanguage)
 #endif
         safe_free(err_language);
-#if USE_SSL
+#if USE_OPENSSL
     delete detail;
 #endif
 }
@@ -833,7 +833,7 @@ ErrorState::Convert(char token, bool building_deny_info_url, bool allowRecursion
     case 'D':
         if (!allowRecursion)
             p = "%D";  // if recursion is not allowed, do not convert
-#if USE_SSL
+#if USE_OPENSSL
         // currently only SSL error details implemented
         else if (detail) {
             detail->useRequest(request);
@@ -1071,7 +1071,7 @@ ErrorState::Convert(char token, bool building_deny_info_url, bool allowRecursion
         break;
 
     case 'x':
-#if USE_SSL
+#if USE_OPENSSL
         if (detail)
             mb.Printf("%s", detail->errorName());
         else
@@ -1222,7 +1222,7 @@ ErrorState::BuildHttpReply()
     // error tracking.
     if (request) {
         int edc = ERR_DETAIL_NONE; // error detail code
-#if USE_SSL
+#if USE_OPENSSL
         if (detail)
             edc = detail->errorNo();
         else
index 1c04b99c54be0702afdecf83171698631cb83e83..695a65c466cee7d4cdefc70f9c6d37533e9c08cf 100644 (file)
@@ -43,7 +43,7 @@
 #include "SquidString.h"
 /* auth/UserRequest.h is empty unless USE_AUTH is defined */
 #include "auth/UserRequest.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/ErrorDetail.h"
 #endif
 
@@ -180,7 +180,7 @@ public:
     char *request_hdrs;
     char *err_msg; /* Preformatted error message from the cache */
 
-#if USE_SSL
+#if USE_OPENSSL
     Ssl::ErrorDetail *detail;
 #endif
     /// type-specific detail about the transaction error;
index 95e8a73f9f4df46b8194e867e94e47b48b748dc4..02ccc2632005c819cf07e00947f8a57131bb6787 100644 (file)
@@ -63,7 +63,7 @@
 #include "tools.h"
 #include "URL.h"
 #include "wordlist.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 #if USE_AUTH
@@ -183,7 +183,7 @@ struct _external_acl_format {
         EXT_ACL_HEADER_REPLY_ID,
         EXT_ACL_HEADER_REPLY_ID_MEMBER,
 
-#if USE_SSL
+#if USE_OPENSSL
         EXT_ACL_USER_CERT,
         EXT_ACL_USER_CA_CERT,
         EXT_ACL_USER_CERT_RAW,
@@ -468,7 +468,7 @@ parse_externalAclHelper(external_acl ** list)
             format->type = _external_acl_format::EXT_ACL_PATH;
         else if (strcmp(token, "%METHOD") == 0 || strcmp(token, "%>rm") == 0)
             format->type = _external_acl_format::EXT_ACL_METHOD;
-#if USE_SSL
+#if USE_OPENSSL
         else if (strcmp(token, "%USER_CERT") == 0)
             format->type = _external_acl_format::EXT_ACL_USER_CERT_RAW;
         else if (strcmp(token, "%USER_CERTCHAIN") == 0)
@@ -623,7 +623,7 @@ dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl
                 DUMP_EXT_ACL_TYPE(PORT);
                 DUMP_EXT_ACL_TYPE(PATH);
                 DUMP_EXT_ACL_TYPE(METHOD);
-#if USE_SSL
+#if USE_OPENSSL
                 DUMP_EXT_ACL_TYPE_FMT(USER_CERT_RAW, " %%USER_CERT_RAW");
                 DUMP_EXT_ACL_TYPE_FMT(USER_CERTCHAIN_RAW, " %%USER_CERTCHAIN_RAW");
                 DUMP_EXT_ACL_TYPE_FMT(USER_CERT, " %%USER_CERT_%s", format->header);
@@ -1111,7 +1111,7 @@ makeExternalAclKey(ACLFilledChecklist * ch, external_acl_data * acl_data)
                 str = sb.termedBuf();
             }
             break;
-#if USE_SSL
+#if USE_OPENSSL
 
         case _external_acl_format::EXT_ACL_USER_CERT_RAW:
 
index b604c22d122d24996779dc2d5a055fb6d1f72570..08ad8604f82b0bf9513475af6b67d7bd6a9e93b1 100644 (file)
--- a/src/fde.h
+++ b/src/fde.h
@@ -34,7 +34,7 @@
 #include "defines.h"
 #include "ip/Address.h"
 
-#if USE_SSL
+#if HAVE_OPENSSL_SSL_H
 #include <openssl/ssl.h>
 #endif
 
@@ -132,7 +132,7 @@ public:
     CommWriteStateData *wstate;         /* State data for comm_write */
     READ_HANDLER *read_method;
     WRITE_HANDLER *write_method;
-#if USE_SSL
+#if USE_OPENSSL
     SSL *ssl;
     SSL_CTX *dynamicSslContext; ///< cached and then freed when fd is closed
 #endif
@@ -185,7 +185,7 @@ private:
         wstate = NULL;
         read_method = NULL;
         write_method = NULL;
-#if USE_SSL
+#if USE_OPENSSL
         ssl = NULL;
         dynamicSslContext = NULL;
 #endif
index 93082f0968ac35e2373a4f5aa742b9c8fb001e7a..66f6645a6550483456bb401ecab97e59dc6547ff 100644 (file)
@@ -196,7 +196,7 @@ typedef enum {
 #endif
     LFT_CREDENTIALS,
 
-#if USE_SSL
+#if USE_OPENSSL
     LFT_SSL_BUMP_MODE,
     LFT_SSL_USER_CERT_SUBJECT,
     LFT_SSL_USER_CERT_ISSUER,
index b90f597e3310bfce07572ed7e086a7349e3e223b..bc85d3217914e86a54cddf57baa4aec94d092c6d 100644 (file)
@@ -15,7 +15,7 @@
 #include "SquidTime.h"
 #include "Store.h"
 #include "URL.h"
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/ErrorDetail.h"
 #endif
 
@@ -801,7 +801,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
 #endif
             if (!out)
                 out = strOrNull(al->cache.extuser);
-#if USE_SSL
+#if USE_OPENSSL
             if (!out)
                 out = strOrNull(al->cache.ssluser);
 #endif
@@ -877,7 +877,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
             break;
 
         case LFT_SQUID_ERROR_DETAIL:
-#if USE_SSL
+#if USE_OPENSSL
             if (al->request && al->request->errType == ERR_SECURE_CONNECT_FAIL) {
                 if (! (out = Ssl::GetErrorName(al->request->errDetail))) {
                     snprintf(tmp, sizeof(tmp), "SSL_ERR=%d", al->request->errDetail);
@@ -1063,7 +1063,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
             dooff = 1;
             break;
 
-#if USE_SSL
+#if USE_OPENSSL
         case LFT_SSL_BUMP_MODE: {
             const Ssl::BumpMode mode = static_cast<Ssl::BumpMode>(al->ssl.bumpMode);
             // for Ssl::bumpEnd, Ssl::bumpMode() returns NULL and we log '-'
index 72c90dbeae868b20023e47dff7a53e3398954704..8799769a453b996becae59fb45bc613c40978ed8 100644 (file)
@@ -169,7 +169,7 @@ static TokenTableEntry TokenTableIcap[] = {
 };
 #endif
 
-#if USE_SSL
+#if USE_OPENSSL
 // SSL (ssl::) tokens
 static TokenTableEntry TokenTableSsl[] = {
     {"bump_mode", LFT_SSL_BUMP_MODE},
@@ -193,7 +193,7 @@ Format::Token::Init()
 #if ICAP_CLIENT
     TheConfig.registerTokens(String("icap"),::Format::TokenTableIcap);
 #endif
-#if USE_SSL
+#if USE_OPENSSL
     TheConfig.registerTokens(String("ssl"),::Format::TokenTableSsl);
 #endif
 }
index c9797b7732b3e72bb622cd724ce585e61d1cb8c6..ad6746c352acf5cf4832ceeb6f08a414a9dc4106 100644 (file)
@@ -67,7 +67,7 @@ Log::Format::SquidIcap(const AccessLogEntry::Pointer &al, Logfile * logfile)
     if (!user)
         user = ::Format::QuoteUrlEncodeUsername(al->cache.extuser);
 
-#if USE_SSL
+#if USE_OPENSSL
     if (!user)
         user = ::Format::QuoteUrlEncodeUsername(al->cache.ssluser);
 #endif
index 6cc0dbaf525d9c582d72636b911c69188a31ff5b..6d154811a5b6a1e40d3ed1cdc6ba3a48217f539e 100644 (file)
@@ -56,7 +56,7 @@ Log::Format::SquidNative(const AccessLogEntry::Pointer &al, Logfile * logfile)
     if (!user)
         user = ::Format::QuoteUrlEncodeUsername(al->cache.extuser);
 
-#if USE_SSL
+#if USE_OPENSSL
     if (!user)
         user = ::Format::QuoteUrlEncodeUsername(al->cache.ssluser);
 #endif
index 851bb43537bd3d068d637919005f1db22bca4e57..59d24b8a62a52772d014c2c5b81446970c9dcfac 100644 (file)
 #if USE_SSL_CRTD
 #include "ssl/certificate_db.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/context_storage.h"
 #include "ssl/helper.h"
 #endif
@@ -750,7 +750,7 @@ mainReconfigureStart(void)
 #if USE_SSL_CRTD
     Ssl::Helper::GetInstance()->Shutdown();
 #endif
-#if USE_SSL
+#if USE_OPENSSL
     if (Ssl::CertValidationHelper::GetInstance())
         Ssl::CertValidationHelper::GetInstance()->Shutdown();
     Ssl::TheGlobalContextStorage.reconfigureStart();
@@ -837,7 +837,7 @@ mainReconfigureFinish(void *)
 #if USE_SSL_CRTD
     Ssl::Helper::GetInstance()->Init();
 #endif
-#if USE_SSL
+#if USE_OPENSSL
     if (Ssl::CertValidationHelper::GetInstance())
         Ssl::CertValidationHelper::GetInstance()->Init();
 #endif
@@ -1042,7 +1042,7 @@ mainInitialize(void)
     Ssl::Helper::GetInstance()->Init();
 #endif
 
-#if USE_SSL
+#if USE_OPENSSL
     if (!configured_once)
         Ssl::initialize_session_cache();
 
@@ -1831,7 +1831,7 @@ SquidShutdown()
 #if USE_SSL_CRTD
     Ssl::Helper::GetInstance()->Shutdown();
 #endif
-#if USE_SSL
+#if USE_OPENSSL
     if (Ssl::CertValidationHelper::GetInstance())
         Ssl::CertValidationHelper::GetInstance()->Shutdown();
 #endif
index 671503ee70715a35dd858e133a0e6c13c74d4715..1b2f698ce326ca0324a04f4581577991f332cd06 100644 (file)
@@ -49,7 +49,7 @@
 #if USE_AUTH
 #include "auth/UserRequest.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
index a12c8ccb2decb50ac736ddafcb7812b898b209dd..88790fc7379c726add61a4471de9073723176214 100644 (file)
@@ -29,7 +29,7 @@
  *
  */
 
-#if USE_SSL
+#if USE_OPENSSL
 #include "acl/forward.h"
 
 class sslproxy_cert_sign
index 020daf7d446ee9a9620d5f052f9ec7d0dab5be54..f0cb0005a809b13c3df020b7306af701d1f1c0ea 100644 (file)
@@ -5,7 +5,7 @@
 #include "StoreEntryStream.h"
 
 #include <limits>
-#if USE_SSL
+#if HAVE_OPENSSL_SSL_H
 #include <openssl/ssl.h>
 #endif
 
index 0ab77378c79925d24c6d00c96a452ff3a2abbff3..dd0f668a818dd82c3a0fbc2212bbf99453c231d1 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SQUID_SSL_CONTEXT_STORAGE_H
 #define SQUID_SSL_CONTEXT_STORAGE_H
 
-#if USE_SSL
+#if USE_OPENSSL
 
 #include "base/LruMap.h"
 #include "CacheManager.h"
@@ -13,7 +13,9 @@
 
 #include <list>
 #include <map>
+#if HAVE_OPENSSL_SSL_H
 #include <openssl/ssl.h>
+#endif
 
 /// TODO: Replace on real size.
 #define SSL_CTX_SIZE 1024
@@ -65,6 +67,6 @@ private:
 /// Global cache for store all SSL server certificates.
 extern GlobalContextStorage TheGlobalContextStorage;
 } //namespace Ssl
-#endif // USE_SSL
+#endif // USE_OPENSSL
 
 #endif // SQUID_SSL_CONTEXT_STORAGE_H
index c6f8d253a53107ccdf174b35a19a68125c86c15e..bd88e7062ed6cce3c05b3985590261ef6d0fa966 100644 (file)
@@ -1,5 +1,6 @@
 #include "squid.h"
 #include "ssl/gadgets.h"
+
 #if HAVE_OPENSSL_X509V3_H
 #include <openssl/x509v3.h>
 #endif
index 2923ea13df382cc68017b8f354d4770f2b04d01a..f944bf0c4e21353848ce1facf9861daebf67c05c 100644 (file)
@@ -36,7 +36,7 @@
 /* MS Visual Studio Projects are monolithic, so we need the following
  * #if to exclude the SSL code from compile process when not needed.
  */
-#if USE_SSL
+#if USE_OPENSSL
 
 #include "acl/FilledChecklist.h"
 #include "anyp/PortCfg.h"
@@ -1874,4 +1874,4 @@ SharedSessionCacheRr::~SharedSessionCacheRr()
     delete owner;
 }
 
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
index e3504bf935ac49f3503011235112e81d008e3965..0e66be8fd45de7b85bc418acc17adb2b2f6f81e6 100644 (file)
@@ -70,7 +70,7 @@
 #if USE_DELAY_POOLS
 #include "DelayId.h"
 #endif
-#if USE_SSL
+#if USE_OPENSSL
 #include "ssl/support.h"
 #endif
 
@@ -1913,7 +1913,7 @@ statClientRequests(StoreEntry * s)
         if (!p && conn != NULL && conn->clientConnection->rfc931[0])
             p = conn->clientConnection->rfc931;
 
-#if USE_SSL
+#if USE_OPENSSL
 
         if (!p && conn != NULL && Comm::IsConnOpen(conn->clientConnection))
             p = sslGetUserEmail(fd_table[conn->clientConnection->fd].ssl);
index d1f9ab1a3a14ff57a351f4a95305332c187e0eb0..d1a4fc94e9a22f2ea1c5c0add44942353c00eac8 100644 (file)
@@ -62,7 +62,7 @@ void ConnStateData::connStateClosed(const CommCloseCbParams &io) STUB
 void ConnStateData::requestTimeout(const CommTimeoutCbParams &params) STUB
 void ConnStateData::swanSong() STUB
 void ConnStateData::quitAfterError(HttpRequest *request) STUB
-#if USE_SSL
+#if USE_OPENSSL
 void ConnStateData::httpsPeeked(Comm::ConnectionPointer serverConnection) STUB
 void ConnStateData::getSslContextStart() STUB
 void ConnStateData::getSslContextDone(SSL_CTX * sslContext, bool isNew) STUB
index d1eb5f83f12d1a0bd92437f45384aa2d1c4c7b4c..6a3adc387f292f5c53a1dd4966287672074b140b 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
 
-#if USE_SSL
+#if USE_OPENSSL
 
 #include "fatal.h"
 
index f4344dd3eda368ffca0e013a853ce849332884ba..19a61365cda368453eaaa86c5a4d4444f43fd041 100644 (file)
@@ -482,7 +482,7 @@ getMyHostname(void)
     if (Config.Sockaddr.http && sa.isAnyAddr())
         sa = Config.Sockaddr.http->s;
 
-#if USE_SSL
+#if USE_OPENSSL
 
     if (Config.Sockaddr.https && sa.isAnyAddr())
         sa = Config.Sockaddr.https->s;
@@ -1142,7 +1142,7 @@ getMyPort(void)
             return p->s.port();
     }
 
-#if USE_SSL
+#if USE_OPENSSL
     if ((p = Config.Sockaddr.https)) {
         // skip any special interception ports
         while (p && p->flags.isIntercepted())
index 0268467f8e4a009e2799ad8fc33e9819ed689e29..d375606f078d57efd39019d8f07a00c06ed88161 100644 (file)
@@ -858,7 +858,7 @@ urlCheckRequest(const HttpRequest * r)
         break;
 
     case AnyP::PROTO_HTTPS:
-#if USE_SSL
+#if USE_OPENSSL
 
         rc = 1;