我正在尝试使用cloudhopper库并完成smpp TLS1.2绑定并且无法执行此操作。
我有以下配置并获得此异常:
SslConfiguration sslConfiguration = new SslConfiguration();
sslConfiguration.setTrustAll(true);
sslConfiguration.setValidateCerts(false);
sslConfiguration.setExcludeProtocols("SSLv2");
clientconfig.setSslConfiguration(sslConfiguration);
clientconfig.setUseSsl(Boolean.valueOf(sslConnection));
javax.net.ssl.SSLException:收到致命警报:unexpected_message 在sun.security.ssl.Alerts.getSSLException(Alerts.java:208)`[:1.7.0_79] at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1639)[:1.7.0_79] at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1607)[:1.7.0_79] at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1776)[:1.7.0_79] at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1068)[:1.7.0_79] at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:890)[:1.7.0_79] at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:764)[:1.7.0_79] 在javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)[:1.7.0_79] 在org.jboss.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:871)[106:org.jboss.netty:3.2.0.Final]
trigger seeding of SecureRandom
done seeding SecureRandom
trigger seeding of SecureRandom
done seeding SecureRandom
Using SSLEngineImpl.
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DH_anon_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DH_anon_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
%% No cached client session
*** ClientHello, TLSv1.2
RandomCookie: GMT: 1529082769 bytes = { 70, 30, 1, 117, 147, 147, 222, 220, 3, 199, 71, 149, 160, 62, 21, 10, 175, 165, 162, 34, 5, 88, 98, 115, 185, 25, 12, 143 }
Session ID: {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, SSL_RSA_WITH_RC4_128_MD5, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA]
Compression Methods: { 0 }
Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA224withECDSA, SHA224withRSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA, MD5withRSA
***
pool-17-thread-1, WRITE: TLSv1.2 Handshake, length = 99
pool-17-thread-1, WRITE: SSLv2 client hello message, length = 83
New I/O client worker #1-1, READ: TLSv1.2 Alert, length = 2
New I/O client worker #1-1, RECV TLSv1 ALERT: fatal, unexpected_message
New I/O client worker #1-1, fatal: engine already closed. Rethrowing javax.net.ssl.SSLException: Received fatal alert: unexpected_message
New I/O client worker #1-1, fatal: engine already closed. Rethrowing javax.net.ssl.SSLException: Received fatal alert: unexpected_message
还要添加我正在尝试连接的提供商的评论。他们在审核后回复了这条消息。
Our internal team has reviewed this information and has provided an update, the customer is using "SSLv2" in the Hello portion of the TLS handshake. The Hello needs to be TLS1.2 or TLS1.2
你能帮忙吗?如何在TLS握手的Hello部分中配置SSLEngine以使用TLS1.2而不是SSLv2。
谢谢。