Mac java keytool生成 https证书(一)

java keytool

 

http://www.kafeitu.me/sso/2010/11/05/sso-cas-full-course.html

 

1.

keytool -genkey -alias wsria -keyalg RSA -keystore /Users/mac/documents/wsriakey

 

Mac java keytool生成 https证书(一)_第1张图片

 

2 .

 

 keytool -export -file /Users/mac/documents/wsria.crt -alias wsria -keystore /Users/mac/documents/wsriakey

Mac java keytool生成 https证书(一)_第2张图片

 

3.

 如果出现 

keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect

 

那么密钥库口令输入 changeit 即可

请输入密码:changeit

 

4.为客户端的JVM导入证书

 

keytool -import -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/lib/security/cacerts -file /Users/mac/documents/wsria.crt -alias wsria

 

Mac java keytool生成 https证书(一)_第3张图片

 

 

 

 

 

你可能感兴趣的:(eclipse,JAVA,tomcat7,idea,mac,Tomcat,mybaits)