Unsigned entries found in the hints jar in Java

Source: Internet
Author: User

    1. First install in Java_home\bin\keytool.exe

    2. Sir, into a signature.

      Keytool-genkey-keystore You.keystore–alias Youapp

      650) this.width=650; "title=" Qq20150925165209.png "src=" http://s3.51cto.com/wyfs02/M00/73/B7/ Wkiol1yfdb7t-ng0aafearse8wg922.jpg "alt=" Wkiol1yfdb7t-ng0aafearse8wg922.jpg "/>

    3. Add the signature to the jar

      650) this.width=650; "title=" Qq20150925165221.png "src=" http://s3.51cto.com/wyfs02/M01/73/B7/ Wkiol1yfdlewfmdraacvw350rjk014.jpg "alt=" Wkiol1yfdlewfmdraacvw350rjk014.jpg "/>

Note: Configure the Java_home first.

Another appendix to the Keytool command is as follows:

Common parameters:

    • -alias aliases, each certificate in the certificate store is distinguished by an alias, which is usually not case-sensitive.

    • -keystore Certificate library file path and name

    • -keyalg Specifies the algorithm that generates the key pair (for example, RSA DSA, default: DSA)

    • -keysize Specify the key length (default, 1024x768)

    • -validity Specifies how many days the certificate is created (default)

    • -storepass Specify the access password for the certificate store

    • -KEYPASS Specifies the private key password for the specified entry certificate in the certificate store

    • -dname represents the distinguished names Publisher information for the certificate. Where "Cn=commonname certificate name (usually the domain name of the website), Ou=organizationunit organizational unit name, o=organizationname organization name, L=localityname City or region name, s= StateName state or province name, C=country two-bit parent country Code "

    • -file exported Certificate location (certificate with public key and subject information)

    • -V displays certificate details in the certificate library

    • -RFC export certificate details in printable encoding

KeyStore Implementation in Java: The
Keytool class is located under the Java.security package, providing a very good interface to get and modify information in a keystore. There are currently two command lines: Keytool and Jarsinger, a GUI tool policy can implement KeyStore. Because KeyStore is public, users can use it to write additional security applications. The
KeyStore also has a built-in implementation by Sun. It implements KeyStore as a file. Takes advantage of a KeyStore type (format) of "JKS". It protects each private key with a separate password. The integrity of the entire keystore is also protected with potentially different passwords.   the

KeyStore Certificate Library has two different types of items:
Key Entry- Each holds extremely sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. Typically, the key stored in such items is a secret key, or a private key with the certificate "chain" used to authenticate the corresponding public key. The Keytool and Jarsigner tools only deal with the latter type of item, the private key and its associated certificate chain.
  Trusted Certificate entry-each item contains a public key certificate that belongs to another community. It is called a "trusted certificate" because the owner of the Key warehouse believes that the public key in the certificate does belong to the identity identified by the certificate "principal" (owner). The certificate issuer guarantees this by signing the certificate.  

Certificate : (also called a public key certificate) is a digitally signed declaration from an entity (issuer) that declares that the public key (and other information) of another entity (principal) has a specific value.  

    • Public key: is a number associated with a specific entity. All people who need to interact with the entity for Trust should know that number. The public key is used to verify the signature.

    • Digital signatures: If some data is digitally signed, they are stored with the identity of an entity and prove that the entity's signature knows the data. The data is not falsified by drawing it with the private key of the entity.

    • Signature: encrypts certain messages with the entity private key to obtain encrypted data;

    • Private key: is a number, private and public key that exists in the key pair of all systems with public key encryption. The public key is used to encrypt the data, and the private key is used to calculate the signature. Public key encrypted messages can only be decrypted with the private key, and the private key signature message can only be verified with the public key.

    • Entity: An entity can be a person, an organization, a program, a computer, a business, a bank, or anything else you want to trust.



The jarsigner Tool leverages the information in the certificate library to generate or verify the digital signature of a Java archive (jar) file (the jar file packages class files, images, sounds, and/or other digitized data in a single file). Jarsigner verifies the digital signature of the jar file with the certificate that accompanies the jar file, which is contained in the signature block file of the jar file, and then checks whether the public key of the certificate is "trustworthy", that is, whether it is included in the specified certificate library.


This article is from the "Cheng && program Garden" blog, please make sure to keep this source http://alentain.blog.51cto.com/3572099/1698279

Unsigned entries found in the hints jar in Java

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.