|
|
92baa4 |
From ebe7a9186469a5901a91469d107851abfdaa3993 Mon Sep 17 00:00:00 2001
|
|
|
92baa4 |
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
92baa4 |
Date: Tue, 5 May 2015 18:59:59 +0200
|
|
|
92baa4 |
Subject: [PATCH] nss: use the default min/max TLS version provided by NSS
|
|
|
92baa4 |
|
|
|
92baa4 |
---
|
|
|
92baa4 |
lib/nss.c | 12 +++++++-----
|
|
|
92baa4 |
1 file changed, 7 insertions(+), 5 deletions(-)
|
|
|
92baa4 |
|
|
|
92baa4 |
diff --git a/lib/nss.c b/lib/nss.c
|
|
|
92baa4 |
index 0691394..6b7c309 100644
|
|
|
92baa4 |
--- a/lib/nss.c
|
|
|
92baa4 |
+++ b/lib/nss.c
|
|
|
92baa4 |
@@ -1206,7 +1206,7 @@ static CURLcode nss_init_sslver(SSLVersionRange *sslver,
|
|
|
92baa4 |
switch (data->set.ssl.version) {
|
|
|
92baa4 |
default:
|
|
|
92baa4 |
case CURL_SSLVERSION_DEFAULT:
|
|
|
92baa4 |
- return CURLE_OK;
|
|
|
92baa4 |
+ break;
|
|
|
92baa4 |
|
|
|
92baa4 |
case CURL_SSLVERSION_TLSv1:
|
|
|
92baa4 |
sslver->min = SSL_LIBRARY_VERSION_TLS_1_0;
|
|
|
92baa4 |
@@ -1368,10 +1368,12 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
|
|
|
92baa4 |
goto error;
|
|
|
92baa4 |
|
|
|
92baa4 |
/* enable/disable the requested SSL version(s) */
|
|
|
92baa4 |
- if(nss_init_sslver(&sslver, data) != CURLE_OK)
|
|
|
92baa4 |
- goto error;
|
|
|
92baa4 |
- if(SSL_VersionRangeSet(model, &sslver) != SECSuccess)
|
|
|
92baa4 |
- goto error;
|
|
|
92baa4 |
+ if(data->set.ssl.version != CURL_SSLVERSION_DEFAULT) {
|
|
|
92baa4 |
+ if(nss_init_sslver(&sslver, data) != CURLE_OK)
|
|
|
92baa4 |
+ goto error;
|
|
|
92baa4 |
+ if(SSL_VersionRangeSet(model, &sslver) != SECSuccess)
|
|
|
92baa4 |
+ goto error;
|
|
|
92baa4 |
+ }
|
|
|
92baa4 |
|
|
|
92baa4 |
ssl_cbc_random_iv = !data->set.ssl_enable_beast;
|
|
|
92baa4 |
#ifdef SSL_CBC_RANDOM_IV
|
|
|
92baa4 |
--
|
|
|
92baa4 |
2.4.0
|
|
|
92baa4 |
|