It's SHA man..
Java networking with no dependencies
Based on the AWS ShaTest hence the name ShaMan, https://www.amazonsha256.com/shaTest.zip (no longer available), with some of my own additions
Usage:
$ javac ShaMan.java
$ java ShaMan
keytool -import -alias myalias -file /path/to/cert/mycert.cer -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit
(Note: use the javax.net.ssl.trustStore=
System Property in the java app to
use the custom TrustStore.)
keytool -import -alias myalias -file /path/to/cert/mycert.crt -keystore ./mykeyStore -storepass 123456
Examples
keytool -import -alias httpbinorg -file /Users/paulmyers/Desktop/httpbinorg.crt -keystore ./keyStore -storepass 123456
keytool -import -alias adobecqmsnet -file /Users/paulmyers/Desktop/adobecqmsnet.crt -keystore ./keyStore -storepass 123456
NOTE: use the -trustcacerts option to include the root CA cert in the truststore.
keytool -list -v -keystore keystore.jks
openssl x509 -noout -text -in myCert.crt
https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html
https://blogs.oracle.com/java-platform-group/diagnosing-tls,-ssl,-and-https