Skip to main content

Module tls

Module tls 

Source
Expand description

TLS for the relay sockets Vector opens itself: ring, the webpki roots, a verifier that remembers each certificate chain it has verified, and session resumption.

A boot opens a hundred-odd relay sockets to a handful of hosts, and each handshake verified the same chain again: two P-384 ECDSA checks per socket, a fifth of boot CPU. A remembered chain is accepted again for that exact name, and a resumed session skips the certificate and its signature altogether.

A resumed session tells the server it is talking to the same client as before, so both caches live on the account’s session, one set per lane: an account’s sockets never resume another account’s sessions, and a shared-lane socket (a stranger can name its host) never resumes one that identified as the npub. A switch drops them with the session.

Functions§

websocket_config
The config session’s relay websockets on lane use.