Skip to main content

Module cert

Module cert 

Source
Expand description

The viewer listener’s certificate: self-signed ECDSA P-256, made once and kept in this instance’s data directory, so its fingerprint (the one a paired device pinned from the QR) survives restarts. No CA is involved and nothing about the certificate itself is trusted; only the fingerprint is.

Structs§

ViewerTls
The certificate in use, its key and its fingerprint.

Functions§

cert_dir
The certificate directory under data_dir.
fingerprint
Lowercase hex SHA-256 of a certificate’s DER bytes.
load_or_create
Load the certificate kept under data_dir, or make and keep a new one when there is none or what is there can’t be used.