Skip to content

Commit

Permalink
deps: update rustls v0.20.1 -> v0.21.0
Browse files Browse the repository at this point in the history
This commit updates reqwest to use a patch to track the
yet-to-be-released 0.21.0 rustls work, both as a direct dependency and
through WIP transitive upgrades to tokio-rustls, hyper-rustls, and
quinn.

One change is required in the reqwest codebase to adjust the import
location of the `DigtallySignedStruct` type.

Notably the experimental h3 support doesn't build and pass tests in this
branch. The upstream h3-quinn crate needs to be patched to use quinn and
quinn-proto v0.10.0 with the rustls 0.21.0. I started down that path but
had to abort after discovering h3-quinn has been using quinn v0.8.0 and
has several breaking changes to address.
  • Loading branch information
cpu committed Mar 24, 2023
1 parent 7fdd014 commit cb672e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ native-tls-crate = { version = "0.2.10", optional = true, package = "native-tls"
tokio-native-tls = { version = "0.3.0", optional = true }

# rustls-tls
hyper-rustls = { version = "0.23", default-features = false, optional = true }
rustls = { version = "0.20", features = ["dangerous_configuration"], optional = true }
hyper-rustls = { version = "0.23.2", default-features = false, optional = true }
rustls = { version = "0.21.0-alpha.1", features = ["dangerous_configuration"], optional = true }
tokio-rustls = { version = "0.23", optional = true }
webpki-roots = { version = "0.22", optional = true }
rustls-native-certs = { version = "0.6", optional = true }
Expand All @@ -141,7 +141,7 @@ trust-dns-resolver = { version = "0.22", optional = true }
# HTTP/3 experimental support
h3 = { version="0.0.1", optional = true }
h3-quinn = { version="0.0.1", optional = true }
quinn = { version = "0.8", default-features = false, features = ["tls-rustls", "ring"], optional = true }
quinn = { version = "0.10", default-features = false, features = ["tls-rustls", "ring"], optional = true }
futures-channel = { version="0.3", optional = true}


Expand Down Expand Up @@ -247,3 +247,9 @@ required-features = ["deflate"]
name = "multipart"
path = "tests/multipart.rs"
required-features = ["multipart"]

[patch.crates-io]
rustls = { git = 'https://github.com/rustls/rustls.git' }
tokio-rustls = { git = 'https://github.com/cpu/tokio-tls', branch = 'cpu-rustls-0.21.0-prep' }
hyper-rustls = { git = 'https://github.com/cpu/hyper-rustls', branch = 'cpu-rustls-0.21.0-prep' }
quinn = { git = 'https://github.com/cpu/quinn', branch = 'cpu-smoke-test-rustls-quic-conns' }
2 changes: 1 addition & 1 deletion src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#[cfg(feature = "__rustls")]
use rustls::{
client::HandshakeSignatureValid, client::ServerCertVerified, client::ServerCertVerifier,
internal::msgs::handshake::DigitallySignedStruct, Error as TLSError, ServerName,
DigitallySignedStruct, Error as TLSError, ServerName,
};
use std::fmt;

Expand Down

0 comments on commit cb672e1

Please sign in to comment.