Skip to main content

Module tls

Module tls 

Source
Expand description

TLS support for encrypted and authenticated connections.

This module provides certificate generation and TLS configuration for:

  • Master↔rcpd connections (rcpd is server, master verifies fingerprint)
  • Source↔Destination connections (mutual TLS with client certificates)

Structs§

CertifiedKey
A certified key pair (certificate + private key) with its fingerprint.

Functions§

compute_fingerprint
Computes SHA-256 fingerprint of a DER-encoded certificate.
create_client_config
Creates a TLS client config that verifies the server’s certificate fingerprint.
create_client_config_with_cert
Creates a TLS client config with a client certificate.
create_server_config
Creates a TLS server config for rcpd (no client authentication required).
create_server_config_with_client_auth
Creates a TLS server config with client certificate verification.
fingerprint_from_hex
Parses a fingerprint from hex string.
fingerprint_to_hex
Converts a fingerprint to lowercase hex string (64 characters).
generate_self_signed_cert
Generates an ephemeral self-signed certificate using Ed25519.

Type Aliases§

Fingerprint
A certificate fingerprint (SHA-256 of DER-encoded certificate).