]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add a test for dnssec-signzone -J
authorEvan Hunt <each@isc.org>
Sat, 5 Feb 2022 07:43:42 +0000 (23:43 -0800)
committerEvan Hunt <each@isc.org>
Thu, 17 Feb 2022 20:03:05 +0000 (12:03 -0800)
generate a journal file, and load it in dnssec-signzone.

bin/tests/system/dnssec/clean.sh
bin/tests/system/dnssec/signer/general/test10.zone [new file with mode: 0644]
bin/tests/system/dnssec/tests.sh

index 68ac5bb90db2ace0d79e0c418821103764210124..d99d2af869d3458e38771c154efae741f0c668d9 100644 (file)
@@ -112,6 +112,7 @@ rm -f ./signer/example.db.after ./signer/example.db.before
 rm -f ./signer/example.db.changed
 rm -f ./signer/general/dsset*
 rm -f ./signer/general/signed.zone
+rm -f ./signer/general/*.jnl
 rm -f ./signer/general/signer.out.*
 rm -f ./signer/nsec3param.out
 rm -f ./signer/signer.out.*
diff --git a/bin/tests/system/dnssec/signer/general/test10.zone b/bin/tests/system/dnssec/signer/general/test10.zone
new file mode 100644 (file)
index 0000000..10a8bc9
--- /dev/null
@@ -0,0 +1,20 @@
+; 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.
+
+;      This is a zone which has two DNSKEY records, both of which have
+; existing private key files available.  They should be loaded automatically
+; and the zone correctly signed.
+;
+$TTL 3600
+example.com.   IN      SOA ns hostmaster 00100000 1200 3600 604800 300
+extra.example.com. IN   A   1.2.3.4
+$include Kexample.com.+008+63613.key
+$include Kexample.com.+008+15002.key
index 340fa1d3b91b79b75d6ec3493e2df2433a370a03..068a76e54db3c142407a0255fadace2871434164 100644 (file)
@@ -1406,6 +1406,20 @@ n=$((n+1))
 test "$ret" -eq 0 || echo_i "failed"
 status=$((status+ret))
 
+echo_ic "check that dnssec-signzone -J loads journal files ($n)"
+ret=0
+(
+cd signer/general || exit 0
+rm -f signed.zone
+$MAKEJOURNAL example.com. test9.zone test10.zone test9.zone.jnl
+$SIGNER -f signed.zone -o example.com. -J test9.zone.jnl test9.zone > signer.out.$n
+grep -q extra signed.zone
+) || ret=1
+n=$((n+1))
+test "$ret" -eq 0 || echo_i "failed"
+status=$((status+ret))
+
+
 echo_ic "check that dnssec-signzone accepts maximum NSEC3 iterations ($n)"
 ret=0
 (