有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java TLS与cloudhopper的绑定

我正在尝试使用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: Received fatal alert: unexpected_message at 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] at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)[:1.7.0_79] at 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

你能帮忙吗?我应该如何配置SSLEngine以使用TLS1。而不是TLS握手的Hello部分中的SSLv2

谢谢


共 (0) 个答案