summaryrefslogtreecommitdiff
path: root/test/parallel/test-tls-handshake-error.js
diff options
context:
space:
mode:
authorMark Walker <mwalker@macadamian.com>2017-10-06 10:32:00 -0700
committerRich Trott <rtrott@gmail.com>2017-10-27 06:57:03 -0700
commitc66e5551dfd6c65a75938155c39975a44bae8be2 (patch)
tree887f6a4ea76b06616ab6141ca275100a34659896 /test/parallel/test-tls-handshake-error.js
parent363091dea5fc23b1661160a378116512235a240f (diff)
downloadandroid-node-v8-c66e5551dfd6c65a75938155c39975a44bae8be2.tar.gz
android-node-v8-c66e5551dfd6c65a75938155c39975a44bae8be2.tar.bz2
android-node-v8-c66e5551dfd6c65a75938155c39975a44bae8be2.zip
test: use fixtures module in tls-handshake-error
PR-URL: https://github.com/nodejs/node/pull/15939 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'test/parallel/test-tls-handshake-error.js')
-rw-r--r--test/parallel/test-tls-handshake-error.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/parallel/test-tls-handshake-error.js b/test/parallel/test-tls-handshake-error.js
index e4a4addd37..776004cf22 100644
--- a/test/parallel/test-tls-handshake-error.js
+++ b/test/parallel/test-tls-handshake-error.js
@@ -1,16 +1,18 @@
'use strict';
const common = require('../common');
+
if (!common.hasCrypto)
common.skip('missing crypto');
const assert = require('assert');
const tls = require('tls');
-const fs = require('fs');
+
+const fixtures = require('../common/fixtures');
const server = tls.createServer({
- key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
- cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`),
+ key: fixtures.readKey('agent1-key.pem'),
+ cert: fixtures.readKey('agent1-cert.pem'),
rejectUnauthorized: true
}, function(c) {
}).listen(0, common.mustCall(function() {