From 4749710a1b1f3aeb82c7024c6f84088b432c1c69 Mon Sep 17 00:00:00 2001 From: Alon Albert Date: Tue, 2 Jan 2018 14:49:50 +0200 Subject: [PATCH] Use proper trust manager --- .../java/org/transdroid/daemon/Deluge/DelugeRpcClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcClient.java b/app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcClient.java index 4f1cec26..dd73ea59 100644 --- a/app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcClient.java +++ b/app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcClient.java @@ -2,7 +2,6 @@ package org.transdroid.daemon.Deluge; import android.support.annotation.NonNull; import android.text.TextUtils; -import deluge.impl.net.AcceptAllTrustManager; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -21,6 +20,7 @@ import javax.net.ssl.TrustManager; import org.transdroid.daemon.DaemonException; import org.transdroid.daemon.DaemonException.ExceptionType; import org.transdroid.daemon.DaemonSettings; +import org.transdroid.daemon.util.IgnoreSSLTrustManager; import se.dimovski.rencode.Rencode; /** @@ -141,7 +141,7 @@ class DelugeRpcClient { @NonNull private Socket openSocket() throws DaemonException { try { - final TrustManager[] trustAllCerts = new TrustManager[]{new AcceptAllTrustManager()}; + final TrustManager[] trustAllCerts = new TrustManager[]{new IgnoreSSLTrustManager()}; final SSLContext sslContext = SSLContext.getInstance("TLSv1"); sslContext.init(null, trustAllCerts, new java.security.SecureRandom());