From: bert hubert Date: Wed, 22 Jun 2016 14:42:11 +0000 (+0200) Subject: add a lot of dnssec trace logging X-Git-Tag: auth-4.0.0-rc1~20^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a95d1b582d54b1ef217c852e038950e1a4ccfaa4;p=pdns add a lot of dnssec trace logging --- diff --git a/pdns/validate-recursor.cc b/pdns/validate-recursor.cc index 227f9ddf8..eae00a61d 100644 --- a/pdns/validate-recursor.cc +++ b/pdns/validate-recursor.cc @@ -52,6 +52,9 @@ vState validateRecords(const vector& recs) if(state == NTA) return Insecure; LOG("! state = "<& recs) #endif // cerr<<"Input to validate: "<first.first)<<"/"<first.second)<<" with "<second.signatures.size()<<" sigs: "; + LOG("validating "<<(i->first.first)<<"/"<first.second)<<" with "<second.signatures.size()<<" sigs"<second.signatures) { vector > toSign = i->second.records; if(getByTag(keys,signature->d_tag).empty()) { - // cerr<<"No key provided for "<d_tag<d_tag<d_siginception < now && signature->d_sigexpire > now) { std::shared_ptr dke = shared_ptr(DNSCryptoKeyEngine::makeFromPublicKeyString(l.d_algorithm, l.d_key)); isValid = dke->verify(msg, signature->d_signature); + LOG("signature by key with tag "<d_tag<<" was " << (isValid ? "" : "NOT ")<<"valid"<first] = i->second; + LOG("Validated "<first.first<<"/"<d_type)<first.first<<"/"<d_type)<first.first<<"/"<<)< (rec); + LOG("Got signature: "<getZoneRepresentation()<<" with tag "<d_tag<<", for type "<d_type)<d_type != QType::DNSKEY) continue; sigs.push_back(*rrc); @@ -248,15 +251,15 @@ vState getKeysFor(DNSRecordOracle& dro, const DNSName& zone, keyset_t &keyset) auto drc=getRR (rec); if(drc) { tkeys.insert(*drc); - // cerr<<"Inserting key with tag "<getTag()<<": "<getZoneRepresentation()<getTag()), (boost::format("tag=%d, algo=%d") % drc->getTag() % static_cast(drc->d_algorithm)).str()); + LOG("Inserting key with tag "<getTag()<<": "<getZoneRepresentation()<getTag()), (boost::format("tag=%d, algo=%d") % drc->getTag() % static_cast(drc->d_algorithm)).str()); toSign.push_back(rec.d_content); toSignTags.push_back(drc->getTag()); } } } - // cerr<<"got "<first<<" for "<(dsrc.d_digesttype) % static_cast(dsrc.d_algorithm)).str()); @@ -316,7 +319,7 @@ vState getKeysFor(DNSRecordOracle& dro, const DNSName& zone, keyset_t &keyset) } } catch(std::exception& e) { - // cerr<<"Could not make a validator for signature: "<