netty5/testsuite
Chris Vest c982d45493 Fix a bug where SslHandler clients would not process Server Hello messages in a timely manner (#11472)
Motivation:
The TLS handshake must be able to finish on its own, without being driven by outside read calls.
This is currently not the case when TCP FastOpen is enabled.
Reads must be permitted and marked as pending, even when a channel is not active.

This is important because, with TCP FastOpen, the handshake processing of a TLS connection will start
before the connection has been established -- before the process of connecting has even been started.

The SslHandler on the client side will add the Client Hello message to the ChannelOutboundBuffer, then
issue a `ctx.read` call for the anticipated Server Hello response, and then flush the Client Hello
message which, in the case of TCP FastOpen, will cause the TCP connection to be established.

In this transaction, it is important that the `ctx.read` call is not ignored since, if auto-read is
turned off, this could delay or even prevent the Server Hello message from being processed, causing
the server-side handshake to time out.

Modification:
Attach a listener to the SslHandler.handshakeFuture in the EchoClient, that will call ctx.read.

Result:
The SocketSslEchoTest now tests that the SslHandler can finish handshakes on its own, without being driven by 3rd party ctx.read calls.
The various channel implementations have been updated to comply with this behaviour.
2021-07-15 12:01:16 +02:00
..
src/main/java/io/netty/testsuite Fix a bug where SslHandler clients would not process Server Hello messages in a timely manner (#11472) 2021-07-15 12:01:16 +02:00
.gitignore updated udt and connection test 2013-05-14 06:46:07 +02:00
pom.xml Migrate testsuite, transport-native-epoll, transport-native-kqueue, and transport-native-unix-common-tests tests to JUnit 5 (#11320) 2021-05-27 14:07:41 +02:00