From: Otto Moerbeek Date: Tue, 25 Jan 2022 07:55:01 +0000 (+0100) Subject: Tweaks and typos X-Git-Tag: auth-4.7.0-alpha1~42^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f9ac81ca949cd2dbe4c39340c0a69a0eca07a62;p=thirdparty%2Fpdns.git Tweaks and typos --- diff --git a/pdns/recursordist/rec-zonetocache.cc b/pdns/recursordist/rec-zonetocache.cc index 7347b61321..3918766ac5 100644 --- a/pdns/recursordist/rec-zonetocache.cc +++ b/pdns/recursordist/rec-zonetocache.cc @@ -21,7 +21,6 @@ */ #include "rec-zonetocache.hh" -#include #include "syncres.hh" #include "zoneparser-tng.hh" @@ -316,15 +315,14 @@ vState ZoneData::dnssecValidate(pdns::ZoneMD& zonemd, size_t& zonemdCount) const d_log->info("zone NSEC(3) record does not validate"); return nsecValidationStatus; } + auto denial = getDenial(csp, d_zone, QType::ZONEMD, false, false, true); - switch (denial) { - case dState::NXQTYPE: + if (denial == dState::NXQTYPE) { d_log->info("Validated denial of absence of ZONEMD record"); return vState::Secure; - default: - d_log->info("No ZONEMD record, but NSEC(3) record does not deny it"); - return vState::BogusInvalidDenial; } + d_log->info("No ZONEMD record, but NSEC(3) record does not deny it"); + return vState::BogusInvalidDenial; } // Collect the ZONEMD records and validate them using the validated DNSSKEYs @@ -345,7 +343,7 @@ void ZoneData::ZoneToCache(const RecZoneToCache::Config& config) throw PDNSException("ZONEMD DNSSEC validation failure: DNSSEC validation is switched off but required by ZoneToCache"); } - // First scan all records collecting info about delegations ans sigs + // First scan all records collecting info about delegations and sigs // A this moment, we ignore NSEC and NSEC3 records. It is not clear to me yet under which conditions // they could be entered in into the (neg)cache. diff --git a/pdns/zonemd.cc b/pdns/zonemd.cc index 1ee0b58b9c..c357e911ef 100644 --- a/pdns/zonemd.cc +++ b/pdns/zonemd.cc @@ -223,7 +223,7 @@ void pdns::ZoneMD::verify(bool& validationDone, bool& validationOK) } if (sorted.empty()) { - // continue; + continue; } if (qtype != QType::RRSIG) {