pub trait ExportKeyingMaterial {
// Required method
fn export_keying_material<T: AsMut<[u8]>>(
&self,
output: T,
label: &[u8],
context: Option<&[u8]>,
) -> Option<T>;
}Expand description
Trait for extracting keying material from a TLS connection.
This allows anything that ends up potentially wrapping a TLS stream to use the
underlying export_keying_material function. It is used during the relay handshake
to establish a shared secret between the client and server for authentication purposes.
Required Methods§
Sourcefn export_keying_material<T: AsMut<[u8]>>(
&self,
output: T,
label: &[u8],
context: Option<&[u8]>,
) -> Option<T>
fn export_keying_material<T: AsMut<[u8]>>( &self, output: T, label: &[u8], context: Option<&[u8]>, ) -> Option<T>
If this type ends up wrapping a TLS stream, then this tries
to export keying material by calling the underlying export_keying_material
function.
However unlike that function, this returns Option, in case the
underlying stream might not be wrapping TLS, e.g. as in the case of
MaybeTlsStream.
For more information on what this function does, see the
export_keying_material documentation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl ExportKeyingMaterial for MaybeTlsStream
server only.