aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-08-27 18:03:37 -0700
committerScott Jackson <daneren2005@gmail.com>2015-08-27 18:03:37 -0700
commita74a93210233eb26c23552d0af4c44d848bca2ce (patch)
tree98b19b05bd940c5f4f9817536db3549b1a3a4eba /app
parentf64a25bdbe6ce01c3f1c1ac301e49a1d86fb5066 (diff)
downloaddsub-a74a93210233eb26c23552d0af4c44d848bca2ce.tar.gz
dsub-a74a93210233eb26c23552d0af4c44d848bca2ce.tar.bz2
dsub-a74a93210233eb26c23552d0af4c44d848bca2ce.zip
Fix Android M not working without the ciphers which broken L...
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/ssl/SSLSocketFactory.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/ssl/SSLSocketFactory.java b/app/src/main/java/github/daneren2005/dsub/service/ssl/SSLSocketFactory.java
index 3b1203c7..830950c8 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/ssl/SSLSocketFactory.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/ssl/SSLSocketFactory.java
@@ -27,6 +27,7 @@
package github.daneren2005.dsub.service.ssl;
+import android.os.Build;
import android.util.Log;
import org.apache.http.conn.ConnectTimeoutException;
@@ -540,8 +541,11 @@ public class SSLSocketFactory implements LayeredSocketFactory {
List<String> enabledCiphers = new ArrayList(Arrays.asList(ciphers));
// On Android 5.0 release, Jetty doesn't seem to play nice with these ciphers
- enabledCiphers.remove("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA");
- enabledCiphers.remove("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA");
+ // Issue seems to have been fixed in M, and now won't work without them. Because Google
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
+ enabledCiphers.remove("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA");
+ enabledCiphers.remove("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA");
+ }
ciphers = enabledCiphers.toArray(new String[enabledCiphers.size()]);
return ciphers;