-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
crypto: Remove unused access of tlsext_hostname. #10882
Conversation
@@ -1816,17 +1816,6 @@ void SSLWrap<Base>::LoadSession(const FunctionCallbackInfo<Value>& args) { | |||
if (w->next_sess_ != nullptr) | |||
SSL_SESSION_free(w->next_sess_); | |||
w->next_sess_ = sess; |
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.
I just left the error case silently ignoring it. Happy to change it if you'd prefer something else.
@@ -0,0 +1,94 @@ | |||
'use strict'; | |||
const common = require('../common'); |
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.
This file is basically entirely copied from test-tls-session-cache.js
with tweaks, so it's probably doing more than it actually needs to.
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.
can you just add the condition you are testing to test-tls-session-cache.js?
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.
Done.
/cc @indutny |
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.
LGTM but would it be possible to merge the test into the existing test? It's duplicating quite a bit of finicky code right now.
@bnoordhuis Oh yeah, that's much tidier. Done. |
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.
LGTM
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.
LGTM, thanks. CI: https://ci.nodejs.org/job/node-test-pull-request/5946/
It's possible the ARM buildbots report failure while the status is green when you click through. Known issue, can be safely ignored.
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.
Please run make test
- the linter failure is real.
@sam-github Oops. Fixed. |
I see some red in that link, but I'm not sure how to read it. What's the error? |
test/arm is known to fail, sqaush and force push, and I'll retest |
also, rebase against master |
And fix the commit message, it should be
No capital, no period. |
The return value of loadSession is ultimately ignored, so don't fill it in. This inches Node closer to 1.1.0 compatibility and is less code. Also remove a comment which appears to have long since become invalid. It dates to 048e0e7 when the SNI value was actually extracted from the session. This also fixes a segfault should d2i_SSL_SESSION fail to parse the input and return NULL. Add a test for this case based on test-tls-session-cache.js.
8f60462
to
71a8e7f
Compare
Squashed and rebased (and comment reworded). |
ping @sam-github |
Landed in e34ee1d |
The return value of loadSession is ultimately ignored, so don't fill it in. This inches Node closer to 1.1.0 compatibility and is less code. Also remove a comment which appears to have long since become invalid. It dates to 048e0e7 when the SNI value was actually extracted from the session. This also fixes a segfault should d2i_SSL_SESSION fail to parse the input and return NULL. Add a test for this case based on test-tls-session-cache.js. PR-URL: #10882 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
The return value of loadSession is ultimately ignored, so don't fill it in. This inches Node closer to 1.1.0 compatibility and is less code. Also remove a comment which appears to have long since become invalid. It dates to 048e0e7 when the SNI value was actually extracted from the session. This also fixes a segfault should d2i_SSL_SESSION fail to parse the input and return NULL. Add a test for this case based on test-tls-session-cache.js. PR-URL: nodejs#10882 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
needs a backport PR in order to land on v4 or v6 |
To clarify, is that a request for me to put one together or just a note for you all? (I'm not familiar with how your branching arrangement works.) |
@davidben ... just a note :-) if someone felt that this needed to go into v6 or v4, then a manual backport would be required because the commit is not landing cleanly as is. Feel free to ignore :-) |
I think we should backport as much as possible, not because we desperately need this PR, but because if we don't land it, subsequent PRs might start not backporting as easily due to conflicts. @davidben if this applies to 6.x and 4.x (it looks like it would), do you have time to backport? |
Looks like the reason it doesn't apply cleanly is because of #10685 and #10698 which were not backported. Though those two really don't apply cleanly. :-) I dunno how far back you want to go here. Doing just the merge is straightforward enough; I can either switch all my |
Its not clear at this moment what should be backported. Lets wait and see. @gibfahn did the two PRs you mentioned by running eslint in fixup mode, it would probably be easier to repeat that than to actually backport. |
@davidben Yep, let me backport those two PRs first. |
The return value of loadSession is ultimately ignored, so don't fill it in. This inches Node closer to 1.1.0 compatibility and is less code.
Also remove a comment which appears to have long since become invalid. It dates to 048e0e7 when the SNI value was actually extracted from the session.
This also fixes a segfault should
d2i_SSL_SESSION
fail to parse the input and return NULL.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
crypto