by shawn.walker@binarycrusader.com:
What does 'go version' print?
$ go version
go version devel +909ea8374845 Sat Nov 08 17:12:23 2014 -0800 solaris/amd64
What steps reproduce the problem?
$ go get code.google.com/p/go.example/hello
What happened?
x509: failed to load system roots and no roots provided
What should have happened instead?
go get should succeed
Please provide any additional information below:
As of Solaris 11.2, there is now a committed, standard location for a system bundle of
CA certificates. Adding that location to the list of certFiles in
crypto/x509/root_unix.go and recompiling resolves the problem.
$ hg diff
diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
--- a/src/crypto/x509/root_unix.go
+++ b/src/crypto/x509/root_unix.go
@@ -16,6 +16,7 @@ var certFiles = []string{
"/etc/ssl/cert.pem", // OpenBSD
"/usr/local/share/certs/ca-root-nss.crt", // FreeBSD/DragonFly
"/etc/pki/tls/cacert.pem", // OpenELEC
+ "/etc/certs/ca-certificates.crt", // Solaris 11.2+
}
// Possible directories with certificate files; stop after successfully
by shawn.walker@binarycrusader.com:
What does 'go version' print? $ go version go version devel +909ea8374845 Sat Nov 08 17:12:23 2014 -0800 solaris/amd64 What steps reproduce the problem? $ go get code.google.com/p/go.example/hello What happened? x509: failed to load system roots and no roots provided What should have happened instead? go get should succeed Please provide any additional information below: As of Solaris 11.2, there is now a committed, standard location for a system bundle of CA certificates. Adding that location to the list of certFiles in crypto/x509/root_unix.go and recompiling resolves the problem. $ hg diff diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go --- a/src/crypto/x509/root_unix.go +++ b/src/crypto/x509/root_unix.go @@ -16,6 +16,7 @@ var certFiles = []string{ "/etc/ssl/cert.pem", // OpenBSD "/usr/local/share/certs/ca-root-nss.crt", // FreeBSD/DragonFly "/etc/pki/tls/cacert.pem", // OpenELEC + "/etc/certs/ca-certificates.crt", // Solaris 11.2+ } // Possible directories with certificate files; stop after successfully