Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SChannel: Support SCH_USE_STRONG_CRYPTO #6734

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/CIPHERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,3 +514,9 @@ and the request will fail.
`CALG_ECMQV`,
`CALG_ECDSA`,
`CALG_ECDH_EPHEM`,

As of curl 7.77.0, you can also pass `USE_STRONG_CRYPTO` as a cipher to
[constrain the set of available ciphers as specified in the schannel
documentation](https://docs.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-server-2022).
Note that the supported ciphers in this case follows the OS version, so if you
are running an outdated OS you might still be supporting weak ciphers.
7 changes: 7 additions & 0 deletions lib/vtls/schannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
#define SP_PROT_TLS1_2_CLIENT 0x00000800
#endif

#ifndef SCH_USE_STRONG_CRYPTO
#define SCH_USE_STRONG_CRYPTO 0x00400000
#endif

#ifndef SECBUFFER_ALERT
#define SECBUFFER_ALERT 17
#endif
Expand Down Expand Up @@ -335,6 +339,9 @@ set_ssl_ciphers(SCHANNEL_CRED *schannel_cred, char *ciphers)
alg = get_alg_id_by_name(startCur);
if(alg)
algIds[algCount++] = alg;
else if(strncmp(startCur, "USE_STRONG_CRYPTO",
sizeof("USE_STRONG_CRYPTO") - 1) == 0)
schannel_cred->dwFlags |= SCH_USE_STRONG_CRYPTO;
else
return CURLE_SSL_CIPHER;
startCur = strchr(startCur, ':');
Expand Down