< prev index next >
test/sun/security/provider/certpath/DisabledAlgorithms/CPValidatorEndEntity.java
Print this page
rev 1394 : 7109274: Restrict the use of certificates with RSA keys less than 1024 bits
Summary: This restriction is applied via the Java Security property, "jdk.certpath.disabledAlgorithms". This will impact providers that adhere to this security property.
Reviewed-by: mullan
@@ -19,16 +19,19 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+// This test case relies on updated static security property, no way to re-use
+// security property in samevm/agentvm mode.
+
/**
* @test
*
* @bug 6861062
* @summary Disable MD2 support
- *
+ * @run main/othervm CPValidatorEndEntity
* @author Xuelei Fan
*/
import java.io.*;
import java.net.SocketException;
@@ -308,10 +311,14 @@
return anchors;
}
public static void main(String args[]) throws Exception {
+ // reset the security property to make sure that the algorithms
+ // and keys used in this test are not disabled.
+ Security.setProperty("jdk.certpath.disabledAlgorithms", "MD2");
+
try {
validate(endentiry_SHA1withRSA_1024_1024,
intermediate_SHA1withRSA_1024_1024);
validate(endentiry_SHA1withRSA_1024_512,
intermediate_SHA1withRSA_512_1024);
< prev index next >