Skip to content

Commit be8a6fd

Browse files
committed
crypto/x509: reduce test's sought number of system certs
150 is too high for some people. Reports of 132, 145, 149 on OS X. Fixes #18203 Change-Id: I559639aba7e87e07d1a1249f8b212b3f34a078ab Reviewed-on: https://go-review.googlesource.com/34019 Reviewed-by: Russ Cox <[email protected]>
1 parent 1ea60c1 commit be8a6fd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/crypto/x509/root_darwin_test.go

+7-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ func TestSystemRoots(t *testing.T) {
2626
if tt == nil {
2727
t.Fatal("no system roots")
2828
}
29-
// On Mavericks, there are 212 bundled certs; require only
30-
// 150 here, since this is just a sanity check, and the
31-
// exact number will vary over time.
29+
// On Mavericks, there are 212 bundled certs, at least
30+
// there was at one point in time on one machine.
31+
// (Maybe it was a corp laptop with extra certs?)
32+
// Other OS X users report
33+
// 135, 142, 145... Let's try requiring at least 100,
34+
// since this is just a sanity check.
3235
t.Logf("got %d roots", len(tt.certs))
33-
if want, have := 150, len(tt.certs); have < want {
36+
if want, have := 100, len(tt.certs); have < want {
3437
t.Fatalf("want at least %d system roots, have %d", want, have)
3538
}
3639
}

0 commit comments

Comments
 (0)