diff --git a/jdk/src/share/native/sun/security/ec/ec.c b/jdk/src/share/native/sun/security/ec/ec.c index d77f110af64..0eda7da753b 100644 --- a/jdk/src/share/native/sun/security/ec/ec.c +++ b/jdk/src/share/native/sun/security/ec/ec.c @@ -422,7 +422,7 @@ ec_GenerateRandomPrivateKey(const unsigned char *order, int len, */ if ((privKeyBytes = PORT_Alloc(2*len, kmflag)) == NULL) goto cleanup; if (randomlen != 2 * len) { - goto cleanup; + randomlen = 2 * len; } /* No need to generate - random bytes are now supplied */ /* CHECK_SEC_OK( RNG_GenerateGlobalRandomBytes(privKeyBytes, 2*len) );*/ diff --git a/jdk/test/sun/security/ec/TestEC.java b/jdk/test/sun/security/ec/TestEC.java index 0f87692a01a..12694a03c64 100644 --- a/jdk/test/sun/security/ec/TestEC.java +++ b/jdk/test/sun/security/ec/TestEC.java @@ -53,7 +53,7 @@ public class TestEC { long start = System.currentTimeMillis(); new TestECDH().main(p); new TestECDSA().main(p); - //new TestCurves().main(p); + new TestCurves().main(p); new TestKeyFactory().main(p); new TestECGenSpec().main(p); new ReadPKCS12().main(p);