当我尝试连接到我的码头服务器时,我收到以下错误:
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