尝试使用自己的CA签名时出现错误代码:ssl_error_no_cypher_overlap

时间:2015-07-23 13:15:53

标签: java openssl x509 keytool ca

我正在使用在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)

1 个答案:

答案 0 :(得分:0)

错误

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参数并启用更多密码套件。

  3. 目标是在两端至少有一个常用的算法 - tomcat和browser。使用的算法应该足够secure