crypto/rsa: log key on test failure

For #74326

Change-Id: If1e61db22c9e7192e5dd56cd36141e5b6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/734640
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
This commit is contained in:
Filippo Valsorda 2026-01-08 02:23:02 +01:00 committed by Gopher Robot
parent 108b333d51
commit 088ba94439

View file

@ -145,6 +145,12 @@ d8Y7
}
func testKeyBasics(t *testing.T, priv *PrivateKey) {
defer func() {
if t.Failed() {
t.Logf("failed key: %#v", priv)
}
}()
if err := priv.Validate(); err != nil {
t.Errorf("Validate() failed: %s", err)
}