| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f5683a9 commit 8fa5bd3
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,10 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | require('../common'); | |
| 3 | + | ||
| 4 | + // This test ensures Node.js doesn't crash on hitting Ctrl+C in order to | ||
| 5 | + // terminate the currently running process (especially on FreeBSD). | ||
| 6 | + // https://github.com/nodejs/node-v0.x-archive/issues/9326 | ||
| 7 | + | ||
| 3 | 8 | const assert = require('assert'); | |
| 4 | 9 | const child_process = require('child_process'); | |
| 5 | 10 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,42 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + if (!common.hasCrypto) | ||
| 4 | + common.skip('node compiled without crypto.'); | ||
| 5 | + const fixtures = require('../common/fixtures'); | ||
| 6 | + | ||
| 7 | + // This test ensures that TLS does not fail to read a self-signed certificate | ||
| 8 | + // and thus throw an `authorizationError`. | ||
| 9 | + // https://github.com/nodejs/node/issues/5100 | ||
| 10 | + | ||
| 11 | + const assert = require('assert'); | ||
| 12 | + const tls = require('tls'); | ||
| 13 | + | ||
| 14 | + const pfx = fixtures.readKey('agent1-pfx.pem'); | ||
| 15 | + | ||
| 16 | + const server = tls | ||
| 17 | + .createServer( | ||
| 18 | + { | ||
| 19 | + pfx: pfx, | ||
| 20 | + passphrase: 'sample', | ||
| 21 | + requestCert: true, | ||
| 22 | + rejectUnauthorized: false | ||
| 23 | + }, | ||
| 24 | + common.mustCall(function(c) { | ||
| 25 | + assert.strictEqual(c.authorizationError, null); | ||
| 26 | + c.end(); | ||
| 27 | + }) | ||
| 28 | + ) | ||
| 29 | + .listen(0, function() { | ||
| 30 | + const client = tls.connect( | ||
| 31 | + { | ||
| 32 | + port: this.address().port, | ||
| 33 | + pfx: pfx, | ||
| 34 | + passphrase: 'sample', | ||
| 35 | + rejectUnauthorized: false | ||
| 36 | + }, | ||
| 37 | + function() { | ||
| 38 | + client.end(); | ||
| 39 | + server.close(); | ||
| 40 | + } | ||
| 41 | + ); | ||
| 42 | + }); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,19 +1,21 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | const common = require('../common'); | |
| 3 | - | ||
| 4 | 3 | if (!common.hasCrypto) | |
| 5 | 4 | common.skip('missing crypto'); | |
| 5 | + const fixtures = require('../common/fixtures'); | ||
| 6 | + | ||
| 7 | + // This test ensures that Node.js doesn't incur a segfault while accessing | ||
| 8 | + // TLSWrap fields after the parent handle was destroyed. | ||
| 9 | + // https://github.com/nodejs/node/issues/5108 | ||
| 6 | 10 | ||
| 7 | 11 | const assert = require('assert'); | |
| 8 | 12 | const tls = require('tls'); | |
| 9 | - const fixtures = require('../common/fixtures'); | ||
| 10 | 13 | ||
| 11 | 14 | const options = { | |
| 12 | 15 | key: fixtures.readKey('agent1-key.pem'), | |
| 13 | 16 | cert: fixtures.readKey('agent1-cert.pem') | |
| 14 | 17 | }; | |
| 15 | 18 | ||
| 16 | - | ||
| 17 | 19 | const server = tls.createServer(options, function(s) { | |
| 18 | 20 | s.end('hello'); | |
| 19 | 21 | }).listen(0, function() { | |
@@ -26,7 +28,6 @@ const server = tls.createServer(options, function(s) { | |||
| 26 | 28 | }); | |
| 27 | 29 | }); | |
| 28 | 30 | ||
| 29 | - | ||
| 30 | 31 | function putImmediate(client) { | |
| 31 | 32 | setImmediate(function() { | |
| 32 | 33 | if (client.ssl) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + require('../common'); | ||
| 3 | + | ||
| 4 | + // This test ensures that Node.js doesn't crash on `process.stdin.emit("end")`. | ||
| 5 | + // https://github.com/nodejs/node/issues/1068 | ||
| 6 | + | ||
| 7 | + process.stdin.emit('end'); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,10 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - | ||
| 3 | 2 | require('../common'); | |
| 3 | + | ||
| 4 | + // This test ensures that zlib throws a RangeError if the final buffer needs to | ||
| 5 | + // be larger than kMaxLength and concatenation fails. | ||
| 6 | + // https://github.com/nodejs/node/pull/1811 | ||
| 7 | + | ||
| 4 | 8 | const assert = require('assert'); | |
| 5 | 9 | ||
| 6 | 10 | // Change kMaxLength for zlib to trigger the error without having to allocate | |
| Back | FazBrowse Home | New Git URL |
0 commit comments