aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/xmpp
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-21 12:20:56 +0300
committerGravatar Vitaly Takmazov2018-03-21 13:52:55 +0300
commit403fab0c39e99ffd0b386eb612f3574938ae2125 (patch)
tree47b99c53134468da50c6f766ebb16043fa984cfa /juick-server/src/main/java/com/juick/server/xmpp
parentf066f48e4cabd0d7649af2e8c1f4b6a7dea56673 (diff)
add some events
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/xmpp')
-rw-r--r--juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionListener.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java b/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java
index dc7b3af9..01cc78ab 100644
--- a/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java
+++ b/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java
@@ -178,7 +178,7 @@ public class ConnectionIn extends Connection implements Runnable {
xmpp.getJid().toEscapedString() + "' id='" + streamID + "' version='1.0'>";
if (xmppversionnew) {
openStream += "<stream:features>";
- if (listener != null && !isSecured() && !Arrays.asList(xmpp.brokenSSLhosts).contains(from)) {
+ if (listener != null && listener.isTlsAvailable() && !isSecured() && !Arrays.asList(xmpp.brokenSSLhosts).contains(from)) {
openStream += "<starttls xmlns=\"" + NS_TLS + "\"><optional/></starttls>";
}
openStream += "</stream:features>";
diff --git a/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionListener.java b/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionListener.java
index efac8732..fde7a0e7 100644
--- a/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionListener.java
+++ b/juick-server/src/main/java/com/juick/server/xmpp/s2s/ConnectionListener.java
@@ -3,6 +3,7 @@ package com.juick.server.xmpp.s2s;
import com.juick.xmpp.extensions.StreamError;
public interface ConnectionListener {
+ boolean isTlsAvailable();
void starttls(ConnectionIn connection);
void proceed(ConnectionOut connection);
void verify(ConnectionOut connection, String from, String type, String sid);