GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — Fixed: Call `handshakeFailure` for TLS timeouts and early closes by chrisvest · Pull Request #18363 · netty/netty Conversation
|
|
FYI @gavinbunney |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @chrisvest - I've opened #18364 against this branch with a narrower fix to retain the behavior that ServiceTalk (I think?) is relying on. It only calls i.e. rather than unconditionally calling: try { super.userEventTriggered(ctx, evt); } finally { notifyHandshakeFailure(ctx, cause); } it is now: if (cause instanceof SslHandshakeTimeoutException || cause instanceof ClosedChannelException) { try { super.userEventTriggered(ctx, evt); } finally { notifyHandshakeFailure(ctx, cause); } } Also added a regression test for the TLS control-write failure case. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Motivation: A TLS handshake timeout or early connection close can produce a failed `SslHandshakeCompletionEvent` without an SSL `DecoderException`. `ApplicationProtocolNegotiationHandler` waits for that exception before calling `handshakeFailure`. In our proxy, this leaves the protocol-negotiation promise unresolved unless we override event handling separately. Modification: This PR calls `handshakeFailure` for completion events caused by `SslHandshakeTimeoutException` or `ClosedChannelException`. Other TLS failures retain their existing exception and close handling. The handler stays installed to consume later SSL decoder exceptions (#10342), without calling the failure callback twice. Result: Timeouts and early closes reach the failure callback without requiring a downstream event-handling override.
handshakeFailure for failed TLS completion events"handshakeFailure for TLS timeouts and early closes
|
Updated the title and description of this PR with the fix PR that was merged into this one. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
✅ All tests passed ✅🏷️ Commit: 585491d Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could not create auto-port PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could not create auto-port PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…18363) (#18366) Motivation: Port of #18363 to 5.0. A TLS handshake timeout or early connection close can produce a failed `SslHandshakeCompletionEvent` without an SSL `DecoderException`. `ApplicationProtocolNegotiationHandler` waits for that exception before calling `handshakeFailure`, which can leave protocol negotiation unresolved. Modification: Cherry-pick of 418ec43 from 4.2. It conflicted with the earlier 5.0 port of #18323 (#18328), so the 4.2 versions of `ApplicationProtocolNegotiationHandler` and its test were taken and re-adapted to the 5.0 handler API (`ChannelInboundHandler`, `channelShutdown`, `CompletionHandler`). `handshakeFailure` is now called for completion events caused by `SslHandshakeTimeoutException` or `ClosedChannelException`. Other TLS failures keep their existing exception and close handling. The handler stays installed to consume later SSL decoder exceptions (#10342), without calling the failure callback twice. Result: Timeouts and early closes reach the failure callback. `ApplicationProtocolNegotiationHandlerTest` passes. Co-authored-by: Chris Vest <[email protected]> Co-authored-by: Gavin Bunney <[email protected]>
…18363) (#18367) Motivation: Port of #18363 to 4.1. A TLS handshake timeout or early connection close can produce a failed `SslHandshakeCompletionEvent` without an SSL `DecoderException`. `ApplicationProtocolNegotiationHandler` waits for that exception before calling `handshakeFailure`, which can leave protocol negotiation unresolved. Modification: Cherry-pick of 418ec43 from 4.2. The main-code change applied cleanly. The test file conflicted with the earlier 4.1 port of #18323 (#18327), so the 4.2 version of `ApplicationProtocolNegotiationHandlerTest` was taken and adapted to the Java 6 baseline (no lambdas/streams, `final` captured locals). `handshakeFailure` is now called for completion events caused by `SslHandshakeTimeoutException` or `ClosedChannelException`. Other TLS failures keep their existing exception and close handling. The handler stays installed to consume later SSL decoder exceptions (#10342), without calling the failure callback twice. Result: Timeouts and early closes reach the failure callback. `ApplicationProtocolNegotiationHandlerTest` passes. Co-authored-by: Chris Vest <[email protected]> Co-authored-by: Gavin Bunney <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.