【问题标题】:Hybris Commerce ERR SSL VERSION OR CIPHER MISMATCHHybris Commerce ERR SSL 版本或密码不匹配
【发布时间】:2018-07-10 07:20:57
【问题描述】:

我已经用 OpenSSL 创建了一个证书

openssl genrsa -des3 -out server.key 2048
openssl rsa -in server.key -out server.key
openssl req -new -key server.key -out server.csr
keytool -import -trustcacerts -alias server.key -file server.crt -keystore 

并将 keystore.jks 放入${catalina.home}/lib/

服务器.xml

<Connector port="9002"
                          maxHttpHeaderSize="8192"
                          maxPostSize="4194304"
              maxThreads="150"
              protocol="org.apache.coyote.http11.Http11Protocol"
              executor="hybrisExecutor"
              enableLookups="false"
              acceptCount="100"
              connectionTimeout="20000"
              disableUploadTimeout="true"
              URIEncoding="UTF-8"
              SSLEnabled="true"
                                       scheme="https"
                                       secure="true"
                                       clientAuth="false"
                               sslProtocol = "TLS"
                               sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2"

                               keystoreFile="${catalina.home}/lib/keystore.jks"
                               keystorePass="123456"

在 Chrome 上出现以下错误:

This site can’t provide a secure connection
13.236.191.242 uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH

Unsupported protocol
The client and server don't support a common SSL protocol version or cipher suite.
curl -Iv https://11.231.191.212:9001/

Trying 11.231.191.212...
TCP_NODELAY set
Connected to 11.231.191.212 (11.231.191.212) port 9001 (#0)
schannel: SSL/TLS connection with 11.231.191.212 port 9001 (step 1/3)
schannel: checking server certificate revocation
schannel: using IP address, SNI is not supported by OS.
schannel: sending initial handshake data: sending 156 bytes...
schannel: sent initial handshake data: sent 156 bytes
schannel: SSL/TLS connection with 11.231.191.212 port 9001 (step 2/3)
schannel: failed to receive handshake, need more data

【问题讨论】:

  • 您的服务器不支持您用于创建证书的密码套件或 TLS 版本。这意味着您的服务器不是最新的,或者您使用旧 tls/cs 创建了证书。
  • 所以我必须使用受支持的 TLS 版本重新创建证书。谢谢

标签: java tomcat hybris


【解决方案1】:

问题是我正在使用 OpenSSL 创建一个自签名证书,但是当从 java Keystore 生成证书时它可以正常工作。

keytool.exe -genkey -alias tomcat -keyalg RSA -keystore c:\tomcatkeys

OpenSSL 和 keystore 生成不同文件格式的证书,您可以从下面的链接中看到不同之处。 https://security.stackexchange.com/questions/98282/difference-between-openssl-and-keytool

【讨论】:

    猜你喜欢
    • 2021-12-05
    • 2021-05-21
    • 2019-01-22
    • 1970-01-01
    • 2022-08-10
    • 1970-01-01
    • 2013-08-02
    • 2021-04-04
    相关资源
    最近更新 更多