Skip to content

Improve Certificate Policy tests#130269

Open
bartonjs wants to merge 6 commits into
dotnet:mainfrom
bartonjs:improve_certpol_tests
Open

Improve Certificate Policy tests#130269
bartonjs wants to merge 6 commits into
dotnet:mainfrom
bartonjs:improve_certpol_tests

Conversation

@bartonjs

@bartonjs bartonjs commented Jul 6, 2026

Copy link
Copy Markdown
Member

This change adds several new certificate policy tests to better cover edge cases.

Since this is one of the areas that is just a thin projection above the Windows OS APIs on .NET Framework, the de facto answers are "our Windows behavior is right".

Copilot AI review requested due to automatic review settings July 6, 2026 23:18
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 expands X.509 certificate policy test coverage by generating more nuanced certificate chains (including a 4-cert chain with per-intermediate extensions) and validating chain-policy behavior across platforms. It also fixes a policy constraint depth accounting bug in the CertificatePolicy implementation.

Changes:

  • Extend TestDataGenerator.MakeTestChain to support per-intermediate extension sets for longer chains.
  • Add table-driven certificate policy mapping/constraint test cases and a 4-cert chain test helper in DynamicChainTests.
  • Fix incorrect depth decrement logic in CertificatePolicy.ReadPolicies for policy mapping inhibition.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/libraries/System.Security.Cryptography/tests/X509Certificates/TestDataGenerator.cs Adds a new MakeTestChain overload for per-intermediate extensions and refactors chain generation.
src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs Adds new certificate policy test cases and a TestChain4 helper (and extends TestChain3).
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePolicy.cs Fixes policy-mapping inhibition depth tracking during policy processing.

@bartonjs

bartonjs commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

Tests passed on main platforms, I'll push the whitespace change then trigger it for extra platforms

Copilot AI review requested due to automatic review settings July 7, 2026 23:46
@bartonjs

bartonjs commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings July 8, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

@bartonjs

bartonjs commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

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

Copilot AI review requested due to automatic review settings July 10, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@bartonjs

bartonjs commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

The Android failures were all the same "hey, Android seems to have changed how policies are processed" bug as #128890, so I marked the new test(s) ActiveIssue.

07-08 20:19:50.116   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 0)
07-08 20:19:50.116   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:50.116   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:50.116   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:50.116   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506

or

07-08 20:19:53.772   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 15)
07-08 20:19:53.772   797   828 I DOTNET  : Expected Flags: "PartialChain"; Actual Flags: "NotValidForUsage"
07-08 20:19:53.772   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1693
07-08 20:19:53.772   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:53.772   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
Full Log Snippet
07-08 20:19:50.116   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 0)
07-08 20:19:50.116   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:50.116   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:50.116   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:50.116   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:50.282   797   828 I DOTNET  : [SKIP] System.Security.Cryptography.X509Certificates.Tests.CollectionTests.X509ChainElementCollection_CopyTo_NonZeroLowerBound_ThrowsIndexOutOfRangeException
07-08 20:19:50.347   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 1)
07-08 20:19:50.347   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:50.347   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:50.347   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:50.347   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:50.606   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 2)
07-08 20:19:50.606   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:50.606   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:50.606   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:50.606   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:50.820   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 3)
07-08 20:19:50.820   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:50.821   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:50.821   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:50.821   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:51.126   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 4)
07-08 20:19:51.126   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:51.126   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:51.126   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:51.126   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:51.335   797   828 I DOTNET  : [SKIP] System.Security.Cryptography.Tests.AesCcmIsSupportedTests.CtorThrowsPNSEIfNotSupported
07-08 20:19:51.465   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 5)
07-08 20:19:51.465   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:51.465   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:51.465   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:51.465   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:51.633   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 6)
07-08 20:19:51.633   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:51.633   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:51.633   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:51.633   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:51.846   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 7)
07-08 20:19:51.846   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:51.846   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:51.846   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:51.846   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:52.200   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 8)
07-08 20:19:52.200   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:52.200   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:52.200   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:52.200   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:52.496   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 9)
07-08 20:19:52.496   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:52.496   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:52.496   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:52.496   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:52.685   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 10)
07-08 20:19:52.685   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:52.685   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:52.685   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:52.685   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:52.941   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 11)
07-08 20:19:52.941   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:52.941   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:52.941   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:52.941   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:53.149   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 12)
07-08 20:19:53.149   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:53.149   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:53.149   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:53.149   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:53.366   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 13)
07-08 20:19:53.366   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:53.366   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:53.366   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:53.366   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:53.556   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 14)
07-08 20:19:53.556   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:53.556   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:53.556   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:53.556   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:53.772   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 15)
07-08 20:19:53.772   797   828 I DOTNET  : Expected Flags: "PartialChain"; Actual Flags: "NotValidForUsage"
07-08 20:19:53.772   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1693
07-08 20:19:53.772   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:53.772   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:54.015   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 16)
07-08 20:19:54.015   797   828 I DOTNET  : Expected Flags: "PartialChain"; Actual Flags: "NotValidForUsage"
07-08 20:19:54.015   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1693
07-08 20:19:54.015   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:54.015   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506
07-08 20:19:54.187   797   828 I DOTNET  : [FAIL] System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(testCase: CaseID 17)
07-08 20:19:54.187   797   828 I DOTNET  : chain.Build returned True with flags (NoError) and depth 4 when (PartialChain) with depth 4 was expected
07-08 20:19:54.187   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestChain4(X509Certificate2 rootCertificate, X509Certificate2 highIntermediateCertificate, X509Certificate2 lowIntermediateCertificate, X509Certificate2 endEntityCertificate, X509ChainStatusFlags expectedFlags, Action`1 configurePolicy) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1691
07-08 20:19:54.187   797   828 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.CertificatePolicyTest(DynamicChainTests.ChainPolicyTestCase testCase) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/DynamicChainTests.cs:line 1052
07-08 20:19:54.187   797   828 I DOTNET  :    at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs:line 506

@bartonjs bartonjs enabled auto-merge (squash) July 10, 2026 16:35
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.

3 participants