Module keylog
Available on crate feature
net only.Expand description
TLS keylog facility used by every TLS implementation supported by rama (and exposed for your own).
The trait at the center is KeyLogSink: a non-blocking,
Send + Sync consumer of one NSS-format keylog line per call. The
TLS crates feed each handshake’s set_keylog_callback into a sink
held behind Arc<dyn KeyLogSink> (the only erasure point); every
sink wrapper above that — FileKeyLogSink, RotatingFileKeyLogSink,
ToggleableKeyLogSink — is statically dispatched.
Lines arrive at the sink including their trailing newline; implementations persist bytes verbatim.
Structs§
- File
KeyLog Sink - Sink that appends every line to a single file.
- KeyLog
Toggle - Cheap external handle for toggling a
ToggleableKeyLogSink. Holds only the sharedAtomicBool; does not retain the inner sink, so it can be stashed in any state container without pinning the sink’s lifetime. - Noop
KeyLog Sink - Sink that drops every line. Useful as a placeholder default and for
the off-state of
ToggleableKeyLogSinkwithout changing types. - Rotating
File KeyLog Sink - Sink that rotates between bucket-named files.
- Toggleable
KeyLog Sink - Wraps any
KeyLogSinkin an atomic on/off switch. When off,write_lineis a single relaxed-cost atomic load that drops the argument. When on, it forwards to the inner sink.
Enums§
- Rotation
Period - Bucket size for
RotatingFileKeyLogSink.
Constants§
- ROTATING_
DEFAULT_ PREFIX - Default filename prefix.
Traits§
- KeyLog
Sink - Consumer of TLS keylog lines.
Functions§
- normalize_
path - open_
intent_ sink - Resolve a
KeyLogIntentinto a concrete sink, opening files as needed.