Why the app is signed, signed with Keytool Jarsigner

Source: Internet
Author: User
Tags sha1

Sign: Writes specific tag information to a specific field in the application, indicating that the software has passed the signer's approval. Procedure: Digitally sign a given application with a private key

Role:

Identify application Authors

Detects if the application has changed

There is a kind of program upgrade, when the new program and the old program signature is inconsistent, there will be conflicts that are not the same app, requiring new programs to change the package name

。。。

Keytool generating the Signature private key command

Keytool-genkey-v-keyalg dsa-keysize 1024-sigalg sha1withdsa-validity 10000-keystore test.keystore-alias devel -keypass 123456-storepass 123456

Parameters:

Keytool Options Description
-genkey Produces a key-value pair (public and private)
-v Allow action output
-alias<alias_name> The alias of the key. Only the first eight characters are valid.
-keyalg The encryption algorithm that generates the key. Supports DSA and RSA.
-keysize Produces the length of the key. If not supported, Keytool uses the default value of bits. Usually we use 2048 bits or longer keys.
-dname

A distinguished name that describes who created the key. This value is used as the issuer and subject field of the self-signed certificate. Note You can not specify at the command line. If not specified Keytool will prompt you (CN, OU, and so on).

-keypass

The password for the key.

Mainly for security reasons, if not provided, Keytool will prompt you to enter.

-validity

Key expiration date, Unit: Day

Note: A value of 10000 or greater is recommended.

-keystore.keystore The file used to store the private key.
-storepass

The password for the private key store file.

Mainly for security reasons, if not provided, Keytool will prompt you to enter. This password is not stored in your shell history.


Jarsigner signing with a private key

Jarsigner-verbose-sigalg sha1withdsa-digestalg sha1-keystore test.keystore-storepass 123456 test.apk devel

Parameters:

Jarsigner Options Description
-keystore.keystore The storage file that contains your private key
-verbose Displays the output action.
-sigalg Signature algorithm, with SHA1withRSA .
-digestalg Message digest algorithm, with SHA1 .
-storepass

The password to store the file.

Mainly for security reasons, if not provided, Jarsigner will prompt you to enter. This password is not stored in your shell history.

-keypass

The password for the private key.

Mainly for security reasons, if not provided, Jarsigner will prompt you to enter. This password is not stored in your shell history.


Why the app is signed, signed with Keytool Jarsigner

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.