Java webservice ssl

Java Webservice ssl

1
2
3
4
5
6
7
用keytool创建Keystore和Truststore文件:

keytool -importcert -alias CA -file ca.crt -keystore keystore.jks
keytool -list -v -keystore keystore.jks
keytool -export -alias CA -keystore keystore.jks -rfc -file selfsignedcert.cer
keytool -import -alias CA -file selfsignedcert.cer -keystore truststore.jks
keytool -list -v -keystore truststore.jks