-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
crypto/x509: Go does not load root CA from System keychain on macOS #28025
Comments
Could you run and paste the output (I expect the command to fail and print) from the command here? #24652 (comment) |
Certainly. Note that
|
/cc @FiloSottile |
Hi, maybe related to both this issue and #27958. I try to access an internal server which uses a certificate signed with an intermediate cert. I completely trust the internal root CA and browsers and curl are fine with this. The server in question ships the intermediate together with it‘s own cert. Now http.Client chokes with above error and I have to add the intermediate to the System.keychain and additionally set trust for ssl connections on the intermediate certificate. |
Duplicate of #24652, thanks for running the test binary. The outstanding patches will fix it. |
Disclaimer: I'm new to Go, so please excuse my general lack of knowledge.
The issue I'm experiencing seems to be related to and/or the same as #14514. It may be related to #24652 and/or #27958, but I'm not sure.
My company uses an internal root CA that is installed into the System keychain on my work Mac. All the browsers on my system trust this root correctly, and I have no trouble connecting to internal sites with certificates signed by this root.
I'm working on a Go program that needs to connect to an API that's served with a certificate signed by this internal root CA. I'm not doing anything fancy to configure my HTTP client:
When I try to make a request to the API, I get the following error:
x509: certificate signed by unknown authority
.All the issues I could find that seem to be similar to what I'm experiencing are closed, but the issue is clearly still present. I did find some links to the
go-rootcerts
package, which does solve the problem when I configure my client like this:Obviously, having to include this just so I can develop locally is not ideal.
I have tried opening the certificate in Keychain Access and toggling the trust settings as suggested in this comment, but that didn't change anything.
What version of Go are you using (
go version
)?go version go1.11.1 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?macOS 10.13.6
What did you do?
Sorry for the lack of runnable program, but I don't think it would be helpful as the issue is somewhat specific to my system/environment.
net/http
client.What did you expect to see?
Successful request/response.
What did you see instead?
x509: certificate signed by unknown authority
The text was updated successfully, but these errors were encountered: