hyper-rustls icon indicating copy to clipboard operation
hyper-rustls copied to clipboard

Add support for SSLKEYLOGFILE

Open pcd1193182 opened this issue 1 year ago • 3 comments

Hey all,

rustls has support for the standard SSL key logging approach (useful when using Wireshark to analyze packet traces. However, hyper-rustls never configures the relevant field. As a result, it is very difficult to debug certain kinds of problems when TLS is in use. Would it be possible to expose this functionality, either by default or through the config builders? Thanks!

pcd1193182 avatar Sep 10 '24 22:09 pcd1193182

There is a From<(H, C)> impl for HttpsConnector that should be able to facilitate this use case. If you'd like a more ergonomic solution, we'd be open to a ConfigBuilderExt method for enabling KeyLogFile.

djc avatar Sep 11 '24 11:09 djc

we'd be open to a ConfigBuilderExt method for enabling KeyLogFile.

@pcd1193182 Would you be interested in writing a PR for this, or is the workaround described above sufficient for your needs?

cpu avatar Sep 17 '24 16:09 cpu

Thus far, the workaround is working for me. It would be nice if it was integrated natively into the ConfigBuilderExt, but it's definitely not critical.

pcd1193182 avatar Sep 17 '24 17:09 pcd1193182

This looked useful and like a simple addition so I implemented opened a PR here: #308

graves avatar Sep 07 '25 17:09 graves

We decided we don't want to expose this API more than necessary, and it should already be necessary to use the functionality by converting an existing ClientConfig into a HttpsConnector as described above. Going to close this issue.

djc avatar Sep 10 '25 09:09 djc