-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add key log callback option to SSLContext #861
Conversation
Motivation: Wireshark can decrypt TLS sessions during packet capture, if the session keys (etc.) are available from an SSL key log file. This log file format has become a de facto industry standard, and BoringSSL (and maybe the others too, didn't check) has a callback mechanism for delivering log lines in this format. Modification: Add `KeyLogCallback` interface and an `SSLContext.setKeyLogCallback` method, which integrators can easily implement the SSLKEYLOGFILE feature, or equivalent, on top of. Result: It is now possible to configure netty-tcnative in a way that TLS sessions can be decrypted at packet-capture time by Wireshark, making it easier to investigate and debug problems with TLS.
Maybe relevant to your interests as well, @hyperxpro. |
Not only a de facto standard, but perhaps on its way to becoming a formalized standard as well: https://datatracker.ietf.org/doc/draft-ietf-tls-keylogfile/ |
openssl-classes/src/main/java/io/netty/internal/tcnative/KeyLogCallback.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally speaking looks good. Just two nits.
I will write an example for this and try to couple it with PcapWriteHandler. |
Co-authored-by: Norman Maurer <[email protected]>
For now, it seems like there is no public API to access the required context pointer.
It looks like a reflective access to the But otherwise the API works, thank you for implementing this. |
Motivation:
Wireshark can decrypt TLS sessions during packet capture, if the session keys (etc.) are available from an SSL key log file. This log file format has become a de facto industry standard, and BoringSSL (and maybe the others too, didn't check) has a callback mechanism for delivering log lines in this format.
Modification:
Add
KeyLogCallback
interface and anSSLContext.setKeyLogCallback
method, which integrators can easily implement the SSLKEYLOGFILE feature, or equivalent, on top of.Result:
It is now possible to configure netty-tcnative in a way that TLS sessions can be decrypted at packet-capture time by Wireshark, making it easier to investigate and debug problems with TLS.