]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
zonemd, unit test for capitalisation of owner and ns names.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 22 Jan 2021 13:40:21 +0000 (14:40 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 22 Jan 2021 13:40:21 +0000 (14:40 +0100)
testcode/unitzonemd.c
testdata/zonemd.example17.zone [new file with mode: 0644]

index 07f97c316e4df74864e8f9f6cb6a4e96fd321f1e..544d032f2b674fa78a0abfcc13feed38984d35ef 100644 (file)
@@ -474,6 +474,13 @@ static void zonemd_verify_tests(void)
                NULL,
                "20180302005009",
                "ZONEMD RRSet contains more than one RR with the same scheme and hash algorithm");
+       /* different capitalisation of ns name and owner names, should
+        * be canonicalized. */
+       zonemd_verify_test("example.com",
+               "testdata/zonemd.example17.zone",
+               NULL,
+               "20180302005009",
+               "ZONEMD verification successful");
 }
 
 /** zonemd unit tests */
diff --git a/testdata/zonemd.example17.zone b/testdata/zonemd.example17.zone
new file mode 100644 (file)
index 0000000..4315f90
--- /dev/null
@@ -0,0 +1,11 @@
+example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
+; capitalisation is different here.
+exaMPLe.cOM. IN NS Ns.exaMPLe.cOm.
+; the ZONEMD that should be in this file, without DNSSEC
+example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
+; capitalisation is different here.
+wWW.exAMPLe.cOM. IN A 127.0.0.1
+ns.example.com. IN A 127.0.0.1
+bar.example.com. IN A 1.2.3.4
+ding.example.com. IN A 1.2.3.4
+foo.example.com. IN A 1.2.3.4