From c63f2320da74f9f58a9b62fc1a791361fabac1f9 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 24 May 2020 19:11:39 +0200 Subject: [PATCH] Enable 3DES by default --- app/src/main/java/eu/faircode/email/EmailService.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/EmailService.java b/app/src/main/java/eu/faircode/email/EmailService.java index 10a41d55f1..b585647023 100644 --- a/app/src/main/java/eu/faircode/email/EmailService.java +++ b/app/src/main/java/eu/faircode/email/EmailService.java @@ -800,6 +800,16 @@ public class EmailService implements AutoCloseable { ciphers.add(cipher); } sslSocket.setEnabledCipherSuites(ciphers.toArray(new String[0])); + } else { + List ciphers = new ArrayList<>(); + ciphers.addAll(Arrays.asList(sslSocket.getEnabledCipherSuites())); + for (String cipher : sslSocket.getSupportedCipherSuites()) + if (cipher.contains("3DES")) { + // Some servers support 3DES and RC4 only + Log.i("SSL enabling cipher=" + cipher); + ciphers.add(cipher); + } + sslSocket.setEnabledCipherSuites(ciphers.toArray(new String[0])); } Log.i("SSL protocols=" + TextUtils.join(",", sslSocket.getEnabledProtocols()));