From bd9e62426acd506d526e02479b25883605182ab8 Mon Sep 17 00:00:00 2001 From: Charles-Henri Bruyand Date: Tue, 27 Mar 2018 16:01:43 +0200 Subject: [PATCH] rec: remove unused plotter related code --- pdns/validate.cc | 68 +++--------------------------------------------- 1 file changed, 3 insertions(+), 65 deletions(-) diff --git a/pdns/validate.cc b/pdns/validate.cc index 3f7e0dafe6..f0fba47392 100644 --- a/pdns/validate.cc +++ b/pdns/validate.cc @@ -9,10 +9,6 @@ bool g_dnssecLOG{false}; uint16_t g_maxNSEC3Iterations{0}; #define LOG(x) if(g_dnssecLOG) { g_log < nsec3) +static std::string getHashFromNSEC3(const DNSName& qname, const std::shared_ptr& nsec3) { std::string result; @@ -155,14 +151,14 @@ static DNSName getNSECOwnerName(const DNSName& initialOwner, const std::vector nsec) +static bool isNSECAncestorDelegation(const DNSName& signer, const DNSName& owner, const std::shared_ptr& nsec) { return nsec->d_set.count(QType::NS) && !nsec->d_set.count(QType::SOA) && signer.countLabels() < owner.countLabels(); } -static bool isNSEC3AncestorDelegation(const DNSName& signer, const DNSName& owner, const std::shared_ptr nsec3) +static bool isNSEC3AncestorDelegation(const DNSName& signer, const DNSName& owner, const std::shared_ptr& nsec3) { return nsec3->d_set.count(QType::NS) && !nsec3->d_set.count(QType::SOA) && @@ -737,11 +733,6 @@ bool validateWithKeySet(time_t now, const DNSName& name, const vectord_type != QType::DNSKEY) { - dotEdge(signature->d_signer, - "DNSKEY", signature->d_signer, std::to_string(signature->d_tag), - DNSRecordContent::NumberToType(signature->d_type), name, "", signIsValid ? "green" : "red"); - } if (signIsValid && !validateAllSigs) { return true; } @@ -847,16 +838,12 @@ void validateDNSKeysAgainstDS(time_t now, const DNSName& zone, const dsmap_t& ds LOG("got valid DNSKEY (it matches the DS) with tag "<(dsrc.d_digesttype) % static_cast(dsrc.d_algorithm)).str()); } else { if (dsCreated) { LOG("DNSKEY did not match the DS, parent DS: "< "<(dsrc.d_digesttype)<<"\" ]; label = \"zone: "<getTag()), isValid ? "green" : "red"); - // dotNode("DNSKEY", zone, (boost::format("tag=%d, algo=%d") % drc->getTag() % static_cast(drc->d_algorithm)).str()); } } @@ -888,16 +875,9 @@ void validateDNSKeysAgainstDS(time_t now, const DNSName& zone, const dsmap_t& ds // cerr<<"validating : "; bool signIsValid = checkSignatureWithKey(now, sig, key, msg); - for(uint16_t tag : toSignTags) { - dotEdge(zone, - "DNSKEY", zone, std::to_string(sig->d_tag), - "DNSKEY", zone, std::to_string(tag), signIsValid ? "green" : "red"); - } - if(signIsValid) { LOG("validation succeeded - whole DNSKEY set is valid"<d_signer))<<" -> "<getTag()<<" and algorithm "<d_algorithm)<<": "<getZoneRepresentation()<getTag()), (boost::format("tag=%d, algo=%d") % drc->getTag() % static_cast(drc->d_algorithm)).str()); toSign.push_back(rec.d_content); } @@ -1057,10 +1036,6 @@ vState getKeysFor(DNSRecordOracle& dro, const DNSName& zone, skeyset_t& keyset) const auto dsrc=std::dynamic_pointer_cast(*j); if(dsrc) { dsmap.insert(*dsrc); - // dotEdge(key*(zoneCutIter+1), - // "DNSKEY", key*(zoneCutIter+1), , - // "DS", *(zoneCutIter+1), std::to_string(dsrc.d_tag)); - // cout<<" "< "< >& signa return DNSName(); } - -string dotEscape(string name) -{ - return "\"" + boost::replace_all_copy(name, "\"", "\\\"") + "\""; -} - -string dotName(string type, DNSName name, string tag) -{ - if(tag == "") - return type+" "+name.toString(); - else - return type+" "+name.toString()+"/"+tag; -} -void dotNode(string type, DNSName name, string tag, string content) -{ -#ifdef GRAPHVIZ - cout<<" " - < " - <