mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Added BC FIPS mode
This commit is contained in:
@@ -93,6 +93,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
private SwitchCompat swCertStrict;
|
||||
private SwitchCompat swOpenSafe;
|
||||
private SwitchCompat swBouncyCastle;
|
||||
private SwitchCompat swFipsMode;
|
||||
private Button btnManage;
|
||||
private TextView tvNetworkMetered;
|
||||
private TextView tvNetworkRoaming;
|
||||
@@ -111,7 +112,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
"download_headers", "download_eml", "download_plain",
|
||||
"require_validated", "require_validated_captive", "vpn_only",
|
||||
"timeout", "prefer_ip4", "bind_socket", "standalone_vpn", "tcp_keep_alive",
|
||||
"ssl_harden", "ssl_harden_strict", "cert_strict", "open_safe", "bouncy_castle"
|
||||
"ssl_harden", "ssl_harden_strict", "cert_strict", "open_safe", "bouncy_castle", "bc_fips"
|
||||
};
|
||||
|
||||
@Override
|
||||
@@ -146,6 +147,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
swCertStrict = view.findViewById(R.id.swCertStrict);
|
||||
swOpenSafe = view.findViewById(R.id.swOpenSafe);
|
||||
swBouncyCastle = view.findViewById(R.id.swBouncyCastle);
|
||||
swFipsMode = view.findViewById(R.id.swFipsMode);
|
||||
btnManage = view.findViewById(R.id.btnManage);
|
||||
|
||||
tvNetworkMetered = view.findViewById(R.id.tvNetworkMetered);
|
||||
@@ -354,6 +356,14 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("bouncy_castle", checked).apply();
|
||||
swFipsMode.setEnabled(checked);
|
||||
}
|
||||
});
|
||||
|
||||
swFipsMode.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("bc_fips", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -619,6 +629,8 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
swCertStrict.setChecked(prefs.getBoolean("cert_strict", !BuildConfig.PLAY_STORE_RELEASE));
|
||||
swOpenSafe.setChecked(prefs.getBoolean("open_safe", false));
|
||||
swBouncyCastle.setChecked(prefs.getBoolean("bouncy_castle", false));
|
||||
swFipsMode.setChecked(prefs.getBoolean("bc_fips", false));
|
||||
swFipsMode.setEnabled(swBouncyCastle.isChecked());
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user