]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move REQUIRE outside comment unsupported alg
authorMatthijs Mekking <github@pletterpet.nl>
Tue, 18 Dec 2018 21:06:08 +0000 (22:06 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 20 Dec 2018 09:50:08 +0000 (04:50 -0500)
(cherry picked from commit 5ca649967e661cd3f292913f54a72080da245523)

lib/dns/dnssec.c
lib/dns/nsec3.c

index b7afce1a73f3f75c70b22f5819f2748615ad5b55..422e98e1787772aff09df5ecb564fa173f055c63 100644 (file)
@@ -1686,10 +1686,11 @@ dns_dnssec_keylistfromrdataset(dns_name_t *origin,
                dns_rdata_reset(&rdata);
                dns_rdataset_current(&keys, &rdata);
 
-               /* Skip unsupported algorithms */
                REQUIRE(rdata.type == dns_rdatatype_key ||
                        rdata.type == dns_rdatatype_dnskey);
                REQUIRE(rdata.length > 3);
+
+               /* Skip unsupported algorithms */
                if (!dst_algorithm_supported(rdata.data[3]))
                        goto skip;
 
index 978d03c7839679f6f73249ee0a1abe8bb53e81e9..6ae7ca85e6c553d5ce60b7c7b4484637035e84da 100644 (file)
@@ -1806,12 +1806,13 @@ dns_nsec3_maxiterations(dns_db_t *db, dns_dbversion_t *version,
                dns_rdata_t rdata = DNS_RDATA_INIT;
                dns_rdataset_current(&rdataset, &rdata);
 
-               /* Skip unsupported algorithms when
-                * calculating the maximum iterations.
-                */
                REQUIRE(rdata.type == dns_rdatatype_key ||
                        rdata.type == dns_rdatatype_dnskey);
                REQUIRE(rdata.length > 3);
+
+               /* Skip unsupported algorithms when
+                * calculating the maximum iterations.
+                */
                if (!dst_algorithm_supported(rdata.data[3]))
                        continue;