aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/xmpp/s2s
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/xmpp/s2s')
-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 dc7b3af92..01cc78ab5 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 efac87327..fde7a0e73 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);