github.com/emmansun/gmsm@v0.29.1/smx509/root_linux.go (about) 1 package smx509 2 3 import "runtime" 4 5 // Possible certificate files; stop after finding one. 6 var certFiles = []string{ 7 "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. 8 "/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL 6 9 "/etc/ssl/ca-bundle.pem", // OpenSUSE 10 "/etc/pki/tls/cacert.pem", // OpenELEC 11 "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // CentOS/RHEL 7 12 "/etc/ssl/cert.pem", // Alpine Linux 13 } 14 15 // Possible directories with certificate files; all will be read. 16 var certDirectories = []string{ 17 "/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139 18 "/etc/pki/tls/certs", // Fedora/RHEL 19 } 20 21 func init() { 22 if runtime.GOOS == "android" { 23 certDirectories = append(certDirectories, 24 "/system/etc/security/cacerts", // Android system roots 25 "/data/misc/keychain/certs-added", // User trusted CA folder 26 ) 27 } 28 }