$OpenBSD: patch-src_ssl_support_c,v 1.1.1.1 2013/01/02 10:12:02 sthen Exp $

Allow building against OpenSSL without SSLv2 support.

--- src/ssl_support.c.orig	Sun Mar 14 13:20:45 2010
+++ src/ssl_support.c	Wed Jun 20 18:27:57 2012
@@ -447,8 +447,13 @@ sslCreateServerContext(const char *certfile, const cha
     debug(83, 1) ("Initialising SSL.\n");
     switch (version) {
     case 2:
+#ifndef OPENSSL_NO_SSL2
 	debug(83, 5) ("Using SSLv2.\n");
 	method = SSLv2_server_method();
+#else
+	debug(83, 1) ("SSLv2 is not available in this Proxy.\n");
+	return NULL;
+#endif
 	break;
     case 3:
 	debug(83, 5) ("Using SSLv3.\n");
@@ -610,8 +615,13 @@ sslCreateClientContext(const char *certfile, const cha
     debug(83, 1) ("Initialising SSL.\n");
     switch (version) {
     case 2:
+#ifndef OPENSSL_NO_SSL2
 	debug(83, 5) ("Using SSLv2.\n");
 	method = SSLv2_client_method();
+#else
+	debug(83, 1) ("SSLv2 is not available in this Proxy.\n");
+	return NULL;
+#endif
 	break;
     case 3:
 	debug(83, 5) ("Using SSLv3.\n");
