From 3c873e6655200b5004dbb033970b11196a23fe4d Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Mon, 10 Jan 2011 08:39:47 +0000 Subject: [PATCH] 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 --- pdns/pdnssec.cc | 10 +++++----- pdns/rcpgenerator.cc | 10 ++++++++++ pdns/slavecommunicator.cc | 7 ++++--- 3 files changed, 19 insertions(+), 8 deletions(-) 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) { -- 2.50.1