]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: don't force system roots load in SetFallbackRoots
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Wed, 3 Sep 2025 19:01:51 +0000 (21:01 +0200)
committerMateusz Poliwczak <mpoliwczak34@gmail.com>
Thu, 4 Sep 2025 17:20:54 +0000 (10:20 -0700)
commit150fae714eb2bcf0a5fb216ac0e5c7fd76f37e02
tree8edaad515436a39042562b06329336894d998d35
parent4f7bbc62c791d7e82218dbc097294649352de684
crypto/x509: don't force system roots load in SetFallbackRoots

This change removes the need from SetFallbackRoots to force loading
of all system CAs, it postpones that to initSystemRoots.

This change also introduces few tests for SetFallbackRoots (linux only),
with the use of user and mount namespaces, such that we can control
the system CAs in the test.

Updates #73691

Change-Id: Ic37270f7825b96d5c3ed8358bbf1895a760a1312
Reviewed-on: https://go-review.googlesource.com/c/go/+/677496
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
src/crypto/x509/root.go
src/crypto/x509/root_linux_test.go [new file with mode: 0644]
src/crypto/x509/root_test.go