mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00

PR-URL: https://github.com/nodejs/node/pull/35086 Reviewed-By: Ruy Adorno <ruyadorno@github.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
24 lines
579 B
JavaScript
24 lines
579 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
|
|
// Check ca option can contain concatenated certs by prepending an unrelated
|
|
// non-CA cert and showing that agent6's CA root is still found.
|
|
|
|
const {
|
|
connect, keys
|
|
} = require(fixtures.path('tls-connect'));
|
|
|
|
connect({
|
|
client: {
|
|
checkServerIdentity: (servername, cert) => { },
|
|
ca: `${keys.agent1.cert}\n${keys.agent6.ca}`,
|
|
},
|
|
server: {
|
|
cert: keys.agent6.cert,
|
|
key: keys.agent6.key,
|
|
},
|
|
}, common.mustSucceed((pair, cleanup) => {
|
|
return cleanup();
|
|
}));
|