Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto/x509: load all trusted certs on darwin
The current implementation of loadSystemRoots does not load all required (trusted) certificates in both the cgo and nocgo paths. In the nocgo path, certificates are simply not loaded from the login or System keychains. In the cgo path, certificates whos Subject doesn't match the Issuer, are ignored. This is problematic in the case of a enterprise environment with their own intermediate CAs. In this case: the issuer is a separate root, which may be loaded, but the intermediate is ignored. A TLS handshake may not include the intermediate cert, leading to an error. This change adds the System and login keychain files to the nocgo path, and removes the restriction on Issuer and Subject name matching in the cgo path. Fixes golang#16532 Change-Id: I4786d6696b338c7e0e0c7806e5d0383f99d2db89
- Loading branch information