Why the app is signed, signed with Keytool Jarsigner

Source: Internet
Author: User

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 is inconsistent with the old program's signature, conflicts do not feel 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

Number of references:

Keytool Options Descriptive narrative
-genkey Produces a key-value pair (public and private)
-v Agree to 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. Assuming not supported, Keytool uses the default value of bits. Usually we use 2048 bits or longer keys.

-dname

The distinguished name. Describes who created the key.

This value is used as the issuer and subject field of the self-signed certificate. Note that you can not specify at the command line. Assuming that no specified Keytool will prompt you (CN, OU, and so on).

-keypass

The password of the key.

Primarily for safety reasons, assumptions are not provided. Keytool will prompt you for input.

-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 of the private key store file.

Primarily for safety reasons, assumptions are not provided. Keytool will prompt you for input.

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

Number of references:

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

Stores the password of the file.

Primarily for safety reasons, assumptions are not provided. Jarsigner will prompt you for input. This password is not stored in your shell history.

-keypass

The password of the private key.

Mainly for safety reasons. If not provided, Jarsigner will prompt you for input.

This password is not stored in your shell history.


Why the app is signed, signed with Keytool Jarsigner

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.