root.go 327 B

1234567891011121314151617
  1. // Copyright 2012 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package x509
  5. import "sync"
  6. var (
  7. once sync.Once
  8. systemRoots *CertPool
  9. )
  10. func systemRootsPool() *CertPool {
  11. once.Do(initSystemRoots)
  12. return systemRoots
  13. }