diff options
Diffstat (limited to 'libgo/go/crypto/x509/root.go')
-rw-r--r-- | libgo/go/crypto/x509/root.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libgo/go/crypto/x509/root.go b/libgo/go/crypto/x509/root.go index 8aae14e..787d955 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() +} |