1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-30 23:00:09 -05:00

Fix code style

This commit is contained in:
cketti 2015-06-17 21:11:24 +02:00
parent e01b1b189f
commit 366531bdf7

View File

@ -1,16 +1,5 @@
package com.fsck.k9.mail.ssl; package com.fsck.k9.mail.ssl;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.fsck.k9.mail.MessagingException;
import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import java.io.IOException; import java.io.IOException;
import java.net.Socket; import java.net.Socket;
@ -20,6 +9,17 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.fsck.k9.mail.MessagingException;
import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import static com.fsck.k9.mail.K9MailLib.LOG_TAG; import static com.fsck.k9.mail.K9MailLib.LOG_TAG;
@ -27,10 +27,10 @@ import static com.fsck.k9.mail.K9MailLib.LOG_TAG;
* Filter and reorder list of cipher suites and TLS versions. * Filter and reorder list of cipher suites and TLS versions.
*/ */
public class DefaultTrustedSocketFactory implements TrustedSocketFactory { public class DefaultTrustedSocketFactory implements TrustedSocketFactory {
protected static final String ENABLED_CIPHERS[]; protected static final String[] ENABLED_CIPHERS;
protected static final String ENABLED_PROTOCOLS[]; protected static final String[] ENABLED_PROTOCOLS;
protected static final String ORDERED_KNOWN_CIPHERS[] = { protected static final String[] ORDERED_KNOWN_CIPHERS = {
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
@ -76,7 +76,7 @@ public class DefaultTrustedSocketFactory implements TrustedSocketFactory {
"SSL_RSA_WITH_RC4_128_MD5", "SSL_RSA_WITH_RC4_128_MD5",
}; };
protected static final String ORDERED_KNOWN_PROTOCOLS[] = { protected static final String[] ORDERED_KNOWN_PROTOCOLS = {
"TLSv1.2", "TLSv1.1", "TLSv1" "TLSv1.2", "TLSv1.1", "TLSv1"
}; };
@ -110,7 +110,7 @@ public class DefaultTrustedSocketFactory implements TrustedSocketFactory {
reorder(enabledCiphers, ORDERED_KNOWN_CIPHERS, BLACKLISTED_CIPHERS); reorder(enabledCiphers, ORDERED_KNOWN_CIPHERS, BLACKLISTED_CIPHERS);
ENABLED_PROTOCOLS = (supportedProtocols == null) ? null : ENABLED_PROTOCOLS = (supportedProtocols == null) ? null :
reorder(supportedProtocols, ORDERED_KNOWN_PROTOCOLS, BLACKLISTED_PROTOCOLS); reorder(supportedProtocols, ORDERED_KNOWN_PROTOCOLS, BLACKLISTED_PROTOCOLS);
} }
public DefaultTrustedSocketFactory(Context context) { public DefaultTrustedSocketFactory(Context context) {