I am getting problem in SSL/TLS authentication using 8.10 asmack jar.
Not getting error but the server is not secure and it is authenticating and processing where it should not authenticate on non SSL server, Using ejabbered as server which is installed in private server
Dont known what wrong in this.
Code is :
connConfig = new ConnectionConfiguration(host, Integer.parseInt(port), service);
connConfig.setSASLAuthenticationEnabled(true);
// connConfig.setDebuggerEnabled(true);
connConfig.setReconnectionAllowed(true);
// This is the SSL Implementation
connConfig.setCompressionEnabled(true);
connConfig.setSecurityMode(SecurityMode.enabled);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
connConfig.setTruststoreType(“AndroidCAStore”);
connConfig.setTruststorePassword(null);
connConfig.setTruststorePath(null);
} else {
connConfig.setTruststoreType(“BKS”);
String path = System.getProperty(“javax.net.ssl.trustStore”);
if (path == null)
path = System.getProperty(“java.home”) + File.separator + “etc” + File.separator + “security” + File.separator + “cacerts.bks”;
connConfig.setTruststorePath(path);
}
connection = new XMPPConnection(connConfig);
connection.connect();
Using code : connConfig.setSecurityMode(SecurityMode.enabled); packet exchange are correct
Packet send : stream:featuresSCRAM-SHA-1DIGEST-MD5PLAIN<register xmlns='http://jabber.org/features/iq-register’/></stream:features>
Packet received :
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
But the server is not SSL enabled so it should not connect to server, but it is connecting and authenticating successfully
Please guide me ASAP. Thanks in advance