| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 935b977 commit 8152248
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -974,7 +974,7 @@ exports.connect = function(/* [port, host], options, cb */) { | |||
| 974 | 974 | assert(typeof options.minDHSize === 'number', | |
| 975 | 975 | 'options.minDHSize is not a number: ' + options.minDHSize); | |
| 976 | 976 | assert(options.minDHSize > 0, | |
| 977 | - 'options.minDHSize is not a posivie number: ' + | ||
| 977 | + 'options.minDHSize is not a positive number: ' + | ||
| 978 | 978 | options.minDHSize); | |
| 979 | 979 | ||
| 980 | 980 | var hostname = options.servername || | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,6 +78,15 @@ testDHE1024(); | |||
| 78 | 78 | assert.throws(() => test(512, true, assert.fail), | |
| 79 | 79 | /DH parameter is less than 1024 bits/); | |
| 80 | 80 | ||
| 81 | + [0, -1, -Infinity, NaN].forEach(minDHSize => { | ||
| 82 | + assert.throws(() => tls.connect({ minDHSize }), | ||
| 83 | + /minDHSize is not a positive number/); | ||
| 84 | + }); | ||
| 85 | + | ||
| 86 | + [true, false, null, undefined, {}, [], '', '1'].forEach(minDHSize => { | ||
| 87 | + assert.throws(() => tls.connect({ minDHSize }), /minDHSize is not a number/); | ||
| 88 | + }); | ||
| 89 | + | ||
| 81 | 90 | process.on('exit', function() { | |
| 82 | 91 | assert.equal(nsuccess, 1); | |
| 83 | 92 | assert.equal(nerror, 1); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments