-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
Description
I did this
Set CURLOPT_SSL_CIPHER_LIST
on a connection that uses Schannel, TLS 1.2, and make a connection to an HTTPS server.
I expected the following
Investigate its Hello message, the cipher suites should match my settings.
curl/libcurl version
libcurl 7.85.0 to the latest
operating system
Fails (CURLOPT_SSL_CIPHER_LIST
has no effect) on Windows 10 build 17763 and above, such as 10 Enterprise 1809 and 20H1.
Works (CURLOPT_SSL_CIPHER_LIST
is in effect) on Windows 10 build 14393, such as Windows Server 2016
Cause analysis
The problem was introduced by 8beff43. The change moved this chunk of code:
Lines 503 to 510 in 801bd51
if(SSL_CONN_CONFIG(cipher_list)) { | |
result = set_ssl_ciphers(&schannel_cred, SSL_CONN_CONFIG(cipher_list), | |
backend->algIds); | |
if(CURLE_OK != result) { | |
failf(data, "Unable to set ciphers to passed via SSL_CONN_CONFIG"); | |
return result; | |
} | |
} |
Lines 1006 to 1021 in cd95ee9
else { | |
/* Pre-Windows 10 1809 */ | |
ALG_ID algIds[NUM_CIPHERS]; | |
char *ciphers = SSL_CONN_CONFIG(cipher_list); | |
SCHANNEL_CRED schannel_cred = { 0 }; | |
schannel_cred.dwVersion = SCHANNEL_CRED_VERSION; | |
schannel_cred.dwFlags = flags; | |
schannel_cred.grbitEnabledProtocols = enabled_protocols; | |
if(ciphers) { | |
result = set_ssl_ciphers(&schannel_cred, ciphers, algIds); | |
if(CURLE_OK != result) { | |
failf(data, "Unable to set ciphers to passed via SSL_CONN_CONFIG"); | |
return result; | |
} | |
} |
Lines 790 to 792 in cd95ee9
/* Windows 10, 1809 (a.k.a. Windows 10 build 17763) */ | |
if(curlx_verify_windows_version(10, 0, 17763, PLATFORM_WINNT, | |
VERSION_GREATER_THAN_EQUAL)) { |
CURLOPT_SSL_CIPHER_LIST
under that combined condition was lost.