Skip to content

Test failure: System.Net.Security.Tests.TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert fails with "Assert.NotNull() Failure: Value is null" #135628

Open

Description

@lewing

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1631737
Build error leg or test failing: System.Net.Security.Tests.TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert
Pull request: #134978

Error Message

{
  "ErrorMessage": [
    "ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert [FAIL]",
    "Assert.NotNull() Failure: Value is null"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Error Details

Helix work item System.Net.Security.Tests, queue windows.10.amd64.open.rt (Windows Server 2016, 10.0.14393).
Console log: https://helixr1107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-134978-merge-10223389250843eb9f/System.Net.Security.Tests/1/console.9d84ff3f.log?helixlogtype=result

System.Net.Security.Tests.TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert [FAIL]
  Assert.NotNull() Failure: Value is null
  Stack Trace:
    TlsSessionTests.cs(1841,0): at ...<ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert>b__2()
    TlsSessionTests.cs(2068,0): at TlsSessionTests.DriveHandshakeWithExternalValidationAsync(TlsBufferSession session, Stream transport, Action onSuspend)
    TlsSessionTests.cs(1836,0): at ...<ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert>b__0()
    TlsSessionTests.cs(1855,0): at TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert()

The test asserts session.GetRemoteCertificates() is non-null in the onSuspend callback (line 1841, added in #134570).
GetRemoteCertificates() is documented to return null when no intermediates were received, so on this Windows
machine the client apparently saw no peer-sent intermediates. One occurrence so far; the PR (#134978) does not touch System.Net.Security.
Searched dotnet/runtime for the test name, assertion text and the TlsSessionTests class: no existing KBE, tracker, or open PR covers it.

Note

This issue was drafted with AI/Copilot assistance.

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1631737
Error message validated: [ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert [FAIL] Assert.NotNull() Failure: Value is null]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 10/12/2026 3:51:14 PM UTC

Report

Build Repository Test Pull Request
1636677 dotnet/runtime System.Net.Security.Tests.TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert #135852
1635885 dotnet/runtime System.Net.Security.Tests.TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert #135801
1634458 dotnet/runtime System.Net.Security.Tests.TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert #135739
1631737 dotnet/runtime System.Net.Security.Tests.TlsSessionTests.ClientSession_ExternalCertificateValidation_AcceptWithDefaultValidation_FailsOnUntrustedCert #134978

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 4 4

Activity

  1. dotnet-policy-service commented on Oct 12, 2026

    @dotnet-policy-service
    Contributor

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

  2. added theissue type on Oct 15, 2026
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Oct 15, 2026
  4. added this to the 12.0.0 milestone on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions