From e137c6a0f46e6574a93ead0794a9e57e100ada03 Mon Sep 17 00:00:00 2001 From: Oliver Luebeck Date: Fri, 6 Oct 2017 10:13:08 -0700 Subject: [PATCH 1/2] test: replacing common.fixturesDir with common.fixtures module for test-tls-honorcipherorder.js --- test/parallel/test-tls-honorcipherorder.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-honorcipherorder.js b/test/parallel/test-tls-honorcipherorder.js index a9d35a01baca51..64dd077940244c 100644 --- a/test/parallel/test-tls-honorcipherorder.js +++ b/test/parallel/test-tls-honorcipherorder.js @@ -1,5 +1,6 @@ 'use strict'; const common = require('../common'); +const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -21,8 +22,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(fixtures.path('/keys/agent2-key.pem')), + cert: fs.readFileSync(fixtures.path('/keys/agent2-cert.pem')), ciphers: 'AES256-SHA256:AES128-GCM-SHA256:AES128-SHA256:' + 'ECDHE-RSA-AES128-GCM-SHA256', honorCipherOrder: !!honorCipherOrder From a74d20432d3c1e63a0752040a82d1a118b867b58 Mon Sep 17 00:00:00 2001 From: Oliver Luebeck Date: Sun, 8 Oct 2017 21:10:04 -0700 Subject: [PATCH 2/2] addressing PR feedback; using fixtures.readKey instead of fixtures.path --- test/parallel/test-tls-honorcipherorder.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-honorcipherorder.js b/test/parallel/test-tls-honorcipherorder.js index 64dd077940244c..60029bb4bd64b8 100644 --- a/test/parallel/test-tls-honorcipherorder.js +++ b/test/parallel/test-tls-honorcipherorder.js @@ -6,7 +6,6 @@ if (!common.hasCrypto) const assert = require('assert'); const tls = require('tls'); -const fs = require('fs'); let nconns = 0; @@ -22,8 +21,8 @@ process.on('exit', function() { function test(honorCipherOrder, clientCipher, expectedCipher, cb) { const soptions = { secureProtocol: SSL_Method, - key: fs.readFileSync(fixtures.path('/keys/agent2-key.pem')), - cert: fs.readFileSync(fixtures.path('/keys/agent2-cert.pem')), + key: fixtures.readKey('agent2-key.pem'), + cert: fixtures.readKey('agent2-cert.pem'), ciphers: 'AES256-SHA256:AES128-GCM-SHA256:AES128-SHA256:' + 'ECDHE-RSA-AES128-GCM-SHA256', honorCipherOrder: !!honorCipherOrder