Question

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?

Was it helpful?

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

OTHER TIPS

This worked for me:

keytool -exportcert -keystore [YOUR_CERTIFICATE_PATH] -storepass [YOUR_CERT_PASSWORD]  -list -v -storetype PKCS12
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top