internal/sm2ec: check failure

This commit is contained in:
Sun Yimin 2025-10-13 17:47:53 +08:00 committed by GitHub
parent 331219bd5b
commit abb51580f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,7 +197,7 @@ func p256SqrTest(t *testing.T, x, p, r *big.Int) {
expected := new(big.Int).Mul(x, x)
expected = expected.Mod(expected, p)
if resInt.Cmp(expected) != 0 {
t.FailNow()
t.Fatalf("p256Sqr(%x) = %x, want %x", x, resInt, expected)
}
}