2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

DNS_KEYTYPE_NOKEY is only applicable to KEY

This commit is contained in:
Mark Andrews
2025-03-25 14:15:37 +11:00
committed by Evan Hunt
parent 5c21576f82
commit 53c6721abc

View File

@@ -588,7 +588,9 @@ keygen(keygen_ctx_t *ctx, isc_mem_t *mctx, int argc, char **argv) {
break;
}
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY) {
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY &&
(ctx->options & DST_TYPE_KEY) != 0)
{
null_key = true;
}