Skip to content

crypto/x509: darwin only loads system.root keychain should also load system keychain #16532

@jostockley

Description

@jostockley

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    1.6
  2. What operating system and processor architecture are you using (go env)?
    amd64 darwin El Capitan
  3. What did you do?
    I am trying to run minikube start on a mac running el capitan. I am inside my corporate network and they have a TLS man-in-the-middle box between the internal network and the internet so that when a TLS connection is made to an internet site, it generates an SSL certificate signed by the corporate root CA. This is installed in my Mac in the system keychain since it is not possible to install trusted CA root certs in the system.root keychain. However, in src/crypto/x509/root_darwin.go I see this:
func execSecurityRoots() (*CertPool, error) {
        cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", "/System/Library/Keychains/SystemRootCertificates.keychain")
        data, err := cmd.Output()
        if err != nil {
                return nil, err
        }

        roots := NewCertPool()
        roots.AppendCertsFromPEM(data)
        return roots, nil
}

I believe the code should also load certificates from /System/Library/Keychains/SystemCACertificates.keychain

so as to pick up any user installed root certificates.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions