Paul is right - if you can prevent the need to disable encryption, you should do that.
That said, your example should work. I’ve written this minimalistic test client. When running against a server on my localhost, I can clearly see unencrypted data be exchanged when I inspect the traffic with tcpdump -i lo port 5222 -X
pom.xml (this defines the dependency to the Smack library that I’ve used)
Hi, thank you for your replies!
I’m executing my Smack client in the same way, using Java 8.
I’m able to log clear traffic at the beginning, but later Smack client send tag and logs becomes encrypted.
See the attachment for more details on the behaviour: Smack traffic log.log (10,0 KB)
StartTLS is being negotiated by your client. Have you invoked .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled) on the configuration object that you’re using to set up the connection? I assume that this will prevent StartTLS from being started.