Debian Codegraph @

src/crypto/x509/root_linux.go

raw
1 // Copyright 2015 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 package x509
6
7 import "internal/goos"
8
9 // Possible certificate files; stop after finding one.
10 var certFiles = []string{
11 "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc.
12 "/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL 6
13 "/etc/ssl/ca-bundle.pem", // OpenSUSE
14 "/etc/pki/tls/cacert.pem", // OpenELEC
15 "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // CentOS/RHEL 7
16 "/etc/ssl/cert.pem", // Alpine Linux
17 }
18
19 // Possible directories with certificate files; all will be read.
20 var certDirectories = []string{
21 "/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139
22 "/etc/pki/tls/certs", // Fedora/RHEL
23 }
24
25 func init() {
26 if goos.IsAndroid == 1 {
27 certDirectories = append(certDirectories,
28 "/system/etc/security/cacerts", // Android system roots
29 "/data/misc/keychain/certs-added", // User trusted CA folder
30 )
31 }
32 }