1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 09:08:49 -05:00

nss: remove version selecting dead code

Closes #3262
This commit is contained in:
Kamil Dudka 2018-11-13 23:54:56 +01:00 committed by Daniel Stenberg
parent 0c448093dd
commit 3d988c5563
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1638,17 +1638,6 @@ static CURLcode nss_load_ca_certificates(struct connectdata *conn,
static CURLcode nss_sslver_from_curl(PRUint16 *nssver, long version) static CURLcode nss_sslver_from_curl(PRUint16 *nssver, long version)
{ {
switch(version) { switch(version) {
case CURL_SSLVERSION_TLSv1:
/* TODO: set sslver->max to SSL_LIBRARY_VERSION_TLS_1_3 once stable */
#ifdef SSL_LIBRARY_VERSION_TLS_1_2
*nssver = SSL_LIBRARY_VERSION_TLS_1_2;
#elif defined SSL_LIBRARY_VERSION_TLS_1_1
*nssver = SSL_LIBRARY_VERSION_TLS_1_1;
#else
*nssver = SSL_LIBRARY_VERSION_TLS_1_0;
#endif
return CURLE_OK;
case CURL_SSLVERSION_SSLv2: case CURL_SSLVERSION_SSLv2:
*nssver = SSL_LIBRARY_VERSION_2; *nssver = SSL_LIBRARY_VERSION_2;
return CURLE_OK; return CURLE_OK;
@ -1709,10 +1698,8 @@ static CURLcode nss_init_sslver(SSLVersionRange *sslver,
} }
switch(min) { switch(min) {
case CURL_SSLVERSION_DEFAULT:
break;
case CURL_SSLVERSION_TLSv1: case CURL_SSLVERSION_TLSv1:
sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; case CURL_SSLVERSION_DEFAULT:
break; break;
default: default:
result = nss_sslver_from_curl(&sslver->min, min); result = nss_sslver_from_curl(&sslver->min, min);