mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 16:55:46 +00:00

PR-URL: https://github.com/nodejs/node/pull/16034 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
27 lines
575 B
JavaScript
27 lines
575 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
common.refreshTmpDir();
|
|
|
|
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
|
|
});
|
|
}));
|