From c66b6c52b72e133104c649701e8515a051d8bd88 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 10 May 2016 16:11:50 +0200 Subject: [PATCH] fix bug with enabling NetCipher on the wrong domains breaks SNI I messed this up in f2621dcb558b12a4430b6301b4af4a824d57eb6d fixes #629 https://gitlab.com/fdroid/fdroidclient/issues/629 --- app/src/main/java/org/fdroid/fdroid/net/HttpDownloader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/fdroid/fdroid/net/HttpDownloader.java b/app/src/main/java/org/fdroid/fdroid/net/HttpDownloader.java index 11d87a8b3..5cc5f75ea 100644 --- a/app/src/main/java/org/fdroid/fdroid/net/HttpDownloader.java +++ b/app/src/main/java/org/fdroid/fdroid/net/HttpDownloader.java @@ -120,7 +120,7 @@ public class HttpDownloader extends Downloader { // workaround until NetCipher supports HTTPS SNI // https://gitlab.com/fdroid/fdroidclient/issues/431 if (connection instanceof HttpsURLConnection - && "f-droid.org".equals(sourceUrl.getHost())) { + && !"f-droid.org".equals(sourceUrl.getHost())) { ((HttpsURLConnection) connection).setSSLSocketFactory(HttpsURLConnection.getDefaultSSLSocketFactory()); }