]> 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)
committerMatthijs Mekking <github@pletterpet.nl>
Wed, 19 Dec 2018 11:54:57 +0000 (12:54 +0100)
lib/dns/dnssec.c
lib/dns/nsec3.c

index e255b6e2a9b5d9d395e17302af8eb8f10f4839d4..420c93aa050d093f49e12d9d5efe87be6f8e585b 100644 (file)
@@ -1623,10 +1623,11 @@ dns_dnssec_keylistfromrdataset(const 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 f30d69591bbb65b7be456df73f3a3bac49e774b6..9bd2b5781d7fcef059310994d941b6512bd9057f 100644 (file)
@@ -1813,12 +1813,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;