aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/x509/verify_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/x509/verify_test.go')
-rw-r--r--src/crypto/x509/verify_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go
index 100a8ff0f9..c3ef503b27 100644
--- a/src/crypto/x509/verify_test.go
+++ b/src/crypto/x509/verify_test.go
@@ -540,8 +540,8 @@ func testVerify(t *testing.T, test verifyTest, useSystemRoots bool) {
func TestGoVerify(t *testing.T) {
// Temporarily enable SHA-1 verification since a number of test chains
// require it. TODO(filippo): regenerate test chains.
- defer func(old bool) { debugAllowSHA1 = old }(debugAllowSHA1)
- debugAllowSHA1 = true
+ t.Setenv("GODEBUG", "x509sha1=1")
+
for _, test := range verifyTests {
t.Run(test.name, func(t *testing.T) {
testVerify(t, test, false)