Skip to content

Instantly share code, notes, and snippets.

@vissapra
Created March 18, 2019 19:00
Show Gist options
  • Save vissapra/4bffc8742a0d945dcd40ca29c9d207c8 to your computer and use it in GitHub Desktop.
Save vissapra/4bffc8742a0d945dcd40ca29c9d207c8 to your computer and use it in GitHub Desktop.
Install SSL certificate to cacerts from remote server
openssl s_client -showcerts -connect {HOST:PORT} </dev/null 2>/dev/null|openssl x509 -outform PEM >server.pem
openssl x509 -outform der -in server.pem -out server.der
sudo keytool -import -alias your-alias -keystore jre/lib/security/cacerts -file server.der
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment