-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix tests on macOS 26 beta 6 #118652
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
Fix tests on macOS 26 beta 6 #118652
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 updates X509 certificate chain validation tests to handle changes in macOS 26 beta 6, where Apple modified their trust store behavior. The changes address two specific test failures caused by Apple removing the blocked key list and yanking an expired root certificate from their trust store.
Key changes:
- Added detection for macOS 26 or later via
IsApplePlatform26OrLater
property - Updated test logic to handle different chain element counts based on platform version
- Modified blocked key test to account for Apple no longer maintaining a disallowed keys list
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
PlatformDetection.Unix.cs | Adds IsApplePlatform26OrLater property to detect macOS 26+ |
ChainTests.cs | Updates two test methods to handle macOS 26+ behavioral changes in certificate chain validation |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
Apple made a few changes to their trust stores in macOS 26 beta 6.
The first,
BuildChainForCertificateSignedWithDisallowedKey
is they no longer have a list of disallowed keys. Prior to macOS 26, Apple kept a list of blocked keys at /System/Library/Security/Certificates.bundle/Contents/Resources/Blocked.plist. These values in the plist were SHA-1 subjectKeyIdentifiers. This list is no longer present on macOS 26. This seems largely sensible - all of those certificates that had those subject key identifiers are distrusted by other means, such as expiration or simply no longer being present in the root store.The second,
SystemTrustCertificateWithCustomRootTrust
, is failing because Apple yanked an expired root from their trust store. So it's going in to the same logical path as OpenSSL is now.Contributes to #118645
Contributes to #118646