【问题标题】:Error code: ssl_error_no_cypher_overlap when trying to sign with own CA错误代码:尝试使用自己的 CA 签名时出现 ssl_error_no_cypher_overlap
【发布时间】:2015-07-23 13:15:52
【问题描述】:

我正在使用在 Apache Tomcat 6.0.44 中运行的 Web 应用程序,该应用程序使用 oracle jre1.7u72。 我已按照以下步骤使用自行创建的 CA 签署服务器证书。followed the steps from this link

创建自己的 CA

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt


openssl genrsa -des3 -out server.key 4096
openssl req -new -key server.key -out server.csr

openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt

deleting the old certificate using keytool command

keytool -list -keystore <path of the keystore file> -alias aliasname -storepass password


importing the newly created server certificate signed by own CA 
keytool -importcert -keystore <path of the keystore> -alias alias -storepass password -file server.crt

并获得跟随错误 安全连接失败

连接到 x.x.x.x 时出错。无法与对等方安全通信:没有通用加密算法。 (错误代码:ssl_error_no_cypher_overlap)

【问题讨论】:

  • 你的问题是什么?
  • 请问为什么会显示这个错误,我在这里/在网站上犯了什么错误?
  • 您是如何获得安全连接的?给我们看一些代码。该错误很容易自我解释。
  • 粘贴了我已经完成的步骤。我也分享了链接。您期望的代码是什么。请说明针对此错误要采取的措施。
  • 您是否使用 Web 浏览器连接到服务器(安装了您创建的证书)?

标签: java openssl x509 keytool ca


【解决方案1】:

错误

An error occurred during a connection to x.x.x.x. Cannot communicate securely with peer: no common encryption algorithm(s). (Error code: ssl_error_no_cypher_overlap)

表示你设置的服务器,和你用来连接服务器的浏览器没有通用的加密算法。

你必须做这两件事中的任何一件

  1. 调整您的 apache tomcat 以支持更多算法(或更多协议版本)。阅读apache tomcat documentationtomcat and ssl docu 如何做到这一点。

  2. 调整您的浏览器。如果您使用(您没有说明任何内容,因此我使用的是常用浏览器),例如,firefox 检查支持论坛以获取答案,如果这不起作用,请尝试the solution from this blog。基本上您只需要更改about:config 参数并启用更多密码套件即可。

目标是在两端都有至少一种常用的算法——tomcat 和浏览器。使用的算法应该是secure足够了。

【讨论】:

    猜你喜欢
    • 2019-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-13
    相关资源
    最近更新 更多