Skip to content

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Aug 15, 2025

On some systems, the expired root is still present, which is RSA+SHA-1 signed. This results in the chain flags also containing NotValidSignature flag.

Relax the assert for Linux to be HasFlag.

Fixes #118770
Fixes #118766

On some systems, the expired root is still present, which is RSA+SHA-1
signed. This results in the chain flags also containing
NotSignatureFlag.

Relax the assert for Linux to be HasFlag.
@vcsjones vcsjones requested a review from bartonjs August 15, 2025 13:30
@Copilot Copilot AI review requested due to automatic review settings August 15, 2025 13:30
@vcsjones vcsjones added the test-enhancement Improvements of test source code label Aug 15, 2025
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 test failure on Linux systems where an expired root certificate with RSA+SHA-1 signing is still present in the certificate store. The test was expecting only the PartialChain flag but was also getting the NotSignatureFlag due to the expired root certificate.

Key Changes:

  • Separates Linux platform handling from Android/Apple platforms in the certificate chain validation test
  • Changes the assertion for Linux from exact equality to using HasFlag to be more tolerant of additional flags

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

@bartonjs
Copy link
Member

If the expired root is still present, wouldn't that yield a full (non-partial) chain, but with some other error?

@vcsjones
Copy link
Member Author

If the expired root is still present,

That's a good point. Not sure why it got partial chain... unless the SHA-1 root is being double-penalized as "Not a good signature algorithm" and that also somehow results in it being excluded as a candidate for a trust anchor.

We have a couple options to proceed here:

  1. Merge this pull request and dig in to it, if time permits.
  2. Partial revert Fix tests on macOS 26 beta 6 #118652: the change that enabled this test for Linux and re-disable the test entirely for Linux.

@bartonjs
Copy link
Member

Eh, let's just re-suppress Linux for now. It'd be good to understand what's going on here, but re-suppressing it will at least get CI back to happ{y|ier}.

@vcsjones vcsjones enabled auto-merge (squash) August 15, 2025 18:57
@vcsjones
Copy link
Member Author

/ba-g WASM timeout; change is test only and not related to the OS for the leg that timed out.

@vcsjones vcsjones merged commit a1d5e43 into dotnet:main Aug 15, 2025
86 of 88 checks passed
@vcsjones vcsjones deleted the fix-failing-test-thing branch August 15, 2025 21:30
@vcsjones vcsjones added this to the 10.0.0 milestone Aug 16, 2025
@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.

Labels

area-System.Security test-enhancement Improvements of test source code

Projects

None yet

2 participants