summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-01-20 18:40:02 -0800
committerRich Trott <rtrott@gmail.com>2019-01-22 22:22:55 -0800
commitc9208f7ee013ffe47451487b582292300312ac1d (patch)
tree2d21046e2798a17e3591012a68b1d494f9a953c9 /test
parent914af23b3d13c7e5f9439621db80a595ad9a0fb8 (diff)
downloadandroid-node-v8-c9208f7ee013ffe47451487b582292300312ac1d.tar.gz
android-node-v8-c9208f7ee013ffe47451487b582292300312ac1d.tar.bz2
android-node-v8-c9208f7ee013ffe47451487b582292300312ac1d.zip
test: remove potential race condition in https renegotiation test
In test/pummel/test-https-ci-reneg-attack.js, there is a boolean that is causing a race condition on some operating systems. It is unnecessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/25601 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test')
-rw-r--r--test/pummel/test-https-ci-reneg-attack.js4
1 files changed, 0 insertions, 4 deletions
diff --git a/test/pummel/test-https-ci-reneg-attack.js b/test/pummel/test-https-ci-reneg-attack.js
index f34010b1e5..50e16192e1 100644
--- a/test/pummel/test-https-ci-reneg-attack.js
+++ b/test/pummel/test-https-ci-reneg-attack.js
@@ -52,15 +52,12 @@ function test(next) {
key: fixtures.readSync('test_key.pem')
};
- let seenError = false;
-
const server = https.createServer(options, function(req, res) {
const conn = req.connection;
conn.on('error', function(err) {
console.error(`Caught exception: ${err}`);
assert(/TLS session renegotiation attack/.test(err));
conn.destroy();
- seenError = true;
});
res.end('ok');
});
@@ -78,7 +75,6 @@ function test(next) {
let renegs = 0;
child.stderr.on('data', function(data) {
- if (seenError) return;
handshakes += ((String(data)).match(/verify return:1/g) || []).length;
if (handshakes === 2) spam();
renegs += ((String(data)).match(/RENEGOTIATING/g) || []).length;