Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
fixup: parallel/tls-delayed* – tls-invoke-queued
  • Loading branch information
vsemozhetbyt committed May 5, 2017
commit 32a0b995559e945566a89379283e6581688bdf23
4 changes: 2 additions & 2 deletions test/parallel/test-tls-delayed-attach-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const net = require('net');
const bonkers = Buffer.alloc(1024, 42);

const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem')
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
};

const server = net.createServer(common.mustCall(function(c) {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-delayed-attach.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const sent = 'hello world';
let received = '';

const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem')
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
};

const server = net.createServer(function(c) {
Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-tls-dhe.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const tls = require('tls');

const spawn = require('child_process').spawn;
const fs = require('fs');
const key = fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem');
const cert = fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem');
const key = fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`);
const cert = fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`);
let nsuccess = 0;
let ntests = 0;
const ciphers = 'DHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
Expand All @@ -51,7 +51,7 @@ common.expectWarning('SecurityWarning',
function loadDHParam(n) {
let path = common.fixturesDir;
if (n !== 'error') path += '/keys';
return fs.readFileSync(path + '/dh' + n + '.pem');
return fs.readFileSync(`${path}/dh${n}.pem`);
}

function test(keylen, expectedCipher, cb) {
Expand Down Expand Up @@ -88,7 +88,7 @@ function test(keylen, expectedCipher, cb) {
client.stdout.on('end', function() {
// DHE key length can be checked -brief option in s_client but it
// is only supported in openssl 1.0.2 so we cannot check it.
const reg = new RegExp('Cipher : ' + expectedCipher);
const reg = new RegExp(`Cipher : ${expectedCipher}`);
if (reg.test(out)) {
nsuccess++;
server.close();
Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-tls-ecdh-disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ const exec = require('child_process').exec;
const fs = require('fs');

const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem'),
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`),
ciphers: 'ECDHE-RSA-RC4-SHA',
ecdhCurve: false
};

const server = tls.createServer(options, common.mustNotCall());

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

// for the performance and stability issue in s_client on Windows
if (common.isWindows)
Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-tls-ecdh.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const exec = require('child_process').exec;
const fs = require('fs');

const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem'),
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`),
ciphers: '-ALL:ECDHE-RSA-AES128-SHA256',
ecdhCurve: 'prime256v1'
};
Expand All @@ -52,8 +52,8 @@ const server = tls.createServer(options, common.mustCall(function(conn) {
}));

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

// for the performance and stability issue in s_client on Windows
if (common.isWindows)
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-env-bad-extra-ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (process.env.CHILD) {

const env = {
CHILD: 'yes',
NODE_EXTRA_CA_CERTS: common.fixturesDir + '/no-such-file-exists',
NODE_EXTRA_CA_CERTS: `${common.fixturesDir}/no-such-file-exists`,
};

const opts = {
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-tls-env-extra-ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ if (process.env.CHILD) {
}

const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'),
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`),
};

const server = tls.createServer(options, function(s) {
Expand All @@ -36,7 +36,7 @@ const server = tls.createServer(options, function(s) {
const env = {
CHILD: 'yes',
PORT: this.address().port,
NODE_EXTRA_CA_CERTS: common.fixturesDir + '/keys/ca1-cert.pem',
NODE_EXTRA_CA_CERTS: `${common.fixturesDir}/keys/ca1-cert.pem`,
};

fork(__filename, {env: env}).on('exit', common.mustCall(function(status) {
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-tls-fast-writing.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const tls = require('tls');
const fs = require('fs');

const dir = common.fixturesDir;
const options = { key: fs.readFileSync(dir + '/test_key.pem'),
cert: fs.readFileSync(dir + '/test_cert.pem'),
ca: [ fs.readFileSync(dir + '/test_ca.pem') ] };
const options = { key: fs.readFileSync(`${dir}/test_key.pem`),
cert: fs.readFileSync(`${dir}/test_cert.pem`),
ca: [ fs.readFileSync(`${dir}/test_ca.pem`) ] };

const server = tls.createServer(options, onconnection);
let gotChunk = false;
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-friendly-error-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const tls = require('tls');

const fs = require('fs');

const key = fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem');
const cert = fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem');
const key = fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`);
const cert = fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`);

tls.createServer({ key: key, cert: cert }, common.mustCall(function(conn) {
conn.end();
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-getcipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const fs = require('fs');
const cipher_list = ['AES128-SHA256', 'AES256-SHA256'];
const cipher_version_pattern = /TLS|SSL/;
const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem'),
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`),
ciphers: cipher_list.join(':'),
honorCipherOrder: true
};
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-getprotocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const clientConfigs = [
];

const serverConfig = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem')
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`)
};

const server = tls.createServer(serverConfig, common.mustCall(function() {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-handshake-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const tls = require('tls');
const fs = require('fs');

const server = tls.createServer({
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'),
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`),
rejectUnauthorized: true
}, function(c) {
}).listen(0, common.mustCall(function() {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-hello-parser-failure.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const net = require('net');
const fs = require('fs');

const options = {
key: fs.readFileSync(common.fixturesDir + '/test_key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/test_cert.pem')
key: fs.readFileSync(`${common.fixturesDir}/test_key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/test_cert.pem`)
};

const bonkers = Buffer.alloc(1024 * 1024, 42);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-honorcipherorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ process.on('exit', function() {
function test(honorCipherOrder, clientCipher, expectedCipher, cb) {
const soptions = {
secureProtocol: SSL_Method,
key: fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem'),
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`),
ciphers: 'AES256-SHA256:AES128-GCM-SHA256:AES128-SHA256:' +
'ECDHE-RSA-AES128-GCM-SHA256',
honorCipherOrder: !!honorCipherOrder
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-tls-interleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const tls = require('tls');
const fs = require('fs');

const dir = common.fixturesDir;
const options = { key: fs.readFileSync(dir + '/test_key.pem'),
cert: fs.readFileSync(dir + '/test_cert.pem'),
ca: [ fs.readFileSync(dir + '/test_ca.pem') ] };
const options = { key: fs.readFileSync(`${dir}/test_key.pem`),
cert: fs.readFileSync(`${dir}/test_cert.pem`),
ca: [ fs.readFileSync(`${dir}/test_ca.pem`) ] };

const writes = [
'some server data',
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-invoke-queued.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const fs = require('fs');
let received = '';

const server = tls.createServer({
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem')
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
}, function(c) {
c._write('hello ', null, function() {
c._write('world!', null, function() {
Expand Down