mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 18:02:58 +01:00
chore(tls): fix feature flagging of DEFAULT_TLS_HANDSHAKE_TIMEOUT
This commit is contained in:
parent
02ac0bb4f7
commit
c5b2d0cd36
@ -37,6 +37,8 @@ pub(crate) static MAX_CONN: AtomicUsize = AtomicUsize::new(256);
|
|||||||
feature = "openssl",
|
feature = "openssl",
|
||||||
feature = "rustls-0_20",
|
feature = "rustls-0_20",
|
||||||
feature = "rustls-0_21",
|
feature = "rustls-0_21",
|
||||||
|
feature = "rustls-0_22-webpki-roots",
|
||||||
|
feature = "rustls-0_22-native-roots",
|
||||||
feature = "native-tls",
|
feature = "native-tls",
|
||||||
))]
|
))]
|
||||||
pub(crate) const DEFAULT_TLS_HANDSHAKE_TIMEOUT: std::time::Duration =
|
pub(crate) const DEFAULT_TLS_HANDSHAKE_TIMEOUT: std::time::Duration =
|
||||||
|
@ -23,7 +23,7 @@ use actix_utils::{
|
|||||||
};
|
};
|
||||||
use pin_project_lite::pin_project;
|
use pin_project_lite::pin_project;
|
||||||
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
use tokio_rustls::{rustls::ServerConfig, Accept, TlsAcceptor};
|
use tokio_rustls::{Accept, TlsAcceptor};
|
||||||
use tokio_rustls_023 as tokio_rustls;
|
use tokio_rustls_023 as tokio_rustls;
|
||||||
|
|
||||||
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
||||||
@ -92,13 +92,13 @@ impl<IO: ActixStream> ActixStream for TlsStream<IO> {
|
|||||||
|
|
||||||
/// Accept TLS connections via the `rustls` crate.
|
/// Accept TLS connections via the `rustls` crate.
|
||||||
pub struct Acceptor {
|
pub struct Acceptor {
|
||||||
config: Arc<ServerConfig>,
|
config: Arc<reexports::ServerConfig>,
|
||||||
handshake_timeout: Duration,
|
handshake_timeout: Duration,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Acceptor {
|
impl Acceptor {
|
||||||
/// Constructs `rustls` based acceptor service factory.
|
/// Constructs `rustls` based acceptor service factory.
|
||||||
pub fn new(config: ServerConfig) -> Self {
|
pub fn new(config: reexports::ServerConfig) -> Self {
|
||||||
Acceptor {
|
Acceptor {
|
||||||
config: Arc::new(config),
|
config: Arc::new(config),
|
||||||
handshake_timeout: DEFAULT_TLS_HANDSHAKE_TIMEOUT,
|
handshake_timeout: DEFAULT_TLS_HANDSHAKE_TIMEOUT,
|
||||||
|
@ -23,7 +23,7 @@ use actix_utils::{
|
|||||||
};
|
};
|
||||||
use pin_project_lite::pin_project;
|
use pin_project_lite::pin_project;
|
||||||
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
use tokio_rustls::{rustls::ServerConfig, Accept, TlsAcceptor};
|
use tokio_rustls::{Accept, TlsAcceptor};
|
||||||
use tokio_rustls_024 as tokio_rustls;
|
use tokio_rustls_024 as tokio_rustls;
|
||||||
|
|
||||||
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
||||||
@ -92,13 +92,13 @@ impl<IO: ActixStream> ActixStream for TlsStream<IO> {
|
|||||||
|
|
||||||
/// Accept TLS connections via the `rustls` crate.
|
/// Accept TLS connections via the `rustls` crate.
|
||||||
pub struct Acceptor {
|
pub struct Acceptor {
|
||||||
config: Arc<ServerConfig>,
|
config: Arc<reexports::ServerConfig>,
|
||||||
handshake_timeout: Duration,
|
handshake_timeout: Duration,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Acceptor {
|
impl Acceptor {
|
||||||
/// Constructs `rustls` based acceptor service factory.
|
/// Constructs `rustls` based acceptor service factory.
|
||||||
pub fn new(config: ServerConfig) -> Self {
|
pub fn new(config: reexports::ServerConfig) -> Self {
|
||||||
Acceptor {
|
Acceptor {
|
||||||
config: Arc::new(config),
|
config: Arc::new(config),
|
||||||
handshake_timeout: DEFAULT_TLS_HANDSHAKE_TIMEOUT,
|
handshake_timeout: DEFAULT_TLS_HANDSHAKE_TIMEOUT,
|
||||||
|
Loading…
Reference in New Issue
Block a user