mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 14:30:36 +02:00
use reexported tls crates when possible
This commit is contained in:
@ -5,7 +5,7 @@ use actix_service::{Service, ServiceFactory};
|
||||
use actix_utils::counter::Counter;
|
||||
use futures_core::future::LocalBoxFuture;
|
||||
|
||||
pub use native_tls::Error;
|
||||
pub use tokio_native_tls::native_tls::Error;
|
||||
pub use tokio_native_tls::{TlsAcceptor, TlsStream};
|
||||
|
||||
use super::MAX_CONN_COUNTER;
|
||||
|
@ -12,7 +12,7 @@ use actix_utils::counter::{Counter, CounterGuard};
|
||||
use futures_core::future::LocalBoxFuture;
|
||||
use tokio_rustls::{Accept, TlsAcceptor};
|
||||
|
||||
pub use rustls::{ServerConfig, Session};
|
||||
pub use tokio_rustls::rustls::{ServerConfig, Session};
|
||||
pub use tokio_rustls::server::TlsStream;
|
||||
|
||||
use super::MAX_CONN_COUNTER;
|
||||
|
@ -6,7 +6,7 @@ use std::{
|
||||
task::{Context, Poll},
|
||||
};
|
||||
|
||||
pub use rustls::Session;
|
||||
pub use tokio_rustls::rustls::Session;
|
||||
pub use tokio_rustls::{client::TlsStream, rustls::ClientConfig};
|
||||
pub use webpki_roots::TLS_SERVER_ROOTS;
|
||||
|
||||
@ -15,7 +15,7 @@ use actix_service::{Service, ServiceFactory};
|
||||
use futures_core::{future::LocalBoxFuture, ready};
|
||||
use log::trace;
|
||||
use tokio_rustls::{Connect, TlsConnector};
|
||||
use webpki::DNSNameRef;
|
||||
use tokio_rustls::webpki::DNSNameRef;
|
||||
|
||||
use crate::connect::{Address, Connection};
|
||||
|
||||
|
@ -4,12 +4,8 @@
|
||||
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||
|
||||
#[cfg(feature = "native-tls")]
|
||||
extern crate tls_native_tls as native_tls;
|
||||
#[cfg(feature = "openssl")]
|
||||
extern crate tls_openssl as openssl;
|
||||
#[cfg(feature = "rustls")]
|
||||
extern crate tls_rustls as rustls;
|
||||
|
||||
#[cfg(feature = "accept")]
|
||||
pub mod accept;
|
||||
|
Reference in New Issue
Block a user