Skip to content
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

[v10.x] tls: expose keylog event on TLSSocket #31582

Closed

Conversation

mildsunrise
Copy link
Member

Backport of #27654.

I had to modify test-tls-keylog-tlsv13.js to use TLS 1.2 connections as (AFAIK) v10 is not going to support TLS 1.3. I also modified the count from 5 to 1, because TLS 1.2 handshakes only emit 1 keylog event. Should I rename the file to test-tls-keylog-tlsv12.js?

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. v10.x labels Jan 30, 2020
Copy link
Contributor

@sam-github sam-github left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @nodejs/lts would have a better idea whether renaming file makes things better, or is just another source of merge conflicts. I'm OK with leaving the file name as-is.

@nodejs-github-bot
Copy link
Collaborator

@mildsunrise
Copy link
Member Author

wait, I see there's ubuntu1804_sharedlibs_openssl110_x64... do we need to support OpenSSL 1.1.0? if so then this can't be merged

@bnoordhuis
Copy link
Member

It's okay to disable the functionality with #if OPENSSL_VERSION_NUMBER < 0x1010100fL. That buildbot is so we know when a change breaks distro builds.

@mildsunrise
Copy link
Member Author

Okay! I've suppressed the SSL_CTX_set_keylog_callback call, the build should work now.

@nodejs-github-bot
Copy link
Collaborator

@bnoordhuis
Copy link
Member

@mildsunrise Do you want me to nominate you for collaborator status? I.e., get your commit bit? You've done enough high-impact work to qualify, IMO.

@mildsunrise
Copy link
Member Author

Oh, I forgot to skip the test when needed... it should be complete now

@mildsunrise Do you want me to nominate you for collaborator status? I.e., get your commit bit? You've done enough high-impact work to qualify, IMO.

It'd be a pleasure! :)

@bnoordhuis
Copy link
Member

#32014 :)

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@BethGriggs
Copy link
Member

In the most recent CI, the Windows failures are flakes, but the failure on ubuntu1804_sharedlibs_openssl110_x64 seems real - https://ci.nodejs.org/job/node-test-commit-linux-containered/18601/nodes=ubuntu1804_sharedlibs_openssl110_x64/testReport/junit/(root)/test/parallel_test_tls_keylog_tlsv13/

test/parallel/test-tls-keylog-tlsv13.js Outdated Show resolved Hide resolved
test/parallel/test-tls-keylog-tlsv13.js Outdated Show resolved Hide resolved
@sam-github
Copy link
Contributor

Keylog support isn't available on that openssl version, but the regex that was added to check had a small typo. Passed for me locally after (by skipping the test).

@nodejs-github-bot
Copy link
Collaborator

@sam-github
Copy link
Contributor

Should I rename the file to test-tls-keylog-tlsv12.js

Yes, please.

Exposes SSL_CTX_set_keylog_callback in the form of a `keylog` event
that is emitted on clients and servers. This enables easy debugging
of TLS connections with i.e. Wireshark, which is a long-requested
feature.

PR-URL: nodejs#27654
Refs: nodejs#2363
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@mildsunrise
Copy link
Member Author

Totally right, that was a typo. I've renamed the file and squashed, hopefully everything is in order now (sorry for taking so many attempts to get it right 😅)

@nodejs-github-bot
Copy link
Collaborator

BethGriggs pushed a commit that referenced this pull request Mar 12, 2020
Exposes SSL_CTX_set_keylog_callback in the form of a `keylog` event
that is emitted on clients and servers. This enables easy debugging
of TLS connections with i.e. Wireshark, which is a long-requested
feature.

PR-URL: #27654
Backport-PR-URL: #31582
Refs: #2363
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@BethGriggs
Copy link
Member

Landed in a2b0e9e 🎉

@BethGriggs BethGriggs closed this Mar 12, 2020
@mildsunrise mildsunrise deleted the v10.x-tls-keylog branch March 12, 2020 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants