]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Support OpenSSL 1.0.0 built without SSLv2
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 7 May 2011 05:45:36 +0000 (23:45 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 7 May 2011 05:45:36 +0000 (23:45 -0600)
src/ssl_support.cc

index 974844bd7077aca9cf044a6e978445dfaebdc43c..546c4cbd541382fec09c5801b064424fb9b8b3e3 100644 (file)
@@ -681,8 +681,13 @@ sslCreateServerContext(const char *certfile, const char *keyfile, int version, c
     switch (version) {
 
     case 2:
+#ifndef OPENSSL_NO_SSL2
         debugs(83, 5, "Using SSLv2.");
         method = SSLv2_server_method();
+#else
+        debugs(83, 1, "SSLv2 is not available in this Proxy.");
+        return NULL;
+#endif
         break;
 
     case 3:
@@ -879,8 +884,13 @@ sslCreateClientContext(const char *certfile, const char *keyfile, int version, c
     switch (version) {
 
     case 2:
+#ifndef OPENSSL_NO_SSL2
         debugs(83, 5, "Using SSLv2.");
         method = SSLv2_client_method();
+#else
+        debugs(83, 1, "SSLv2 is not available in this Proxy.");
+        return NULL;
+#endif
         break;
 
     case 3: