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
ClientConfigthat trusts only the torrent’s embedded CA. - build_
server_ config - Build a rustls
ServerConfigusing 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.