mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 20:09:04 +00:00
.
This commit is contained in:
23
test/js/node/test/parallel/test-tls-invalid-pfx.js
Normal file
23
test/js/node/test/parallel/test-tls-invalid-pfx.js
Normal file
@@ -0,0 +1,23 @@
|
||||
'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();
|
||||
}));
|
||||
Reference in New Issue
Block a user