packages/net/rrs/patches/002-no_sslv2.patch
pavlov 14c1a8db5f patch file cleanup... ick.. kaloz you owe me some love
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6526 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-03-05 01:34:12 +00:00

46 lines
1.6 KiB
Diff

diff -ruN rrs-1.70-old/rrs.c rrs-1.70-new/rrs.c
--- rrs-1.70-old/rrs.c 2006-12-18 11:41:42.000000000 +0100
+++ rrs-1.70-new/rrs.c 2006-12-18 11:53:43.000000000 +0100
@@ -1826,9 +1826,12 @@
}
rrs_ssl = TLSv1;
if (optarg) {
+#ifndef OPENSSL_NO_SSL2
if (!strcasecmp(optarg, "SSLv2")) {
rrs_ssl = SSLv2;
- } else if (!strcasecmp(optarg, "SSLv3")) {
+ } else
+#endif
+ if (!strcasecmp(optarg, "SSLv3")) {
rrs_ssl = SSLv3;
} else if (!strcasecmp(optarg, "TLSv1")) {
rrs_ssl = TLSv1;
@@ -1981,9 +1984,12 @@
SSL_load_error_strings();
if (rrs_listen) {
+#ifndef OPENSSL_NO_SSL2
if (rrs_ssl == SSLv2) {
sslmethod = SSLv2_server_method();
- } else if (rrs_ssl == SSLv3) {
+ } else
+#endif
+ if (rrs_ssl == SSLv3) {
sslmethod = SSLv3_server_method();
} else if (rrs_ssl == TLSv1) {
sslmethod = TLSv1_server_method();
@@ -1992,9 +1998,12 @@
return err_generic;
}
} else {
+#ifndef OPENSSL_NO_SSL2
if (rrs_ssl == SSLv2) {
sslmethod = SSLv2_client_method();
- } else if (rrs_ssl == SSLv3) {
+ } else
+#endif
+ if (rrs_ssl == SSLv3) {
sslmethod = SSLv3_client_method();
} else if (rrs_ssl == TLSv1) {
sslmethod = TLSv1_client_method();