2016-12-21 09:33:13 -08:00
|
|
|
'use strict';
|
2018-03-03 00:01:54 +05:30
|
|
|
const common = require('../common');
|
2017-07-17 15:33:46 -07:00
|
|
|
const fixtures = require('../common/fixtures');
|
2016-12-21 09:33:13 -08:00
|
|
|
|
|
|
|
// 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 {
|
2020-09-06 22:27:07 +02:00
|
|
|
connect, keys
|
2017-07-17 15:33:46 -07:00
|
|
|
} = require(fixtures.path('tls-connect'));
|
2016-12-21 09:33:13 -08:00
|
|
|
|
|
|
|
connect({
|
|
|
|
client: {
|
|
|
|
checkServerIdentity: (servername, cert) => { },
|
2017-04-28 04:06:42 +03:00
|
|
|
ca: `${keys.agent1.cert}\n${keys.agent6.ca}`,
|
2016-12-21 09:33:13 -08:00
|
|
|
},
|
|
|
|
server: {
|
|
|
|
cert: keys.agent6.cert,
|
|
|
|
key: keys.agent6.key,
|
|
|
|
},
|
2020-09-06 22:27:07 +02:00
|
|
|
}, common.mustSucceed((pair, cleanup) => {
|
2016-12-21 09:33:13 -08:00
|
|
|
return cleanup();
|
2018-03-03 00:01:54 +05:30
|
|
|
}));
|