mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
17b9925393
PR-URL: https://github.com/nodejs/node/pull/49566 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
24 lines
556 B
JavaScript
24 lines
556 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
const fixtures = require('../common/fixtures');
|
|
|
|
const {
|
|
assert, connect, keys
|
|
} = require(fixtures.path('tls-connect'));
|
|
|
|
const invalidPfx = fixtures.readKey('cert-without-key.pfx');
|
|
|
|
connect({
|
|
client: {
|
|
pfx: invalidPfx,
|
|
passphrase: 'test',
|
|
rejectUnauthorized: false
|
|
},
|
|
server: keys.agent1
|
|
}, common.mustCall((e, pair, cleanup) => {
|
|
assert.strictEqual(e.message, 'Unable to load private key from PFX data');
|
|
cleanup();
|
|
}));
|