rs-netty v1.1.0
v1.1.0 expands rs-netty with a full transport-level TLS API for TCP clients and servers.
TLS is modeled as an optional TCP transport capability rather than a pipeline codec, so existing typed pipelines continue to operate on plaintext application messages after the TLS handshake completes.
Highlights
Transport-level TLS
- Add
tlsfeature support forTcpServer::tls(...)andTcpClient::tls(...). - Add
TlsContextBuilder::for_server()andTlsContextBuilder::for_client()for building reusable server/client TLS contexts. - Support PEM and DER certificate inputs for server certificates, private keys, client roots, and client identities.
Client trust configuration
- Support custom root certificates with
root_certificate_pemandroot_certificate_der. - Add optional
tls-native-rootssupport for platform root certificates. - Add optional
tls-webpki-rootssupport for Mozilla WebPKI roots. - Add
tls-dangerousdevelopment/test helpers for custom verifiers and accepting invalid certificates.
mTLS
- Add required client certificate authentication with
client_auth_required_pemandclient_auth_required_der. - Add optional client certificate authentication with
client_auth_optional_pemandclient_auth_optional_der. - Add client identity configuration with
client_identity_pemandclient_identity_der.
ALPN
- Add ALPN protocol advertisement on both server and client TLS contexts.
- Expose the negotiated ALPN protocol through TLS connection metadata.
SNI
- Add client-side server name override with
server_name(...). - Add server-side SNI certificate selection with
sni_certificate_pemandsni_certificate_der. - Support a default/fallback server certificate when SNI-specific identities are configured.
TLS metadata
- Add
TlsInfofor negotiated TLS connection metadata. - Expose peer certificates, selected ALPN protocol, and effective server name / SNI.
- Make TLS metadata available from TCP handler contexts, stream pipeline stage contexts, and
ConnInfo::tls().
Validation
- Added runtime lifecycle coverage for TLS metadata, optional mTLS, ALPN validation, and SNI certificate selection.
- Added trybuild coverage for the public TLS builder and metadata APIs.
- Updated README and mdBook API/example/non-goal documentation for the new TLS capabilities.