1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-25 07:23:03 +00:00

SSL debugging

This commit is contained in:
M66B 2022-02-23 11:31:28 +01:00
parent 34627add38
commit d0fa70201b

View file

@ -1153,6 +1153,15 @@ public class EmailService implements AutoCloseable {
if (socket instanceof SSLSocket) { if (socket instanceof SSLSocket) {
SSLSocket sslSocket = (SSLSocket) socket; SSLSocket sslSocket = (SSLSocket) socket;
if (BuildConfig.TEST_RELEASE) {
List<String> protocols = new ArrayList<>(Arrays.asList(sslSocket.getEnabledProtocols()));
List<String> ciphers = new ArrayList<>(Arrays.asList(sslSocket.getEnabledCipherSuites()));
for (String protocol : sslSocket.getSupportedProtocols())
Log.e("SSL " + protocol + "=" + protocols.contains(protocol));
for (String cipher : sslSocket.getSupportedCipherSuites())
Log.e("SSL " + cipher + "=" + protocols.contains(cipher));
}
if (!secure) { if (!secure) {
sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols()); sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols());