Skip to content

honour Keychain trust settings when loading macOS system CAs - #2641

Open
metsw24-max wants to merge 1 commit into
yhirose:masterfrom
metsw24-max:macos-keychain-trust-settings
Open

metsw24-max wants to merge 1 commit into
yhirose:masterfrom
metsw24-max:macos-keychain-trust-settings

Conversation

@metsw24-max

Copy link
Copy Markdown
Contributor

Distrusted Keychain roots loaded as trusted CAs on macOS
The system CA loader takes every certificate that has Trust Settings in the system, admin or user domain as a trusted root without reading those settings, so a root set to "Never Trust" in Keychain Access, or trusted only for S/MIME or code signing, still verifies TLS servers. The loader now evaluates the settings for the SSL policy, with the user domain overriding admin and system, and the OpenSSL path shares the helper Mbed TLS and wolfSSL use.

Reviewer note: the decision follows SecTrustSettings.h (empty array means TrustRoot, first applicable usage constraint decides) and matches what Go's crypto/x509 did for the same issue; the unit test covers the shapes Keychain Access writes, since trust settings cannot be changed from a test without a GUI authorisation prompt.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant