--- a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java Thu Jun 25 11:59:40 2015 -0700
+++ b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java Fri Jun 26 21:34:34 2015 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -27,6 +27,7 @@
* @summary Test the new RSA provider can verify all the RSA certs in the cacerts file
* @author Andreas Sterbenz
* @library ..
+ * @library ../../../../java/security/testlibrary
*/
// this test serves as our known answer test
@@ -47,7 +48,7 @@
public void main(Provider p) throws Exception {
long start = System.currentTimeMillis();
- Security.addProvider(p);
+ Providers.setAt(p, 1);
try {
String PROVIDER = p.getName();
String javaHome = System.getProperty("java.home");
@@ -75,8 +76,8 @@
}
long stop = System.currentTimeMillis();
System.out.println("All tests passed (" + (stop - start) + " ms).");
- } finally {
+ } finally {
Security.removeProvider(p.getName());
- }
+ }
}
}