From: Bert Hubert Date: Mon, 10 Jan 2011 08:39:47 +0000 (+0000) Subject: add support for unsalted nsec3 hashes ('1 0 1 -') X-Git-Tag: auth-3.0~395 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c873e6655200b5004dbb033970b11196a23fe4d;p=pdns add support for unsalted nsec3 hashes ('1 0 1 -') git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1852 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 8adb374ac..334135d29 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -107,9 +107,9 @@ void rectifyZone(DNSSECKeeper& dk, const std::string& zone) NSEC3PARAMRecordContent ns3pr; bool narrow; - dk.getNSEC3PARAM(zone, &ns3pr, &narrow); + bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow); string hashed; - if(ns3pr.d_salt.empty()) + if(!haveNSEC3) cerr<<"Adding NSEC ordering information"<updateDNSSECOrderAndAuth(sd.domain_id, zone, qname, auth); else { if(!narrow) { @@ -179,9 +179,9 @@ void showZone(DNSSECKeeper& dk, const std::string& zone) { NSEC3PARAMRecordContent ns3pr; bool narrow; - dk.getNSEC3PARAM(zone, &ns3pr, &narrow); + bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow); - if(ns3pr.d_salt.empty()) + if(!haveNSEC3) cout<<"Zone has NSEC semantics"<updateDNSSECOrderAndAuth(domain_id, domain, qname, auth); else { if(!narrow) {