[packages] curl: update to v7.19.6
[openwrt/svn-archive/archive.git] / libs / curl / patches / 510-no_sslv2.patch
1 --- a/lib/ssluse.c
2 +++ b/lib/ssluse.c
3 @@ -1384,10 +1384,12 @@ ossl_connect_step1(struct connectdata *c
4 case CURL_SSLVERSION_TLSv1:
5 req_method = TLSv1_client_method();
6 break;
7 +#ifndef OPENSSL_NO_SSL2
8 case CURL_SSLVERSION_SSLv2:
9 req_method = SSLv2_client_method();
10 sni = FALSE;
11 break;
12 +#endif
13 case CURL_SSLVERSION_SSLv3:
14 req_method = SSLv3_client_method();
15 sni = FALSE;
16 --- a/src/main.c
17 +++ b/src/main.c
18 @@ -824,7 +824,9 @@ static void help(void)
19 #endif
20 " -Y/--speed-limit Stop transfer if below speed-limit for 'speed-time' secs",
21 " -y/--speed-time Time needed to trig speed-limit abort. Defaults to 30",
22 +#ifndef OPENSSL_NO_SSL2
23 " -2/--sslv2 Use SSLv2 (SSL)",
24 +#endif
25 " -3/--sslv3 Use SSLv3 (SSL)",
26 " --stderr <file> Where to redirect stderr. - means stdout",
27 " --tcp-nodelay Use the TCP_NODELAY option",
28 @@ -2228,10 +2230,12 @@ static ParameterError getparameter(char
29 /* TLS version 1 */
30 config->ssl_version = CURL_SSLVERSION_TLSv1;
31 break;
32 +#ifndef OPENSSL_NO_SSL2
33 case '2':
34 /* SSL version 2 */
35 config->ssl_version = CURL_SSLVERSION_SSLv2;
36 break;
37 +#endif
38 case '3':
39 /* SSL version 3 */
40 config->ssl_version = CURL_SSLVERSION_SSLv3;