mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-03 15:58:42 +00:00
net/quic: Allow SSL keylog file for debugging
rustls has a KeyLog implementation that opens a file whose name is given by the `SSLKEYLOGFILE` environment variable, and writes keys into it. If SSLKEYLOGFILE is not set, this does nothing. See https://docs.rs/rustls/latest/rustls/struct.KeyLogFile.html https://docs.rs/rustls/latest/rustls/trait.KeyLog.html Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1036>
This commit is contained in:
parent
ce930eab5f
commit
befd8d4bd2
1 changed files with 2 additions and 0 deletions
|
@ -144,6 +144,7 @@ fn configure_client(secure_conn: bool, alpns: Vec<String>) -> Result<ClientConfi
|
||||||
.map(|x| x.as_bytes().to_vec())
|
.map(|x| x.as_bytes().to_vec())
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
crypto.alpn_protocols = alpn_protocols;
|
crypto.alpn_protocols = alpn_protocols;
|
||||||
|
crypto.key_log = Arc::new(rustls::KeyLogFile::new());
|
||||||
|
|
||||||
Ok(ClientConfig::new(Arc::new(crypto)))
|
Ok(ClientConfig::new(Arc::new(crypto)))
|
||||||
}
|
}
|
||||||
|
@ -234,6 +235,7 @@ fn configure_server(
|
||||||
.map(|x| x.as_bytes().to_vec())
|
.map(|x| x.as_bytes().to_vec())
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
crypto.alpn_protocols = alpn_protocols;
|
crypto.alpn_protocols = alpn_protocols;
|
||||||
|
crypto.key_log = Arc::new(rustls::KeyLogFile::new());
|
||||||
let mut server_config = ServerConfig::with_crypto(Arc::new(crypto));
|
let mut server_config = ServerConfig::with_crypto(Arc::new(crypto));
|
||||||
|
|
||||||
Arc::get_mut(&mut server_config.transport)
|
Arc::get_mut(&mut server_config.transport)
|
||||||
|
|
Loading…
Reference in a new issue