tomcat的https

转载http://www.chinaunix.net/jh/13/456376.html
http://andyj.iteye.com/blog/176470

keytool -genkey -alias tomcat -keyalg RSA -keystore test.keystore
生成awcloud.keystore,注意:第一个用户名为本地计算机名称,不能为ip,国家写CN
keytool -list -keystore keystore
查看
keytool -certreq -keyalg RSA -alias tomcat -file test.csr -keystore test.keystore
生成test.csr

http://www.verisign.com/server2/trial/faq/index.html
Free 30-Day SSL Trial
VeriSign® SSL Test Certificate 点TRY
输入邮箱,continue
Server platform:选apache
Paste Certificate Signing Request (CSR)输入test.csr的内容

收邮件后,点连接进入,保存test.cer

keytool -import -alias root -keystore test.keystore -trustcacerts -file root.cer

keytool -import -alias inter-ca -keystore test.keystore -trustcacerts -file inter-ca.cer

keytool -import -alias tomcat -keystore test.keystore -trustcacerts -file client.cer


把test.keystore
放到tomcat/conf下,修改server.xml
maxThreads="150" scheme="https" secure="true"
clientAuth="want" keystoreFile="conf/awcloud.keystore" keystorePass="haoning" sslProtocol="TLS" />

你可能感兴趣的:(java)