Skip to main content

Module ssl

Module ssl 

Source
Expand description

TLS transport for SSL torrents.

Wraps a TCP stream with rustls TLS, using the CA certificate from the .torrent file as the trust anchor. SNI is set to the hex-encoded info hash.

Structs§

SslConfig
Configuration for an SSL torrent’s TLS layer.

Functions§

accept_tls
Accept a TLS connection on the server side.
build_client_config
Build a rustls ClientConfig that trusts only the torrent’s embedded CA.
build_server_config
Build a rustls ServerConfig using our cert and key.
connect_tls
Perform a TLS client handshake, setting SNI to the hex-encoded info hash.
generate_self_signed_cert
Generate a self-signed client certificate + private key using rcgen.