diff --git a/doc/api/tls.md b/doc/api/tls.md index c11d748676fd5c..a2532917826a6a 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1198,12 +1198,13 @@ 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 +1360,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 + + +* {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 + + +* {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 @@ -1485,6 +1506,8 @@ where `secureSocket` has the same API as `pair.cleartext`. [`server.setTicketKeys()`]: #tls_server_setticketkeys_keys [`socket.setTimeout(timeout)`]: #net_socket_settimeout_timeout_callback [`tls.DEFAULT_ECDH_CURVE`]: #tls_tls_default_ecdh_curve +[`tls.DEFAULT_MAX_VERSION`]: #tls_tls_default_max_version +[`tls.DEFAULT_MIN_VERSION`]: #tls_tls_default_min_version [`tls.Server`]: #tls_class_tls_server [`tls.TLSSocket.getPeerCertificate()`]: #tls_tlssocket_getpeercertificate_detailed [`tls.TLSSocket.getSession()`]: #tls_tlssocket_getsession