< prev index next >
test/sun/security/provider/DSA/TestKeyPairGenerator.java
Print this page
rev 12543 : 8181048: Refactor existing providers to refer to the same constants for default values for key length
Reviewed-by: mullan, ahgross
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -21,11 +21,11 @@
* questions.
*/
/*
* @test
- * @bug 4800108
+ * @bug 4800108 8181048
* @summary verify that precomputed DSA parameters are always used (512, 768, 1024, 2048 bit)
* @run main/othervm/timeout=15 TestKeyPairGenerator
*/
// this fix is really a performance fix, so this test is not foolproof
@@ -54,19 +54,16 @@
// problem was when not calling initialize()
// do that twice to artifically inflate the time
// on JDKs that do not have the fix
kpg = KeyPairGenerator.getInstance("DSA", "SUN");
kp = kpg.generateKeyPair();
- checkKeyLength(kp, 1024);
kpg = KeyPairGenerator.getInstance("DSA", "SUN");
kp = kpg.generateKeyPair();
- checkKeyLength(kp, 1024);
// some other basic tests
kp = kpg.generateKeyPair();
- checkKeyLength(kp, 1024);
kpg.initialize(1024);
kp = kpg.generateKeyPair();
checkKeyLength(kp, 1024);
< prev index next >