]> granicus.if.org Git - pdns/commitdiff
don't genereate keys for nsd in unsigned mode
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 3 Sep 2013 11:30:45 +0000 (13:30 +0200)
committermind04 <mind04@monshouwer.org>
Thu, 5 Sep 2013 20:10:51 +0000 (22:10 +0200)
regression-tests/start-test-stop

index 934e92a3ad6c9abe189d32622bc2e12c9dbf154c..89fa0218bff910437692936294417ab555ab7707 100755 (executable)
@@ -25,17 +25,14 @@ server:
        username: ""
 __EOF__
 
-       nsdfix
        rm -f K*
+       rm -f *.nsd
+
+       nsdfix
+
        for zone in $(grep zone named.conf  | cut -f2 -d\")
        do
-               if [ ! "${zone: 0:16}" = "secure-delegated" ]
-               then
-                       ksk=$(ldns-keygen -r /dev/urandom -a RSASHA256 -k $zone)
-               else
-                       ksk="secure-delegated.dnssec-parent.com"
-               fi
-               zsk=$(ldns-keygen -r /dev/urandom -a RSASHA256 $zone)
+
                if [ -f $zone.nsd ]
                then
                        zonefile=${zone}.nsd
@@ -43,6 +40,17 @@ __EOF__
                        zonefile=${zone}
                fi
 
+               if [ "$1" != "unsigned" ]
+               then
+                       if [ ! "${zone: 0:16}" = "secure-delegated" ]
+                       then
+                               ksk=$(ldns-keygen -r /dev/urandom -a RSASHA256 -k $zone)
+                       else
+                               ksk="secure-delegated.dnssec-parent.com"
+                       fi
+                       zsk=$(ldns-keygen -r /dev/urandom -a RSASHA256 $zone)
+               fi
+
                case $1 in
                        nsec)
                                ldns-signzone -f ${zone}.signed ${zonefile} $ksk $zsk
@@ -64,6 +72,7 @@ __EOF__
                                echo 'tonsd called with wrong param'
                                exit 1
                esac
+
                echo "" >> nsd.conf
                echo "zone:" >> nsd.conf
                echo "  name: \"${zone}\"" >> nsd.conf
@@ -860,7 +869,7 @@ export optout
 if [ $presigned = yes ]
 then
         skipreasons="$skipreasons presigned nodyndns"
-       if [ ${context:0:6} = gmysql ] | [ ${context:0:7} = ext-nsd ] | [ ${context:0:8} = ext-bind ]
+       if [ ${context:0:6} = gmysql ] || [ ${context:0:7} = ext-nsd ] || [ ${context:0:8} = ext-bind ]
        then
                context=${context}-presigned
                [ -z "$GMYSQL2DB" ] && GMYSQL2DB=pdnstest2