From a178943d01604b8d19ac862b6dd2c7dc6409c8b8 Mon Sep 17 00:00:00 2001 From: Phil Porada Date: Fri, 31 Mar 2023 16:27:12 -0400 Subject: [PATCH] bad-key-revoker: Reduce probability of hash collision during testing (#6790) Create a jwkHash of 32 bytes rather than 2 bytes to reduce the probability of a hash collision in the `TestInvoke` function. Fixes https://github.com/letsencrypt/boulder/issues/6789 --- cmd/bad-key-revoker/main_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bad-key-revoker/main_test.go b/cmd/bad-key-revoker/main_test.go index e3bc8230a..1051226e5 100644 --- a/cmd/bad-key-revoker/main_test.go +++ b/cmd/bad-key-revoker/main_test.go @@ -81,7 +81,7 @@ func TestSelectUncheckedRows(t *testing.T) { func insertRegistration(t *testing.T, dbMap *db.WrappedMap, fc clock.Clock, addrs ...string) int64 { t.Helper() - jwkHash := make([]byte, 2) + jwkHash := make([]byte, 32) _, err := rand.Read(jwkHash) test.AssertNotError(t, err, "failed to read rand") contactStr := "[]"