tls: throw when unable to set ciphers#21557
Merged
mscdex merged 0 commit intonodejs:masterfrom Jul 3, 2018
Merged
Conversation
7c7709e to
bfbeb1d
Compare
bnoordhuis
approved these changes
Jun 27, 2018
src/node_crypto.cc
Outdated
Member
There was a problem hiding this comment.
I realise this is an existing pattern but you can just return ThrowCryptoError(env, err, "Failed to set ciphers"); - it will use the message when err == 0. Either way is fine though, it's the kind of cleanup that can wait for another PR.
Contributor
Author
|
/cc @nodejs/tsc |
cjihrig
approved these changes
Jun 29, 2018
jasnell
approved these changes
Jun 29, 2018
bfbeb1d to
132a188
Compare
Contributor
Author
|
One last CI run before landing: https://ci.nodejs.org/job/node-test-pull-request/15714/ |
TimothyGu
approved these changes
Jul 3, 2018
132a188 to
a15ea5d
Compare
mscdex
added a commit
to mscdex/io.js
that referenced
this pull request
Jul 3, 2018
PR-URL: nodejs#21557 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@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 PR both clarifies the
ciphersoption for tls connections and makestls.createSecureContext()throw (with an OpenSSL error message) ifciphersis not acceptable.It may be worth mimicking this same behavior for other setter functions. While most others at least throw a generic error (while
SetCiphers()silently ignored the return value when setting ciphers), I think tweaking those to include the OpenSSL error may be more helpful.CI: https://ci.nodejs.org/job/node-test-pull-request/15648/
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes