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