Tomcat8.0 SSL配置

  1. Tomcat ssl 配置

    keytool -export -file tomcat.crt -alias tomcat -keystore tomcat.keystore 
    
  2. 导出数字证书

    keytool -export -file tomcat.crt -alias tomcat -keystore tomcat.keystore 
    
  3. 在tomcat所在的机器,将证书导入到cacerts

    keytool -importcert -alias tomcat -file tomcat.crt -keystore "%JAVA_HOME%/jre/lib/security/cacerts" -storepass changeit   
    
  4. 进入对应目录可使用如下命令查看证书信息:

    keytool -list -keystore cacerts -alias tomcat
    输入密钥库口令
    tomcat, 2017-11-24, trustedCertEntry
    证书指纹 (SHA1): C5:EE:80:F3:E0:A7:E8:42:D5:F1:D1:3B:D8:6B:67:8B:9C:63:BE:1F
    
  5. 将配置文件copy至对应的位置中

    cd ${JAVA_HOME}/jre/lib/security
    
  6. 备用命令如下

    keytool -delete -alias tomcat -keystore cacerts
    keytool -import -alias tomcat -keystore cacerts -file ${JAVA_HOME}/jre/lib/security/tomcat.cer
    keytool -list -keystore cacerts -alias tomcat
    
  7. 配置tomcat8.0的ssl协议

       
                 
    

你可能感兴趣的:(Tomcat8.0 SSL配置)