1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-17 15:05:02 -05:00

schannel: fix --tls-max for when min is --tlsv1 or default

Prior to this change schannel ignored --tls-max (CURL_SSLVERSION_MAX_
macros) when --tlsv1 (CURL_SSLVERSION_TLSv1) or default TLS
(CURL_SSLVERSION_DEFAULT), using a max of TLS 1.2 always.

Closes https://github.com/curl/curl/pull/4633
This commit is contained in:
Xiaoyin Liu 2019-11-24 01:29:46 +08:00 committed by Jay Satiro
parent 8d2dac7dec
commit 0a65febccf

View File

@ -554,10 +554,6 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
switch(conn->ssl_config.version) { switch(conn->ssl_config.version) {
case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_DEFAULT:
case CURL_SSLVERSION_TLSv1: case CURL_SSLVERSION_TLSv1:
schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT |
SP_PROT_TLS1_1_CLIENT |
SP_PROT_TLS1_2_CLIENT;
break;
case CURL_SSLVERSION_TLSv1_0: case CURL_SSLVERSION_TLSv1_0:
case CURL_SSLVERSION_TLSv1_1: case CURL_SSLVERSION_TLSv1_1:
case CURL_SSLVERSION_TLSv1_2: case CURL_SSLVERSION_TLSv1_2: