Merge branch '3939-insufficient-information-to-identify-key' into 'main'

Resolve "Insufficient information to identify key"

Closes #3939

See merge request isc-projects/bind9!7676
This commit is contained in:
Mark Andrews 2023-03-14 03:09:25 +00:00
commit 4f670d1916
2 changed files with 12 additions and 6 deletions

View file

@ -1885,7 +1885,8 @@ failure:
static isc_result_t
publish_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
dns_ttl_t ttl, isc_mem_t *mctx, void (*report)(const char *, ...)) {
dns_ttl_t ttl, isc_mem_t *mctx,
void (*report)(const char *, ...) ISC_FORMAT_PRINTF(1, 2)) {
isc_result_t result;
unsigned char buf[DST_KEY_MAXSIZE];
char keystr[DST_KEY_FORMATSIZE];
@ -1902,7 +1903,8 @@ publish_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
if (key->prepublish && ttl > key->prepublish) {
isc_stdtime_t now;
report("Key %s: Delaying activation to match the DNSKEY TTL.",
report("Key %s: Delaying activation to match the DNSKEY TTL "
"(%u).",
keystr, ttl);
isc_stdtime_get(&now);
@ -1919,14 +1921,16 @@ failure:
static isc_result_t
remove_key(dns_diff_t *diff, dns_dnsseckey_t *key, const dns_name_t *origin,
dns_ttl_t ttl, isc_mem_t *mctx, const char *reason,
void (*report)(const char *, ...)) {
void (*report)(const char *, ...) ISC_FORMAT_PRINTF(1, 2)) {
isc_result_t result;
unsigned char buf[DST_KEY_MAXSIZE];
dns_rdata_t dnskey = DNS_RDATA_INIT;
char alg[80];
char namebuf[DNS_NAME_FORMATSIZE];
dns_secalg_format(dst_key_alg(key->key), alg, sizeof(alg));
report("Removing %s key %d/%s from DNSKEY RRset.", reason,
dns_name_format(dst_key_name(key->key), namebuf, sizeof(namebuf));
report("Removing %s key %s/%d/%s from DNSKEY RRset.", reason, namebuf,
dst_key_id(key->key), alg);
RETERR(make_dnskey(key->key, buf, sizeof(buf), &dnskey));
@ -2244,7 +2248,8 @@ isc_result_t
dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
dns_dnsseckeylist_t *removed, const dns_name_t *origin,
dns_ttl_t hint_ttl, dns_diff_t *diff, isc_mem_t *mctx,
void (*report)(const char *, ...)) {
void (*report)(const char *, ...)
ISC_FORMAT_PRINTF(1, 2)) {
isc_result_t result;
dns_dnsseckey_t *key, *key1, *key2, *next;
bool found_ttl = false;

View file

@ -322,7 +322,8 @@ isc_result_t
dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
dns_dnsseckeylist_t *removed, const dns_name_t *origin,
dns_ttl_t hint_ttl, dns_diff_t *diff, isc_mem_t *mctx,
void (*report)(const char *, ...));
void (*report)(const char *, ...)
ISC_FORMAT_PRINTF(1, 2));
/*%<
* Update the list of keys in 'keys' with new key information in 'newkeys'.
*