mirror of
https://github.com/actix/actix-web.git
synced 2024-06-13 02:39:32 +00:00
awc: gate TlsConnectorService behind any feature that uses it
This commit is contained in:
parent
babac131d4
commit
8fe8ae82a8
|
@ -649,6 +649,14 @@ where
|
||||||
|
|
||||||
/// service for establish tcp connection and do client tls handshake.
|
/// service for establish tcp connection and do client tls handshake.
|
||||||
/// operation is canceled when timeout limit reached.
|
/// 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, Tls> {
|
struct TlsConnectorService<Tcp, Tls> {
|
||||||
/// TCP connection is canceled on `TcpConnectorInnerService`'s timeout setting.
|
/// TCP connection is canceled on `TcpConnectorInnerService`'s timeout setting.
|
||||||
tcp_service: Tcp,
|
tcp_service: Tcp,
|
||||||
|
@ -659,6 +667,14 @@ struct TlsConnectorService<Tcp, Tls> {
|
||||||
timeout: Duration,
|
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<Tcp, Tls, IO> Service<Connect> for TlsConnectorService<Tcp, Tls>
|
impl<Tcp, Tls, IO> Service<Connect> for TlsConnectorService<Tcp, Tls>
|
||||||
where
|
where
|
||||||
Tcp:
|
Tcp:
|
||||||
|
|
Loading…
Reference in a new issue