From 15bcbb03a2bbdc00175c03763e2ed7f30b4f2a57 Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Fri, 16 Jan 2015 13:14:16 +0100 Subject: [PATCH] Fix always failing SSL with empty sslTrustKey --- app/src/main/java/org/transdroid/daemon/util/HttpHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java b/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java index 90a2db9e..309b4ff1 100644 --- a/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java +++ b/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java @@ -130,7 +130,7 @@ public class HttpHelper { // Register http and https sockets SchemeRegistry registry = new SchemeRegistry(); SocketFactory httpsSocketFactory; - if (sslTrustKey != null) { + if (sslTrustKey != null && sslTrustKey.length() != 0) { httpsSocketFactory = new TlsSniSocketFactory(sslTrustKey); } else if (sslTrustAll) { httpsSocketFactory = new TlsSniSocketFactory(true);