xref: /third_party/node/test/parallel/test-tls-ca-concat.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci// Check ca option can contain concatenated certs by prepending an unrelated
61cb0ef41Sopenharmony_ci// non-CA cert and showing that agent6's CA root is still found.
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ciconst {
91cb0ef41Sopenharmony_ci  connect, keys
101cb0ef41Sopenharmony_ci} = require(fixtures.path('tls-connect'));
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ciconnect({
131cb0ef41Sopenharmony_ci  client: {
141cb0ef41Sopenharmony_ci    checkServerIdentity: (servername, cert) => { },
151cb0ef41Sopenharmony_ci    ca: `${keys.agent1.cert}\n${keys.agent6.ca}`,
161cb0ef41Sopenharmony_ci  },
171cb0ef41Sopenharmony_ci  server: {
181cb0ef41Sopenharmony_ci    cert: keys.agent6.cert,
191cb0ef41Sopenharmony_ci    key: keys.agent6.key,
201cb0ef41Sopenharmony_ci  },
211cb0ef41Sopenharmony_ci}, common.mustSucceed((pair, cleanup) => {
221cb0ef41Sopenharmony_ci  return cleanup();
231cb0ef41Sopenharmony_ci}));
24

Indexes created Thu Nov 07 10:32:03 CST 2024