crypto/x509: root_cgo_darwin omits certs with number of trust settings 0 erroneously when CGO_ENABLED=1 #25649
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Darwin
Milestone
What version of Go are you using (
go version
)?go version go1.10.2 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?darwin/amd64
What did you do?
Ran
With patch from https://go-review.googlesource.com/changes/97801/revisions/1/patch?download (#24147) to inspect certs.
Looking for a very specific cert to be trusted on connections passing through Zscaler. This specific cert is coming up as "untrusted" with the patch when the OSX Keychain Access UI says it is in fact "Always Trust" in the cert info.
Example output from
go run main.go
of the above program:I can "fix" the issue by using Keychain Access to update the Trust from
Always Trust
toNever Trust
and back toAlways Trust
(closeGet Info
window between changes to persist them). The actual difference appears by querying the system with thesecurity
command as follows:Note: when importing the cert manually using the UI, the above issue is not seen as it appears the UI automatically adds trust settings.
What did you expect to see?
I expect that a cert added via
security
command would work without updating trust settings via the Keychain Access UI.What did you see instead?
Commands (like
helm
) that attempt to make secured connections fail.I started down this rabbit hole by noticing that
CGO_ENABLED=0
compiled binaries didn't see this issue whereasCGO_ENABLED=1
compiled binaries did. I finally decided to dig into it and discovered this.Possibly related to #24652
The text was updated successfully, but these errors were encountered: