Description
Describe the problem you are trying to solve
rustup-init.sh was recently updated to force strong TLS 1.2-1.3 cipher suites for downloading files (if supported by local tools). However, rustup itself isn't doing the same.
Schannel in Windows 7, 8, and 8.1 doesn't support the two strong cipher suites offered by rust servers (as of April 23, 2020), so this request is limited in scope to curl-backend + OpenSSL.
Describe the solution you'd like
Use the same strong TLS 1.2-1.3 cipher suites as rustup-init.sh (if supported by OpenSSL) when rustup is using curl-backend + OpenSSL.
One way is to configure reqwest
to use rustls
instead of native-tls
.
rustls
only supports 9 cipher suites and they're the same 9 we want enabled.
/// A list of all the cipher suites supported by rustls.
pub static ALL_CIPHERSUITES: [&SupportedCipherSuite; 9] =
[// TLS1.3 suites
&TLS13_CHACHA20_POLY1305_SHA256,
&TLS13_AES_256_GCM_SHA384,
&TLS13_AES_128_GCM_SHA256,
// TLS1.2 suites
&TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
&TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
&TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
&TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
&TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
&TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256];
Author of reqwest
says,
If you wish to try this out progressively, you can enable both default-tls and rustls-tls, and maybe check a config or env var to call either .use_default_tls() or .use_rustls_tls().
Thanks @kinnison and @seanmonstar for helpful feedback and suggestions.
Notes
-
Schannel TLS cipher suites in WIndows 8.1
https://docs.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-8-1 -
I don't know how much fuzz testing is/was done for ring, rustls, and reqwest.
-
ring
is in https://github.com/google/oss-fuzz/tree/master/projects -
rustls
security audit getting funded (stay tuned, maybe news "few months" from Feb 2020)
Get a security audit done rustls/rustls#189 -
https://github.com/ctz/rustls-native-certs and https://github.com/ctz/webpki-roots and mkcert.org
-
Implement optional support for rustls #568 (old issue about supporting
rustls
as an option in rustup)