Last active
September 16, 2015 19:58
-
-
Save mbilski/7de2c799c0899d4060b9 to your computer and use it in GitHub Desktop.
Importing SSL cert into java keystore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n | openssl s_client -connect <HOSTNAME:PORT> | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/cert | |
keytool -importcert -alias "<ALIAS>" -file /tmp/cert -keystore <KEYSTORE> -storepass changeit -noprompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment