From 4f91c46a42dbe73ec438a8d5a6f5a89877c057b4 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Wed, 21 Feb 2001 06:47:45 +0000 Subject: [PATCH] Test that both normal and ANY queries that match a CNAME are properly validated. --- bin/tests/system/dnssec/tests.sh | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index ca5d0b3730..04210a16e0 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.30 2001/02/20 18:33:49 bwelling Exp $ +# $Id: tests.sh,v 1.31 2001/02/21 06:47:45 bwelling Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -232,5 +232,33 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +echo "I:checking that validation of a query returning a CNAME works ($n)" +ret=0 +$DIG $DIGOPTS +noauth cname1.example. txt @10.53.0.2 \ + > dig.out.ns2.test$n || ret=1 +$DIG $DIGOPTS +noauth cname1.example. txt @10.53.0.4 \ + > dig.out.ns4.test$n || ret=1 +$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1 +grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1 +# the CNAME & its sig, the TXT and its SIG +grep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + +echo "I:checking that validation of an ANY query returning a CNAME works ($n)" +ret=0 +$DIG $DIGOPTS +noauth cname2.example. any @10.53.0.2 \ + > dig.out.ns2.test$n || ret=1 +$DIG $DIGOPTS +noauth cname2.example. any @10.53.0.4 \ + > dig.out.ns4.test$n || ret=1 +$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1 +grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1 +# The CNAME, NXT, and their SIGs +grep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + echo "I:exit status: $status" exit $status