Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,32 @@ module.exports = function createServers(options, listening) {

log('https | listening on %d', port);
server = https.createServer({
//
// Load default SSL key, cert and ca(s).
//
key: fs.readFileSync(path.join(ssl.root, ssl.key)),
cert: fs.readFileSync(path.join(ssl.root, ssl.cert)),
ca: ssl.ca && ssl.ca.map(
function (file) {
return fs.readFileSync(path.join(ssl.root, file));
}
),
//
// Properly expose ciphers for an A+ SSL rating:
// https://certsimple.com/blog/a-plus-node-js-ssl
//
ciphers: ssl.ciphers,
honorCipherOrder: ssl.honorCipherOrder === false ? false : true
honorCipherOrder: ssl.honorCipherOrder === false ? false : true,
//
// Optionally support SNI-based SSL.
//
SNICallback: ssl.SNICallback,
//
// Protect against the POODLE attack by disabling SSLv3
// @see http://googleonlinesecurity.blogspot.nl/2014/10/this-poodle-bites-exploiting-ssl-30.html
//
secureProtocol: 'SSLv23_method',
secureOptions: require('constants').SSL_OP_NO_SSLv3
}, ssl.handler || handler);

args = [server, port];
Expand Down