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');
|
|
|
|
|
|
|
|
common.refreshTmpDir();
|
|
|
|
|
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 = {
|
2017-10-06 12:25:07 -07:00
|
|
|
cert: fixtures.readSync('test_cert.pem'),
|
|
|
|
key: fixtures.readSync('test_key.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
|
|
|
|
});
|
|
|
|
}));
|