Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix renegotiation tests in pummel #25668

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion test/pummel/test-https-ci-reneg-attack.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ function test(next) {
// Count handshakes, start the attack after the initial handshake is done
let handshakes = 0;
let renegs = 0;
let waitingToSpam = true;

child.stderr.on('data', function(data) {
handshakes += ((String(data)).match(/verify return:1/g) || []).length;
if (handshakes === 2) spam();
if (handshakes === 2 && waitingToSpam) {
waitingToSpam = false;
spam();
}
renegs += ((String(data)).match(/RENEGOTIATING/g) || []).length;
});

Expand Down
6 changes: 5 additions & 1 deletion test/pummel/test-tls-ci-reneg-attack.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,15 @@ function test(next) {
// Count handshakes, start the attack after the initial handshake is done
let handshakes = 0;
let renegs = 0;
let waitingToSpam = true;

child.stderr.on('data', function(data) {
if (seenError) return;
handshakes += ((String(data)).match(/verify return:1/g) || []).length;
if (handshakes === 2) spam();
if (handshakes === 2 && waitingToSpam) {
waitingToSpam = false;
spam();
}
renegs += ((String(data)).match(/RENEGOTIATING/g) || []).length;
});

Expand Down