summaryrefslogtreecommitdiff
path: root/test/pummel/test-tls-ci-reneg-attack.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/pummel/test-tls-ci-reneg-attack.js')
-rw-r--r--test/pummel/test-tls-ci-reneg-attack.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/pummel/test-tls-ci-reneg-attack.js b/test/pummel/test-tls-ci-reneg-attack.js
index c8f78e0609..dd2b43ed60 100644
--- a/test/pummel/test-tls-ci-reneg-attack.js
+++ b/test/pummel/test-tls-ci-reneg-attack.js
@@ -17,7 +17,7 @@ if (!common.opensslCli) {
}
// renegotiation limits to test
-var LIMITS = [0, 1, 2, 3, 5, 10, 16];
+const LIMITS = [0, 1, 2, 3, 5, 10, 16];
{
let n = 0;
@@ -30,14 +30,14 @@ var LIMITS = [0, 1, 2, 3, 5, 10, 16];
}
function test(next) {
- var options = {
+ const options = {
cert: fs.readFileSync(common.fixturesDir + '/test_cert.pem'),
key: fs.readFileSync(common.fixturesDir + '/test_key.pem')
};
- var seenError = false;
+ let seenError = false;
- var server = tls.createServer(options, function(conn) {
+ const server = tls.createServer(options, function(conn) {
conn.on('error', function(err) {
console.error('Caught exception: ' + err);
assert(/TLS session renegotiation attack/.test(err));
@@ -48,8 +48,8 @@ function test(next) {
});
server.listen(common.PORT, function() {
- var args = ('s_client -connect 127.0.0.1:' + common.PORT).split(' ');
- var child = spawn(common.opensslCli, args);
+ const args = ('s_client -connect 127.0.0.1:' + common.PORT).split(' ');
+ const child = spawn(common.opensslCli, args);
//child.stdout.pipe(process.stdout);
//child.stderr.pipe(process.stderr);
@@ -58,8 +58,8 @@ function test(next) {
child.stderr.resume();
// count handshakes, start the attack after the initial handshake is done
- var handshakes = 0;
- var renegs = 0;
+ let handshakes = 0;
+ let renegs = 0;
child.stderr.on('data', function(data) {
if (seenError) return;
@@ -74,7 +74,7 @@ function test(next) {
process.nextTick(next);
});
- var closed = false;
+ let closed = false;
child.stdin.on('error', function(err) {
switch (err.code) {
case 'ECONNRESET':