From ac0714038e2ccd40219205aa7c4a070116cd2b7f Mon Sep 17 00:00:00 2001 From: Octavian Ionescu Date: Mon, 6 Nov 2017 17:13:49 +0200 Subject: [PATCH] test: reaplace fixturesDir with usage of fixtures module repalce common.fixturesDir with usage of the fixtures module Signed-off-by: Octavian Ionescu --- test/parallel/test-tls-ecdh-disable.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-ecdh-disable.js b/test/parallel/test-tls-ecdh-disable.js index 24ebeb37605115..e38683239bc9be 100644 --- a/test/parallel/test-tls-ecdh-disable.js +++ b/test/parallel/test-tls-ecdh-disable.js @@ -19,8 +19,14 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +/** + * It tests the usage of ecliptic curves will not be used + * if it is disabled from server initialization + */ + 'use strict'; const common = require('../common'); +const { readKey } = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -30,11 +36,10 @@ if (!common.opensslCli) const assert = require('assert'); const tls = require('tls'); 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: readKey('agent2-key.pem'), + cert: readKey('agent2-cert.pem'), ciphers: 'ECDHE-RSA-AES128-SHA', ecdhCurve: false };