Skip to content

Commit cef5010

Browse files
ckarandeBethGriggs
authored andcommitted
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: #28758 Refs: #26821 PR-URL: #28827 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
1 parent 2afbb3e commit cef5010

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

doc/api/cli.md

+2
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ greater than `4` (its current default value). For more information, see the
773773
[`Buffer`]: buffer.html#buffer_class_buffer
774774
[`SlowBuffer`]: buffer.html#buffer_class_slowbuffer
775775
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn
776+
[`tls.DEFAULT_MAX_VERSION`]: tls.html#tls_tls_default_max_version
777+
[`tls.DEFAULT_MIN_VERSION`]: tls.html#tls_tls_default_min_version
776778
[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
777779
[REPL]: repl.html
778780
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage

doc/api/tls.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -1198,12 +1198,12 @@ changes:
11981198
`object.passphrase` if provided, or `options.passphrase` if it is not.
11991199
* `maxVersion` {string} Optionally set the maximum TLS version to allow. One
12001200
of `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
1201-
`secureProtocol` option, use one or the other. **Default:** `'TLSv1.2'`.
1201+
`secureProtocol` option, use one or the other. **Default:** [`tls.DEFAULT_MAX_VERSION`][].
12021202
* `minVersion` {string} Optionally set the minimum TLS version to allow. One
12031203
of `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
12041204
`secureProtocol` option, use one or the other. It is not recommended to use
12051205
less than TLSv1.2, but it may be required for interoperability.
1206-
**Default:** `'TLSv1'`.
1206+
**Default:** [`tls.DEFAULT_MIN_VERSION`][].
12071207
* `passphrase` {string} Shared passphrase used for a single private key and/or
12081208
a PFX.
12091209
* `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
13591359
default value is `'auto'`. See [`tls.createSecureContext()`] for further
13601360
information.
13611361

1362+
## tls.DEFAULT_MAX_VERSION
1363+
<!-- YAML
1364+
added: v10.6.0
1365+
-->
1366+
1367+
* {string} The default value of the `maxVersion` option of
1368+
[`tls.createSecureContext()`][]. It can be assigned any of the supported TLS
1369+
protocol versions, `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`.
1370+
**Default:** `'TLSv1.2'`.
1371+
1372+
## tls.DEFAULT_MIN_VERSION
1373+
<!-- YAML
1374+
added: v10.6.0
1375+
-->
1376+
1377+
* {string} The default value of the `minVersion` option of
1378+
[`tls.createSecureContext()`][]. It can be assigned any of the supported TLS
1379+
protocol versions, `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`.
1380+
**Default:** `'TLSv1'`.
1381+
13621382
## Deprecated APIs
13631383

13641384
### Class: CryptoStream

0 commit comments

Comments
 (0)