From 7156849c77a7dffb014c35df58115eda6d316a83 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 25 May 2020 13:51:25 +0200 Subject: [PATCH] [core] Set default SecurityMode to 'required' in ConnectionConfiguration --- .../java/org/jivesoftware/smack/ConnectionConfiguration.java | 2 +- .../java/org/jivesoftware/smack/DummyConnection.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java b/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java index e0b24a08f..89b6ec278 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java @@ -600,7 +600,7 @@ public abstract class ConnectionConfiguration { * @param the resulting connection configuration type parameter. */ public abstract static class Builder, C extends ConnectionConfiguration> { - private SecurityMode securityMode = SecurityMode.ifpossible; + private SecurityMode securityMode = SecurityMode.required; private DnssecMode dnssecMode = DnssecMode.disabled; private String keystorePath = System.getProperty("javax.net.ssl.keyStore"); private String keystoreType = KeyStore.getDefaultType(); diff --git a/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java b/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java index b49ab8d3e..d0864842b 100644 --- a/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java +++ b/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java @@ -225,6 +225,7 @@ public class DummyConnection extends AbstractXMPPConnection { ConnectionConfiguration.Builder { private Builder() { + setSecurityMode(SecurityMode.disabled); } @Override