-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: more regression tests for minDHSize option #3629
Conversation
assert.throws(() => tls.connect({ minDHSize: -1 }), | ||
/minDHSize is not a positive number/); | ||
|
||
[true, false, null, undefined, {}, [], '', '1'].forEach(value => { |
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.
Since we are doing this, can we include Infinity and NaN?
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 added tests for negative infinity and nan. I left out positive infinity because I'm not even sure what it would mean to want keys of infinite size.
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 left out positive infinity because I'm not even sure what it would mean to want keys of infinite size.
Infinite quantum entropy?
8f66027
to
752e19b
Compare
LGTM |
Check that trying to use a < 1024 bits DH key throws an exception. parallel/test-tls-dhe tests this as well but it feels incongruous not to do it here when both tests have similar logic for 1024/2048 bits keys. PR-URL: nodejs#3629 Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Check that tls.connect() fails in the expected way when passing in invalid minDHSize options. PR-URL: nodejs#3629 Reviewed-By: Sakthipriyan Vairamani <[email protected]>
752e19b
to
82022a7
Compare
Check that trying to use a < 1024 bits DH key throws an exception. parallel/test-tls-dhe tests this as well but it feels incongruous not to do it here when both tests have similar logic for 1024/2048 bits keys. PR-URL: #3629 Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Check that tls.connect() fails in the expected way when passing in invalid minDHSize options. PR-URL: #3629 Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@nodejs/lts ... please weigh in on this one... this LGTM for v4.4 |
it is worth noting that this relies on a semver major change from #1831 |
yeah, this is not for v4.x cause |
CI: https://ci.nodejs.org/job/node-test-pull-request/658/