mirror of
https://github.com/curl/curl.git
synced 2026-08-26 16:23:32 +03:00
nss: allow to use TLS > 1.0 if built against recent NSS
Bug: http://curl.haxx.se/mail/lib-2013-11/0162.html
This commit is contained in:
parent
4fb8241add
commit
7fc9325a52
2 changed files with 24 additions and 0 deletions
22
lib/nss.c
22
lib/nss.c
|
|
@ -1228,7 +1228,13 @@ static CURLcode nss_init_sslver(SSLVersionRange *sslver,
|
|||
|
||||
case CURL_SSLVERSION_TLSv1:
|
||||
sslver->min = SSL_LIBRARY_VERSION_TLS_1_0;
|
||||
#ifdef SSL_LIBRARY_VERSION_TLS_1_2
|
||||
sslver->max = SSL_LIBRARY_VERSION_TLS_1_2;
|
||||
#elif defined SSL_LIBRARY_VERSION_TLS_1_1
|
||||
sslver->max = SSL_LIBRARY_VERSION_TLS_1_1;
|
||||
#else
|
||||
sslver->max = SSL_LIBRARY_VERSION_TLS_1_0;
|
||||
#endif
|
||||
return CURLE_OK;
|
||||
|
||||
case CURL_SSLVERSION_SSLv2:
|
||||
|
|
@ -1242,8 +1248,24 @@ static CURLcode nss_init_sslver(SSLVersionRange *sslver,
|
|||
return CURLE_OK;
|
||||
|
||||
case CURL_SSLVERSION_TLSv1_0:
|
||||
sslver->min = SSL_LIBRARY_VERSION_TLS_1_0;
|
||||
sslver->max = SSL_LIBRARY_VERSION_TLS_1_0;
|
||||
return CURLE_OK;
|
||||
|
||||
case CURL_SSLVERSION_TLSv1_1:
|
||||
#ifdef SSL_LIBRARY_VERSION_TLS_1_1
|
||||
sslver->min = SSL_LIBRARY_VERSION_TLS_1_1;
|
||||
sslver->max = SSL_LIBRARY_VERSION_TLS_1_1;
|
||||
return CURLE_OK;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case CURL_SSLVERSION_TLSv1_2:
|
||||
#ifdef SSL_LIBRARY_VERSION_TLS_1_2
|
||||
sslver->min = SSL_LIBRARY_VERSION_TLS_1_2;
|
||||
sslver->max = SSL_LIBRARY_VERSION_TLS_1_2;
|
||||
return CURLE_OK;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue