-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix BuildChainCustomTrustStore test #117734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 the BuildChainCustomTrustStore
test that started failing in Alpine 3.22 due to the expiration of the Baltimore CyberTrust Root certificate on May 12, 2025. The certificate was subsequently removed from the system trust store, causing the test to fail when it expected the certificate to be available.
- Modifies the system trust store test case to allow untrusted root certificates
- Adds appropriate verification flags and chain status handling for expired certificates
- Aligns the test behavior with other similar tests in the codebase
src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs
Show resolved
Hide resolved
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
/backport to release/9.0-staging |
/backport to release/8.0-staging |
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/16347511153 |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/16347508992 |
The test BuildChainCustomTrustStore started failing in Alpine 3.22.
This is failing because the root certificate of the chain, "C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root" expired May 12 23:59:00 2025. Since the root certificate is expired, it was completely removed from the trust store in an update to Alpine.
This unit test was relying on the certificate being in the system trust store, which is no longer true.
This pull request changes the "use the system trust store" case to permit an untrusted root. This is consistent with what we are doing in other tests that use this chain:
runtime/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs
Lines 46 to 49 in a436284
Contributes to #117723