mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +00:00
Do not call exit() upon dns_zoneverify_dnssec() errors
Replace the remaining fatal() calls inside dns_zoneverify_dnssec() with zoneverify_log_error() and zoneverify_print() calls, ensuring proper cleanup.
This commit is contained in:
@@ -1837,12 +1837,18 @@ dns_zoneverify_dnssec(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ignore_kskflag ) {
|
if (ignore_kskflag) {
|
||||||
if (!vctx.goodksk && !vctx.goodzsk)
|
if (!vctx.goodksk && !vctx.goodzsk) {
|
||||||
fatal("No self-signed DNSKEY found.");
|
zoneverify_log_error(&vctx,
|
||||||
} else if (!vctx.goodksk)
|
"No self-signed DNSKEY found");
|
||||||
fatal("No self-signed KSK DNSKEY found. Supply an active\n"
|
result = ISC_R_FAILURE;
|
||||||
"key with the KSK flag set, or use '-P'.");
|
goto done;
|
||||||
|
}
|
||||||
|
} else if (!vctx.goodksk) {
|
||||||
|
zoneverify_log_error(&vctx, "No self-signed KSK DNSKEY found");
|
||||||
|
result = ISC_R_FAILURE;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
determine_active_algorithms(&vctx, ignore_kskflag, keyset_kskonly);
|
determine_active_algorithms(&vctx, ignore_kskflag, keyset_kskonly);
|
||||||
|
|
||||||
@@ -1863,9 +1869,13 @@ dns_zoneverify_dnssec(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vresult != ISC_R_SUCCESS)
|
result = vresult;
|
||||||
fatal("DNSSEC completeness test failed (%s).",
|
if (result != ISC_R_SUCCESS) {
|
||||||
dns_result_totext(vresult));
|
zoneverify_print(&vctx,
|
||||||
|
"DNSSEC completeness test failed (%s).\n",
|
||||||
|
dns_result_totext(result));
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
if (vctx.goodksk || ignore_kskflag) {
|
if (vctx.goodksk || ignore_kskflag) {
|
||||||
print_summary(&vctx, keyset_kskonly);
|
print_summary(&vctx, keyset_kskonly);
|
||||||
|
Reference in New Issue
Block a user