This trait represents the ability to do something useful with key material, such as logging it to a file for debugging.
Naturally, secrets passed over the interface are extremely sensitive and can break the security of past, present and future sessions.
You'll likely want some interior mutability in your implementation to make this useful.
KeyLogFile that implements the standard
environment variable behaviour.
fn log(&self, label: &str, client_random: &[u8], secret: &[u8])
Log the given
client_random is provided for
label describes precisely what
secretis the master secret for a TLSv1.2 session.
secretencrypts early data transmitted by a client
secretencrypts handshake messages from the server during a TLSv1.3 handshake.
secretencrypts handshake messages from the client during a TLSv1.3 handshake.
secretencrypts post-handshake data from the server in a TLSv1.3 session.
secretencrypts post-handshake data from the client in a TLSv1.3 session.
secretis the post-handshake exporter secret in a TLSv1.3 session.
These strings are selected to match the NSS key log format: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format
fn will_log(&self, _label: &str) -> bool
Indicates whether the secret with label
label will be logged.
will_log returns true then
log will be called with the secret.
log will not be called for the secret. This is a