]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that the specified DS digest is supported
authorMark Andrews <marka@isc.org>
Wed, 28 May 2025 03:59:04 +0000 (13:59 +1000)
committerMark Andrews <marka@isc.org>
Wed, 18 Jun 2025 21:00:53 +0000 (07:00 +1000)
dnssec-dsfromkey and dnssec-cds failed to properly check if the
specified DS digest type is supported or not.

bin/dnssec/dnssectool.c

index cb42bb710a1e49fdc3867514d860dcec674314b3..91a6c47554b3d1955611890632a5e88a3ba73d34 100644 (file)
@@ -361,7 +361,10 @@ strtodsdigest(const char *str) {
        r.length = strlen(str);
        result = dns_dsdigest_fromtext(&alg, &r);
        if (result != ISC_R_SUCCESS) {
-               fatal("unknown DS algorithm %s", str);
+               fatal("unknown DS digest %s", str);
+       }
+       if (!dst_ds_digest_supported(alg)) {
+               fatal("unsupported DS digest %s", str);
        }
        return alg;
 }