mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test: use common/fixtures in tls-connect-no-host
PR-URL: https://github.com/nodejs/node/pull/15986 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
ce33cffbcb
commit
c0bba73ac2
1 file changed
+3
-4
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
if (!common.hasCrypto)
|
||||
common.skip('missing crypto');
|
||||
@@ -7,11 +8,9 @@ if (!common.hasCrypto)
|
||||
const tls = require('tls');
|
||||
|
||||
const assert = require('assert');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
|
||||
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
|
||||
const cert = fixtures.readSync('test_cert.pem');
|
||||
const key = fixtures.readSync('test_key.pem');
|
||||
|
||||
// https://github.com/nodejs/node/issues/1489
|
||||
// tls.connect(options) with no options.host should accept a cert with
|
||||
|
||||
Reference in new issue
Block a user