dns.dnssec.validate_nsec_wildcard

dns.dnssec

validate_nsec_wildcard(nsec_records, qname, encloser) -> ok, err

Validate NSEC proves no closer name hides behind a wildcard answer

The proof of RFC 4035 §5.3.4 for an answer expanded from the wildcard right under encloser. An NSEC must cover qname, so the name has no records of its own.

That NSEC must also name encloser as the closest encloser of qname. The closest encloser an NSEC shows is the longest ancestor qname shares with its owner or its next name. A longer one than encloser is a closer name, or an empty non-terminal, and the wildcard does not reach under it.

The NSEC proves nothing when qname lies below its owner, and that owner is a delegation or holds a DNAME (RFC 6840 §4.1).