1'use strict'; 2const common = require('../common'); 3const fixtures = require('../common/fixtures'); 4const assert = require('assert'); 5const { fork } = require('child_process'); 6 7// This test ensures that trying to load extra certs won't throw even when 8// there is no crypto support, i.e., built with "./configure --without-ssl". 9if (process.argv[2] === 'child') { 10 // exit 11} else { 12 const NODE_EXTRA_CA_CERTS = fixtures.path('keys', 'ca1-cert.pem'); 13 14 fork( 15 __filename, 16 ['child'], 17 { env: { ...process.env, NODE_EXTRA_CA_CERTS } }, 18 ).on('exit', common.mustCall(function(status) { 19 // Client did not succeed in connecting 20 assert.strictEqual(status, 0); 21 })); 22} 23