diff options
author | 2016-11-08 15:14:28 +0300 | |
---|---|---|
committer | 2016-11-08 15:14:28 +0300 | |
commit | 7e8e8f8d709318cce97f40adaee8a4abbdc2b960 (patch) | |
tree | 73e687f4153daf46bc7662ba4ee284ef5851fed6 /juick-ws/src/main/java/com/juick/ws/s2s/ConnectionIn.java | |
parent | 69a2000c03948b3ab8413f210ecf919ab5ef948d (diff) |
xmpp: allow s2s without tls
Diffstat (limited to 'juick-ws/src/main/java/com/juick/ws/s2s/ConnectionIn.java')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/s2s/ConnectionIn.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/s2s/ConnectionIn.java b/juick-ws/src/main/java/com/juick/ws/s2s/ConnectionIn.java index d1d69dd0..5ac21fb6 100644 --- a/juick-ws/src/main/java/com/juick/ws/s2s/ConnectionIn.java +++ b/juick-ws/src/main/java/com/juick/ws/s2s/ConnectionIn.java @@ -133,7 +133,7 @@ public class ConnectionIn extends Connection implements Runnable { LOGGER.info("STREAM " + streamID + ": " + xml); xmpp.getRouter().send(xml); } - } else if (!isSecured() && tag.equals("starttls")) { + } else if (sc != null && !isSecured() && tag.equals("starttls")) { LOGGER.info("STREAM " + streamID + " SECURING"); sendStanza("<proceed xmlns=\"" + NS_TLS + "\" />"); try { @@ -182,7 +182,7 @@ public class ConnectionIn extends Connection implements Runnable { xmpp.HOSTNAME + "' id='" + streamID + "' version='1.0'>"; if (xmppversionnew) { openStream += "<stream:features>"; - if (!isSecured() && !xmpp.brokenSSLhosts.contains(from)) { + if (sc != null && !isSecured() && !xmpp.brokenSSLhosts.contains(from)) { openStream += "<starttls xmlns=\"" + NS_TLS + "\"><optional/></starttls>"; } openStream += "</stream:features>"; |