OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [crypto/] [tls/] [root_unix.go] - Blame information for rev 861

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2011 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
 
5
// +build freebsd linux openbsd netbsd
6
 
7
package tls
8
 
9
import (
10
        "crypto/x509"
11
        "io/ioutil"
12
)
13
 
14
// Possible certificate files; stop after finding one.
15
var certFiles = []string{
16
        "/etc/ssl/certs/ca-certificates.crt",     // Linux etc
17
        "/etc/pki/tls/certs/ca-bundle.crt",       // Fedora/RHEL
18
        "/etc/ssl/ca-bundle.pem",                 // OpenSUSE
19
        "/etc/ssl/cert.pem",                      // OpenBSD
20
        "/usr/local/share/certs/ca-root-nss.crt", // FreeBSD
21
}
22
 
23
func initDefaultRoots() {
24
        roots := x509.NewCertPool()
25
        for _, file := range certFiles {
26
                data, err := ioutil.ReadFile(file)
27
                if err == nil {
28
                        roots.AppendCertsFromPEM(data)
29
                        break
30
                }
31
        }
32
        varDefaultRoots = roots
33
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.