Search code examples
aircertificatesha1fingerprint

How to get the SHA1 Signing certificate fingerprint?


I created a self-signed digital certificate (.p12 / Type: 2048-RSA) with Adobe Air to sign my Android app. How to get the SHA1 signing certificate fingerprint for it?


Solution

  • You first need to convert your cert from .p12 (pkcs12) to binary .der (DER) format to achieve this. The simplest method I can find is to use this tool.

    Alternatively, you can do this yourself by first generating a PEM cert and then the DER cert using these commands:

    openssl pkcs12 -in your_certificate.p12 -out your_certificate.pem
    openssl rsa -inform PEM -outform DER -in your_certificate.pem -out your_certificate.der
    

    Once you have your DER you can generate the SHA1 like this:

    openssl dgst -sha1 your_certificate.der