Last active
August 29, 2015 14:00
-
-
Save wsargent/11062326 to your computer and use it in GitHub Desktop.
Creates a JKS keystore that uses exampleCA as a trust anchor.
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
#!/bin/bash | |
export PW=`cat password` | |
# Create a JKS keystore that trusts the example CA, with the default password. | |
# This is used by the client. | |
keytool -import -v \ | |
-alias exampleca \ | |
-file exampleca.crt \ | |
-keypass:env PW \ | |
-storepass changeit \ | |
-keystore trustanchors.jks << EOF | |
yes | |
EOF | |
# List out the details of the store password. | |
keytool -list -v \ | |
-keystore trustanchors.jks \ | |
-storepass changeit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment