2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

1528. [cleanup] Simplify some dns_name_ functions based on the

deprecation of bitstring labels.
This commit is contained in:
Tatuya JINMEI 神明達哉
2003-10-25 00:31:12 +00:00
parent 6da7c87a77
commit e407562a75
13 changed files with 115 additions and 365 deletions

View File

@@ -16,7 +16,7 @@
*/
/*
* $Id: dnssec.c,v 1.77 2003/09/30 05:56:10 marka Exp $
* $Id: dnssec.c,v 1.78 2003/10/25 00:31:09 jinmei Exp $
*/
@@ -182,7 +182,7 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
dns_fixedname_t fnewname;
REQUIRE(name != NULL);
REQUIRE(dns_name_depth(name) <= 255);
REQUIRE(dns_name_countlabels(name) <= 255);
REQUIRE(set != NULL);
REQUIRE(key != NULL);
REQUIRE(inception != NULL);
@@ -212,7 +212,7 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
sig.covered = set->type;
sig.algorithm = dst_key_alg(key);
sig.labels = dns_name_depth(name) - 1;
sig.labels = dns_name_countlabels(name) - 1;
if (dns_name_iswildcard(name))
sig.labels--;
sig.originalttl = set->ttl;
@@ -403,11 +403,10 @@ dns_dnssec_verify(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
* If the name is an expanded wildcard, use the wildcard name.
*/
dns_fixedname_init(&fnewname);
labels = dns_name_depth(name) - 1;
labels = dns_name_countlabels(name) - 1;
if (labels - sig.labels > 0) {
RUNTIME_CHECK(dns_name_splitatdepth(name, sig.labels + 1, NULL,
dns_fixedname_name(&fnewname))
== ISC_R_SUCCESS);
dns_name_split(name, sig.labels + 1, NULL,
dns_fixedname_name(&fnewname));
RUNTIME_CHECK(dns_name_downcase(dns_fixedname_name(&fnewname),
dns_fixedname_name(&fnewname),
NULL)