Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare actix-tls release 3.0.0-rc.1 #423

Merged
merged 7 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tweak re-exports
  • Loading branch information
robjtede committed Nov 30, 2021
commit 4b35c052ef07b8fef857dac5f7d150b8ec7eac43
2 changes: 1 addition & 1 deletion actix-tls/src/accept/native_tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub struct Acceptor {
}

impl Acceptor {
/// Constructs `native-tls` based `Acceptor` service factory.
/// Constructs `native-tls` based acceptor service factory.
pub fn new(acceptor: TlsAcceptor) -> Self {
Acceptor {
acceptor,
Expand Down
2 changes: 1 addition & 1 deletion actix-tls/src/accept/openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub struct Acceptor {
}

impl Acceptor {
/// Create OpenSSL based `Acceptor` service factory.
/// Create `openssl` based acceptor service factory.
#[inline]
pub fn new(acceptor: SslAcceptor) -> Self {
Acceptor {
Expand Down
2 changes: 1 addition & 1 deletion actix-tls/src/accept/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub struct Acceptor {
}

impl Acceptor {
/// Constructs Rustls based acceptor service factory.
/// Constructs `rustls` based acceptor service factory.
pub fn new(config: ServerConfig) -> Self {
Acceptor {
config: Arc::new(config),
Expand Down
10 changes: 6 additions & 4 deletions actix-tls/src/connect/native_tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,24 @@ use actix_utils::future::{ok, Ready};
use futures_core::future::LocalBoxFuture;
use log::trace;
use tokio_native_tls::{
native_tls::TlsConnector as NativeTlsConnector, TlsConnector as TokioNativeTlsConnector,
native_tls::TlsConnector as NativeTlsConnector, TlsConnector as AsyncNativeTlsConnector,
TlsStream,
};

use crate::connect::{Connection, Host};

pub mod reexports {
//! Re-exports from `native-tls` that are useful for connectors.
//! Re-exports from `native-tls` and `tokio-native-tls` that are useful for connectors.

pub use tokio_native_tls::native_tls::TlsConnector;

pub use tokio_native_tls::TlsStream as AsyncTlsStream;
}

/// Connector service and factory using `native-tls`.
#[derive(Clone)]
pub struct TlsConnector {
connector: TokioNativeTlsConnector,
connector: AsyncNativeTlsConnector,
}

impl TlsConnector {
Expand All @@ -34,7 +36,7 @@ impl TlsConnector {
/// This type is it's own service factory, so it can be used in that setting, too.
pub fn new(connector: NativeTlsConnector) -> Self {
Self {
connector: TokioNativeTlsConnector::from(connector),
connector: AsyncNativeTlsConnector::from(connector),
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions actix-tls/src/connect/openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ use tokio_openssl::SslStream;
use crate::connect::{Connection, Host};

pub mod reexports {
//! Re-exports from `openssl` that are useful for connectors.
//! Re-exports from `openssl` and `tokio-openssl` that are useful for connectors.

pub use openssl::ssl::{Error as SslError, HandshakeError, SslConnector, SslMethod};
pub use openssl::ssl::{Error, HandshakeError, SslConnector, SslMethod, SslStream};

pub use tokio_openssl::SslStream as AsyncSslStream;
}

/// Connector service factory using `openssl`.
Expand Down
4 changes: 3 additions & 1 deletion actix-tls/src/connect/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ use crate::connect::{Connection, Host};
pub mod reexports {
//! Re-exports from `rustls` and `webpki_roots` that are useful for connectors.

pub use tokio_rustls::{client::TlsStream, rustls::ClientConfig};
pub use tokio_rustls::rustls::ClientConfig;

pub use tokio_rustls::client::TlsStream as AsyncTlsStream;

pub use webpki_roots::TLS_SERVER_ROOTS;
}
Expand Down