From e427911cdbd70bcf8bad80b6d5c9b8c0c6535dc0 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 3 Feb 2024 16:39:21 +0000 Subject: [PATCH] feat(tls): rustls-0_22 create feature --- actix-rt/src/lib.rs | 1 + actix-tls/CHANGES.md | 2 ++ actix-tls/Cargo.toml | 5 +++-- actix-tls/src/accept/mod.rs | 8 ++------ 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/actix-rt/src/lib.rs b/actix-rt/src/lib.rs index 6f8057de..fc2a56ba 100644 --- a/actix-rt/src/lib.rs +++ b/actix-rt/src/lib.rs @@ -34,6 +34,7 @@ //! ``` //! //! # `io-uring` Support +//! //! There is experimental support for using io-uring with this crate by enabling the //! `io-uring` feature. For now, it is semver exempt. //! diff --git a/actix-tls/CHANGES.md b/actix-tls/CHANGES.md index d6f16209..8f7e8a3c 100644 --- a/actix-tls/CHANGES.md +++ b/actix-tls/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased +- Add `rustls-0_22` create feature which excludes any root certificate methods or re-exports. + ## 3.2.0 - Support Rustls v0.22. diff --git a/actix-tls/Cargo.toml b/actix-tls/Cargo.toml index 630b7e08..cbfa0f12 100755 --- a/actix-tls/Cargo.toml +++ b/actix-tls/Cargo.toml @@ -57,8 +57,9 @@ rustls-0_21-webpki-roots = ["tokio-rustls-024", "webpki-roots-025"] rustls-0_21-native-roots = ["tokio-rustls-024", "dep:rustls-native-certs-06"] # use rustls v0.22 impls -rustls-0_22-webpki-roots = ["dep:tokio-rustls-025", "dep:rustls-pki-types-1", "dep:webpki-roots-026"] -rustls-0_22-native-roots = ["dep:tokio-rustls-025", "dep:rustls-pki-types-1", "dep:rustls-native-certs-07"] +rustls-0_22 = ["dep:tokio-rustls-025", "dep:rustls-pki-types-1"] +rustls-0_22-webpki-roots = ["rustls-0_22", "dep:webpki-roots-026"] +rustls-0_22-native-roots = ["rustls-0_22", "dep:rustls-native-certs-07"] # use native-tls impls native-tls = ["dep:tokio-native-tls"] diff --git a/actix-tls/src/accept/mod.rs b/actix-tls/src/accept/mod.rs index e884bd33..2302723e 100644 --- a/actix-tls/src/accept/mod.rs +++ b/actix-tls/src/accept/mod.rs @@ -22,10 +22,7 @@ pub use rustls_0_20 as rustls; #[cfg(feature = "rustls-0_21")] pub mod rustls_0_21; -#[cfg(any( - feature = "rustls-0_22-webpki-roots", - feature = "rustls-0_22-native-roots", -))] +#[cfg(feature = "rustls-0_22")] pub mod rustls_0_22; #[cfg(feature = "native-tls")] @@ -37,8 +34,7 @@ pub(crate) static MAX_CONN: AtomicUsize = AtomicUsize::new(256); feature = "openssl", feature = "rustls-0_20", feature = "rustls-0_21", - feature = "rustls-0_22-webpki-roots", - feature = "rustls-0_22-native-roots", + feature = "rustls-0_22", feature = "native-tls", ))] pub(crate) const DEFAULT_TLS_HANDSHAKE_TIMEOUT: std::time::Duration =