Skip to content

Instantly share code, notes, and snippets.

@esemeniuc
Created March 24, 2023 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esemeniuc/580b29c8b22c824b9538bc3c05ab48de to your computer and use it in GitHub Desktop.
Save esemeniuc/580b29c8b22c824b9538bc3c05ab48de to your computer and use it in GitHub Desktop.
Rustls SSLKEYLOGFILE extraction
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