* gcc.dg/guality/guality.exp: Skip on AIX.
[official-gcc.git] / libgo / go / crypto / x509 / root_plan9.go
blob9965caadee3a887dd744f30051deacb51692cb57
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.
5 // +build plan9
7 package x509
9 import "io/ioutil"
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) {
17 return nil, nil
20 func initSystemRoots() {
21 roots := NewCertPool()
22 for _, file := range certFiles {
23 data, err := ioutil.ReadFile(file)
24 if err == nil {
25 roots.AppendCertsFromPEM(data)
26 systemRoots = roots
27 return
31 // All of the files failed to load. systemRoots will be nil which will
32 // trigger a specific error at verification time.