Java 使用keeytool生成密钥库和数字证书

阅读更多

详细说明

http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/keytool.html

 

常用操作:
1、Create a keystore
keytool.exe -genkey -alias dennyStcert -keystore denny.keystore -storepass "store_password" -keypass "key_passwrod" -keyalg "RSA"
keytool.exe -genkey -alias jamesStcert -keystore james.keystore -storepass "store_password" -keypass "key_passwrod" -keyalg "RSA"
2、Export Certificate  to *.cer file;
keytool.exe -export -alias dennyStcert -keystore denny.keystore -file denny.cer
keytool.exe -export -alias jamesStcert -keystore james.keystore -file james.cer
3、View Certificate
keytool.exe -printcert -file denny.cer

4、inport cer and set another alias
keytool.exe -import -alias denny2ndcert -file denny.cer -keystore denny.keystore

5.list keystore
keytool.exe -list -keystore denny.keystore

你可能感兴趣的:(Java,Oracle,Windows,HTML)