packages/net/socat/patches/502-no_sslv2.patch

49 lines
1.4 KiB
Diff
Raw Normal View History

--- 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")) {