Created
March 24, 2023 05:12
-
-
Save esemeniuc/580b29c8b22c824b9538bc3c05ab48de to your computer and use it in GitHub Desktop.
Rustls SSLKEYLOGFILE extraction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use rustls; | |
let roots = rustls::RootCertStore::empty(); | |
let mut tls = rustls::ClientConfig::builder() | |
.with_safe_defaults() | |
.with_root_certificates(roots) | |
.with_no_client_auth(); | |
tls.key_log = Arc::new(rustls::KeyLogFile::new()); | |
let client = Arc::new( | |
reqwest::Client::builder() | |
.use_preconfigured_tls(tls) | |
.default_headers(default_headers) | |
.timeout(timeout) | |
.pool_idle_timeout(timeout) | |
.build() | |
.expect("build rpc client"), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment