File: root.go

package info (click to toggle)
golang-github-avast-apkverifier 0.0~git20191015.7330a51-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid
  • size: 1,224 kB
  • sloc: makefile: 11; sh: 8
file content (22 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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.

package x509andr

import "sync"

var (
	once           sync.Once
	systemRoots    *CertPool
	systemRootsErr error
)

func systemRootsPool() *CertPool {
	once.Do(initSystemRoots)
	return systemRoots
}

func initSystemRoots() {
	systemRoots, systemRootsErr = loadSystemRoots()
}