Skip to content

Commit 1b2a3d4

Browse files
committed
Changes var to const/let in tls-ecdh; nodejs#28 from nina16
1 parent 8264a22 commit 1b2a3d4

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎test/parallel/test-tls-ecdh.js‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
2+
const common = require('../common');
3+
const assert = require('assert');
44

55
if (!common.hasCrypto) {
66
common.skip('missing crypto');
77
return;
88
}
9-
var tls = require('tls');
9+
const tls = require('tls');
1010

11-
var exec = require('child_process').exec;
12-
var fs = require('fs');
11+
const exec = require('child_process').exec;
12+
const fs = require('fs');
1313

14-
var options = {
14+
const options = {
1515
key: fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'),
1616
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem'),
1717
ciphers: '-ALL:ECDHE-RSA-AES128-SHA256',
1818
ecdhCurve: 'prime256v1'
1919
};
2020

21-
var reply = 'I AM THE WALRUS'; // something recognizable
21+
const reply = 'I AM THE WALRUS'; // something recognizable
2222

23-
var server = tls.createServer(options, common.mustCall(function(conn) {
23+
const server = tls.createServer(options, common.mustCall(function(conn) {
2424
conn.end(reply);
2525
}));
2626

2727
server.listen(0, '127.0.0.1', common.mustCall(function() {
28-
var cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers +
28+
let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers +
2929
` -connect 127.0.0.1:${this.address().port}`;
3030

3131
// for the performance and stability issue in s_client on Windows

0 commit comments

Comments
 (0)