crypto: replace goto SSL_CTX_use_certificate_chain#23113
Closed
danbev wants to merge 1 commit intonodejs:masterfrom
Closed
crypto: replace goto SSL_CTX_use_certificate_chain#23113danbev wants to merge 1 commit intonodejs:masterfrom
danbev wants to merge 1 commit intonodejs:masterfrom
Conversation
Contributor
Author
addaleax
reviewed
Sep 27, 2018
bnoordhuis
reviewed
Sep 27, 2018
src/node_crypto.cc
Outdated
Member
There was a problem hiding this comment.
There is a potential footgun here. Someone someday might look at line 686 and see this:
ret = SSL_CTX_use_certificate_chain(...);
return ret;And change that to:
return SSL_CTX_use_certificate_chain(...);Without realizing that the assignment to ret is necessary because of its side effects. Probably also easy to miss in code review.
Member
There was a problem hiding this comment.
I think we could really do a variant here that uses a smart pointer and releases it if necessary; it’s just not trivial to translate the code to that…
Contributor
Author
There was a problem hiding this comment.
Sorry about the late response on this. I'll take another stab at this today. Thanks
3 tasks
bbfee1c to
6540586
Compare
This commit removes the goto statements in SSL_CTX_use_certificate_chain by using a unique_ptr.
6540586 to
a46fae0
Compare
Contributor
Author
|
Updated CI: https://ci.nodejs.org/job/node-test-pull-request/17623/ (:heavy_check_mark:) |
jasnell
approved these changes
Oct 5, 2018
Contributor
Author
|
Landed in 8d218a9. |
danbev
added a commit
that referenced
this pull request
Oct 8, 2018
This commit removes the goto statements in SSL_CTX_use_certificate_chain by using a unique_ptr. PR-URL: #23113 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Oct 10, 2018
This commit removes the goto statements in SSL_CTX_use_certificate_chain by using a unique_ptr. PR-URL: #23113 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This was referenced Oct 10, 2018
This was referenced Oct 11, 2018
jasnell
pushed a commit
that referenced
this pull request
Oct 17, 2018
This commit removes the goto statements in SSL_CTX_use_certificate_chain by using a unique_ptr. PR-URL: #23113 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
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.
This commit removes the goto statements in SSL_CTX_use_certificate_chain
by using a unique_ptr.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes