mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-16 14:35:04 -05:00
combined nested if statements in DomainNameChecker.matchDns
This commit is contained in:
parent
5c23549a0b
commit
f79b1eb142
@ -164,20 +164,16 @@ public class DomainNameChecker {
|
|||||||
List<?> altNameEntry = (List<?>)(i.next());
|
List<?> altNameEntry = (List<?>)(i.next());
|
||||||
if ((altNameEntry != null) && (2 <= altNameEntry.size())) {
|
if ((altNameEntry != null) && (2 <= altNameEntry.size())) {
|
||||||
Integer altNameType = (Integer)(altNameEntry.get(0));
|
Integer altNameType = (Integer)(altNameEntry.get(0));
|
||||||
if (altNameType != null) {
|
if (altNameType != null && altNameType.intValue() == ALT_DNS_NAME) {
|
||||||
if (altNameType.intValue() == ALT_DNS_NAME) {
|
|
||||||
hasDns = true;
|
hasDns = true;
|
||||||
String altName = (String)(altNameEntry.get(1));
|
String altName = (String)(altNameEntry.get(1));
|
||||||
if (altName != null) {
|
if (altName != null && matchDns(thisDomain, altName)) {
|
||||||
if (matchDns(thisDomain, altName)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (CertificateParsingException e) {
|
} catch (CertificateParsingException e) {
|
||||||
// one way we can get here is if an alternative name starts with
|
// one way we can get here is if an alternative name starts with
|
||||||
// '*' character, which is contrary to one interpretation of the
|
// '*' character, which is contrary to one interpretation of the
|
||||||
|
Loading…
Reference in New Issue
Block a user