2013年1月29日 星期二

Java keytool Command

1. import certificate into keystore
      keytool –import –alias xxx –file xxx.cer –keystore keyFile

2. List keystore content
      keytool –list –v –keystore keyFile

3. Delete a alias in keystore
      keytool –delete –alias xxx –keystore keyFile

4. Generate key
      keytool -genkey -alias xxx -keyalg RSA -keystore keyFile

5. Generate Certification Application
      keytool -certreq -alias xxx -file certreq.txt -keystore keyFile

6. List key in keystore as PKCS12 type
      keytool –list –v –keystore keyFile -storetype pkcs12

7. Generate a keystore with privacy key
      keytool -genkey -alias Alias -keyalg RSA -keystore keyFile.jks

8. Modify the password of keystore
      keytool -storepasswd -new newPassword -keystore keyFile.jks

 

沒有留言:

張貼留言