Interface KeyLog
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Receives TLS traffic secrets in the NSS key log format (
SSLKEYLOGFILE), which Wireshark
reads to decrypt QUIC packets. A debugging aid only: whoever holds the log can read the traffic.
The labels are those of TLS 1.3: CLIENT_HANDSHAKE_TRAFFIC_SECRET,
SERVER_HANDSHAKE_TRAFFIC_SECRET, CLIENT_TRAFFIC_SECRET_0 and
SERVER_TRAFFIC_SECRET_0. Implementations must be thread-safe: connections log from their own
threads.
-
Method Details
-
log
Logs one secret.- Parameters:
label- the NSS key log labelclientRandom- the ClientHello random that identifies the handshakesecret- the secret
-
line
Formats one line of the key log file.- Parameters:
label- the labelclientRandom- the client randomsecret- the secret- Returns:
- the line, without a line terminator
-
file
A key log that appends to a file, creating it if needed.- Parameters:
file- the file, such as the one named by theSSLKEYLOGFILEenvironment variable- Returns:
- the key log; each line is written and flushed under a lock
-
fromEnvironment
The key log named by theSSLKEYLOGFILEenvironment variable.- Returns:
- a file key log, or null if the variable is not set
-