Skip storing trust anchors

pull/172/head
M66B 6 years ago
parent 16aa183b3f
commit f505d4ceeb

@ -4837,7 +4837,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
// Load/store intermediate certificates // Load/store intermediate certificates
List<X509Certificate> local = new ArrayList<>(); List<X509Certificate> local = new ArrayList<>();
try { try {
List<EntityCertificate> ecs = db.certificate().getIntermediateCertificate(); List<EntityCertificate> ecs = db.certificate().getIntermediateCertificate();
for (EntityCertificate ec : ecs) for (EntityCertificate ec : ecs)
@ -4846,7 +4845,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
for (X509Certificate c : certs) { for (X509Certificate c : certs) {
boolean[] usage = c.getKeyUsage(); boolean[] usage = c.getKeyUsage();
boolean root = (usage != null && usage[5]); boolean root = (usage != null && usage[5]);
if (root) { if (root && ks.getCertificateAlias(c) == null) {
boolean found = false; boolean found = false;
String issuer = (c.getIssuerDN() == null ? "" : c.getIssuerDN().getName()); String issuer = (c.getIssuerDN() == null ? "" : c.getIssuerDN().getName());
EntityCertificate record = EntityCertificate.from(c, true, issuer); EntityCertificate record = EntityCertificate.from(c, true, issuer);

Loading…
Cancel
Save