Skip to content

Instantly share code, notes, and snippets.

@dzeikei
Last active December 15, 2015 23:39
Show Gist options
  • Select an option

  • Save dzeikei/5341753 to your computer and use it in GitHub Desktop.

Select an option

Save dzeikei/5341753 to your computer and use it in GitHub Desktop.

Revisions

  1. dzeikei revised this gist Apr 9, 2013. 2 changed files with 7 additions and 1 deletion.
    7 changes: 7 additions & 0 deletions SSLPinning
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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
    1 change: 0 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    openssl s_client -connect {hostname}:443 | openssl x509 -pubkey -noout
  2. dzeikei created this gist Apr 9, 2013.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    openssl s_client -connect {hostname}:443 | openssl x509 -pubkey -noout