Skip to content

Conversation

vcsjones
Copy link
Member

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

@Copilot Copilot AI review requested due to automatic review settings August 12, 2025 19:39
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 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.

Copy link
Contributor

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

@vcsjones vcsjones merged commit f53ffe6 into dotnet:main Aug 14, 2025
79 of 82 checks passed
@vcsjones vcsjones deleted the fix-tests-apple-26 branch August 14, 2025 01:09
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants