From 8fe8ae82a82d802d9129b0cb6b3f768895b3534b Mon Sep 17 00:00:00 2001 From: asonix Date: Sat, 4 May 2024 16:53:49 -0500 Subject: [PATCH] awc: gate TlsConnectorService behind any feature that uses it --- awc/src/client/connector.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/awc/src/client/connector.rs b/awc/src/client/connector.rs index 94629b955..b66e13ec7 100644 --- a/awc/src/client/connector.rs +++ b/awc/src/client/connector.rs @@ -649,6 +649,14 @@ where /// service for establish tcp connection and do client tls handshake. /// operation is canceled when timeout limit reached. +#[cfg(any( + feature = "dangerous-h2c", + feature = "openssl", + feature = "rustls-0_20", + feature = "rustls-0_21", + feature = "rustls-0_22-webpki-roots", + feature = "rustls-0_22-native-roots", +))] struct TlsConnectorService { /// TCP connection is canceled on `TcpConnectorInnerService`'s timeout setting. tcp_service: Tcp, @@ -659,6 +667,14 @@ struct TlsConnectorService { timeout: Duration, } +#[cfg(any( + feature = "dangerous-h2c", + feature = "openssl", + feature = "rustls-0_20", + feature = "rustls-0_21", + feature = "rustls-0_22-webpki-roots", + feature = "rustls-0_22-native-roots", +))] impl Service for TlsConnectorService where Tcp: