File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed
regression-tests/backends Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -1537,18 +1537,23 @@ try
1537
1537
string nsec3params = cmds.size () > 2 ? cmds[2 ] : " 1 0 1 ab" ;
1538
1538
bool narrow = cmds.size () > 3 && cmds[3 ]==" narrow" ;
1539
1539
NSEC3PARAMRecordContent ns3pr (nsec3params);
1540
-
1541
- string zone=cmds[1 ];
1542
- if (!dk.isSecuredZone (zone)) {
1543
- cerr<<" Zone '" <<zone<<" ' is not secured, can't set NSEC3 parameters" <<endl;
1544
- exit (EXIT_FAILURE);
1540
+
1541
+ if (! dk.setNSEC3PARAM (cmds[1 ], ns3pr, narrow)) {
1542
+ cerr<<" Cannot set NSEC3 param for " << cmds[1 ] << endl;
1543
+ return 1 ;
1545
1544
}
1546
- dk.setNSEC3PARAM (zone, ns3pr, narrow);
1547
-
1545
+
1548
1546
if (!ns3pr.d_flags )
1549
- cerr<<" NSEC3 set, please rectify-zone if your backend needs it" <<endl;
1547
+ cerr<<" NSEC3 set, " ;
1548
+ else
1549
+ cerr<<" NSEC3 (opt-out) set, " ;
1550
+
1551
+ if (dk.isSecuredZone (cmds[1 ]))
1552
+ cerr<<" please rectify your zone if your backend needs it" <<endl;
1550
1553
else
1551
- cerr<<" NSEC3 (opt-out) set, please rectify-zone if your backend needs it" <<endl;
1554
+ cerr<<" please secure and rectify your zone." <<endl;
1555
+
1556
+ return 0 ;
1552
1557
}
1553
1558
else if (cmds[0 ]==" set-presigned" ) {
1554
1559
if (cmds.size () < 2 ) {
Original file line number Diff line number Diff line change @@ -12,16 +12,14 @@ gsql-master()
12
12
do
13
13
if [ $context != ${backend}-nodnssec ]
14
14
then
15
- securezone $zone ${backend}
16
15
if [ $context = ${backend}-nsec3 ] || [ $context = ${backend}-nsec3-optout ]
17
16
then
18
17
../pdns/pdnssec --config-dir=. --config-name=$backend set-nsec3 $zone "1 $optout 1 abcd" 2>&1
19
- ../pdns/pdnssec --config-dir=. --config-name=$backend rectify-zone $zone 2>&1
20
18
elif [ $context = ${backend}-nsec3-narrow ]
21
19
then
22
20
../pdns/pdnssec --config-dir=. --config-name=$backend set-nsec3 $zone '1 1 1 abcd' narrow 2>&1
23
- ../pdns/pdnssec --config-dir=. --config-name=$backend rectify-zone $zone 2>&1
24
21
fi
22
+ securezone $zone ${backend}
25
23
else
26
24
../pdns/pdnssec --config-dir=. --config-name=$backend rectify-zone $zone 2>&1
27
25
fi
You can’t perform that action at this time.
0 commit comments