GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — Add key log callback option to SSLContext by chrisvest · Pull Request #861 · netty/netty-tcnative Conversation
Member
Motivation: Modification: Result:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsMotivation: 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.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
normanmaurer
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally speaking looks good. Just two nits.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Norman Maurer <[email protected]>
|
There was an error while loading. Please reload this page.
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Follow-up for #861. Motivation: `SSLContext.setKeyLogCallback` only works with BoringSSL and AWS-LC. OpenSSL has had the same `SSL_CTX_set_keylog_callback` API since 1.1.1, so `netty-tcnative-openssl-dynamic` users can't get SSLKEYLOGFILE-style key logs. Modification: - Enable key logging for OpenSSL 1.1.1 and later (still not LibreSSL) with a new `TCN_KEYLOG_SUPPORTED` macro. - Weak-link `SSL_CTX_set_keylog_callback` with GCC/clang, and return false if it's missing at runtime, like `setNumTickets`. MSVC builds use the version check only. - Document supported libraries, when false is returned, and the callback's threading and exception behavior. - Add tests that run real TLS 1.2 and 1.3 handshakes and check the key log labels. Result: Key logging works with OpenSSL 1.1.1 and later. Weak linking covers builds against older headers: the call returns false on an OpenSSL runtime older than 1.1.1 and true on 1.1.1 or later. Co-authored-by: Norman Maurer <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.