[Android] command line jarsigner signature and certificate chain to address not found error

1, the signature fails

$jarsigner -verbose -keystore /Volumes/Study/resourcesLib/Qunero-achivements/AndroidApp/QuLordy-signed-key -signedjar ./signed_XiaomiVerify.apk ./XiaomiVerify.apk qulordy
Enter passphrase key store: 
jarsigner: the certificate chain could not find qulordy. qulordy must refer to a valid entry keystore contains a private key and corresponding public key certificate chain.

 

2, view help

$jarsigner -h
Usage: jarsigner [options] jar file aliases (key alias) 
       jarsigner - the Verify [options] jar file

[ -Keystore <URL> ] key store location

[ -Storepass <password> ] keystore password for integrity

[ -Storetype <type> ] type keystore

[ -Keypass <password> ] private key password (if different)

[ -Sigfile <file>] .SF / name of the file .DSA

[ -Signedjar <file> name] signed JAR file

[ -Digestalg <algorithm> name] digest algorithm

[ -Sigalg <algorithm> name] Signature Algorithm

[ - the Verify] to verify signed JAR files

[ -Verbose] Signature / output verification details

[ - certs] output display certificate details and verification

[ -Tsa <URL> location] timestamp mechanism

[ -Tsacert <alias> ] public key certificate timestamp mechanism

[ -Altsigner <Class> ] Alternative signature mechanism class name

[ -Altsignerpath <path list> ] position of substitution of the signature mechanism

[ - internalsf] contained in the signature block file .SF

[ - sectionsonly] not counting the entire list of hash

[ - protected] key store has been verified path protection

[ -ProviderName <name> ] provider name

[ -ProviderClass <class>         name of the cryptographic service provider
  [ -ProviderArg <parameters>]] ... and the main class file constructor parameters

 

3, looking for a signature Alias:

First, when the eclipse is to export with success. So try to re-export the application can see an alias, as I was 'qulordy key':

 

4, re-signed:

$jarsigner -verbose -keystore /Volumes/Study/resourcesLib/Qunero-achivements/AndroidApp/QuLordy-signed-key -signedjar ./signed_XiaomiVerify.apk ./XiaomiVerify.apk 'qulordy key'
Enter passphrase key store: 
   Adding: META -INF / the MANIFEST.MF
   Adding: META -INF / QULORDY_.SF
   Adding: META -INF / QULORDY_.RSA
  Is the signature: AndroidManifest.xml
  It is the signature: classes.dex
   Adding: RES / 
   are added: RES / drawable / 
  are the signature: RES / drawable / icon.png
   Adding: RES / layout / 
  are signature: RES / layout / main.xml
  It is the signature: resources.arsc

 

 

Reproduced in: https: //www.cnblogs.com/QuLory/p/3141039.html

Guess you like

Origin blog.csdn.net/weixin_34037977/article/details/93154362