Smack & Android: SSLHandShakeException

I have installed my openfire server, and I have already tested using Spark, it works perfectly. I’m using an Amazon EC2 server.

Now, I’m trying to add the chat functionality to my app. I’m using Smack 4.1 with Android. I’m trying to open a connection with my server:

XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration


config.setUsernameAndPassword(USERNAME, PASSWORD);

Just to let you know I’m using the same information as above on Spark and it just works.

On other hand, I’m getting the following exception from Android Studio:

11-18 22:34:19.862 24113-24154/? E/MainActivity: org.jivesoftware.smack.SmackException: Trust anchor for certification path not found.

Does anyone know something about it? I’ve searched about this exception and I see is related to certificates. I’m not sure about the certificates on the openfire server… I’m curious about the fact it works on Spar flawless, I think it might be something I need to do in my Android code.

Suddenly I have the same problem. The strange thing is, my app worked great before some days, I changed aboslutely nothing and now I get the same exception. Before I was able to connect to a server (in my case, now I am not. Anybody who has idea about the problem?

I found that interesting post, I will give it a try and report later… hor-for-certification-path-not-found-wit