use of org.minidns.dnssec.DnssecResultNotAuthenticException in project Smack by igniterealtime.
the class MiniDnsResolver method shouldAbortIfNotAuthentic.
private static boolean shouldAbortIfNotAuthentic(DnsName name, DnssecMode dnssecMode, ResolverResult<?> result, List<RemoteConnectionEndpointLookupFailure> lookupFailures) {
switch(dnssecMode) {
case needsDnssec:
case needsDnssecAndDane:
// Check if the result is authentic data, i.e. there a no reasons the result is unverified.
DnssecResultNotAuthenticException exception = result.getDnssecResultNotAuthenticException();
if (exception != null) {
RemoteConnectionEndpointLookupFailure failure = new RemoteConnectionEndpointLookupFailure.DnsLookupFailure(name, exception);
lookupFailures.add(failure);
return true;
}
break;
case disabled:
break;
default:
throw new IllegalStateException("Unknown DnssecMode: " + dnssecMode);
}
return false;
}
Aggregations