diff -ruN socat-1.4-old/sslcls.c socat-1.4-new/sslcls.c --- socat-1.4-old/sslcls.c 2005-03-12 19:06:54.000000000 +0100 +++ socat-1.4-new/sslcls.c 2006-12-18 12:26:32.000000000 +0100 @@ -35,6 +35,7 @@ return result; } +#ifndef OPENSSL_NO_SSL2 SSL_METHOD *sycSSLv2_client_method(void) { SSL_METHOD *result; Debug("SSLv2_client_method()"); @@ -50,6 +51,7 @@ Debug1("SSLv2_server_method() -> %p", result); return result; } +#endif SSL_METHOD *sycSSLv3_client_method(void) { SSL_METHOD *result; diff -ruN socat-1.4-old/xio-openssl.c socat-1.4-new/xio-openssl.c --- socat-1.4-old/xio-openssl.c 2005-09-04 11:40:45.000000000 +0200 +++ socat-1.4-new/xio-openssl.c 2006-12-18 12:27:17.000000000 +0100 @@ -612,9 +612,12 @@ if (!server) { if (me_str != 0) { +#ifndef OPENSSL_NO_SSL2 if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) { method = sycSSLv2_client_method(); - } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { + } else +#endif + if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { method = sycSSLv3_client_method(); } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") || !strcasecmp(me_str, "SSL")) { @@ -631,9 +634,12 @@ } } else /* server */ { if (me_str != 0) { +#ifndef OPENSSL_NO_SSL2 if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) { method = sycSSLv2_server_method(); - } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { + } else +#endif + if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { method = sycSSLv3_server_method(); } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") || !strcasecmp(me_str, "SSL")) {