From 8c3c693b1921e92509fc82e4a7e68f91c4225182 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 6 May 2011 23:45:36 -0600 Subject: [PATCH] Support OpenSSL 1.0.0 built without SSLv2 --- src/ssl_support.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ssl_support.cc b/src/ssl_support.cc index 974844bd70..546c4cbd54 100644 --- a/src/ssl_support.cc +++ b/src/ssl_support.cc @@ -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: -- 2.47.3