11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ciif (!common.hasCrypto) 51cb0ef41Sopenharmony_ci common.skip('missing crypto'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciconst tmpdir = require('../common/tmpdir'); 81cb0ef41Sopenharmony_citmpdir.refresh(); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures'); 111cb0ef41Sopenharmony_ciconst https = require('https'); 121cb0ef41Sopenharmony_ciconst options = { 131cb0ef41Sopenharmony_ci cert: fixtures.readKey('rsa_cert.crt'), 141cb0ef41Sopenharmony_ci key: fixtures.readKey('rsa_private.pem') 151cb0ef41Sopenharmony_ci}; 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ciconst server = https.createServer(options, common.mustCall((req, res) => { 181cb0ef41Sopenharmony_ci res.end('bye\n'); 191cb0ef41Sopenharmony_ci server.close(); 201cb0ef41Sopenharmony_ci})); 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_ciserver.listen(common.PIPE, common.mustCall(() => { 231cb0ef41Sopenharmony_ci https.get({ 241cb0ef41Sopenharmony_ci socketPath: common.PIPE, 251cb0ef41Sopenharmony_ci rejectUnauthorized: false 261cb0ef41Sopenharmony_ci }); 271cb0ef41Sopenharmony_ci})); 28