When we are appending contents of a DNSKEY rdataset to a keylist,
don't attempt to read the private key file of a KSK when we are in
offline-ksk mode.
}
RETERR(result);
+ if (kasp != NULL && dns_kasp_offlineksk(kasp) &&
+ (dst_key_flags(dnskey) & DNS_KEYFLAG_KSK) != 0)
+ {
+ result = ISC_R_NOPERM;
+ goto addkey;
+ }
+
/* Now read the private key. */
result = keyfromfile(
kasp, directory, dnskey,
filename, isc_result_totext(result));
}
+ addkey:
if (result == ISC_R_FILENOTFOUND || result == ISC_R_NOPERM) {
if (pubkey != NULL) {
addkey(keylist, &pubkey, savekeys, mctx);
* 'keysigs' and 'soasigs', if not NULL and associated, contain the
* RRSIGS for the DNSKEY and SOA records respectively and are used to mark
* whether a key is already active in the zone.
+ *
+ * Private key files for keys with the KSK role are skipped if kasp is in
+ * offline-ksk mode.
*/
isc_result_t