Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get SHA1 fingerprints from p12 certificate?

In order to get the keys of my Android project, Google requires SHA1 fingerprint. Offered this command: keytool-list-v-keystore mystore.keystore

I went through different options, but always in an error Illegal option: Files keytool:-list [OPTION] ...

For example my command:

C:\Program Files (x86)\Java\jre7\bin>keytool -storepass mypass -list -v -keystore C:\Program Files (x86)\Java\jre7\bin\android.p12

If i set p12 file in root (c:) then i get another error - Invalid keystore format.

like image 639
Astraport Avatar asked Mar 04 '13 12:03

Astraport


People also ask

How can I get SHA-1 fingerprint for my website?

Click the “Security” icon/tab at the top of the “Page Info” dialog. Click “View Certificate”. Verify that the certificate's name under “Common Name (CN)” exactly matches what this GRC page shows. The SHA1 fingerprint is shown under “Fingerprints”.

Where can I get SHA-1 signing certificate?

If you've published your app using Play App Signing, a requirement when using Android App Bundle, you can get your SHA-1 from the Google Play Console on the Release > Setup > App Integrity page.


1 Answers

This can also be done with OpenSSL:

openssl pkcs12 -in <my pkcs12 file>.p12 -nodes -passin pass:<passphrase, or blank> |openssl x509 -noout -fingerprint
like image 73
Ludvig A. Norin Avatar answered Oct 01 '22 13:10

Ludvig A. Norin