AnsweredAssumed Answered

Connect to OF with Smack 4.1.8 via SSL (Port 5223)

Question asked by Sebastian on Aug 26, 2016
Latest reply on Aug 27, 2016 by Flow

Hi everybody,


I have a little problem: I want to connect to my Openfire server with Smack 4.1.8 via SSL (Port: 5223). I use the folowing code:

config = XMPPTCPConnectionConfiguration.builder()








      .setUsernameAndPassword(USERNAME, PASSWORD)



connection = new XMPPTCPConnection(config);






But everytime I get a timeout.

On the server side it tells me: SSL Handshake failed.

  And if I use the DummySSLFactory, i get: Unconnected sockets not implemented


at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(

at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(

at org.jivesoftware.smack.AbstractXMPPConnection.connect(

at de.smacktest.sender.ID_RegistrationClient.login(

at de.smacktest.sender.ID_RegistrationClient.<init>(

at de.smacktest.App.main(

Caused by: java.lang.UnsupportedOperationException


... 6 more

  Sorry, I am quite new to SSL. Do I need a certificate? How to create or import a certificate?

  If anyone could help me out, it would be great

  Thank you