Skip to content

Commit b814cfc

Browse files
driverktValerie Peng
authored and
Valerie Peng
committed
8178806: Better exception logging in crypto code
Reviewed-by: valeriep
1 parent 8c87a67 commit b814cfc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/java.base/share/classes/javax/crypto/JceSecurity.java.template

+5-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,11 @@ final class JceSecurity {
235235

236236
// return whether this provider is properly signed and can be used by JCE
237237
static boolean canUseProvider(Provider p) {
238-
return getVerificationResult(p) == null;
238+
Exception e = getVerificationResult(p);
239+
if (debug != null && e != null) {
240+
debug.println("Provider verification result: " + e);
241+
}
242+
return e == null;
239243
}
240244

241245
// dummy object to represent null

0 commit comments

Comments
 (0)