我试图为Tomcat配置8 SSL(HTTPS)和下面的步骤做了,但还是它不工作SSL不工作的Tomcat的8
1)创建一个使用密钥库文件
keytool -genkey -alias myservername -keyalg RSA
2)产生的CSR如下
keytool -certreq -alias myservername -file C:\tomcat_ssl\local_machine\test.csr -keystore C:\tomcat_ssl\local_machine\test.keystore
3)然后,我们已经生成的证书,然后导入链式证书和证书如下
keytool -import -alias root -keystore C:\tomcat_ssl\local_machine\test.keystore -trustcacerts -file C:\tomcat_ssl\local_machine\srv_chain.cer
keytool -import -alias myservername -keystore C:\tomcat_ssl\local_machine\test.keystore -file C:\tomcat_ssl\local_machine\srv_main.cer
4)最后还是在tomcat的server.xml中的变化如下
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="C:\tomcat_ssl\local_machine\test.keystore" keystorePass="123" keystoreAlias="myservername"/>
重新启动Tomcat和它不工作,并显示以下屏幕
在Tomcat的日志,它不是显示任何错误,我也尝试过其他选项,如保持cipher
标记连接,Enabled TLS 1,2,3
,更改https端口等无济于事。
另外我已经测试了https端口443,它显示为监听时,我netstat。任何想法,这是为什么不启用SSL调试tomcat中
http-nio-443-exec-5, fatal error: 10: General SSLEngine problem
javax.net.ssl.SSLHandshakeException: SSLv2Hello is disabled
http-nio-443-exec-5, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
http-nio-443-exec-5, WRITE: TLSv1.2 Alert, length = 2
http-nio-443-exec-5, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeException: SSLv2Hello is disabled
http-nio-443-exec-5, called closeOutbound()
http-nio-443-exec-5, closeOutboundInternal()
[Raw write]: length = 7
服务器启动过程中的任何错误日志?你有没有检查过其他浏览器(chrome/mozilla)? –
@ redflar3嗨,实际上在所有服务器日志中没有错误信息..我只检查IE 11,因为其他浏览器不允许在这里... – JavaGeek
你使用的是什么Java版本?你能用SSLLabs测试你的服务器吗?如果没有,您可以构建一个简单的Java客户端并用'-Djavax.net.debug = all'调试SSL连接,以在客户端获得详细的日志。将结果添加到您的问题 – pedrofb