Skip to content

Instantly share code, notes, and snippets.

@xymor
Last active September 28, 2016 01:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xymor/9fcf3352df46e99e4175 to your computer and use it in GitHub Desktop.
Save xymor/9fcf3352df46e99e4175 to your computer and use it in GitHub Desktop.
Java whitelist ssl certificate
keytool -printcert -sslserver secure.fcontrol.com.br -rfc > fcontrol.pem
#alternative: openssl s_client -quiet -showcerts -connect secure.fcontrol.com.br:443 | sed -n '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > fcontrol.pem
keytool -import -trustcacerts -alias secure.fcontrol.com.br -file fcontrol.pem -keystore /home/raphaelm/projects/git-repos/ideais-kanlo/etc/kanlo2/vmfiles/etc/pki/java/cacerts
#list trusted certificates
keytool -list -keystore /home/raphaelm/projects/git-repos/ideais-kanlo/etc/kanlo2/vmfiles/etc/pki/java/cacerts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment