GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: more regression tests for minDHSize option · nodejs/node@8152248

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _tls_wrap.js
  • test/parallel
    • test-tls-client-mindhsize.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ exports.connect = function(/* [port, host], options, cb */) {
974974
assert(typeof options.minDHSize === 'number',
975975
'options.minDHSize is not a number: ' + options.minDHSize);
976976
assert(options.minDHSize > 0,
977-
'options.minDHSize is not a posivie number: ' +
977+
'options.minDHSize is not a positive number: ' +
978978
options.minDHSize);
979979

980980
var hostname = options.servername ||
Collapse file

‎test/parallel/test-tls-client-mindhsize.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-client-mindhsize.js
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ testDHE1024();
7878
assert.throws(() => test(512, true, assert.fail),
7979
/DH parameter is less than 1024 bits/);
8080

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+
8190
process.on('exit', function() {
8291
assert.equal(nsuccess, 1);
8392
assert.equal(nerror, 1);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.