Skip to main content

Module tls

Module tls 

Source
Expand description

TLS to a passalong-server: the one public key a tls_pin names, or the operating system’s trust store. There is no setting that turns verification off.

A pin is the SHA-256 of the certificate’s SubjectPublicKeyInfo. With a pin, no authority, name, or date is checked, which is how a self-signed server is reached; the handshake’s signature still is, or the pin would prove nothing.

Structs§

PinMismatch
The server presented a key other than the pinned one.
PinnedVerifier
Trusts the certificate whose public key the pin names, and nothing else.
Presented
What a server presents, for passalong init to show before anything is trusted.

Functions§

client_config
The TLS configuration for a server with pin, or without one.
presented
The certificate the server at url presents: its pin, and whether the system trusts it. The handshake is always refused once the certificate is seen, so no request, and no API key, reaches the server.
provider
The ring provider, which the SSH backend uses too.
spki_pin
The pin of the certificate der: the SHA-256 of its SubjectPublicKeyInfo, the seventh element of tbsCertificate when the optional version comes first.