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.
11 // Possible certificate files; stop after finding one.
12 var certFiles
= []string{
13 "/sys/lib/tls/ca.pem",
16 func (c
*Certificate
) systemVerify(opts
*VerifyOptions
) (chains
[][]*Certificate
, err error
) {
20 func initSystemRoots() {
21 roots
:= NewCertPool()
22 for _
, file
:= range certFiles
{
23 data
, err
:= ioutil
.ReadFile(file
)
25 roots
.AppendCertsFromPEM(data
)
31 // All of the files failed to load. systemRoots will be nil which will
32 // trigger a specific error at verification time.