mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-12 07:07:18 +00:00
Small improvement
This commit is contained in:
parent
5c3592b7fe
commit
63309f6a35
1 changed files with 4 additions and 2 deletions
|
@ -112,6 +112,9 @@ public class EmailService implements AutoCloseable {
|
|||
"SSLv2", "SSLv3", "TLSv1", "TLSv1.1"
|
||||
));
|
||||
|
||||
private static final Pattern SSL_CIPHER_BLACKLIST =
|
||||
Pattern.compile(".*(_DES|DH_|DSS|EXPORT|MD5|NULL|RC4|TLS_FALLBACK_SCSV).*");
|
||||
|
||||
private EmailService() {
|
||||
// Prevent instantiation
|
||||
}
|
||||
|
@ -794,9 +797,8 @@ public class EmailService implements AutoCloseable {
|
|||
sslSocket.setEnabledProtocols(protocols.toArray(new String[0]));
|
||||
|
||||
ArrayList<String> ciphers = new ArrayList<>();
|
||||
Pattern pattern = Pattern.compile(".*(_DES|DH_|DSS|EXPORT|MD5|NULL|RC4|TLS_FALLBACK_SCSV).*");
|
||||
for (String cipher : sslSocket.getEnabledCipherSuites()) {
|
||||
if (pattern.matcher(cipher).matches())
|
||||
if (SSL_CIPHER_BLACKLIST.matcher(cipher).matches())
|
||||
Log.i("SSL disabling cipher=" + cipher);
|
||||
else
|
||||
ciphers.add(cipher);
|
||||
|
|
Loading…
Add table
Reference in a new issue