This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is not (at least initially) intended to be merged, just as a proposal.
Basically implements a polyfill that:
keylog
events based on itCLIENT_RANDOM
line as we do now, and emittingkeylog
events.keylog
is available natively, does nothingPolyfilling the keylog API would allow us to implement
index.js
without needing the native module:Which would in turn allow us to skip building the native module entirely, if the native API is present. So, for recent Node.JS versions, this would simply be a small JS module for easy SSLKEYLOGFILE logging.
The downside is that we'd have to drop
update_log
andget_session_key
. If someone needs custom logging he can subscribe tokeylog
directly, and only use this module as a polyfill. The second one is not entirely replaceable, but you can parsekeylog
lines to get the secrets you need (with TLSv1.3 this should be even more reliable than callingget_session_key
manually, IMHO). What are your thoughts on this?