Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -77,7 +74,6 @@ function test(next) {
let renegs = 0;

child.stderr.on('data', function(data) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using .on('data') without any sort of buffering might also be very brittle and something that we should fix…?

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