From 4b74f7040852a90b049f80398bf87b1478d336f4 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Thu, 2 Dec 2021 16:43:55 +0100 Subject: [PATCH 1/2] doc: clarify the 'ciphers' list string format --- doc/api/tls.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index a9b23fc97501fc..80facabbf60302 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -361,14 +361,14 @@ The default can also be replaced on a per client or server basis using the in [`tls.createServer()`][], [`tls.connect()`][], and when creating new [`tls.TLSSocket`][]s. -The ciphers list can contain a mixture of TLSv1.3 cipher suite names, the ones -that start with `'TLS_'`, and specifications for TLSv1.2 and below cipher -suites. The TLSv1.2 ciphers support a legacy specification format, consult -the OpenSSL [cipher list format][] documentation for details, but those -specifications do _not_ apply to TLSv1.3 ciphers. The TLSv1.3 suites can only -be enabled by including their full name in the cipher list. They cannot, for -example, be enabled or disabled by using the legacy TLSv1.2 `'EECDH'` or -`'!EECDH'` specification. +The ciphers list is colon-separated and can contain a mixture of TLSv1.3 +cipher suite names, the ones that start with `'TLS_'`, and specifications for +TLSv1.2 and below cipher suites. The TLSv1.2 ciphers support a legacy +specification format, consult the OpenSSL [cipher list format][] documentation +for details, but those specifications do _not_ apply to TLSv1.3 ciphers. The +TLSv1.3 suites can only be enabled by including their full name in the cipher +list. They cannot, for example, be enabled or disabled by using the legacy +TLSv1.2 `'EECDH'` or `'!EECDH'` specification. Despite the relative order of TLSv1.3 and TLSv1.2 cipher suites, the TLSv1.3 protocol is significantly more secure than TLSv1.2, and will always be chosen @@ -1844,10 +1844,11 @@ changes: 'RSA+SHA384') or TLS v1.3 scheme names (e.g. `rsa_pss_pss_sha512`). See [OpenSSL man pages](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set1_sigalgs_list.html) for more info. - * `ciphers` {string} Cipher suite specification, replacing the default. For - more information, see [Modifying the default TLS cipher suite][]. Permitted - ciphers can be obtained via [`tls.getCiphers()`][]. Cipher names must be - uppercased in order for OpenSSL to accept them. + * `ciphers` {string} Colon-separated cipher suite specification, replacing + the default. For more information, see + [modifying the default TLS cipher suite][]. Permitted ciphers can be + obtained via [`tls.getCiphers()`][]. Cipher names must be uppercased in + order for OpenSSL to accept them. * `clientCertEngine` {string} Name of an OpenSSL engine which can provide the client certificate. * `crl` {string|string\[]|Buffer|Buffer\[]} PEM formatted CRLs (Certificate From 0b583f8cf74a05d1c5fddd2720639f5c69a55851 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Thu, 2 Dec 2021 17:02:25 +0100 Subject: [PATCH 2/2] doc: document the tls.DEFAULT_CIPHERS property --- doc/api/tls.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/api/tls.md b/doc/api/tls.md index 80facabbf60302..e912a7b1c82e64 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1849,6 +1849,7 @@ changes: [modifying the default TLS cipher suite][]. Permitted ciphers can be obtained via [`tls.getCiphers()`][]. Cipher names must be uppercased in order for OpenSSL to accept them. + **Default:** [`tls.DEFAULT_CIPHERS`][]. * `clientCertEngine` {string} Name of an OpenSSL engine which can provide the client certificate. * `crl` {string|string\[]|Buffer|Buffer\[]} PEM formatted CRLs (Certificate @@ -2177,6 +2178,21 @@ from the bundled Mozilla CA store as supplied by the current Node.js version. The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store that is fixed at release time. It is identical on all supported platforms. +## `tls.DEFAULT_CIPHERS` + + + +* {string} The default TLS cipher suites supported by this Node.js process, + as a colon-separated string. See [modifying the default TLS cipher suite][] + for further information. + ## `tls.DEFAULT_ECDH_CURVE`