]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Test managed-keys placeholder
authorAram Sargsyan <aram@isc.org>
Mon, 31 Oct 2022 12:48:57 +0000 (12:48 +0000)
committerAram Sargsyan <aram@isc.org>
Tue, 1 Nov 2022 10:49:43 +0000 (10:49 +0000)
Add a dnssec test to make sure that named can correctly process a
managed-keys zone with a placeholder KEYDATA record.

(cherry picked from commit 8c48eabbc13c0e12ed298f53443eecd14d173567)

bin/tests/system/dnssec/clean.sh
bin/tests/system/dnssec/ns4/managed-keys.bind.in [new file with mode: 0644]
bin/tests/system/dnssec/tests.sh

index 68ac5bb90db2ace0d79e0c418821103764210124..1a933ad570e8cf141b9965d3fdef66ceaa012ec6 100644 (file)
@@ -34,7 +34,7 @@ rm -f ./keygen.err
 rm -f ./named.secroots.test*
 rm -f ./nosign.before
 rm -f ./ns*/*.nta
-rm -f ./ns*/managed-keys.bind* ./ns*/*.mkeys*
+rm -f ./ns*/managed-keys.bind ./ns*/managed-keys.bind.jnl ./ns*/*.mkeys*
 rm -f ./ns*/named.lock
 rm -f ./ns1/managed.key.id
 rm -f ./ns1/root.db ./ns2/example.db ./ns2/managed.db ./ns2/trusted.db
@@ -97,7 +97,6 @@ rm -f ./ns3/ttlpatch.example.db.patched
 rm -f ./ns3/unsecure.example.db ./ns3/bogus.example.db ./ns3/keyless.example.db
 rm -f ./ns3/unsupported.managed.db.tmp ./ns3/unsupported.trusted.db.tmp
 rm -f ./ns3/NSEC ./ns3/NSEC3
-rm -f ./ns4/managed-keys.bind*
 rm -f ./ns4/named_dump.db*
 rm -f ./ns6/optout-tld.db
 rm -f ./ns7/multiple.example.bk ./ns7/nsec3.example.bk ./ns7/optout.example.bk
diff --git a/bin/tests/system/dnssec/ns4/managed-keys.bind.in b/bin/tests/system/dnssec/ns4/managed-keys.bind.in
new file mode 100644 (file)
index 0000000..570669d
--- /dev/null
@@ -0,0 +1,21 @@
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; SPDX-License-Identifier: MPL-2.0
+;
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0.  If a copy of the MPL was not distributed with this
+; file, you can obtain one at https://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+$ORIGIN .
+$TTL 0 ; 0 seconds
+@                      IN SOA  . . (
+                               2          ; serial
+                               0          ; refresh (0 seconds)
+                               0          ; retry (0 seconds)
+                               0          ; expire (0 seconds)
+                               0          ; minimum (0 seconds)
+                               )
+                       KEYDATA 20221028094934 19700101000000 19700101000000 0 0 0 ; placeholder
index 308bc70468144fd972d857b11dec2a687bbb3342..8e3d62a4727a9d3cf4e3cc24bbbc0dd57d67ba18 100644 (file)
@@ -2446,7 +2446,10 @@ status=$((status+ret))
 
 # Reconfigure caching server to use "dnssec-validation auto", and repeat
 # some of the DNSSEC validation tests to ensure that it works correctly.
+# Also setup a placeholder managed-keys zone to check if named can process it
+# correctly.
 echo_i "switching to automatic root key configuration"
+cp ns4/managed-keys.bind.in ns4/managed-keys.bind
 copy_setports ns4/named2.conf.in ns4/named.conf
 rndccmd 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i
 sleep 5