diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-10-15 17:08:38 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-10-15 17:08:38 +0200 |
commit | e75c2cd731fd7fa55d5f57a07af42911f271a5cc (patch) | |
tree | aa428e5d704e86b9aed81eb82d2c0c9f3ea48ebe /src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | |
parent | 1738673c53b8ac0abbb2e5939dff16300a9c67b8 (diff) |
use own XmppDomainVerifier instead of deprecated StrictHostnameVerifier. fixes #1189
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 999aecc9f..d21682a79 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -55,6 +55,7 @@ import javax.net.ssl.X509TrustManager; import de.duenndns.ssl.MemorizingTrustManager; import eu.siacs.conversations.Config; +import eu.siacs.conversations.crypto.XmppDomainVerifier; import eu.siacs.conversations.crypto.sasl.DigestMd5; import eu.siacs.conversations.crypto.sasl.External; import eu.siacs.conversations.crypto.sasl.Plain; @@ -606,9 +607,9 @@ public class XmppConnection implements Runnable { final SSLSocketFactory factory = sc.getSocketFactory(); final HostnameVerifier verifier; if (mInteractive) { - verifier = trustManager.wrapHostnameVerifier(new StrictHostnameVerifier()); + verifier = trustManager.wrapHostnameVerifier(new XmppDomainVerifier()); } else { - verifier = trustManager.wrapHostnameVerifierNonInteractive(new StrictHostnameVerifier()); + verifier = trustManager.wrapHostnameVerifierNonInteractive(new XmppDomainVerifier()); } final InetAddress address = socket == null ? null : socket.getInetAddress(); |