Retro68/gcc/libgo/go/crypto/x509/root.go

23 lines
432 B
Go
Raw Normal View History

2012-03-27 23:13:14 +00:00
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
2014-09-21 17:33:12 +00:00
package x509
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
import "sync"
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
var (
once sync.Once
systemRoots *CertPool
systemRootsErr error
2014-09-21 17:33:12 +00:00
)
2012-03-27 23:13:14 +00:00
2014-09-21 17:33:12 +00:00
func systemRootsPool() *CertPool {
once.Do(initSystemRoots)
return systemRoots
2012-03-27 23:13:14 +00:00
}
func initSystemRoots() {
systemRoots, systemRootsErr = loadSystemRoots()
}