]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Support OpenSSL 1.0.0 built without SSLv2
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 4 May 2011 07:19:55 +0000 (19:19 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 4 May 2011 07:19:55 +0000 (19:19 +1200)
src/ssl/support.cc

index 55cf01bb1a95427f4260084d044e3755ce4295a9..7e3995e0676ade8fd6d3fa2b41811e2d411519df 100644 (file)
@@ -652,8 +652,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:
@@ -850,8 +855,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: