Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f79b1eb1 authored by András Veres-Szentkirályi's avatar András Veres-Szentkirályi
Browse files

combined nested if statements in DomainNameChecker.matchDns

parent 5c23549a
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -164,20 +164,16 @@ public class DomainNameChecker {
                    List<?> altNameEntry = (List<?>)(i.next());
                    if ((altNameEntry != null) && (2 <= altNameEntry.size())) {
                        Integer altNameType = (Integer)(altNameEntry.get(0));
                        if (altNameType != null) {
                            if (altNameType.intValue() == ALT_DNS_NAME) {
                        if (altNameType != null && altNameType.intValue() == ALT_DNS_NAME) {
                            hasDns = true;
                            String altName = (String)(altNameEntry.get(1));
                                if (altName != null) {
                                    if (matchDns(thisDomain, altName)) {
                            if (altName != null && matchDns(thisDomain, altName)) {
                                return true;
                            }
                        }
                    }
                }
            }
                }
            }
        } catch (CertificateParsingException e) {
            // one way we can get here is if an alternative name starts with
            // '*' character, which is contrary to one interpretation of the