I am trying to use cloudhopper library and accomplish smpp TLS1.2 binding and failing to do it.
I have following configuration and getting this exception:
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
Also adding a comment from the provider I am trying to connect to. They replied with this message after review.
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
Could you please help with it? How should I configure SSLEngine to use TLS1.2 and not SSLv2 in Hello portion of the TLS handshake.
Thank you.