Tuesday, March 16, 2010

keytool

keytool usage:

-certreq     [-v] [-protected]
             [-alias ] [-sigalg ]
             [-file ] [-keypass ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-changealias [-v] [-protected] -alias -destalias
             [-keypass ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-delete      [-v] [-protected] -alias
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-exportcert  [-v] [-rfc] [-protected]
             [-alias ] [-file ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-genkeypair  [-v] [-protected]
             [-alias ]
             [-keyalg ] [-keysize ]
             [-sigalg ] [-dname ]
             [-validity ] [-keypass ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-genseckey   [-v] [-protected]
             [-alias ] [-keypass ]
             [-keyalg ] [-keysize ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-help

-importcert  [-v] [-noprompt] [-trustcacerts] [-protected]
             [-alias ]
             [-file ] [-keypass ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-importkeystore [-v]
             [-srckeystore ] [-destkeystore ]
             [-srcstoretype ] [-deststoretype ]
             [-srcstorepass ] [-deststorepass ]
             [-srcprotected] [-destprotected]
             [-srcprovidername ]
             [-destprovidername ]
             [-srcalias [-destalias ]
               [-srckeypass ] [-destkeypass ]]
             [-noprompt]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-keypasswd   [-v] [-alias ]
             [-keypass ] [-new ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-list        [-v | -rfc] [-protected]
             [-alias ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]

-printcert   [-v] [-file ]

-storepasswd [-v] [-new ]
             [-keystore ] [-storepass ]
             [-storetype ] [-providername ]
             [-providerclass [-providerarg ]] ...
             [-providerpath ]



More info here http://download.oracle.com/docs/cd/E15051_01/wls/docs103/secmanage/identity_trust.html#wp1167001


to create a keystore:

C:\beawli\jrockit_160_05\bin>keytool -genkeypair -alias acme -keysize 1024 -storetype jks -keystore longkeys.jks -storepass weblogic -keypass weblogic  

No comments: