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
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="want" keystoreFile="conf/awcloud.keystore" keystorePass="haoning" sslProtocol="TLS" />
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值