Registry Mirror
Skip to content

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 70c24e1743dc2a520c9eb43c2a810fe7f3899944

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Main refresh preserves all four previously validated patch files byte-for-byte.
↑ Fresh baseline, all seven product TFMs, Android managed test compilation, and desktop unit suite passed.
↓ Desktop functional suite has one exact pre-existing #132950 failure; refreshed Android execution and CI remain pending.
Diagnosis confidence 9.5/10 ↑ Earlier Java observations and unfixed managed reproductions establish unavailable early cipher metadata on affected Android versions.
↑ Query deferral leaves certificate-validation timing and policy unchanged.
Evidence fit 9.5/10 ↑ API 28 reproduction produces the reported SSL_NULL_WITH_NULL_NULL parsing failure; isolated older-API regression tests previously passed with this fix.
↓ November 27 refresh has not been executed locally on Android; historical results are distinguished below.

Summary

Avoid querying negotiated connection information from Android's handshake session during certificate validation when the platform cannot supply a valid cipher:

  • Defer the early query on API 24/25 ((NONE)), API 27 (native null-cipher crash), and API 28 (SSL_NULL_WITH_NULL_NULL).
  • Preserve working callback-time information on API 26 and API 29+, along with the existing protocol/context guards and handshake-completion refresh.
  • Keep the version predicate in SslStream.Android.cs, with an Android-only call from shared code. Expand the existing root-trust regression across protocols and client/server validation roles, checking callback metadata, final connection information, and bidirectional encrypted data.

Certificate-validation timing and policy are unchanged. This PR contains only the connection-info query fix; separate rejection/exception-handling hangs discovered during testing are not addressed here.

Validation

Historical isolated-patch validation

These results were collected before the November 27 main refresh. All are from the isolated patch in this PR, without the separate rejection-handling changes.

  • System.Net.Security product target frameworks: built successfully, zero warnings/errors.
  • Android ARM64, every API 24–37, CoreCLR and Mono: 148/148 focused regression cases passed. Covers TLS 1.2, OS-default negotiation, and TLS 1.3 where available, with both certificate-validation roles.
  • Complete AndroidPlatformTrust suite on API 28: 21/21 passed on each runtime.
  • macOS ARM64 FunctionalTests: 5,048 passed, 31 existing skips. UnitTests: 131 passed, 3 existing skips.
  • Frozen APKs were checked for the exact built System.Net.Security assembly, matching runtime CoreLib, and correct native runtime host; test XML counts and protocol/role combinations were independently verified.

Full-suite execution on every Android API and other architectures was not performed for this isolated patch. Existing rejection-path hangs on other Android versions are deferred to a separate fix; no tests were disabled.

November 27 main refresh

Merged main at 546a94e68c739515edcae2a4a13cd9ba0716d378 without conflicts. The PR still changes exactly four files; their contents are byte-identical to the previous approved head.

  • CMAKE_PREFIX_PATH="$(brew --prefix icu4c@78)" ./build.sh clr+libs -rc release: passed, zero warnings/errors. The initial attempt failed to locate ICU's ucurr.h; the successful retry used the already-installed ICU 78 via a command-local search path, with no package installation or global configuration change.
  • ./dotnet.sh build src/libraries/System.Net.Security/src/System.Net.Security.csproj /p:RuntimeConfiguration=Release: passed for all seven TFMs, zero warnings/errors.
  • ./dotnet.sh build /t:Compile src/libraries/System.Net.Security/tests/AndroidPlatformTrustTests/System.Net.Security.AndroidPlatformTrust.Tests.csproj /p:TargetFramework=net12.0-android /p:TargetOS=android /p:TargetArchitecture=arm64 /p:RuntimeConfiguration=Release /p:SelfContained=false /p:RuntimeIdentifier=: passed, managed compilation only. Android packaging attempts failed because this workspace has no current Android runtime pack; no fresh local APK or Android test execution is claimed.
  • ./dotnet.sh build /t:Test src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj /p:RuntimeConfiguration=Release: 131 passed, 4 skipped, zero failures.
  • ./dotnet.sh build /t:Test src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj /p:RuntimeConfiguration=Release: 5,049 passed, 34 skipped, one failure. ConnectWithRevocation_WithCallback(checkRevocation: True) reports RevocationStatusUnknown instead of Revoked, exactly matching open pre-existing #132950. An isolated two-case run reproduced that same failure. The test is unchanged by this PR; no test was disabled or unrelated product fix added.

Fresh CI is being requested for the pushed revision; its outcome is not yet known.

Fixes #136456

Note

This PR and its description were prepared with GitHub Copilot.

Avoid querying incomplete handshake cipher information during certificate validation on Android API 24, 25, 27, and 28. Preserve early metadata on API 26 and 29+ and keep the handshake-completion refresh unchanged.

Expand Android root-trust coverage across protocols and client/server validation roles, including callback-time metadata and encrypted data exchange.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d1eb39b-b333-42a0-b862-cefce2a6c517
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@simonrozsival simonrozsival changed the title Fix SslStream handshake connection info queries on older Android versions [Android] Fix SslStream handshake connection info queries on older Android versions Oct 27, 2026
@simonrozsival

Copy link
Copy Markdown
Member Author

/azp run runtime-android

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@simonrozsival

Copy link
Copy Markdown
Member Author

/azp run runtime-android

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d1eb39b-b333-42a0-b862-cefce2a6c517
@simonrozsival

Copy link
Copy Markdown
Member Author

/azp run runtime-android

Note

This CI request was issued by GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@simonrozsival

Copy link
Copy Markdown
Member Author

/azp run runtime-android

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] SslStream on Android 9 (API 28) fails with ArgumentException "SSL_NULL_WITH_NULL_NULL" since .NET 11 Preview 4 — is this expected?

3 participants