Skip to content

Commit d014c29

Browse files
committed
Update libcurl
1 parent 92d8826 commit d014c29

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ bytesize = "1.0"
2121
cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" }
2222
cargo-util = { path = "crates/cargo-util", version = "0.2.1" }
2323
crates-io = { path = "crates/crates-io", version = "0.34.0" }
24-
curl = { version = "0.4.43", features = ["http2"] }
25-
curl-sys = "0.4.55"
24+
curl = { version = "0.4.44", features = ["http2"] }
25+
curl-sys = "0.4.58"
2626
env_logger = "0.9.0"
2727
pretty_env_logger = { version = "0.4", optional = true }
2828
anyhow = "1.0"

src/cargo/ops/registry.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,24 @@ pub fn configure_http_handle(config: &Config, handle: &mut Easy) -> CargoResult<
678678
handle.ssl_min_max_version(min_version, max_version)?;
679679
}
680680
}
681+
} else if cfg!(windows) {
682+
// This is a temporary workaround for some bugs with libcurl and
683+
// schannel and TLS 1.3.
684+
//
685+
// Our libcurl on Windows is usually built with schannel.
686+
// On Windows 11 (or Windows Server 2022), libcurl recently (late
687+
// 2022) gained support for TLS 1.3 with schannel, and it now defaults
688+
// to 1.3. Unfortunately there have been some bugs with this.
689+
// https://github.com/curl/curl/issues/9431 is the most recent. Once
690+
// that has been fixed, and some time has passed where we can be more
691+
// confident that the 1.3 support won't cause issues, this can be
692+
// removed.
693+
//
694+
// Windows 10 is unaffected. libcurl does not support TLS 1.3 on
695+
// Windows 10. (Windows 10 sorta had support, but it required enabling
696+
// an advanced option in the registry which was buggy, and libcurl
697+
// does runtime checks to prevent it.)
698+
handle.ssl_min_max_version(SslVersion::Default, SslVersion::Tlsv12)?;
681699
}
682700

683701
if let Some(true) = http.debug {

0 commit comments

Comments
 (0)