diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-10-17 16:10:31 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-10-17 16:10:31 +0200 |
commit | e956c7b2a2e24dbb38435f59c1c70889585c167a (patch) | |
tree | 9994f52b87942a49b9a611f0ad4795c7981059e4 /src | |
parent | 3c6c424d31be3e21d1bebd6288646f1cbc6881d9 (diff) |
only try EXTERNAL auth if client certificate is set for account
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 18667248..ac902973 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -678,7 +678,7 @@ public class XmppConnection implements Runnable { .findChild("mechanisms")); final Element auth = new Element("auth"); auth.setAttribute("xmlns", "urn:ietf:params:xml:ns:xmpp-sasl"); - if (mechanisms.contains("EXTERNAL")) { + if (mechanisms.contains("EXTERNAL") && account.getPrivateKeyAlias() != null) { saslMechanism = new External(tagWriter, account, mXmppConnectionService.getRNG()); } else if (mechanisms.contains("SCRAM-SHA-1")) { saslMechanism = new ScramSha1(tagWriter, account, mXmppConnectionService.getRNG()); |