packages/libs/curl/patches/510-no_sslv2.patch
jow 73835c66c4 [packages] curl: update to v7.21.7 (CVE-2011-2192)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29480 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-07 23:30:57 +00:00

26 lines
909 B
Diff

--- a/src/main.c
+++ b/src/main.c
@@ -936,7 +936,9 @@ static void help(void)
"Time needed to trig speed-limit abort. Defaults to 30",
" --ssl Try SSL/TLS (FTP, IMAP, POP3, SMTP)",
" --ssl-reqd Require SSL/TLS (FTP, IMAP, POP3, SMTP)",
+#ifndef OPENSSL_NO_SSL2
" -2/--sslv2 Use SSLv2 (SSL)",
+#endif
" -3/--sslv3 Use SSLv3 (SSL)",
" --stderr <file> Where to redirect stderr. - means stdout",
" --tcp-nodelay Use the TCP_NODELAY option",
@@ -2535,10 +2537,12 @@ static ParameterError getparameter(char
/* TLS version 1 */
config->ssl_version = CURL_SSLVERSION_TLSv1;
break;
+#ifndef OPENSSL_NO_SSL2
case '2':
/* SSL version 2 */
config->ssl_version = CURL_SSLVERSION_SSLv2;
break;
+#endif
case '3':
/* SSL version 3 */
config->ssl_version = CURL_SSLVERSION_SSLv3;