Skip to content

Instantly share code, notes, and snippets.

@sjeandeaux
Created April 27, 2019 02:25
Show Gist options
  • Save sjeandeaux/765b3f265f5caa9bf22ba16de7caedb2 to your computer and use it in GitHub Desktop.
Save sjeandeaux/765b3f265f5caa9bf22ba16de7caedb2 to your computer and use it in GitHub Desktop.
Import certificate from server (hostname and port)
server=google.com
server=443
alias=alias
password=changeit
keytool -printcert -sslserver ${server}:${port} -rfc > tempfile
keytool -import -noprompt -alias ${alias} -keystore knox.jks -storepass ${password} < tempfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment