diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-01-22 11:20:31 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-01-22 11:20:31 +0100 |
commit | 40005cec1b1a864c529ead082a6e41a1471c874c (patch) | |
tree | 8e42c210500630e14e354d9724871afc69aa2fef /src/main/java/eu/siacs/conversations/xmpp | |
parent | 77c0fb0b2ae257b7bf257417ed689f2334507f2c (diff) |
added config variable to allow non-tls connections
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 1f114141..273a7381 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -727,7 +727,7 @@ public class XmppConnection implements Runnable { if (this.streamFeatures.hasChild("starttls") && !features.encryptionEnabled) { sendStartTLS(); } else if (this.streamFeatures.hasChild("register") && account.isOptionSet(Account.OPTION_REGISTER)) { - if (features.encryptionEnabled) { + if (features.encryptionEnabled || Config.ALLOW_NON_TLS_CONNECTIONS) { sendRegistryRequest(); } else { throw new IncompatibleServerException(); @@ -737,7 +737,8 @@ public class XmppConnection implements Runnable { changeStatus(Account.State.REGISTRATION_NOT_SUPPORTED); disconnect(true); } else if (this.streamFeatures.hasChild("mechanisms") - && shouldAuthenticate && features.encryptionEnabled) { + && shouldAuthenticate + && (features.encryptionEnabled || Config.ALLOW_NON_TLS_CONNECTIONS)) { final List<String> mechanisms = extractMechanisms(streamFeatures .findChild("mechanisms")); final Element auth = new Element("auth"); |