Skip to content

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Aug 15, 2025

Fixes #118118
Fixes #117963
Fixes #118350

#117428 Introduced some PAL constants to adjust SslStream behavior with regards to sending custom alerts. The PR assumed that since SslStreamPal.ApplyAlertToken is a no-op (due to no API for creating custom alert being available), the entire SslStream.CreateFatalHandshakeAlertToken would be no-op as well. This was the case on Linux and OSX, but not so on Android.

To avoid a regression in .NET 10, this PR restores the call to CreateFatalHandshakeAlertToken, but ideally, the code should be examined as to why the last call to SslStream.HandshakeInternal is needed (as any internally generated alerts should've been returned as part of the previous call).

@rzikm
Copy link
Member Author

rzikm commented Aug 15, 2025

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@rzikm rzikm requested a review from liveans August 15, 2025 08:48
@rzikm rzikm marked this pull request as ready for review August 15, 2025 10:35
@Copilot Copilot AI review requested due to automatic review settings August 15, 2025 10:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a regression introduced in PR #117428 that incorrectly assumed Android's SslStream behavior was identical to Linux/OSX regarding custom alert generation. The fix restores proper handshake teardown behavior on Android by setting CanGenerateCustomAlerts = true and removing an incorrect assertion.

Key changes:

  • Restores CanGenerateCustomAlerts = true for Android to enable proper handshake teardown
  • Removes incorrect debug assertion that was causing issues
  • Adds explanatory comment about Android's unique handshake requirements

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@rzikm
Copy link
Member Author

rzikm commented Aug 15, 2025

Affected tests pass now, other CI failures should be unreltaed.

@rzikm
Copy link
Member Author

rzikm commented Aug 15, 2025

/ba-g failing test is #118770 and is unrelated

@rzikm rzikm merged commit 2b21c73 into dotnet:main Aug 15, 2025
86 of 92 checks passed
davidnguyen-tech added a commit to davidnguyen-tech/runtime that referenced this pull request Aug 15, 2025
davidnguyen-tech added a commit that referenced this pull request Aug 18, 2025
* Enable smoke tests fixed in #118765

* Fix duplicate include
@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.