SSL debugging

pull/194/merge
M66B 3 years ago
parent 34627add38
commit d0fa70201b

@ -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());

Loading…
Cancel
Save