Skip to content

Commit

Permalink
fix: correct aws rustls v0.23 feature gating
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed May 19, 2024
1 parent 9a437fe commit acb7405
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion actix-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ rand = { version = "0.8", optional = true }
sha1 = { version = "0.10", optional = true }

# openssl/rustls
actix-tls = { version = "3.3", default-features = false, optional = true }
actix-tls = { version = "3.4", default-features = false, optional = true }

# compress-*
brotli = { version = "6", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion actix-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ actix-rt = { version = "2.6", default-features = false }
actix-server = "2"
actix-service = "2"
actix-utils = "3"
actix-tls = { version = "3.3", default-features = false, optional = true }
actix-tls = { version = "3.4", default-features = false, optional = true }

actix-http = { version = "3.7", features = ["ws"] }
actix-router = { version = "0.5", default-features = false, features = ["http"] }
Expand Down
4 changes: 2 additions & 2 deletions awc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ actix-codec = "0.5"
actix-service = "2"
actix-http = { version = "3.7", features = ["http2", "ws"] }
actix-rt = { version = "2.1", default-features = false }
actix-tls = { version = "3.3", features = ["connect", "uri"] }
actix-tls = { version = "3.4", features = ["connect", "uri"] }
actix-utils = "3"

base64 = "0.22"
Expand Down Expand Up @@ -120,7 +120,7 @@ actix-http = { version = "3.7", features = ["openssl"] }
actix-http-test = { version = "3", features = ["openssl"] }
actix-server = "2"
actix-test = { version = "0.1", features = ["openssl", "rustls-0_23"] }
actix-tls = { version = "3.3", features = ["openssl", "rustls-0_23"] }
actix-tls = { version = "3.4", features = ["openssl", "rustls-0_23"] }
actix-utils = "3"
actix-web = { version = "4", features = ["openssl"] }

Expand Down
5 changes: 4 additions & 1 deletion awc/src/client/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ impl Connector<()> {

OurTlsConnector::Rustls023(std::sync::Arc::new(config))
}

} else if #[cfg(any(feature = "rustls-0_22-webpki-roots", feature = "rustls-0_22-native-roots"))] {
/// Build TLS connector with Rustls v0.22, based on supplied ALPN protocols.
fn build_tls(protocols: Vec<Vec<u8>>) -> OurTlsConnector {
Expand Down Expand Up @@ -743,6 +742,9 @@ where
feature = "rustls-0_21",
feature = "rustls-0_22-webpki-roots",
feature = "rustls-0_22-native-roots",
feature = "rustls-0_23",
feature = "rustls-0_23-webpki-roots",
feature = "rustls-0_23-native-roots"
))]
struct TlsConnectorService<Tcp, Tls> {
/// TCP connection is canceled on `TcpConnectorInnerService`'s timeout setting.
Expand All @@ -761,6 +763,7 @@ struct TlsConnectorService<Tcp, Tls> {
feature = "rustls-0_21",
feature = "rustls-0_22-webpki-roots",
feature = "rustls-0_22-native-roots",
feature = "rustls-0_23",
))]
impl<Tcp, Tls, IO> Service<Connect> for TlsConnectorService<Tcp, Tls>
where
Expand Down

0 comments on commit acb7405

Please sign in to comment.