]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add inline test related to unsupported algorithms
authorMatthijs Mekking <matthijs@isc.org>
Mon, 14 Jan 2019 15:02:30 +0000 (16:02 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 19 Mar 2019 16:14:18 +0000 (17:14 +0100)
bin/tests/system/inline/ns3/named.conf.in
bin/tests/system/inline/ns3/sign.sh
bin/tests/system/inline/setup.sh
bin/tests/system/inline/tests.sh

index 1dff0b5679a229705f75ce8fb273208b20ea8b28..a8c434dc025075900524b2ed86a41764566ea6df 100644 (file)
@@ -168,3 +168,10 @@ zone "removedkeys-secondary" {
        auto-dnssec maintain;
        file "removedkeys-secondary.bk";
 };
+
+zone "unsupported" {
+       type master;
+       file "unsupported.db";
+       inline-signing yes;
+       auto-dnssec maintain;
+};
index 15b542421522d220b7b9ec825bb9bc75e80dcec6..621f077683567778ca0b9f63c0656126d60f3468 100755 (executable)
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
+# Fake an unsupported key
+unsupportedkey=$("$KEYGEN" -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -n zone unsupported)
+awk '$3 == "DNSKEY" { $6 = 255 } { print }' ${unsupportedkey}.key > ${unsupportedkey}.tmp
+mv ${unsupportedkey}.tmp ${unsupportedkey}.key
+
 zone=bits
 rm -f K${zone}.+*+*.key
 rm -f K${zone}.+*+*.private
index 23a9c18dc87465bebde9c400ec02738880fb7c7b..4c207ee22cd52571c8b213a2d9517a7aa2fd9ee6 100644 (file)
@@ -27,6 +27,7 @@ cp ns2/bits.db.in ns2/retransfer3.db
 cp ns3/master.db.in ns3/master.db
 cp ns3/master.db.in ns3/dynamic.db
 cp ns3/master.db.in ns3/updated.db
+cp ns3/master.db.in ns3/unsupported.db
 cp ns3/master.db.in ns3/expired.db
 cp ns3/master.db.in ns3/nsec3.db
 cp ns3/master.db.in ns3/externalkey.db
index 12c0926b2497f3be5528fd05c95ab2129ab5b017..60e578371ead599f001ba0aba2eff0001d25b22a 100755 (executable)
@@ -27,6 +27,13 @@ do
        sleep 1
 done
 
+n=`expr $n + 1`
+echo_i "checking that an unsupported algorithm is not used for signing ($n)"
+ret=0
+grep -q "algorithm is unsupported" ns3/named.run || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
 n=`expr $n + 1`
 echo_i "checking that rrsigs are replaced with ksk only ($n)"
 ret=0