Skip to content

Instantly share code, notes, and snippets.

@dzeikei
Last active December 15, 2015 23:39
Show Gist options
  • Save dzeikei/5341753 to your computer and use it in GitHub Desktop.
Save dzeikei/5341753 to your computer and use it in GitHub Desktop.
Get public key from a HTTPS server
Grab the certificate from the HTTPS server (e.g. Google)
$ openssl s_client -connect google.com:443
Generate a Java keystore from certificate
$ wget http://bouncycastle.org/download/bcprov-jdk16-146.jar
$ keytool -importcert -file your_signing_certificate.pem -keystore app.keystore -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov-jdk16-146.jar -storetype BKS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment