From 37e951cc00cfbd1905f57e4d32c1c154498ae89e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 20 Jan 2019 18:40:02 -0800 Subject: [PATCH] test: remove potential race condition in https renegotiation test In test/pummel/test-https-ci-reneg-attack.js, there is a boolean that is set by the server and checked by the client, which is a separate process launched with child_process.spawn(). The boolean is not actually required by the client and might even be causing a race condition on some operating systems. Remove it. --- test/pummel/test-https-ci-reneg-attack.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/pummel/test-https-ci-reneg-attack.js b/test/pummel/test-https-ci-reneg-attack.js index fad8cd992dd35d..d228d3c5bb47f0 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'); }); @@ -77,7 +74,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;