0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/async-hooks
Sam Roberts 42dbaed460 tls: support TLSv1.3
This introduces TLS1.3 support and makes it the default max protocol,
but also supports CLI/NODE_OPTIONS switches to disable it if necessary.

TLS1.3 is a major update to the TLS protocol, with many security
enhancements. It should be preferred over TLS1.2 whenever possible.

TLS1.3 is different enough that even though the OpenSSL APIs are
technically API/ABI compatible, that when TLS1.3 is negotiated, the
timing of protocol records and of callbacks broke assumptions hard-coded
into the 'tls' module.

This change introduces no API incompatibilities when TLS1.2 is
negotiated. It is the intention that it be backported to current and LTS
release lines with the default maximum TLS protocol reset to 'TLSv1.2'.
This will allow users of those lines to explicitly enable TLS1.3 if they
want.

API incompatibilities between TLS1.2 and TLS1.3 are:

- Renegotiation is not supported by TLS1.3 protocol, attempts to call
`.renegotiate()` will always fail.

- Compiling against a system OpenSSL lower than 1.1.1 is no longer
supported (OpenSSL-1.1.0 used to be supported with configure flags).

- Variations of `conn.write('data'); conn.destroy()` have undefined
behaviour according to the streams API. They may or may not send the
'data', and may or may not cause a ERR_STREAM_DESTROYED error to be
emitted. This has always been true, but conditions under which the write
suceeds is slightly but observably different when TLS1.3 is negotiated
vs when TLS1.2 or below is negotiated.

- If TLS1.3 is negotiated, and a server calls `conn.end()` in its
'secureConnection' listener without any data being written, the client
will not receive session tickets (no 'session' events will be emitted,
and `conn.getSession()` will never return a resumable session).

- The return value of `conn.getSession()` API may not return a resumable
session if called right after the handshake. The effect will be that
clients using the legacy `getSession()` API will resume sessions if
TLS1.2 is negotiated, but will do full handshakes if TLS1.3 is
negotiated.  See https://github.com/nodejs/node/pull/25831 for more
information.

PR-URL: https://github.com/nodejs/node/pull/26209
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-03-20 07:48:25 -07:00
..
async-hooks.status Revert "test: mark async-hooks/test-callback-error as flaky" 2018-09-05 12:39:43 +02:00
coverage.md test,doc: adjust async-hooks coverage doc for lint 2018-08-12 15:30:10 -07:00
hook-checks.js
init-hooks.js test: fix uses of deprecated assert.fail with multiple args 2018-11-10 11:45:41 -05:00
test-async-await.js tools: capitalize sentences 2018-12-10 17:07:18 +01:00
test-callback-error.js async_hooks: remove deprecated emitBefore and emitAfter 2019-03-18 11:36:48 +01:00
test-crypto-pbkdf2.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-crypto-randomBytes.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-disable-in-init.js
test-embedder.api.async-resource-no-type.js
test-embedder.api.async-resource.js async_hooks: remove deprecated emitBefore and emitAfter 2019-03-18 11:36:48 +01:00
test-embedder.api.async-resource.runInAsyncScope.js
test-emit-after-on-destroyed.js async_hooks: remove deprecated emitBefore and emitAfter 2019-03-18 11:36:48 +01:00
test-emit-before-after.js
test-emit-before-on-destroyed.js async_hooks: remove deprecated emitBefore and emitAfter 2019-03-18 11:36:48 +01:00
test-emit-init.js
test-enable-disable.js tools: capitalize sentences 2018-12-10 17:07:18 +01:00
test-enable-in-init.js test: refactor test-enable-in-init 2018-12-13 17:28:55 -08:00
test-fseventwrap.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-fsreqcallback-access.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-fsreqcallback-readFile.js tools: capitalize sentences 2018-12-10 17:07:18 +01:00
test-getaddrinforeqwrap.js doc,lib,test: capitalize comment sentences 2018-12-17 17:14:35 +01:00
test-getnameinforeqwrap.js doc,lib,test: capitalize comment sentences 2018-12-17 17:14:35 +01:00
test-graph.fsreq-readFile.js src: rename PROVIDER_FSREQWRAP to PROVIDER_FSREQCALLBACK 2018-08-01 15:07:14 -04:00
test-graph.http.js http,https: protect against slow headers attack 2018-11-28 11:36:34 +11:00
test-graph.intervals.js src: refactor timers to remove TimerWrap 2018-06-24 21:35:05 -07:00
test-graph.pipe.js
test-graph.pipeconnect.js
test-graph.shutdown.js
test-graph.signal.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
test-graph.statwatcher.js
test-graph.tcp.js
test-graph.timeouts.js src: refactor timers to remove TimerWrap 2018-06-24 21:35:05 -07:00
test-graph.tls-write-12.js tls: support TLSv1.3 2019-03-20 07:48:25 -07:00
test-graph.tls-write.js tls: support TLSv1.3 2019-03-20 07:48:25 -07:00
test-httpparser.request.js http: make parser choice a runtime flag 2018-12-06 05:21:36 +01:00
test-httpparser.response.js http: make parser choice a runtime flag 2018-12-06 05:21:36 +01:00
test-immediate.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-improper-order.js async_hooks: remove deprecated emitBefore and emitAfter 2019-03-18 11:36:48 +01:00
test-improper-unwind.js async_hooks: remove deprecated emitBefore and emitAfter 2019-03-18 11:36:48 +01:00
test-net-get-connections.js
test-nexttick-default-trigger.js
test-no-assert-when-disabled.js
test-pipeconnectwrap.js tools: capitalize sentences 2018-12-10 17:07:18 +01:00
test-pipewrap.js tools: capitalize sentences 2018-12-10 17:07:18 +01:00
test-promise.chain-promise-before-init-hooks.js benchmark,doc,lib,test: capitalize comments 2019-02-28 18:31:10 +01:00
test-promise.js test: remove unused function arguments in async-hooks tests 2018-11-18 23:31:35 -08:00
test-promise.promise-before-init-hooks.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
test-querywrap.js doc,lib,test: capitalize comment sentences 2018-12-17 17:14:35 +01:00
test-queue-microtask.js lib: implement queueMicrotask 2018-09-23 15:57:19 -05:00
test-shutdownwrap.js
test-signalwrap.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
test-statwatcher.js
test-tcpwrap.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
test-timers.setInterval.js
test-timers.setTimeout.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-tlswrap.js tls: support TLSv1.3 2019-03-20 07:48:25 -07:00
test-ttywrap.readstream.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-ttywrap.writestream.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-udpsendwrap.js doc,lib,test: capitalize comment sentences 2018-12-17 17:14:35 +01:00
test-udpwrap.js test: move tick.js from test/async-hooks to test/common 2018-10-15 07:41:12 +02:00
test-writewrap.js
test-zlib.zlib-binding.deflate.js test: remove usage of process.binding() 2019-03-07 17:43:21 +01:00
testcfg.py test: remove custom AsyncHooksTestConfiguration 2018-07-30 23:50:17 -04:00
verify-graph.js test: fix for activities in tick objects prune function 2019-03-01 11:23:31 +01:00