Skip to content

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

@timja

Description

@timja

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions