From 2c5fe4f907973870bd9f56a5ab94ab4485196e5a Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 8 Mar 2024 11:34:17 +0100 Subject: [PATCH] validate: Remove unused harvestCSPFromRecs() --- pdns/validate.cc | 30 +----------------------------- pdns/validate.hh | 1 - 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/pdns/validate.cc b/pdns/validate.cc index 6833ab9baa..20b87d57e9 100644 --- a/pdns/validate.cc +++ b/pdns/validate.cc @@ -705,7 +705,7 @@ dState getDenial(const cspmap_t &validrrsets, const DNSName& qname, const uint16 if (g_maxNSEC3sPerRecordToConsider > 0 && nsec3sConsidered >= g_maxNSEC3sPerRecordToConsider) { VLOG(log, qname << ": Too many NSEC3s for this record"< insecure/7bits.nl/[] -// www.powerdnssec.org -> secure/powerdnssec.org/[keys] -// www.dnssec-failed.org -> bogus/dnssec-failed.org/[] - -cspmap_t harvestCSPFromRecs(const vector& recs) -{ - cspmap_t cspmap; - for(const auto& rec : recs) { - // cerr<<"res "<(rec); - if (rrc) { - cspmap[{rec.d_name,rrc->d_type}].signatures.push_back(rrc); - } - } - else { - cspmap[{rec.d_name, rec.d_type}].records.insert(rec.getContent()); - } - } - return cspmap; -} - bool getTrustAnchor(const map& anchors, const DNSName& zone, dsmap_t &res) { const auto& iter = anchors.find(zone); diff --git a/pdns/validate.hh b/pdns/validate.hh index 034839fca0..f739bb7bab 100644 --- a/pdns/validate.hh +++ b/pdns/validate.hh @@ -107,7 +107,6 @@ vState validateWithKeySet(time_t now, const DNSName& name, const sortedRecords_t bool isCoveredByNSEC(const DNSName& name, const DNSName& begin, const DNSName& next); bool isCoveredByNSEC3Hash(const std::string& hash, const std::string& beginHash, const std::string& nextHash); bool isCoveredByNSEC3Hash(const DNSName& name, const DNSName& beginHash, const DNSName& nextHash); -cspmap_t harvestCSPFromRecs(const vector& recs); bool getTrustAnchor(const map& anchors, const DNSName& zone, dsmap_t &res); bool haveNegativeTrustAnchor(const map& negAnchors, const DNSName& zone, std::string& reason); vState validateDNSKeysAgainstDS(time_t now, const DNSName& zone, const dsmap_t& dsmap, const skeyset_t& tkeys, const sortedRecords_t& toSign, const vector >& sigs, skeyset_t& validkeys, const OptLog&, pdns::validation::ValidationContext& context); -- 2.47.2