From c78ec927ee89d61c010425d9e74cb9cdc949f596 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Sun, 7 Sep 2025 16:44:43 +0200 Subject: [PATCH] [release-branch.go1.24] crypto/internal/fips140/ecdsa: make TestingOnlyNewDRBG generic We are re-sealing the .zip file anyway for another reason, might as well take the opportunity to remove the fips140.Hash type indirection. Updates #75523 Change-Id: I6a6a6964fdb312cc2c64e327f845c398c0f6279b Reviewed-on: https://go-review.googlesource.com/c/go/+/701442 Reviewed-by: Roland Shoemaker Commit-Queue: Junyang Shao Reviewed-by: Junyang Shao TryBot-Bypass: Filippo Valsorda --- src/crypto/internal/fips140/ecdsa/hmacdrbg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/internal/fips140/ecdsa/hmacdrbg.go b/src/crypto/internal/fips140/ecdsa/hmacdrbg.go index 8f52091170..5f05e50966 100644 --- a/src/crypto/internal/fips140/ecdsa/hmacdrbg.go +++ b/src/crypto/internal/fips140/ecdsa/hmacdrbg.go @@ -121,7 +121,7 @@ func newDRBG[H fips140.Hash](hash func() H, entropy, nonce []byte, s personaliza // // This should only be used for ACVP testing. hmacDRBG is not intended to be // used directly. -func TestingOnlyNewDRBG(hash func() fips140.Hash, entropy, nonce []byte, s []byte) *hmacDRBG { +func TestingOnlyNewDRBG[H fips140.Hash](hash func() H, entropy, nonce []byte, s []byte) *hmacDRBG { return newDRBG(hash, entropy, nonce, plainPersonalizationString(s)) } -- 2.52.0