Skip to content

Commit

Permalink
test: remove potential race condition in https renegotiation test
Browse files Browse the repository at this point in the history
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: #25601
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed May 16, 2019
1 parent b27e3c8 commit 554b562
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/pummel/test-https-ci-reneg-attack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
Expand All @@ -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;
Expand Down

0 comments on commit 554b562

Please sign in to comment.