summaryrefslogtreecommitdiff
path: root/bin/tests/system/tsig/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tests/system/tsig/tests.sh')
-rw-r--r--bin/tests/system/tsig/tests.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/tests/system/tsig/tests.sh b/bin/tests/system/tsig/tests.sh
index 0f50c796..95f3118c 100644
--- a/bin/tests/system/tsig/tests.sh
+++ b/bin/tests/system/tsig/tests.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2005-2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2005-2007, 2011 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: tests.sh,v 1.5 2007-06-19 23:47:06 tbox Exp $
+# $Id: tests.sh,v 1.7 2011-11-06 23:46:40 tbox Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -213,6 +213,15 @@ if [ $ret -eq 1 ] ; then
echo "I: failed"; status=1
fi
+echo "I:attempting fetch with bad tsig algorithm"
+ret=0
+$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+ -y "badalgo:invalid:$sha512" @10.53.0.1 soa -p 5300 > dig.out.badalgo 2>&1 || ret=1
+grep -i "Couldn't create key invalid: algorithm is unsupported" dig.out.badalgo > /dev/null || ret=1
+if [ $ret -eq 1 ] ; then
+ echo "I: failed"; status=1
+fi
+
exit $status