diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 12b2aed57c..809b7be911 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -1176,7 +1176,13 @@ select_signing_key(dns_validator_t *val, dns_rdataset_t *rdataset) { goto done; } dst_key_free(&val->key); - } else { + } else if (result != DST_R_UNSUPPORTEDALG) { + /* + * We can encounter unsupported algorithm when the zone + * is signed with both supported and unsupported + * algorithm at the same time. Stop looking in all + * other failure cases. + */ break; } dns_rdata_reset(&rdata);