Skip to main content

Module tls

Module tls 

Source
Expand description

Backend-agnostic TLS client seam (SIPS).

transport::tls::TlsConnection::connect consults the connector registered here before falling back to the built-in rustls path, so custom TLS stacks — including embedded ones over embassy-net (embedded-tls, esp-mbedtls) — can provide SIPS without tokio or rustls. Host builds are unaffected when nothing is registered.

The connector owns the TCP dial: each backend brings its own TCP stack (tokio on the host, embassy-net on embedded), so the seam only passes the target address. Streams expose async-fn IO with owned buffers, which is adapter buffers chunks when bridging into tokio’s poll-based halves.

Structs§

TlsClientConfig
Backend-agnostic TLS client configuration (PEM encodings).

Traits§

TlsConnector
Factory for outbound TLS sessions (SIPS client role). Owns the TCP dial.
TlsStream
An established TLS client session (handshake already completed).

Functions§

clear_client_connector
Clears a previously registered connector (mainly for tests).
client_connector
Returns the registered connector, if any.
set_client_connector
Registers the process-wide TLS client connector (thread-safe, leak-once). Call once during startup, before any SIPS connection.