Skip to content

Commit ba2affe

Browse files
author
Shigeki Ohtsu
committed
tls: add DHE-RSA-AES128-SHA256 to the default ciphers
`!EDH` is also removed from the list in the discussion of nodejs#8272
1 parent 46981d6 commit ba2affe

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

doc/api/tls.markdown

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,16 @@ automatically set as a listener for the [secureConnection][] event. The
142142
conjunction with the `honorCipherOrder` option described below to
143143
prioritize the non-CBC cipher.
144144

145-
Defaults to `ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH`.
146-
Consult the [OpenSSL cipher list format documentation] for details on the
147-
format.
148-
149-
`ECDHE-RSA-AES128-SHA256` and `AES128-GCM-SHA256` are TLS v1.2 ciphers and
150-
used when node.js is linked against OpenSSL 1.0.1 or newer, such as the
151-
bundled version of OpenSSL. Note that it is still possible for a TLS v1.2
152-
client to negotiate a weaker cipher unless `honorCipherOrder` is enabled.
145+
Defaults to
146+
`ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL`.
147+
Consult the [OpenSSL cipher list format documentation] for details
148+
on the format.
149+
150+
`ECDHE-RSA-AES128-SHA256`, `DHE-RSA-AES128-SHA256` and
151+
`AES128-GCM-SHA256` are TLS v1.2 ciphers and used when node.js is
152+
linked against OpenSSL 1.0.1 or newer, such as the bundled version
153+
of OpenSSL. Note that it is still possible for a TLS v1.2 client
154+
to negotiate a weaker cipher unless `honorCipherOrder` is enabled.
153155

154156
`RC4` is used as a fallback for clients that speak on older version of
155157
the TLS protocol. `RC4` has in recent years come under suspicion and

lib/tls.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ exports.CLIENT_RENEG_WINDOW = 600;
3333
exports.SLAB_BUFFER_SIZE = 10 * 1024 * 1024;
3434

3535
exports.DEFAULT_CIPHERS =
36-
'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:' + // TLS 1.2
37-
'RC4:HIGH:!MD5:!aNULL:!EDH'; // TLS 1.0
36+
// TLS 1.2
37+
'ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:AES128-GCM-SHA256:' +
38+
// TLS 1.0
39+
'RC4:HIGH:!MD5:!aNULL';
3840

3941
exports.DEFAULT_ECDH_CURVE = 'prime256v1';
4042

0 commit comments

Comments
 (0)