Lines Matching defs:nsec3
1 /* $NetBSD: nsec3.c,v 1.14 2025/01/26 16:25:23 christos Exp $ */
36 #include <dns/nsec3.h>
199 dns_rdata_nsec3_t nsec3;
208 result = dns_rdata_tostruct(rdata, &nsec3, NULL);
212 for (i = 0; i < nsec3.len; i += len) {
213 INSIST(i + 2 <= nsec3.len);
214 window = nsec3.typebits[i];
215 len = nsec3.typebits[i + 1];
218 INSIST(i + len <= nsec3.len);
226 present = dns_nsec_isset(&nsec3.typebits[i],
231 dns_rdata_freestruct(&nsec3);
391 match_nsec3param(const dns_rdata_nsec3_t *nsec3,
393 if (nsec3->hash == nsec3param->hash &&
394 nsec3->iterations == nsec3param->iterations &&
395 nsec3->salt_length == nsec3param->salt_length &&
396 !memcmp(nsec3->salt, nsec3param->salt, nsec3->salt_length))
412 dns_rdata_nsec3_t nsec3;
441 CHECK(dns_rdata_tostruct(&rdata, &nsec3, NULL));
443 if (!match_nsec3param(&nsec3, nsec3param)) {
520 find_nsec3(dns_rdata_nsec3_t *nsec3, dns_rdataset_t *rdataset,
529 CHECK(dns_rdata_tostruct(&rdata, nsec3, NULL));
531 if (match_nsec3param(nsec3, nsec3param)) {
555 dns_rdata_nsec3_t nsec3;
622 result = find_nsec3(&nsec3, &rdataset, nsec3param);
625 flags = nsec3.flags;
627 next_length = nsec3.next_length;
629 memmove(nexthash, nsec3.next, next_length);
675 result = find_nsec3(&nsec3, &rdataset, nsec3param);
691 if (OPTOUT(nsec3.flags)) {
702 if (OPTOUT(nsec3.flags) && unsecure) {
708 old_next = nsec3.next;
709 old_length = nsec3.next_length;
719 nsec3.next = nexthash;
720 nsec3.next_length = (unsigned char)next_length;
723 dns_rdatatype_nsec3, &nsec3,
731 flags = nsec3.flags;
791 result = find_nsec3(&nsec3, &rdataset, nsec3param);
822 result = find_nsec3(&nsec3, &rdataset, nsec3param);
831 old_next = nsec3.next;
832 old_length = nsec3.next_length;
842 nsec3.next = nexthash;
843 nsec3.next_length = (unsigned char)next_length;
846 dns_rdatatype_nsec3, &nsec3,
855 flags = nsec3.flags;
1395 dns_rdata_nsec3_t nsec3;
1459 result = find_nsec3(&nsec3, &rdataset, nsec3param);
1461 next_length = nsec3.next_length;
1463 memmove(nexthash, nsec3.next, next_length);
1492 result = find_nsec3(&nsec3, &rdataset, nsec3param);
1509 nsec3.next = nexthash;
1510 nsec3.next_length = (unsigned char)next_length;
1512 nsec3.flags = nsec3param->flags & DNS_NSEC3FLAG_OPTOUT;
1516 dns_rdatatype_nsec3, &nsec3,
1572 result = find_nsec3(&nsec3, &rdataset, nsec3param);
1574 next_length = nsec3.next_length;
1576 memmove(nexthash, nsec3.next, next_length);
1602 result = find_nsec3(&nsec3, &rdataset, nsec3param);
1619 nsec3.next = nexthash;
1620 nsec3.next_length = (unsigned char)next_length;
1623 dns_rdatatype_nsec3, &nsec3,
1900 dns_rdata_nsec3_t nsec3;
1933 result = dns_rdata_tostruct(&rdata, &nsec3, NULL);
1987 if (!dns_nsec3_supportedhash(nsec3.hash)) {
2008 if (isc_buffer_usedlength(&buffer) != nsec3.next_length) {
2016 scope = memcmp(owner, nsec3.next, nsec3.next_length);
2030 if (nsec3.iterations > DNS_NSEC3_MAXITERATIONS) {
2034 length = isc_iterated_hash(hash, nsec3.hash, nsec3.iterations,
2035 nsec3.salt, nsec3.salt_length,
2040 if (length != nsec3.next_length) {
2043 nsec3.next_length);
2149 memcmp(hash, nsec3.next, length) < 0) ||
2151 (order > 0 || memcmp(hash, nsec3.next, length) < 0)))
2169 *optout = ((nsec3.flags &