Files
woodpecker/vendor/github.com/jackspirou/syscerts/root.go
6543 112d227433 Use go's vendoring (#284) (#415)
* use vendoring

* add tools.go
2021-10-08 12:41:28 +02:00

23 lines
460 B
Go

// 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 syscerts
import (
"crypto/x509"
"sync"
)
var (
once sync.Once
systemRoots *x509.CertPool
)
// SystemRootsPool attempts to find and return a pool of all all installed
// system certificates.
func SystemRootsPool() *x509.CertPool {
once.Do(initSystemRoots)
return systemRoots
}