2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 07:35:26 +00:00

dst_key_iszonekey() was incorrectly checking the 'name type' field of a key.

The constants added to dst.h for dst_key_iszonekey() duplicated constants
in dns/keyvalues.h, and are now gone.
This commit is contained in:
Brian Wellington
2000-04-10 19:48:05 +00:00
parent 7c0e50b562
commit 2a05fa7535
2 changed files with 3 additions and 12 deletions

View File

@@ -17,7 +17,7 @@
/* /*
* Principal Author: Brian Wellington * Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.25 2000/04/07 20:50:30 bwelling Exp $ * $Id: dst_api.c,v 1.26 2000/04/10 19:48:03 bwelling Exp $
*/ */
#include <config.h> #include <config.h>
@@ -717,14 +717,11 @@ dst_key_isprivate(const dst_key_t *key) {
isc_boolean_t isc_boolean_t
dst_key_iszonekey(const dst_key_t *key) { dst_key_iszonekey(const dst_key_t *key) {
unsigned int namtyp;
REQUIRE(VALID_KEY(key)); REQUIRE(VALID_KEY(key));
if ((key->key_flags & DST_KEYFLAG_NOAUTH) != 0) if ((key->key_flags & DNS_KEYTYPE_NOAUTH) != 0)
return (ISC_FALSE); return (ISC_FALSE);
namtyp = (key->key_flags & DST_KEYFLAG_NTMASK) >> DST_KEYFLAG_NTSHIFT; if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
if (namtyp != DST_NAMTYP_ZONE)
return (ISC_FALSE); return (ISC_FALSE);
return (ISC_TRUE); return (ISC_TRUE);
} }

View File

@@ -54,12 +54,6 @@ typedef void * dst_context_t;
#define DST_KEYPROTO_DNSSEC 3 #define DST_KEYPROTO_DNSSEC 3
#define DST_KEYPROTO_IPSEC 4 #define DST_KEYPROTO_IPSEC 4
/* Key flag values. */
#define DST_KEYFLAG_NOAUTH 0x00008000
#define DST_KEYFLAG_NTMASK 0x00000300
#define DST_KEYFLAG_NTSHIFT 8
#define DST_NAMTYP_ZONE 0x02
/* A buffer of this size is large enough to hold any key */ /* A buffer of this size is large enough to hold any key */
#define DST_KEY_MAXSIZE 1024 #define DST_KEY_MAXSIZE 1024