From 7649cd7144da861f9b335d44a912d8dc830a6bfc Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Tue, 24 Mar 2015 14:29:22 +0100 Subject: [PATCH] allow "pdnssec set-nsec3 ZONE" for insecure zones this saves on one rectify when securing a NSEC3 zone --- pdns/pdnssec.cc | 22 ++++++++++++++-------- regression-tests/backends/gsql-common | 4 +--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 8470c7e4f..120f787dc 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -1673,18 +1673,24 @@ try string nsec3params = cmds.size() > 2 ? cmds[2] : "1 0 1 ab"; bool narrow = cmds.size() > 3 && cmds[3]=="narrow"; NSEC3PARAMRecordContent ns3pr(nsec3params); - + DNSName zone(cmds[1]); - if(!dk.isSecuredZone(zone)) { - cerr<<"Zone '"<&1 - ../pdns/pdnssec --config-dir=. --config-name=$backend rectify-zone $zone 2>&1 elif [ $context = ${backend}-nsec3-narrow ] then ../pdns/pdnssec --config-dir=. --config-name=$backend set-nsec3 $zone '1 1 1 abcd' narrow 2>&1 - ../pdns/pdnssec --config-dir=. --config-name=$backend rectify-zone $zone 2>&1 fi + securezone $zone ${backend} else ../pdns/pdnssec --config-dir=. --config-name=$backend rectify-zone $zone 2>&1 fi -- 2.40.0