Skip to content

Instantly share code, notes, and snippets.

@wsargent
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wsargent/11062326 to your computer and use it in GitHub Desktop.
Save wsargent/11062326 to your computer and use it in GitHub Desktop.
Creates a JKS keystore that uses exampleCA as a trust anchor.
#!/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