這物比PGP閣kha重要

keytool -genkey -dname "cn=Tsuibinn Tan, ou=Chair, o=DPP, c=TW" -alias justforfun -keypass kpi135 -keystore C:\working\mykeystore -storepass itsapassword -validity 3650

 

Keytool Option Description
-genkey Generate a key pair (public and private keys)
-v Enable verbose output.
-keystore <keystore-name>.keystore A name for the keystore containing the private key.
-storepass <password>

A password for the keystore.

As a security precaution, do not include this option in your command line unless you are working at a secure computer. If not supplied, Keytool prompts you to enter the password. In this way, your password is not stored in your shell history.

-alias <alias_name> An alias for the key.
-keyalg <alg> The encryption algorithm to use when generating the key. Both DSA and RSA are supported.
-dname <name>

A Distinguished Name that describes who created the key. The value is used as the issuer and subject fields in the self-signed certificate.

Note that you do not need to specify this option in the command line. If not supplied, Jarsigner prompts you to enter each of the Distinguished Name fields (CN, OU, and so on).

-validity <valdays>

The validity period for the key, in days.

Note: A value of 10000 or greater is recommended.

-keypass <password>

The password for the key.

As a security precaution, do not include this option in your command line unless you are working at a secure computer. If not supplied, Keytool prompts you to enter the password. In this way, your password is not stored in your shell history.

 

 

Example:

$ keytool -genkey -v -keystore my-release-key.keystore 
-alias alias_name -keyalg RSA -validity 10000

Posted by eudoxus at 痞客邦 PIXNET Comments(1) Trackback(0) Hits(40)


open trackbacks list Trackbacks (0)

Comments (1)

Post Comment
  • FZFI




    大人的玩具免費贈送
    請點小圖示進入唷^^

Comment Permissions: Allow commenting

Leave Comment

*Name/Nickname
E-mail
Personal Website
Comment Title
*Comment
* Private Comment