由于 POODLE vulnerability,最新版本的 Chrome 和 Firefox 默认禁用 SSLv3.0。 .当我尝试打开我设置的站点(并且工作正常)时,这会导致以下错误:
使用 Chrome:
A secure connection cannot be established because this site uses an unsupported protocol.
Error code: ERR_SSL_VERSION_OR_CIPHER_MISMATCH
使用 Firefox:
Cannot communicate securely with peer: no common encryption algorithm(s). (Error code: ssl_error_no_cypher_overlap)
我研究过这个问题with Chrome , Firefox , Tomcat和 more Tomcat docs .我明白这个问题,但我找不到配置 Tomcat 7 以仅使用现在安全的 TLS 密码和协议(protocol)的文档。我不确定我是否需要创建新的证书/ key 对、更改我的 server.xml 或安装新版本的 Tomcat 或其他什么。我什至不确定这些浏览器现在认为哪些版本的密码/协议(protocol)是“可接受的”。谁能指出我的文档或示例设置?
我在 Ubuntu 14.04 和 Tomcat 7 上使用 OpenJDK 1.7。
这是我的证书文件(已编辑):
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: something
Creation date: May 4, 2013
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=something, OU=something, O=something, L=something, ST=something, C=something
Issuer: CN=something, OU=something, O=something, L=something, ST=something, C=something
Serial number: ...
Valid from: Sat May 04 17:28:21 MST 2013 until: Tue May 02 17:28:21 MST 2023
Certificate fingerprints:
MD5: ...
SHA1: ...
SHA256: ...
Signature algorithm name: SHA1withDSA
Version: 3
这是我用于 HTTPS 支持的 server.xml
条目:
<Connector port="8484" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="/path/mykeystore"
keystorePass="password"
clientAuth="false"
sslProtocol="TLS"
sslEnabledProtocols="TLS" />
最佳答案
我在使用 Tomcat 8.0.23 和 Java 8 build 1.8.0_45 进行新安装时遇到了问题。我终于发现,当我使用 Java keytool 实用程序创建自签名证书时,我没有指定 -keyalg RSA 选项。我删除了旧 keystore ,并确保在创建新 keystore 时包含该选项。这解决了问题。
关于java - 如何修复 Tomcat 7 服务器上的 "ssl_error_no_cypher_overlap"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29449966/