Skip to content
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

Merged
merged 2 commits into from
Nov 3, 2015

Conversation

bnoordhuis
Copy link
Member

@bnoordhuis bnoordhuis added crypto Issues and PRs related to the crypto subsystem. test Issues and PRs related to the tests. labels Nov 2, 2015
assert.throws(() => tls.connect({ minDHSize: -1 }),
/minDHSize is not a positive number/);

[true, false, null, undefined, {}, [], '', '1'].forEach(value => {
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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?

@bnoordhuis
Copy link
Member Author

@thefourtheye
Copy link
Contributor

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]>
@bnoordhuis bnoordhuis closed this Nov 3, 2015
@bnoordhuis bnoordhuis deleted the more-mindhsize-tests branch November 3, 2015 10:48
@bnoordhuis bnoordhuis merged commit 82022a7 into nodejs:master Nov 3, 2015
bnoordhuis added a commit that referenced this pull request Nov 7, 2015
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]>
bnoordhuis added a commit that referenced this pull request Nov 7, 2015
Check that tls.connect() fails in the expected way when passing in
invalid minDHSize options.

PR-URL: #3629
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@Fishrock123 Fishrock123 mentioned this pull request Nov 11, 2015
@MylesBorins
Copy link
Contributor

This should not land if f72e178 from #1831 does not land

@rvagg rvagg mentioned this pull request Dec 17, 2015
@jasnell
Copy link
Member

jasnell commented Feb 17, 2016

@nodejs/lts ... please weigh in on this one... this LGTM for v4.4

@MylesBorins
Copy link
Contributor

it is worth noting that this relies on a semver major change from #1831

@rvagg
Copy link
Member

rvagg commented Feb 18, 2016

yeah, this is not for v4.x cause minDHSize is a v5 thing, updating labels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Issues and PRs related to the crypto subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants