2017-06-06 15:06:45 -04:00
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
|
2017-07-01 02:29:09 +03:00
|
|
|
if (!common.hasCrypto)
|
2017-06-06 15:06:45 -04:00
|
|
|
common.skip('missing crypto');
|
|
|
|
|
2017-12-24 22:38:11 -08:00
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
|
|
tmpdir.refresh();
|
2017-06-06 15:06:45 -04:00
|
|
|
|
2017-10-06 12:25:07 -07:00
|
|
|
const fixtures = require('../common/fixtures');
|
2017-06-06 15:06:45 -04:00
|
|
|
const https = require('https');
|
|
|
|
const options = {
|
2019-05-29 11:43:44 -07:00
|
|
|
cert: fixtures.readKey('rsa_cert.crt'),
|
|
|
|
key: fixtures.readKey('rsa_private.pem')
|
2017-06-06 15:06:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
const server = https.createServer(options, common.mustCall((req, res) => {
|
|
|
|
res.end('bye\n');
|
|
|
|
server.close();
|
|
|
|
}));
|
|
|
|
|
|
|
|
server.listen(common.PIPE, common.mustCall(() => {
|
|
|
|
https.get({
|
|
|
|
socketPath: common.PIPE,
|
|
|
|
rejectUnauthorized: false
|
|
|
|
});
|
|
|
|
}));
|