I received a keystore file from a customer which I am supposed to use to sign an APK that is going to replace/update an existing APK on the play store.
Unfortunately I get the following error:
jarsigner: Certificate chain not found for: alias_name. alias_name must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.
When I try to sign the same APK with a different, self-generated keystore, this works fine, so I figured there must be something missing in the keystore.
Keystore-Typ: JKS
Keystore-Provider: SUN
Keystore enthält 1 Eintrag
Aliasname: alias_name
Erstellungsdatum: 19.05.2015
Eintragstyp: PrivateKeyEntry
Zertifikatskettenlänge: 1
Zertifikat[1]:
Eigentümer: (redacted)
Aussteller: (redacted)
Seriennummer: 5152a7xx
Gültig von: Wed Mar 27 09:00:32 CET 2013 bis: Sun Aug 12 10:00:32 CEST 2040
Zertifikat-Fingerprints:
MD5: (bla)
SHA1: (bla)
SHA256: (bla)
Signaturalgorithmusname: SHA1withRSA
Version: 3
*******************************************
*******************************************
When I compare this to a different keystore file, I notice there is an "Extension" missing. What is it, and how do I go about fixing this? Is the file incomplete that I got from my customer?
When I import the .p12 file into my Mac OS X keychain, I can see a private key called alias_name
and a certificate; although there is no "certificate chain" or anything.
I tried the following command:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore data_dirs/ff.keystore /path/to/QtApp-release-unsigned.apk alias_name
jarsigner: Certificate chain not found for: alias_name. alias_name must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.