summaryrefslogtreecommitdiff
path: root/net/ssl
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-12-18 13:48:31 +0100
committerByteHamster <info@bytehamster.com>2022-12-18 15:01:59 +0100
commitd8d6f1c72f0aad452eb88f002dd11995bc1230f9 (patch)
tree184ca8046c438cdfb502c6a74b45ceb8870e6257 /net/ssl
parent1d251492b08ca17852e4a8bb5b0a9638443da9b2 (diff)
downloadAntennaPod-d8d6f1c72f0aad452eb88f002dd11995bc1230f9.zip
Remove support for Android 4.4
Diffstat (limited to 'net/ssl')
-rw-r--r--net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/SslClientSetup.java18
1 files changed, 1 insertions, 17 deletions
diff --git a/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/SslClientSetup.java b/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/SslClientSetup.java
index 45bae160d..aa70514f6 100644
--- a/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/SslClientSetup.java
+++ b/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/SslClientSetup.java
@@ -1,31 +1,15 @@
package de.danoeh.antennapod.net.ssl;
-import android.os.Build;
-import okhttp3.CipherSuite;
import okhttp3.ConnectionSpec;
import okhttp3.OkHttpClient;
import javax.net.ssl.X509TrustManager;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.List;
public class SslClientSetup {
public static void installCertificates(OkHttpClient.Builder builder) {
X509TrustManager trustManager = BackportTrustManager.create();
builder.sslSocketFactory(new AntennaPodSslSocketFactory(trustManager), trustManager);
-
- ConnectionSpec tlsSpec = ConnectionSpec.MODERN_TLS;
- if (BuildConfig.FLAVOR.equals("play") && Build.VERSION.SDK_INT < 21) {
- // workaround for Android 4.x for certain web sites.
- // see: https://github.com/square/okhttp/issues/4053#issuecomment-402579554
- List<CipherSuite> cipherSuites = new ArrayList<>(ConnectionSpec.MODERN_TLS.cipherSuites());
- cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA);
- cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA);
- tlsSpec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
- .cipherSuites(cipherSuites.toArray(new CipherSuite[0]))
- .build();
- }
- builder.connectionSpecs(Arrays.asList(tlsSpec, ConnectionSpec.CLEARTEXT));
+ builder.connectionSpecs(Arrays.asList(ConnectionSpec.MODERN_TLS, ConnectionSpec.CLEARTEXT));
}
}