diff options
author | Chetan Karande <kchetan.tech@gmail.com> | 2019-07-24 00:46:41 +0300 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2019-10-07 19:32:22 +0300 |
commit | cef501013541476dff0cc0b5e153627da7f0af48 (patch) | |
tree | b3409ee93010eda962caa47f56cbff4d0ba61fb0 | |
parent | 2afbb3efabd74e1121784548862f52d5d78649f0 (diff) |
doc: describe tls.DEFAULT_MIN_VERSION/_MAX_VERSION
Add documentation for tls.DEFAULT_MAX_VERSION and
tls.DEFAULT_MIN_VERSION, which existed in v10.6.0
Fixes: https://github.com/nodejs/node/issues/28758
Refs: https://github.com/nodejs/node/pull/26821
PR-URL: https://github.com/nodejs/node/pull/28827
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
-rw-r--r-- | doc/api/cli.md | 2 | ||||
-rw-r--r-- | doc/api/tls.md | 24 |
2 files changed, 24 insertions, 2 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md index 7563515b9f9..7ecb565066d 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -773,6 +773,8 @@ greater than `4` (its current default value). For more information, see the [`Buffer`]: buffer.html#buffer_class_buffer [`SlowBuffer`]: buffer.html#buffer_class_slowbuffer [`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn +[`tls.DEFAULT_MAX_VERSION`]: tls.html#tls_tls_default_max_version +[`tls.DEFAULT_MIN_VERSION`]: tls.html#tls_tls_default_min_version [Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/ [REPL]: repl.html [ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage diff --git a/doc/api/tls.md b/doc/api/tls.md index c11d748676f..5c3cebe694c 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1198,12 +1198,12 @@ changes: `object.passphrase` if provided, or `options.passphrase` if it is not. * `maxVersion` {string} Optionally set the maximum TLS version to allow. One of `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - `secureProtocol` option, use one or the other. **Default:** `'TLSv1.2'`. + `secureProtocol` option, use one or the other. **Default:** [`tls.DEFAULT_MAX_VERSION`][]. * `minVersion` {string} Optionally set the minimum TLS version to allow. One of `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the `secureProtocol` option, use one or the other. It is not recommended to use less than TLSv1.2, but it may be required for interoperability. - **Default:** `'TLSv1'`. + **Default:** [`tls.DEFAULT_MIN_VERSION`][]. * `passphrase` {string} Shared passphrase used for a single private key and/or a PFX. * `pfx` {string|string[]|Buffer|Buffer[]|Object[]} PFX or PKCS12 encoded @@ -1359,6 +1359,26 @@ The default curve name to use for ECDH key agreement in a tls server. The default value is `'auto'`. See [`tls.createSecureContext()`] for further information. +## tls.DEFAULT_MAX_VERSION +<!-- YAML +added: v10.6.0 +--> + +* {string} The default value of the `maxVersion` option of + [`tls.createSecureContext()`][]. It can be assigned any of the supported TLS + protocol versions, `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. + **Default:** `'TLSv1.2'`. + +## tls.DEFAULT_MIN_VERSION +<!-- YAML +added: v10.6.0 +--> + +* {string} The default value of the `minVersion` option of + [`tls.createSecureContext()`][]. It can be assigned any of the supported TLS + protocol versions, `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. + **Default:** `'TLSv1'`. + ## Deprecated APIs ### Class: CryptoStream |