2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

Added dst_key_isnullkey()

This commit is contained in:
Brian Wellington 2000-04-18 17:39:37 +00:00
parent 5ffd8a456d
commit eb5250f0bd
2 changed files with 18 additions and 1 deletions

View File

@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.27 2000/04/12 15:52:11 bwelling Exp $
* $Id: dst_api.c,v 1.28 2000/04/18 17:39:36 bwelling Exp $
*/
#include <config.h>
@ -729,6 +729,20 @@ dst_key_iszonekey(const dst_key_t *key) {
return (ISC_TRUE);
}
isc_boolean_t
dst_key_isnullkey(const dst_key_t *key) {
REQUIRE(VALID_KEY(key));
if ((key->key_flags & DNS_KEYFLAG_TYPEMASK) != DNS_KEYTYPE_NOKEY)
return (ISC_FALSE);
if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
return (ISC_FALSE);
if (key->key_proto != DNS_KEYPROTO_DNSSEC &&
key->key_proto != DNS_KEYPROTO_ANY)
return (ISC_FALSE);
return (ISC_TRUE);
}
/*
* dst_sig_size
* Computes the maximum size of a signature generated by the given key

View File

@ -292,6 +292,9 @@ dst_key_isprivate(const dst_key_t *key);
isc_boolean_t
dst_key_iszonekey(const dst_key_t *key);
isc_boolean_t
dst_key_isnullkey(const dst_key_t *key);
/* Computes the size of a signature generated by the given key.
*
* Requires: