aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/crypto/ecdsa/ecdsa_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/crypto/ecdsa/ecdsa_test.go')
-rw-r--r--libgo/go/crypto/ecdsa/ecdsa_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/libgo/go/crypto/ecdsa/ecdsa_test.go b/libgo/go/crypto/ecdsa/ecdsa_test.go
index cc22b7a..d6b4039 100644
--- a/libgo/go/crypto/ecdsa/ecdsa_test.go
+++ b/libgo/go/crypto/ecdsa/ecdsa_test.go
@@ -20,12 +20,15 @@ func testKeyGeneration(t *testing.T, c *elliptic.Curve, tag string) {
return
}
if !c.IsOnCurve(priv.PublicKey.X, priv.PublicKey.Y) {
- t.Errorf("%s: public key invalid", tag, err)
+ t.Errorf("%s: public key invalid: %s", tag, err)
}
}
func TestKeyGeneration(t *testing.T) {
testKeyGeneration(t, elliptic.P224(), "p224")
+ if testing.Short() {
+ return
+ }
testKeyGeneration(t, elliptic.P256(), "p256")
testKeyGeneration(t, elliptic.P384(), "p384")
testKeyGeneration(t, elliptic.P521(), "p521")
@@ -53,6 +56,9 @@ func testSignAndVerify(t *testing.T, c *elliptic.Curve, tag string) {
func TestSignAndVerify(t *testing.T) {
testSignAndVerify(t, elliptic.P224(), "p224")
+ if testing.Short() {
+ return
+ }
testSignAndVerify(t, elliptic.P256(), "p256")
testSignAndVerify(t, elliptic.P384(), "p384")
testSignAndVerify(t, elliptic.P521(), "p521")
@@ -214,5 +220,8 @@ func TestVectors(t *testing.T) {
if Verify(&pub, hashed, r, s) != test.ok {
t.Errorf("%d: bad result", i)
}
+ if testing.Short() {
+ break
+ }
}
}