tls: cleanup onhandshakestart callback#20466
Closed
apapirovski wants to merge 1 commit intonodejs:masterfrom
Closed
tls: cleanup onhandshakestart callback#20466apapirovski wants to merge 1 commit intonodejs:masterfrom
apapirovski wants to merge 1 commit intonodejs:masterfrom
Conversation
Re-arrange and cleanup the flow of the onhandshakestart to be more clear and less repetitive. Exit early in the case of a first ever handshake for a given connection.
apapirovski
commented
May 2, 2018
| if (++this.handshakes > tls.CLIENT_RENEG_LIMIT) { | ||
| // Defer the error event to the next tick. We're being called from OpenSSL's | ||
| // state machine and OpenSSL is not re-entrant. We cannot allow the user's | ||
| // callback to destroy the connection right now, it would crash and burn. |
Contributor
Author
There was a problem hiding this comment.
This is no longer necessary. We already defer the actual cleanup within destroy by using setImmediate. This is also backed up by the way renegotiation errors are handled below (which we also have tests for).
Contributor
Author
bnoordhuis
approved these changes
May 2, 2018
Member
|
OS X failure seems unrelated, re-run: https://ci.nodejs.org/job/node-test-commit-osx/18327/ |
BridgeAR
approved these changes
May 5, 2018
Contributor
Author
|
Landed in 491ae12 |
apapirovski
added a commit
that referenced
this pull request
May 6, 2018
Re-arrange and cleanup the flow of the onhandshakestart to be more clear and less repetitive. Exit early in the case of a first ever handshake for a given connection. PR-URL: #20466 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
May 8, 2018
Re-arrange and cleanup the flow of the onhandshakestart to be more clear and less repetitive. Exit early in the case of a first ever handshake for a given connection. PR-URL: #20466 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
May 8, 2018
Re-arrange and cleanup the flow of the onhandshakestart to be more clear and less repetitive. Exit early in the case of a first ever handshake for a given connection. PR-URL: #20466 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
May 9, 2018
Re-arrange and cleanup the flow of the onhandshakestart to be more clear and less repetitive. Exit early in the case of a first ever handshake for a given connection. PR-URL: #20466 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Re-arrange and cleanup the flow of the onhandshakestart to be
more clear and less repetitive. Exit early in the case of a
first ever handshake for a given connection.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes