summaryrefslogtreecommitdiff
path: root/test/parallel/test-tls-key-mismatch.js
diff options
context:
space:
mode:
authorKasim Doctor <kasim.doctor@appdirect.com>2017-10-06 09:40:55 -0700
committerGireesh Punathil <gpunathi@in.ibm.com>2017-10-16 10:03:14 +0530
commit006fdb2fe5d9d1681f25c44009242304740ce154 (patch)
treed3f454f6e00fdacbde36099fb76c844c33592213 /test/parallel/test-tls-key-mismatch.js
parent6bc82daef0550ca820c2c30b40670f3ee810e2c4 (diff)
downloadandroid-node-v8-006fdb2fe5d9d1681f25c44009242304740ce154.tar.gz
android-node-v8-006fdb2fe5d9d1681f25c44009242304740ce154.tar.bz2
android-node-v8-006fdb2fe5d9d1681f25c44009242304740ce154.zip
test: replace fixturesDir with common.fixtures
PR-URL: https://github.com/nodejs/node/pull/15810 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'test/parallel/test-tls-key-mismatch.js')
-rw-r--r--test/parallel/test-tls-key-mismatch.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/parallel/test-tls-key-mismatch.js b/test/parallel/test-tls-key-mismatch.js
index ed5a15c258..b0c8affade 100644
--- a/test/parallel/test-tls-key-mismatch.js
+++ b/test/parallel/test-tls-key-mismatch.js
@@ -25,15 +25,16 @@ const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
+const fixtures = require('../common/fixtures');
+
const assert = require('assert');
const tls = require('tls');
-const fs = require('fs');
const errorMessageRegex =
/^Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch$/;
const options = {
- key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
- cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`)
+ key: fixtures.readKey('agent1-key.pem'),
+ cert: fixtures.readKey('agent2-cert.pem')
};
assert.throws(function() {