如何修复 ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY

How to fix ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY

我有一个网站,最近 chrome 在尝试访问它时开始返回此错误:

ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY

这是一个 java+jsp 网站,运行在 apache tomacat 上。它还使用 Verisign 认证,但我读到该错误与此证书无关。

感谢您的帮助。

您的服务器正在使用弱 Diffie-Hellman 密钥,因此可能会受到 Logjam attack. Because of this attack more and more browser and TLS stacks increase their minimum length of the DH key to 768 or 1024 bit. Probably the OpenSSL version you are using in your server uses a 512 bit DH key by default, which is too small. You need to fix this by explicitly setting a larger DH key in your server configuration. How this is done depends on the server, see Guide to Deploying Diffie-Hellman for TLS 的影响以了解详情。

如果您与 Oracle 签订了支持合同,则可以下载最新版本的 Java 6/7,它将 JSSE 中的 DHE 加密提高到 1024 位。

有一个解决方法(警告:这会造成安全漏洞!

使用此参数启动chrome:

--cipher-suite-blacklist=0x0088,0x0087,0x0039,0x0038,0x0044,0x0045,0x0066,0x0032,0x0033,0x0016,0x0013

参数说明:

0x0088 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
0x0087 TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA
0x0039 TLS_DHE_RSA_WITH_AES_256_CBC_SHA
0x0038 TLS_DHE_DSS_WITH_AES_256_CBC_SHA
0x0044 TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA
0x0045 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
0x0066 TLS_DHE_DSS_WITH_RC4_128_SHA
0x0032 TLS_DHE_DSS_WITH_AES_128_CBC_SHA
0x0033 TLS_DHE_RSA_WITH_AES_128_CBC_SHA
0x0016 TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
0x0013 SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA

来源:

learncisco.net

productforums.google.com

weakdh.org

chromium.googlesource.com/.../sslproto.h

我可以通过将系统 属性 jdk.tls.ephemeralDHKeySize 设置为 1024(或 2048)来解决这个问题。

我按照以下方法修复了它: http://support.filecatalyst.com/index.php?/Knowledgebase/Article/View/277/0/workaround-for-tomcat-ssl-tls-logjam-vulnerability

综上所述,我编辑了 server.xml。

在连接器协议上,我更改了 属性

Protocol="TLS"

为了

sslEnabledProtocols="TLSv1, TLSv1.1, TLSv1.2" 

并添加了 属性

ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, 
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA, 
TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256, 
TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA"