Update ssltunnel to 1.16 (#3655)
[openwrt/svn-archive/archive.git] / net / socat / patches / 502-no_sslv2.patch
1 diff -ruN socat-1.4-old/sslcls.c socat-1.4-new/sslcls.c
2 --- socat-1.4-old/sslcls.c 2005-03-12 19:06:54.000000000 +0100
3 +++ socat-1.4-new/sslcls.c 2006-12-18 12:26:32.000000000 +0100
4 @@ -35,6 +35,7 @@
5 return result;
6 }
7
8 +#ifndef OPENSSL_NO_SSL2
9 SSL_METHOD *sycSSLv2_client_method(void) {
10 SSL_METHOD *result;
11 Debug("SSLv2_client_method()");
12 @@ -50,6 +51,7 @@
13 Debug1("SSLv2_server_method() -> %p", result);
14 return result;
15 }
16 +#endif
17
18 SSL_METHOD *sycSSLv3_client_method(void) {
19 SSL_METHOD *result;
20 diff -ruN socat-1.4-old/xio-openssl.c socat-1.4-new/xio-openssl.c
21 --- socat-1.4-old/xio-openssl.c 2005-09-04 11:40:45.000000000 +0200
22 +++ socat-1.4-new/xio-openssl.c 2006-12-18 12:27:17.000000000 +0100
23 @@ -612,9 +612,12 @@
24
25 if (!server) {
26 if (me_str != 0) {
27 +#ifndef OPENSSL_NO_SSL2
28 if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) {
29 method = sycSSLv2_client_method();
30 - } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
31 + } else
32 +#endif
33 + if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
34 method = sycSSLv3_client_method();
35 } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") ||
36 !strcasecmp(me_str, "SSL")) {
37 @@ -631,9 +634,12 @@
38 }
39 } else /* server */ {
40 if (me_str != 0) {
41 +#ifndef OPENSSL_NO_SSL2
42 if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) {
43 method = sycSSLv2_server_method();
44 - } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
45 + } else
46 +#endif
47 + if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
48 method = sycSSLv3_server_method();
49 } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") ||
50 !strcasecmp(me_str, "SSL")) {