为tomcat配置https证书

为tomcat配置https模式

    <Connector port="9999" protocol="HTTP/1.1"
        SSLEnabled="true"
        maxThreads="150"
        scheme="https"
        secure="true"
        clientAuth="true"
        sslProtocol="TLS"
        keystoreFile="yyy/xxx.keystore"  <!--证书存放的地址,使用/作为地址分隔符-->
        keystorePass="****"
        truststoreFile="yyy/xxx.keystore" <!--证书存放的地址,使用/作为地址分隔符-->
        truststorePass="*****"
     />

在此之前需要制作keystore,需要用到openssl和keytool,相关连接:

安装openSSL

http://bbs.csdn.net/topics/392193545?page=1

keytool介绍

https://www.chinassl.net/ssltools/keytool-commands.html

关于SSL的更多学习

《Java加密与解密的艺术》