Crate tls_listener

Source
Expand description

Async TLS listener

This library is intended to automatically initiate a TLS connection for each new connection in a source of new streams (such as a listening TCP or unix domain socket).

§Features:

  • tokio-net: Implementations for tokio socket types (default)
  • rt: Features that depend on the tokio runtime, such as SpawningHandshakes
  • rustls-core: Support the tokio-rustls backend for tls
  • rustls-aws-lc: Include the aws-lc provider for rustls
  • rustls-ring: Include the ring provider for rustls
  • rustls-fips: Include enabling the “fips” feature for rustls
  • native-tls: support the tokio-native-tls backend for tls

Re-exports§

pub use tokio_native_tls as native_tls;
pub use tokio_openssl as openssl;
pub use tokio_rustls as rustls;

Structs§

Builder
Builder for TlsListener.
SpawningHandshakes
Convert an AsyncTls into one that will spawn a new task for each new connection.
TlsListener
Wraps a Stream of connections (such as a TCP listener) so that each connection is itself encrypted using TLS.

Enums§

Error
Wraps errors from either the listener or the TLS Acceptor

Constants§

DEFAULT_ACCEPT_BATCH_SIZE
Default number of connections to accept in a batch before trying to
DEFAULT_HANDSHAKE_TIMEOUT
Default timeout for the TLS handshake.

Traits§

AsyncAccept
Asynchronously accept connections.
AsyncTls
Trait for TLS implementation.

Functions§

builder
Create a new Builder for a TlsListener