mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Enabled Certificate transparency cache
This commit is contained in:
@@ -454,7 +454,9 @@ public class EmailService implements AutoCloseable {
|
||||
boolean bc = prefs.getBoolean("bouncy_castle", false);
|
||||
boolean fips = prefs.getBoolean("bc_fips", false);
|
||||
factory = new SSLSocketFactoryService(
|
||||
host, insecure, ssl_harden, strict, cert_strict, cert_transparency, check_names, bc, fips, key, chain, fingerprint);
|
||||
context, host, insecure,
|
||||
ssl_harden, strict, cert_strict, cert_transparency, check_names,
|
||||
bc, fips, key, chain, fingerprint);
|
||||
properties.put("mail." + protocol + ".ssl.socketFactory", factory);
|
||||
properties.put("mail." + protocol + ".socketFactory.fallback", "false");
|
||||
properties.put("mail." + protocol + ".ssl.checkserveridentity", "false");
|
||||
@@ -1040,7 +1042,7 @@ public class EmailService implements AutoCloseable {
|
||||
private SSLSocketFactory factory;
|
||||
private X509Certificate certificate;
|
||||
|
||||
SSLSocketFactoryService(String host, boolean insecure,
|
||||
SSLSocketFactoryService(Context context, String host, boolean insecure,
|
||||
boolean ssl_harden, boolean ssl_harden_strict, boolean cert_strict, boolean cert_transparency, boolean check_names,
|
||||
boolean bc, boolean fips,
|
||||
PrivateKey key, X509Certificate[] chain, String fingerprint) throws GeneralSecurityException {
|
||||
@@ -1050,7 +1052,8 @@ public class EmailService implements AutoCloseable {
|
||||
this.ssl_harden_strict = ssl_harden_strict;
|
||||
this.trustedFingerprint = fingerprint;
|
||||
|
||||
TrustManager[] tms = SSLHelper.getTrustManagers(server, secure, cert_strict, cert_transparency, check_names, trustedFingerprint,
|
||||
TrustManager[] tms = SSLHelper.getTrustManagers(
|
||||
context, server, secure, cert_strict, cert_transparency, check_names, trustedFingerprint,
|
||||
new SSLHelper.ITrust() {
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] chain) {
|
||||
|
||||
Reference in New Issue
Block a user