From f572300695b1dcaa8404dc9ca5c7dd9aa9940824 Mon Sep 17 00:00:00 2001 From: John Howard Date: Fri, 22 Mar 2024 15:27:22 +0100 Subject: [PATCH 1/2] Update rustls to 0.23 --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f7e52a4d..55c33a29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,9 @@ log = { version = "0.4.4", optional = true } pki-types = { package = "rustls-pki-types", version = "1" } rustls-native-certs = { version = "0.7", optional = true } rustls-platform-verifier = { version = "0.2", optional = true } -rustls = { version = "0.22", default-features = false } +rustls = { version = "0.23", default-features = false } tokio = "1.0" -tokio-rustls = { version = "0.25", default-features = false } +tokio-rustls = { version = "0.26", default-features = false } tower-service = "0.3" webpki-roots = { version = "0.26", optional = true } futures-util = { version = "0.3", default-features = false } @@ -28,7 +28,7 @@ futures-util = { version = "0.3", default-features = false } [dev-dependencies] http-body-util = "0.1" hyper-util = { version = "0.1", default-features = false, features = ["server-auto"] } -rustls = { version = "0.22", default-features = false, features = ["tls12"] } +rustls = { version = "0.23", default-features = false, features = ["tls12"] } rustls-pemfile = "2" tokio = { version = "1.0", features = ["io-std", "macros", "net", "rt-multi-thread"] } From cdf13430f96ddb2c81adbe93f331043620a34c97 Mon Sep 17 00:00:00 2001 From: John Howard Date: Mon, 25 Mar 2024 13:20:33 -0700 Subject: [PATCH 2/2] Pull in new rustls-platform-verifier --- .github/workflows/build.yml | 12 ++++++------ Cargo.toml | 7 ++++--- src/connector/builder.rs | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27ae1e5a..d090352c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,18 +56,18 @@ jobs: env: RUST_BACKTRACE: 1 - - name: cargo test (debug; native-tokio only) - run: cargo test --no-default-features --features native-tokio + - name: cargo test (debug; native-tokio) + run: cargo test --no-default-features --features native-tokio,aws-lc-rs env: RUST_BACKTRACE: 1 - - name: cargo test (debug; webpki-tokio only) - run: cargo test --no-default-features --features webpki-tokio + - name: cargo test (debug; webpki-tokio) + run: cargo test --no-default-features --features webpki-tokio,aws-lc-rs env: RUST_BACKTRACE: 1 - - name: cargo test (debug; all features) - run: cargo test --all-features + - name: cargo test (debug; http) + run: cargo test -F http1,http2 env: RUST_BACKTRACE: 1 diff --git a/Cargo.toml b/Cargo.toml index 55c33a29..3785a821 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ hyper-util = { version = "0.1", default-features = false, features = ["client-le log = { version = "0.4.4", optional = true } pki-types = { package = "rustls-pki-types", version = "1" } rustls-native-certs = { version = "0.7", optional = true } -rustls-platform-verifier = { version = "0.2", optional = true } +rustls-platform-verifier = { version = "0.3", optional = true } rustls = { version = "0.23", default-features = false } tokio = "1.0" tokio-rustls = { version = "0.26", default-features = false } @@ -33,8 +33,9 @@ rustls-pemfile = "2" tokio = { version = "1.0", features = ["io-std", "macros", "net", "rt-multi-thread"] } [features] -default = ["native-tokio", "http1", "tls12", "logging", "ring"] -aws-lc-rs = ["rustls/aws_lc_rs"] +default = ["native-tokio", "http1", "tls12", "logging", "aws_lc_rs"] +aws_lc_rs = ["rustls/aws_lc_rs"] +aws-lc-rs = ["aws_lc_rs"] # Alias because Cargo features commonly use `-` http1 = ["hyper-util/http1"] http2 = ["hyper-util/http2"] webpki-tokio = ["webpki-roots"] diff --git a/src/connector/builder.rs b/src/connector/builder.rs index 3e1abdab..a5e90da4 100644 --- a/src/connector/builder.rs +++ b/src/connector/builder.rs @@ -54,7 +54,7 @@ impl ConnectorBuilder { /// Use rustls' default crypto provider and other defaults, and the platform verifier /// /// See [`ConfigBuilderExt::with_platform_verifier()`]. - #[cfg(all(feature = "ring", feature = "rustls-platform-verifier"))] + #[cfg(feature = "rustls-platform-verifier")] pub fn with_platform_verifier(self) -> ConnectorBuilder { self.with_tls_config( ClientConfig::builder() @@ -67,7 +67,7 @@ impl ConnectorBuilder { /// native roots. /// /// See [`ConfigBuilderExt::with_native_roots`] - #[cfg(all(feature = "ring", feature = "rustls-native-certs"))] + #[cfg(feature = "rustls-native-certs")] pub fn with_native_roots(self) -> std::io::Result> { Ok(self.with_tls_config( ClientConfig::builder() @@ -97,7 +97,7 @@ impl ConnectorBuilder { /// safe defaults. /// /// See [`ConfigBuilderExt::with_webpki_roots`] - #[cfg(all(feature = "ring", feature = "webpki-roots"))] + #[cfg(feature = "webpki-roots")] pub fn with_webpki_roots(self) -> ConnectorBuilder { self.with_tls_config( ClientConfig::builder()