【问题标题】:Jetty 9 cant work with self-signed certificate that generated by OpenSSLJetty 9 无法使用由 OpenSSL 生成的自签名证书
【发布时间】:2015-04-12 05:35:54
【问题描述】:

我想在 jetty-distribution-9.2.9.v20150224

上配置 SSL

我跟着http://www.eclipse.org/jetty/documentation/current/configuring-ssl.html配置SSL并生成证书

问题是: 如果我使用 Keytool 生成的密钥库:

keytool -keystore keystore -alias jetty -genkey -keyalg RSA

并将 ssl 和 https 模块配置为 start.ini,Jetty 可以正常工作。

但是,从密钥库中提取的证书不能被浏览器信任。所以我想使用 Openssl 创建自签名证书

我的Openssl版本是0.9.8,我按照以下步骤生成了keystore:

openssl genrsa -des3 -out server.key

openssl req -new -key server.key -out server.csr

openssl x509 -req -days 365 -in mn-server.csr -signkey server.key -out server.crt

keytool -import -trustcacerts -alias server -file server.crt -keystore truststore.keystore

但是,这个 truststore.keystore 不起作用。 Http 工作正常,但我无法访问 https。没有特殊异常抛出,检查8443端口时已经初始化。

我是否缺少一些码头配置?还是生成的证书生成不正确?


调试后,我看到了这个no cipher suites in common异常

%%Initialized:  [Session-1, SSL_NULL_WITH_NULL_NULL]
qtp1811075214-27, fatal error: 40: no cipher suites in common
javax.net.ssl.SSLHandshakeException: no cipher suites in common
%% Invalidated:  [Session-1, SSL_NULL_WITH_NULL_NULL]
qtp1811075214-27, SEND TLSv1.2 ALERT:  fatal, description = handshake_failure
qtp1811075214-27, WRITE: TLSv1.2 Alert, length = 2
qtp1811075214-27, fatal: engine already closed.  Rethrowing    javax.net.ssl.SSLHandshakeException: no cipher suites in common

我使用的签名算法是 SHA1withRSA ,我的 Java 版本是“1.8.0_25”

【问题讨论】:

标签: ssl https jetty jetty-9


【解决方案1】:

通过将spring-ws-core版本升级到2.2.x解决了

我还将 openssl 升级到 1.0.1k

【讨论】:

  • 我没有看到有人提到他在使用 Spring
猜你喜欢
  • 1970-01-01
  • 2016-12-04
  • 2020-04-16
相关资源
最近更新 更多