1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 13:44:40 +00:00

Prevent NPE

This commit is contained in:
M66B 2024-12-12 07:40:43 +01:00
parent 371814d1da
commit 0d5aafb1f9

View file

@ -224,7 +224,9 @@ public class EntityCertificate {
List<RDN> rdns = new ArrayList<>(); List<RDN> rdns = new ArrayList<>();
rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.CN))); rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.CN)));
rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.EmailAddress))); rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.EmailAddress)));
for (RDN rdn : rdns) for (RDN rdn : rdns) {
if (rdn == null)
continue;
for (AttributeTypeAndValue tv : rdn.getTypesAndValues()) { for (AttributeTypeAndValue tv : rdn.getTypesAndValues()) {
ASN1Encodable enc = tv.getValue(); ASN1Encodable enc = tv.getValue();
if (enc == null) if (enc == null)
@ -237,6 +239,7 @@ public class EntityCertificate {
result.add(MessageHelper.fromPunyCode(email)); result.add(MessageHelper.fromPunyCode(email));
} }
} }
}
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(ex);
} }