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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user