diff --git a/lib/dns/sec/dst/dst_api.c b/lib/dns/sec/dst/dst_api.c index 0a677d058c..41ac0c8988 100644 --- a/lib/dns/sec/dst/dst_api.c +++ b/lib/dns/sec/dst/dst_api.c @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_api.c,v 1.22 2000/03/14 22:05:08 bwelling Exp $ + * $Id: dst_api.c,v 1.23 2000/03/16 22:43:33 halley Exp $ */ #include @@ -713,6 +713,20 @@ dst_key_isprivate(const dst_key_t *key) { return (key->func->isprivate(key)); } +isc_boolean_t +dst_key_iszonekey(const dst_key_t *key) { + unsigned int namtyp; + + REQUIRE(VALID_KEY(key)); + + if ((key->key_flags & DST_KEYFLAG_NOAUTH) != 0) + return (ISC_FALSE); + namtyp = (key->key_flags & DST_KEYFLAG_NTMASK) >> DST_KEYFLAG_NTSHIFT; + if (namtyp != DST_NAMTYP_ZONE) + return (ISC_FALSE); + return (ISC_TRUE); +} + /* * dst_sig_size * Computes the maximum size of a signature generated by the given key