diff options
Diffstat (limited to 'src/pkg/crypto/rsa/rsa_test.go')
-rw-r--r-- | src/pkg/crypto/rsa/rsa_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/crypto/rsa/rsa_test.go b/src/pkg/crypto/rsa/rsa_test.go index ffd96e62f..cf193c669 100644 --- a/src/pkg/crypto/rsa/rsa_test.go +++ b/src/pkg/crypto/rsa/rsa_test.go @@ -120,8 +120,10 @@ func testKeyBasics(t *testing.T, priv *PrivateKey) { } func fromBase10(base10 string) *big.Int { - i := new(big.Int) - i.SetString(base10, 10) + i, ok := new(big.Int).SetString(base10, 10) + if !ok { + panic("bad number: " + base10) + } return i } |