Liberty Websphere 上没有共同的密码套件

Posted

技术标签:

【中文标题】Liberty Websphere 上没有共同的密码套件【英文标题】:no cipher suites in common on Liberty Websphere 【发布时间】:2014-09-02 09:32:09 【问题描述】:

我正在尝试在我的 Websphere-Liberty 服务器上使用自签名 CA 设置 SSL,但我不断收到 SSLHandshakeException。我不是 SSL 专家,所以可能我只是忘记了一些事情。

以下是有关我的设置的一些详细信息:

product = WebSphere Application Server 8.5.5.0 (wlp-1.0.3.20130510-0831)
java.version = 1.7.0_51
os = Windows 8 (6.2; amd64) (en_US)

我设法部署了 worklight 应用程序中心战争,它可以通过浏览器访问。当我尝试通过 https 访问应用中心时,出现以下异常:

[9/1/14 19:07:11:799 EEST] 00000021 com.ibm.ws.channel.ssl.internal.SSLHandshakeErrorTracker     E CWWKO0801E: Unable to initialize SSL connection. Unauthorized access was denied or security settings have expired. Exception is javax.net.ssl.SSLHandshakeException: no cipher suites in common

我的 server.xml 中有以下配置

<feature>ssl-1.0</feature>
<keyStore id="defaultKeyStore" password="trasys" />

一旦我添加了密钥库属性,Websphere 就会生成一个带有默认证书的密钥库文件 (key.jks)。我使用 java keytool 实用程序删除了证书并添加了我自己的自签名 CA 证书。此证书是在 cygwin 中使用以下 openssl 命令生成的(如以下 *** 票证所示:Is a signed SSL certificate required for Worklight development?):

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt

要将证书添加到空密钥库,我使用了以下命令:

keytool -import -trustcacerts -alias mydomain -file certificate.crt -keystore keystore.jks

所以这基本上是我到目前为止所尝试的,有人知道我缺少什么吗?

【问题讨论】:

【参考方案1】:

您只使用您的程序导入公共证书,而不是私钥。您的密钥库中需要私钥。 您可以使用以下解决方案:

将您的密钥和证书转换为 pkcs12,然后按照此处的说明导入 importing an existing x509 certificate and private key in Java keystore to use in ssl 使用 Liberty 工具 securityUtility createSSLCertificate 创建证书,如 securityUtility command 所述 如果您拥有完整的 WebSphere Application Server,则可以使用 IBM 密钥管理实用程序 (ikeyman) 创建和导入密钥和证书。

【讨论】:

谢谢,这确实解决了我的问题。要完整;我使用以下 openssl 命令转换了我的证书和密钥:openssl pkcs12 -export -in certificate.crt -inkey privateKey.key -out certificate.p12 -name hiper-certificate。然后我通过 portecle 将此 p12 文件添加到密钥库中。

以上是关于Liberty Websphere 上没有共同的密码套件的主要内容,如果未能解决你的问题,请参考以下文章

Websphere Liberty Profile 上 Worklight 服务器的拓扑

将 LDAP 配置从 Websphere 迁移到 Liberty

WebSphere Liberty Web 套接字丢失消息

websphere liberty - SLF4J jars 与 websphere 内部包冲突

轻量级应用服务器WebSphere Liberty 17.0.0.1 新版本发布会

将修订包应用到 WebSphere Liberty Profile