Skip to content
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

macOS: Custom chains that include intermediate certificates do not work #3

Open
timja opened this issue Jan 6, 2025 · 1 comment · May be fixed by #5
Open

macOS: Custom chains that include intermediate certificates do not work #3

timja opened this issue Jan 6, 2025 · 1 comment · May be fixed by #5

Comments

@timja
Copy link

timja commented Jan 6, 2025

Hi

In our enterprise setup we have a MiTM setup on most URLs using ZScaler (although some are bypassed).

We have a setup:

Root -> Intermediate 1 -> Intermediate 2 -> Re-signed leaf.

This doesn't work in IntelliJ and JetBrains toolbox.

I tracked down a similar bug in the JDK and created a PR for it here: openjdk/jdk#22911


See the documentation for: SecTrustSettingsCopyTrustSettings(::_:)

Specifically:

However, an empty trust settings array isn’t the same as no trust settings, where the trustSettings parameter returns NULL. No trust-settings array means “this certificate must be verifiable using a known trusted certificate”.

This is incorrectly implemented at

if (SecurityFramework.OSStatus.errSecItemNotFound.equals(rc) || trustedSettingsArray == null) {

by returning false when null.


I plan to provide a PR for this

@timja timja linked a pull request Jan 6, 2025 that will close this issue
@timja timja changed the title macOS: SecTrustSettingsCopyTrustSettings doesn't check NULL result - breaks intermediate CA certs macOS: Intermediate certificates do not work Jan 7, 2025
@timja timja changed the title macOS: Intermediate certificates do not work macOS: Custom chains that include intermediate certificates do not work Jan 7, 2025
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 a pull request may close this issue.

2 participants