• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3
4if (!common.hasCrypto)
5  common.skip('missing crypto');
6
7const tmpdir = require('../common/tmpdir');
8tmpdir.refresh();
9
10const fixtures = require('../common/fixtures');
11const https = require('https');
12const options = {
13  cert: fixtures.readKey('rsa_cert.crt'),
14  key: fixtures.readKey('rsa_private.pem')
15};
16
17const server = https.createServer(options, common.mustCall((req, res) => {
18  res.end('bye\n');
19  server.close();
20}));
21
22server.listen(common.PIPE, common.mustCall(() => {
23  https.get({
24    socketPath: common.PIPE,
25    rejectUnauthorized: false
26  });
27}));
28