powered by Jive Software

Smack version 4.3.0-beta2 TLS error

sasl

#1

Hi:
Could you help me,
when i use smack version is 4.3.0-beta2 to connection openfire4.2.3 on android project with android studio,i have git this problem with android client。
XXException: No supported and enabled SASL Mechanism provided by server. Server announced mechanisms: [PLAIN, SCRAM-SHA-1, CRAM-MD5, DIGEST-MD5]. Registered SASL mechanisms with Smack: []. Enabled SASL mechanisms for this connection: null. Blacklisted SASL mechanisms: [SCRAM-SHA-1-PLUS].
I already set mXMPPConfigBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);

I want to print the log that xmpp information between server to client/client to server by custom,but i don`t know how to import smack source to android studio that i can change the smack source to add my log,so i import part smack souce (such as ,im ,core,extensions,tcp)what i used as part source of my project, i got the problem


#2

It may be late answer but I recently started using smack and understood that in order to register SASL mechanism you may use below code.

    SASLMechanism mechanism = new SCRAMSHA1Mechanism();			
	SASLAuthentication.registerSASLMechanism(mechanism);
			
// black list or unblacklist mechanism 
	SASLAuthentication.blacklistSASLMechanism("DIGEST-MD5");
	SASLAuthentication.unBlacklistSASLMechanism("SCRAM-SHA-1");

Hope this may help someone.