mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
tls: fix createSecureContext() cipher list filter
PR-URL: https://github.com/nodejs/node/pull/27614 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
10c5171d57
commit
ae749e7a29
2 changed files with 12 additions and 1 deletions
|
@ -163,7 +163,8 @@ exports.createSecureContext = function createSecureContext(options) {
|
|||
// cipher suites all have a standard name format beginning with TLS_, so split
|
||||
// the ciphers and pass them to the appropriate API.
|
||||
const ciphers = (options.ciphers || tls.DEFAULT_CIPHERS).split(':');
|
||||
const cipherList = ciphers.filter((_) => !_.match(/^TLS_/)).join(':');
|
||||
const cipherList = ciphers.filter((_) => !_.match(/^TLS_/) &&
|
||||
_.length > 0).join(':');
|
||||
const cipherSuites = ciphers.filter((_) => _.match(/^TLS_/)).join(':');
|
||||
|
||||
if (cipherSuites === '' && cipherList === '') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue