Certificates can be tricky to debug because they do not always give you a helpful error messages. To be able to turn the JVM debug mode on can be a great help. I will here show two methods to enable debug mode for SSL:
As an VM option
java -Djavax.net.debug=ssl:handshake myprogram
Or as a system property (in your code):
System.setProperty("javax.net.debug", "ssl:handshake");
Hope it will help you track down that nasty SSL bug 🙂
Tested on OSX 10.15.6, Java 1.8.0_252
0 Comments.