packages/net/socat/patches/502-no_sslv2.patch
florian 5428c7d1d9 Update socat to 1.6.0.1 (#3654)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@11685 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-07-06 11:27:01 +00:00

49 lines
1.4 KiB
Diff

--- a/sslcls.c
+++ b/sslcls.c
@@ -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;
--- a/xio-openssl.c
+++ b/xio-openssl.c
@@ -676,9 +676,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")) {
@@ -695,9 +698,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")) {