Skip to content Skip to sidebar Skip to footer

Cannot Establish Tls Connection To Openfire 4.1.3 Server With Smack 4.2 On Android: Sslprotocolexception: Ssl Handshake Aborted

I'm trying to connect to my Openfire 4.1.3 server with Smack 4.2, the current config works ok: XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration.builde

Solution 1:

setUsernameAndPassword() method is missing.

 val config= XMPPTCPConnectionConfiguration.builder()
                    .setXmppDomain(mDomainName)
                    .setUsernameAndPassword(mUsername,mPassword)
                    .setDebuggerEnabled(true)
                    .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)



            mConnection= XMPPTCPConnection(config.build())
            mConnection!!.connect().login()

Solution 2:

W/System.err: Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb38b1400: Failure in SSL library, usually a protocol error
W/System.err: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER (external/boringssl/src/ssl/tls_record.c:1920xa769d1aa:0x00000000)

Your Android platform does not like the SSL/TLS version your Openfire uses.

Post a Comment for "Cannot Establish Tls Connection To Openfire 4.1.3 Server With Smack 4.2 On Android: Sslprotocolexception: Ssl Handshake Aborted"