]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Cleanup keymgr.c
authorMatthijs Mekking <matthijs@isc.org>
Thu, 7 Jan 2021 11:26:53 +0000 (12:26 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 3 Feb 2021 14:47:40 +0000 (15:47 +0100)
Three small cleanups:

1. Remove an unused keystr/dst_key_format.
2. Initialize a dst_key_state_t state with NA.
3. Update false comment about local policy (local policy only adds
   barrier on transitions to the RUMOURED state, not the UNRETENTIVE
   state).

(cherry picked from commit 189d9a2d21b44eec25245cd5189c86d7115e79af)

lib/dns/keymgr.c

index 076eb40e4b0f8da3a54987132d89d9030d1f6ed9..d7a5e279fddc667ff1904f3ee73da14e19fdc3dc 100644 (file)
@@ -778,9 +778,6 @@ keymgr_ds_hidden_or_chained(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key,
        for (dns_dnsseckey_t *dkey = ISC_LIST_HEAD(*keyring); dkey != NULL;
             dkey = ISC_LIST_NEXT(dkey, link))
        {
-               char keystr[DST_KEY_FORMATSIZE];
-               dst_key_format(dkey->key, keystr, sizeof(keystr));
-
                if (match_algorithms &&
                    (dst_key_alg(dkey->key) != dst_key_alg(key->key))) {
                        continue;
@@ -1082,7 +1079,7 @@ keymgr_policy_approval(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key,
        if (next != RUMOURED) {
                /*
                 * Local policy only adds an extra barrier on transitions to
-                * the RUMOURED and UNRETENTIVE states.
+                * the RUMOURED state.
                 */
                return (true);
        }
@@ -2094,7 +2091,7 @@ keytime_status(dst_key_t *key, isc_stdtime_t now, isc_buffer_t *buf,
        char timestr[26]; /* Minimal buf as per ctime_r() spec. */
        isc_result_t ret;
        isc_stdtime_t when = 0;
-       dst_key_state_t state;
+       dst_key_state_t state = NA;
 
        isc_buffer_printf(buf, "%s", pre);
        (void)dst_key_getstate(key, ks, &state);