jetty tomcat 配置 ssl
1.生成密钥:
a.)首先生成一个pica.keystore(keystore密钥库)
备注:生产密钥库的路径最好在server服务器下。(如:jetty路径为${jetty.home}/etc/)
keytool -genkey -alias pica -keyalg RSA -dname "cn=localhost,ou=pica,o=wingware,l=china,st=beijing,c=cn" -keypass 123456 -storepass 123456 -keystore pica.keystore -validity 3600
keytool -export -trustcacerts -alias pica -file pica.cer -keystore pica.keystore -storepass 123456
keytool -import -trustcacerts -alias pica -file pica.cer -keystore “%JAVA_HOME%/jre/lib/security/cacerts” -storepass changeit
<Configure id="Server" default="." />/etc/pica.keystore</Set><Set name="Password">123456</Set><Set name="KeyPassword">123456</Set><Set name="truststore"><SystemProperty name="jetty.home" default="." />/etc/pica.keystore</Set><Set name="trustPassword">123456</Set></New></Arg></Call></Configure>
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="D:\Tomcat 6.0\bin\server.keystore" keystorePass="123456" />