@@ -235,6 +235,11 @@ understanding of the implications and risks.
235235
236236TLSv1.3 does not support renegotiation.
237237
238+ Renegotiation is deprecated (see [ DEP0213] [ ] ). A future version of Node.js will
239+ disable it by default, for servers and clients. The ` allowRenegotiation ` option
240+ of [ ` tls.createServer() ` ] [ ] and [ ` tls.connect() ` ] [ ] can be set to ` false ` to
241+ disable it now, or to ` true ` to keep it enabled when that default changes.
242+
238243### Session resumption
239244
240245Establishing a TLS session can be relatively slow. The process can be sped
@@ -901,6 +906,9 @@ connection is open.
901906<!-- YAML
902907added: v0.11.4
903908changes:
909+ - version: REPLACEME
910+ pr-url: https://github.com/nodejs/node/pull/67532
911+ description: The `allowRenegotiation` option is now supported.
904912 - version: v12.2.0
905913 pr-url: https://github.com/nodejs/node/pull/27497
906914 description: The `enableTrace` option is now supported.
@@ -927,6 +935,7 @@ changes:
927935 * ` ALPNProtocols ` : See [ ` tls.createServer() ` ] [ ]
928936 * ` SNICallback ` : See [ ` tls.createServer() ` ] [ ]
929937 * ` ALPNCallback ` : See [ ` tls.createServer() ` ] [ ]
938+ * ` allowRenegotiation ` : See [ ` tls.createServer() ` ] [ ]
930939 * ` session ` {Buffer} A ` Buffer ` instance containing a TLS session.
931940 * ` requestOCSP ` {boolean} If ` true ` , specifies that the OCSP status request
932941 extension will be added to the client hello and an ` 'OCSPResponse' ` event
@@ -1119,11 +1128,18 @@ certificate at all.
11191128
11201129<!-- YAML
11211130added: v8.4.0
1131+ deprecated: REPLACEME
11221132-->
11231133
1134+ > Stability: 0 - Deprecated. See [ DEP0213] [ ] .
1135+
11241136Disables TLS renegotiation for this ` TLSSocket ` instance. Once called, attempts
11251137to renegotiate will trigger an ` 'error' ` event on the ` TLSSocket ` .
11261138
1139+ Set ` allowRenegotiation: false ` when creating the server or connection
1140+ instead. This method has no effect on a connection created that way, where the
1141+ peer's attempts to renegotiate are refused without an error.
1142+
11271143### ` tlsSocket.enableTrace() `
11281144
11291145<!-- YAML
@@ -1586,6 +1602,7 @@ Returns the numeric representation of the remote port. For example, `443`.
15861602
15871603<!-- YAML
15881604added: v0.11.8
1605+ deprecated: REPLACEME
15891606changes:
15901607 - version: v18.0.0
15911608 pr-url: https://github.com/nodejs/node/pull/41678
@@ -1594,6 +1611,8 @@ changes:
15941611 `ERR_INVALID_CALLBACK`.
15951612-->
15961613
1614+ > Stability: 0 - Deprecated. See [ DEP0213] [ ] .
1615+
15971616* ` options ` {Object}
15981617 * ` rejectUnauthorized ` {boolean} If not ` false ` , the server certificate is
15991618 verified against the list of supplied CAs. An ` 'error' ` event is emitted if
@@ -1622,6 +1641,12 @@ When running as the server, the socket will be destroyed with an error after
16221641For TLSv1.3, renegotiation cannot be initiated, it is not supported by the
16231642protocol.
16241643
1644+ If the connection was created with ` allowRenegotiation: false ` , this method
1645+ returns ` false ` and ` callback ` is called with an
1646+ [ ` ERR_TLS_RENEGOTIATION_DISABLED ` ] [ ] error. A future version of Node.js will
1647+ disable renegotiation by default, and this method will then only work on
1648+ connections created with ` allowRenegotiation: true ` .
1649+
16251650### ` tlsSocket.servername `
16261651
16271652<!-- YAML
@@ -1740,6 +1765,9 @@ was present (see [CVE-2021-44531][]). Applications that wish to accept
17401765<!-- YAML
17411766added: v0.11.3
17421767changes:
1768+ - version: REPLACEME
1769+ pr-url: https://github.com/nodejs/node/pull/67532
1770+ description: The `allowRenegotiation` option is now supported.
17431771 - version:
17441772 - v15.1.0
17451773 - v14.18.0
@@ -1837,6 +1865,9 @@ changes:
18371865 TLS connection. When a server offers a DH parameter with a size less
18381866 than ` minDHSize ` , the TLS connection is destroyed and an error is thrown.
18391867 ** Default:** ` 1024 ` .
1868+ * ` allowRenegotiation ` {boolean} If ` true ` , the client accepts renegotiation
1869+ requested by the server. A future version of Node.js will change this default
1870+ to ` false ` (see [ DEP0213] [ ] ). ** Default:** ` true ` .
18401871 * ` highWaterMark ` {number} Consistent with the readable stream ` highWaterMark ` parameter.
18411872 ** Default:** ` 16 * 1024 ` .
18421873 * ` timeout ` : {number} If set and if a socket is created internally, will call
@@ -2209,6 +2240,9 @@ permissible, use 2048 bits or larger for stronger security.
22092240<!-- YAML
22102241added: v0.3.2
22112242changes:
2243+ - version: REPLACEME
2244+ pr-url: https://github.com/nodejs/node/pull/67532
2245+ description: The `allowRenegotiation` option is now supported.
22122246 - version: v27.0.0-alpha.0.0.0
22132247 pr-url: https://github.com/nodejs/node/pull/64777
22142248 description: Using the `clientCertEngine` option now throws
@@ -2246,6 +2280,13 @@ changes:
22462280-->
22472281
22482282* ` options ` {Object}
2283+ * ` allowRenegotiation ` {boolean} If ` true ` , connections to the server may be
2284+ renegotiated, either when requested by the client or through local calls to
2285+ [ ` tlsSocket.renegotiate() ` ] [ ] . Renegotiation is deprecated (see
2286+ [ DEP0213] [ ] ) and future versions will set this default to ` false ` .
2287+ Setting this to ` true ` throws [ ` ERR_TLS_RENEGOTIATION_UNSUPPORTED ` ] [ ]
2288+ where the TLS library does not support renegotiation on servers.
2289+ ** Default:** ` true ` .
22492290 * ` ALPNProtocols ` {string\[ ] |Buffer|TypedArray|DataView} An array of strings,
22502291 or a single ` Buffer ` , ` TypedArray ` , or ` DataView ` containing the supported
22512292 ALPN protocols. Buffers should have the format ` [len][name][len][name]... `
@@ -2585,6 +2626,7 @@ added: v0.11.3
25852626
25862627[ CVE-2021-44531 ] : https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531
25872628[ Chrome's 'modern cryptography' setting ] : https://www.chromium.org/Home/chromium-security/education/tls#TOC-Cipher-Suites
2629+ [ DEP0213 ] : deprecations.md#dep0213-tls-renegotiation
25882630[ DHE ] : https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
25892631[ ECDHE ] : https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman
25902632[ IANA TLS Supported Groups registry ] : https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8
@@ -2617,6 +2659,8 @@ added: v0.11.3
26172659[ `--use-openssl-ca` ] : cli.md#--use-bundled-ca---use-openssl-ca
26182660[ `--use-system-ca` ] : cli.md#--use-system-ca
26192661[ `Duplex` ] : stream.md#class-streamduplex
2662+ [ `ERR_TLS_RENEGOTIATION_DISABLED` ] : errors.md#err_tls_renegotiation_disabled
2663+ [ `ERR_TLS_RENEGOTIATION_UNSUPPORTED` ] : errors.md#err_tls_renegotiation_unsupported
26202664[ `NODE_EXTRA_CA_CERTS` ] : cli.md#node_extra_ca_certsfile
26212665[ `NODE_OPTIONS` ] : cli.md#node_optionsoptions
26222666[ `SSL_export_keying_material` ] : https://www.openssl.org/docs/man3.0/man3/SSL_export_keying_material.html
@@ -2652,6 +2696,7 @@ added: v0.11.3
26522696[ `tls.getCACertificates()` ] : #tlsgetcacertificatestype
26532697[ `tls.getCiphers()` ] : #tlsgetciphers
26542698[ `tls.rootCertificates` ] : #tlsrootcertificates
2699+ [ `tlsSocket.renegotiate()` ] : #tlssocketrenegotiateoptions-callback
26552700[ `x509.checkHost()` ] : crypto.md#x509checkhostname-options
26562701[ asn1.js ] : https://www.npmjs.com/package/asn1.js
26572702[ certificate object ] : #certificate-object
0 commit comments