aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-02-06 22:12:06 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-02-09 22:22:54 +0100
commit2a699bc6e94b8223d900e8880ad628aebf17ab6d (patch)
tree702f4ba21f3f0ff2ca28c321e28d993eb432f9fd /lib/url.c
parent2a266c1c7c075f9faced0248ed3f870dac1fc749 (diff)
CURLOPT_SSL_OPTIONS: added
Allow an appliction to set libcurl specific SSL options. The first and only options supported right now is CURLSSLOPT_ALLOW_BEAST. It will make libcurl to disable any work-arounds the underlying SSL library may have to address a known security flaw in the SSL3 and TLS1.0 protocol versions. This is a reaction to us unconditionally removing that behavior after this security advisory: http://curl.haxx.se/docs/adv_20120124B.html ... it did however cause a lot of programs to fail because of old servers not liking this work-around. Now programs can opt to decrease the security in order to interoperate with old servers better.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/url.c b/lib/url.c
index c89234d74..b3040b26d 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -838,6 +838,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
{
char *argptr;
CURLcode result = CURLE_OK;
+ long arg;
#ifndef CURL_DISABLE_HTTP
curl_off_t bigsize;
#endif
@@ -847,12 +848,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.dns_cache_timeout = va_arg(param, long);
break;
case CURLOPT_DNS_USE_GLOBAL_CACHE:
- {
/* remember we want this enabled */
- long use_cache = va_arg(param, long);
- data->set.global_dns_cache = (0 != use_cache)?TRUE:FALSE;
- }
- break;
+ arg = va_arg(param, long);
+ data->set.global_dns_cache = (0 != arg)?TRUE:FALSE;
+ break;
case CURLOPT_SSL_CIPHER_LIST:
/* set a list of cipher we want to use in the SSL connection */
result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
@@ -2189,6 +2188,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.use_ssl = (curl_usessl)va_arg(param, long);
break;
+
+ case CURLOPT_SSL_OPTIONS:
+ arg = va_arg(param, long);
+ data->set.ssl_enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE;
+ break;
+
#endif
case CURLOPT_FTPSSLAUTH:
/*