Skip to content

Commit

Permalink
crypto/x509: add new FreeBSD 12.2+ trusted certificate folder
Browse files Browse the repository at this point in the history
Up to FreeBSD 12.1 the package ca_root_nss was needed in order to have
certificates under /usr/local/share/certs as the base system didn't have
a system trusted certificate store.

This has been fixed in FreeBSD 12.2 using /etc/ssl/certs:
https://svnweb.freebsd.org/base?view=revision&revision=357082

Fixes #46284

Change-Id: I912b1bacc30cdf20d19e3ef9d09b69bb8055ff49
GitHub-Last-Rev: 0fa5542
GitHub-Pull-Request: #46276
Reviewed-on: https://go-review.googlesource.com/c/go/+/321190
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
  • Loading branch information
lapo-luchini authored and FiloSottile committed May 20, 2021
1 parent f8be906 commit ce9a3b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/crypto/x509/root_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var certFiles = []string{
// Possible directories with certificate files; stop after successfully
// reading at least one file from a directory.
var certDirectories = []string{
"/etc/ssl/certs", // FreeBSD 12.2+
"/usr/local/share/certs", // FreeBSD
"/etc/openssl/certs", // NetBSD
}

0 comments on commit ce9a3b7

Please sign in to comment.