mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
607 B
29 lines
607 B
8 years ago
|
'use strict';
|
||
|
const common = require('../common');
|
||
|
|
||
|
if (!common.hasCrypto) {
|
||
|
common.skip('missing crypto');
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
common.refreshTmpDir();
|
||
|
|
||
|
const fs = require('fs');
|
||
|
const https = require('https');
|
||
|
const options = {
|
||
|
cert: fs.readFileSync(common.fixturesDir + '/test_cert.pem'),
|
||
|
key: fs.readFileSync(common.fixturesDir + '/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
|
||
|
});
|
||
|
}));
|