Simplification

pull/170/head
M66B 5 years ago
parent 6cde2087d4
commit ab325935ac

@ -455,14 +455,7 @@ public class MailService implements AutoCloseable {
SSLContext sslContext = SSLContext.getInstance("TLS");
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
try {
KeyStore ks = KeyStore.getInstance("AndroidCAStore");
ks.load(null, null);
tmf.init(ks);
} catch (IOException ex) {
Log.e(ex);
tmf.init((KeyStore) null);
}
TrustManager[] tms = tmf.getTrustManagers();
if (tms == null || tms.length == 0 || !(tms[0] instanceof X509TrustManager)) {

@ -4,6 +4,7 @@
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
Loading…
Cancel
Save