add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / net / socat / patches / 502-no_sslv2.patch
1 --- a/sslcls.c
2 +++ b/sslcls.c
3 @@ -35,6 +35,7 @@
4     return result;
5  }
6  
7 +#ifndef OPENSSL_NO_SSL2
8  SSL_METHOD *sycSSLv2_client_method(void) {
9     SSL_METHOD *result;
10     Debug("SSLv2_client_method()");
11 @@ -50,6 +51,7 @@
12     Debug1("SSLv2_server_method() -> %p", result);
13     return result;
14  }
15 +#endif
16  
17  SSL_METHOD *sycSSLv3_client_method(void) {
18     SSL_METHOD *result;
19 --- a/xio-openssl.c
20 +++ b/xio-openssl.c
21 @@ -676,9 +676,12 @@
22  
23     if (!server) {
24        if (me_str != 0) {
25 +#ifndef OPENSSL_NO_SSL2
26          if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) {
27             method = sycSSLv2_client_method();
28 -        } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
29 +        } else
30 +#endif
31 +        if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
32             method = sycSSLv3_client_method();
33          } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") ||
34                     !strcasecmp(me_str, "SSL")) {
35 @@ -695,9 +698,12 @@
36        }
37     } else /* server */ {
38        if (me_str != 0) {
39 +#ifndef OPENSSL_NO_SSL2
40          if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) {
41             method = sycSSLv2_server_method();
42 -        } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
43 +        } else
44 +#endif
45 +        if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) {
46             method = sycSSLv3_server_method();
47          } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") ||
48                     !strcasecmp(me_str, "SSL")) {