mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
bf6ce47259
Move tmpdir functionality to its own module (common/tmpdir). PR-URL: https://github.com/nodejs/node/pull/17856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
28 lines
613 B
JavaScript
28 lines
613 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
const https = require('https');
|
|
const options = {
|
|
cert: fixtures.readSync('test_cert.pem'),
|
|
key: fixtures.readSync('test_key.pem')
|
|
};
|
|
|
|
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
|
|
});
|
|
}));
|