Skip to content

Commit d8ee4d5

Browse files
committed
Inline unnecessary intermediate variables
1 parent b107767 commit d8ee4d5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ module.exports = function createServers(options, listening) {
127127
port = +ssl.port || 443,
128128
ciphers = ssl.ciphers || CIPHERS,
129129
ca = ssl.ca,
130-
key = fs.readFileSync(path.resolve(ssl.root, ssl.key)),
131-
cert = fs.readFileSync(path.resolve(ssl.root, ssl.cert)),
132-
honorCipherOrder = !!ssl.honorCipherOrder,
133130
server,
134131
args;
135132

@@ -148,8 +145,8 @@ module.exports = function createServers(options, listening) {
148145
//
149146
// Load default SSL key, cert and ca(s).
150147
//
151-
key: key,
152-
cert: cert,
148+
key: fs.readFileSync(path.resolve(ssl.root, ssl.key)),
149+
cert: fs.readFileSync(path.resolve(ssl.root, ssl.cert)),
153150
ca: ca && ca.map(
154151
function (file) {
155152
return fs.readFileSync(path.resolve(ssl.root, file));
@@ -160,7 +157,7 @@ module.exports = function createServers(options, listening) {
160157
// https://certsimple.com/blog/a-plus-node-js-ssl
161158
//
162159
ciphers: ciphers,
163-
honorCipherOrder: honorCipherOrder,
160+
honorCipherOrder: !!ssl.honorCipherOrder,
164161
//
165162
// Protect against the POODLE attack by disabling SSLv3
166163
// @see http://googleonlinesecurity.blogspot.nl/2014/10/this-poodle-bites-exploiting-ssl-30.html

0 commit comments

Comments
 (0)