Enable SSLv3 if available

pull/194/merge
M66B 3 years ago
parent 6bf50c8f76
commit 36675a634f

@ -1167,10 +1167,14 @@ public class EmailService implements AutoCloseable {
}
sslSocket.setEnabledCipherSuites(ciphers.toArray(new String[0]));
} else {
// Enable SSLv3 if available
sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols());
List<String> ciphers = new ArrayList<>();
ciphers.addAll(Arrays.asList(sslSocket.getEnabledCipherSuites()));
for (String cipher : sslSocket.getSupportedCipherSuites())
if (cipher.contains("3DES")) {
if (!ciphers.contains(cipher) &&
(cipher.contains("3DES") || cipher.contains("RC4"))) {
// Some servers support 3DES and RC4 only
Log.i("SSL enabling cipher=" + cipher);
ciphers.add(cipher);

Loading…
Cancel
Save