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

Added trush manager logging

This commit is contained in:
M66B 2022-02-22 18:33:57 +01:00
parent 4df24d7dd0
commit 068e812fd3

View file

@ -969,12 +969,18 @@ public class EmailService implements AutoCloseable {
tmf.init((KeyStore) null); tmf.init((KeyStore) null);
TrustManager[] tms = tmf.getTrustManagers(); TrustManager[] tms = tmf.getTrustManagers();
Log.i("Trust managers=" + (tms == null ? null : tms.length));
if (tms == null || tms.length == 0 || !(tms[0] instanceof X509TrustManager)) { if (tms == null || tms.length == 0 || !(tms[0] instanceof X509TrustManager)) {
Log.e("Missing root trust manager"); Log.e("Missing root trust manager");
sslContext.init(null, tms, null); sslContext.init(null, tms, null);
} else { } else {
final X509TrustManager rtm = (X509TrustManager) tms[0]; final X509TrustManager rtm = (X509TrustManager) tms[0];
if (tms.length > 1)
for (TrustManager tm : tms)
Log.e("Trust manager " + tm.getClass());
X509TrustManager tm = new X509TrustManager() { X509TrustManager tm = new X509TrustManager() {
// openssl s_client -connect <host> // openssl s_client -connect <host>