嵌入式码头-一般SSLEngine问题-SSLv2Hello禁用错误

问题描述 投票:1回答:1

当我尝试连接到我的码头服务器时,出现以下错误:

New I/O worker #777, WRITE: SSLv2 client hello message, length = 179
fatal error: 10: General SSLEngine problem
javax.net.ssl.SSLHandshakeException: SSLv2Hello is disabled
SEND TLSv1.2 ALERT:  fatal, description = unexpected_message
WRITE: TLSv1.2 Alert, length = 2
fatal: engine already closed.  Rethrowing javax.net.ssl.SSLHandshakeException: SSLv2Hello is disabled
New I/O worker #777, called closeOutbound()
New I/O worker #777, closeOutboundInternal()
New I/O worker #777, SEND TLSv1.2 ALERT:  warning, description = close_notify
New I/O worker #777, WRITE: TLSv1.2 Alert, length = 2

使用Java 1.8.241。使用配置为使用SSL的Jetty(v9.2.9)服务器。服务器正在使用自签名证书,我已将其导入密钥库和cacerts。使用wAsync Atmosphere客户端连接到服务器。

为了创建自签名证书,我在命令提示符下以管理员身份使用以下命令:

keytool -genkeypair -alias jetty_cloud -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore jetty_cloud.p12 -validity 3650
keytool -genkeypair -alias jetty_cloud -keyalg RSA -keysize 2048 -keystore jetty_cloud.jks -validity 3650
keytool -importkeystore -srckeystore jetty_cloud.jks -destkeystore jetty_cloud.p12 -deststoretype pkcs12
keytool -export -alias jetty_cloud -file jetty_cloud.crt -keystore jetty_cloud.jks
keytool -import -alias jetty_cloud -file "C:\Program Files\Java\jre1.8.0_241\bin\jetty_cloud.crt" -keystore "C:\Program Files\Java\jre1.8.0_241\lib\security\cacerts" -storepass changeit
java ssl https embedded-jetty atmosphere
1个回答
1
投票

SSLv2Hello默认在Java 7+上被禁用

参见:https://www.oracle.com/java/technologies/compatibility.html

您的客户端,即异步气氛客户端,需要配置或升级以使用较新的SSL / TLS设置。

建议使用TLSv1.2或更高版本的客户端配置作为目标。 (这意味着在客户端禁用了SSL,SSLv2,SSLv3,TLSv1.0和TLSv1.1)

© www.soinside.com 2019 - 2024. All rights reserved.