diff --git a/test/parallel/test-tls-client-getephemeralkeyinfo.js b/test/parallel/test-tls-client-getephemeralkeyinfo.js index a73f0fafd9dd6a..50848a420d57bc 100644 --- a/test/parallel/test-tls-client-getephemeralkeyinfo.js +++ b/test/parallel/test-tls-client-getephemeralkeyinfo.js @@ -6,7 +6,6 @@ const fixtures = require('../common/fixtures'); const assert = require('assert'); const tls = require('tls'); -const fs = require('fs'); const key = fixtures.readKey('agent2-key.pem'); const cert = fixtures.readKey('agent2-cert.pem'); @@ -15,9 +14,7 @@ let ntests = 0; let nsuccess = 0; function loadDHParam(n) { - let path = fixtures.fixturesDir; - if (n !== 'error') path += '/keys'; - return fs.readFileSync(`${path}/dh${n}.pem`); + return fixtures.readKey(`dh${n}.pem`); } const cipherlist = { diff --git a/test/parallel/test-tls-client-mindhsize.js b/test/parallel/test-tls-client-mindhsize.js index 51ea1f08b71c90..aab719ad44e4e3 100644 --- a/test/parallel/test-tls-client-mindhsize.js +++ b/test/parallel/test-tls-client-mindhsize.js @@ -14,10 +14,7 @@ let nsuccess = 0; let nerror = 0; function loadDHParam(n) { - const params = [`dh${n}.pem`]; - if (n !== 'error') - params.unshift('keys'); - return fixtures.readSync(params); + return fixtures.readKey(`dh${n}.pem`); } function test(size, err, next) {