8178806: Better exception logging in crypto code

Reviewed-by: valeriep
This commit is contained in:
Kevin Driver 2023-02-09 22:31:00 +00:00 committed by Valerie Peng
parent 8c87a67419
commit b814cfc39d

View File

@ -235,7 +235,11 @@ final class JceSecurity {
// return whether this provider is properly signed and can be used by JCE
static boolean canUseProvider(Provider p) {
return getVerificationResult(p) == null;
Exception e = getVerificationResult(p);
if (debug != null && e != null) {
debug.println("Provider verification result: " + e);
}
return e == null;
}
// dummy object to represent null