--- old/test/sun/security/pkcs11/KeyStore/Basic.java Wed May 27 22:52:22 2015 +++ new/test/sun/security/pkcs11/KeyStore/Basic.java Wed May 27 22:52:21 2015 @@ -368,7 +368,12 @@ private static void module() throws Exception { // perform Security.addProvider of P11 provider - ProviderLoader.go(System.getProperty("CUSTOM_P11_CONFIG")); + Provider p = getSunPKCS11(System.getProperty("CUSTOM_P11_CONFIG")); + if (p != null) { + Security.addProvider(p); + } else { + throw new Exception("Error: PKCS11 provider configuration failed"); + } String KS_PROVIDER = "SunPKCS11-" + System.getProperty("TOKEN");