summaryrefslogtreecommitdiff
path: root/libgo/go/crypto/x509/root.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/crypto/x509/root.go')
-rw-r--r--libgo/go/crypto/x509/root.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/libgo/go/crypto/x509/root.go b/libgo/go/crypto/x509/root.go
index 8aae14e09ee..787d955be47 100644
--- a/libgo/go/crypto/x509/root.go
+++ b/libgo/go/crypto/x509/root.go
@@ -7,11 +7,16 @@ package x509
import "sync"
var (
- once sync.Once
- systemRoots *CertPool
+ once sync.Once
+ systemRoots *CertPool
+ systemRootsErr error
)
func systemRootsPool() *CertPool {
once.Do(initSystemRoots)
return systemRoots
}
+
+func initSystemRoots() {
+ systemRoots, systemRootsErr = loadSystemRoots()
+}