From: Mark Andrews Date: Thu, 2 Oct 2014 01:07:01 +0000 (+1000) Subject: SIG(0) update forwarding testing requires crypto be configured X-Git-Tag: v9.11.0a1~1369 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a837c939c4731770bd8953ed9a2ed7d0b29ef6df;p=thirdparty%2Fbind9.git SIG(0) update forwarding testing requires crypto be configured --- diff --git a/bin/tests/system/upforwd/clean.sh b/bin/tests/system/upforwd/clean.sh index 45179ac34fb..3952354ee0d 100644 --- a/bin/tests/system/upforwd/clean.sh +++ b/bin/tests/system/upforwd/clean.sh @@ -25,3 +25,5 @@ rm -f dig.out.ns1 dig.out.ns2 dig.out.ns1 dig.out.ns3 dig.out.ns1.after rm -f ns1/*.jnl ns2/*.jnl ns3/*.jnl ns1/example.db ns2/*.bk ns3/*.bk rm -f ns3/nomaster1.db rm -f */named.memstats +rm -f Ksig0.example2.* +rm -f keyname diff --git a/bin/tests/system/upforwd/setup.sh b/bin/tests/system/upforwd/setup.sh index 5e10d88ccc6..9e1f437e6ae 100644 --- a/bin/tests/system/upforwd/setup.sh +++ b/bin/tests/system/upforwd/setup.sh @@ -24,7 +24,16 @@ rm -f ns1/example2.db.jnl ns2/example2.bk ns2/example2.bk.jnl cp -f ns3/nomaster.db ns3/nomaster1.db rm -f Ksig0.example2.* +# +# SIG(0) required cryptographic support which may not be configured. +# test -r $RANDFILE || $GENRANDOM 400 $RANDFILE -keyname=`$KEYGEN -q -r $RANDFILE -n HOST -a RSASHA1 -b 1024 -T KEY sig0.example2` -cat ns1/example1.db $keyname.key > ns1/example2.db -echo $keyname > keyname +keyname=`$KEYGEN -q -r $RANDFILE -n HOST -a RSASHA1 -b 1024 -T KEY sig0.example2 2>/dev/null` +if test -n "$keyname" +then + cat ns1/example1.db $keyname.key > ns1/example2.db + echo $keyname > keyname +else + cat ns1/example1.db > ns1/example2.db + rm -f keyname +fi diff --git a/bin/tests/system/upforwd/tests.sh b/bin/tests/system/upforwd/tests.sh index 0491596ff52..3d283570f22 100644 --- a/bin/tests/system/upforwd/tests.sh +++ b/bin/tests/system/upforwd/tests.sh @@ -182,19 +182,24 @@ done if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi n=`expr $n + 1` -echo "I:checking update forwarding to with sig0 ($n)" -keyname=`cat keyname` -$NSUPDATE -k $keyname.private -- - < dig.out.ns1.test$n -grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1 -if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi -n=`expr $n + 1` + $DIG unsigned.example2 A @10.53.0.1 -p 5300 > dig.out.ns1.test$n + grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1 + if [ $ret != 0 ] ; then echo "I:failed"; fi + status=`expr $status + $ret` + n=`expr $n + 1` +fi echo "I:exit status: $status" exit $status