mirror of
https://github.com/golang/go
synced 2024-11-23 20:30:04 -07:00
crypto/x509: fix comments on certDirectories
CL 205237 allowed SSL_CERT_DIR to be a colon delimited list of directories. In the case that SSL_CERT_DIR is unset, the change also made certDirectories to all be loaded rather than stopping after successfully reading at least one file from a directory. This update fixes code comments on the certDirectories package level variables to reflect current behavior. Fixes #48808 Change-Id: Id92f875545272fc6205d9955d03ea7bf844f15eb Reviewed-on: https://go-review.googlesource.com/c/go/+/354140 Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Reviewed-by: Katie Hockman <katie@golang.org> Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Katie Hockman <katie@golang.org>
This commit is contained in:
parent
06dbf6121a
commit
fd4b391849
@ -9,8 +9,7 @@ var certFiles = []string{
|
|||||||
"/var/ssl/certs/ca-bundle.crt",
|
"/var/ssl/certs/ca-bundle.crt",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possible directories with certificate files; stop after successfully
|
// Possible directories with certificate files; all will be read.
|
||||||
// reading at least one file from a directory.
|
|
||||||
var certDirectories = []string{
|
var certDirectories = []string{
|
||||||
"/var/ssl/certs",
|
"/var/ssl/certs",
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ var certFiles = []string{
|
|||||||
"/etc/openssl/certs/ca-certificates.crt", // NetBSD
|
"/etc/openssl/certs/ca-certificates.crt", // NetBSD
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possible directories with certificate files; stop after successfully
|
// Possible directories with certificate files; all will be read.
|
||||||
// reading at least one file from a directory.
|
|
||||||
var certDirectories = []string{
|
var certDirectories = []string{
|
||||||
"/etc/ssl/certs", // FreeBSD 12.2+
|
"/etc/ssl/certs", // FreeBSD 12.2+
|
||||||
"/usr/local/share/certs", // FreeBSD
|
"/usr/local/share/certs", // FreeBSD
|
||||||
|
@ -9,6 +9,5 @@ package x509
|
|||||||
// Possible certificate files; stop after finding one.
|
// Possible certificate files; stop after finding one.
|
||||||
var certFiles = []string{}
|
var certFiles = []string{}
|
||||||
|
|
||||||
// Possible directories with certificate files; stop after successfully
|
// Possible directories with certificate files; all will be read.
|
||||||
// reading at least one file from a directory.
|
|
||||||
var certDirectories = []string{}
|
var certDirectories = []string{}
|
||||||
|
@ -14,8 +14,7 @@ var certFiles = []string{
|
|||||||
"/etc/ssl/cert.pem", // Alpine Linux
|
"/etc/ssl/cert.pem", // Alpine Linux
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possible directories with certificate files; stop after successfully
|
// Possible directories with certificate files; all will be read.
|
||||||
// reading at least one file from a directory.
|
|
||||||
var certDirectories = []string{
|
var certDirectories = []string{
|
||||||
"/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139
|
"/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139
|
||||||
"/etc/pki/tls/certs", // Fedora/RHEL
|
"/etc/pki/tls/certs", // Fedora/RHEL
|
||||||
|
@ -11,8 +11,7 @@ var certFiles = []string{
|
|||||||
"/etc/ssl/cacert.pem", // OmniOS
|
"/etc/ssl/cacert.pem", // OmniOS
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possible directories with certificate files; stop after successfully
|
// Possible directories with certificate files; all will be read.
|
||||||
// reading at least one file from a directory.
|
|
||||||
var certDirectories = []string{
|
var certDirectories = []string{
|
||||||
"/etc/certs/CA",
|
"/etc/certs/CA",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user