Skip to content

Latest commit

 

History

History
59 lines (32 loc) · 1.5 KB

README.md

File metadata and controls

59 lines (32 loc) · 1.5 KB

shaman

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

Keystore / Truststore commands

1. Use this command to install a cert in the default JVM truststore

keytool -import -alias myalias -file /path/to/cert/mycert.cer -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit

2. Use this command to install a cert in the custom JVM truststore

(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.

3. List certs in a keystore


keytool -list -v -keystore keystore.jks

4. Use openssl to look dump the data in a cert:

openssl x509 -noout -text -in myCert.crt

References

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

https://whatsmychaincert.com/