tonic
tonic copied to clipboard
feat: optional `SSLKEYLOGFILE` support
Motivation
Using SSLKEYLOGFILE
is helpful when you want to intercept TLS traffic for debugging and is generally supported by many libraries and browsers. Also see: https://wiki.wireshark.org/TLS#using-the-pre-master-secret
Solution
Add a use_key_log
option to server and client TLS configs that -- when set -- will enable rustls's SSLKEYLOGFILE
handling.
Since this is mostly config wiring and relies on the already existing rustls features, does this need a test? If so, where should this test be placed?
Seems to be related to #893.
The solution there seems to be: just bypass tonic::transport
entirely and write 100+ lines of glue-code to wire up all the components (tower
, hyper
, rustls
) yourself. That seems doable, but somewhat defeats the purpose of tonic
, i.e. having an easy-to-use client&server toolkit.