-
Bug
-
Resolution: Fixed
-
P4
-
8
-
b75
-
Verified
When these two tests are run on some of the smaller profiles (that don't have all the security providers installed) then they fail with a confusing exception, eg:
java.lang.RuntimeException: Didn't catch the exception properly
at Verify.main(Verify.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:474)
at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:706)
at java.lang.Thread.run(Thread.java:722)
It would be desirable if this test were updated to fail with a useful message when the provider under test is not found, eg:
--- a/test/sun/security/x509/X509CRLImpl/Verify.java
+++ b/test/sun/security/x509/X509CRLImpl/Verify.java
@@ -148,6 +148,8 @@
throws CRLException, NoSuchAlgorithmException, InvalidKeyException,
SignatureException {
Provider provider = Security.getProvider(providerName);
+ if (provider == null)
+ throw new RuntimeException("Provider " + providerName + " not found");
crl.verify(key, provider);
}
}
Alternatively the verification could be skipped for providers that aren't installed.