1RR::NSEC3(3) User Contributed Perl Documentation RR::NSEC3(3)
2
3
4
6 Net::DNS::RR::NSEC3 - DNS NSEC3 resource record
7
9 "use Net::DNS::RR;"
10
12 Class for DNS Address (NSEC3) resource records.
13
14 The NSEC3 Resource Record (RR) provides authenticated denial of
15 existence for DNS Resource Record Sets. The NSEC3 RR lists RR types
16 present at the NSEC3 RR's original ownername. It includes the next
17 hashed ownername in the hash order of the zone. The complete set of
18 NSEC3 RRs in a zone indicates which RRsets exist for the original
19 ownername of the RRset and form a chain of hashed ownernames in the
20 zone.
21
23 ownername
24 Returns the hashed value of the original owner name as contained in the
25 first label of the ownername of the record.
26
27 The owner name for the NSEC3 RR is the base32 encoding of the hashed
28 owner name prepended as a single label to the name of the zone.
29
30 In other words the name(name) method returns the result of the
31 ownername() method prepended to the name of the containing zone.
32
33 optout
34 Reads and sets the opt-out attribute.
35
36 flags
37 Reads and sets the flag field.
38
39 hashalgo
40 Reads and sets the hashalgo (hash algorithm) attribute.
41
42 hnxtname
43 Reads and sets the hnxtname (hashed next ownername) attribute.
44
45 typelist (inhereted from NSEC)
46 print "typelist" = ", $rr->typelist, "\n";
47
48 Returns a string with the list of qtypes for which data exists for this
49 particular label.
50
51 typebm (inhereted from NSEC)
52 print "typebm" = " unpack("B*", $rr->typebm), "\n";
53
54 Same as the typelist but now in a representation bitmap as in
55 specified in the RFC. This is not the kind of method you will need on
56 daily basis.
57
58 covered, matched
59 print "covered" if $rr->covered{'example.foo'}
60
61 covered returns a nonzero value when the the domain name provided as
62 argument is covered as defined in the NSEC3 specification:
63
64 To cover: An NSEC3 RR is said to "cover" a name if the hash of the
65 name or "next closer" name falls between the owner name and the
66 next hashed owner name of the NSEC3. In other words, if it proves
67 the nonexistence of the name, either directly or by proving the
68 nonexistence of an ancestor of the name.
69
70 Similarly ismatched returns a nonzero value when the domainname in the
71 argument matches as defined in the NSEC3 specification:
72
73 To match: An NSEC3 RR is said to "match" a name if the owner name
74 of the NSEC3 RR is the same as the hashed owner name of that
75 name.
76
78 name2hash
79 Takes the hash identifyer (numeric), a fullyqualfied domain name, the
80 number of iterations and a binary salt to compute the hash value used
81 in the NSEC3 calculations.
82
83 $hashalg=Net::DNS::SEC->digtype("SHA1");
84 $salt=pack("H*","aabbccdd");
85 $iterations=12;
86 $name="*.x.w.example";
87
88 $hashedname= Net::DNS::RR::NSEC3::name2hash($hashalg,$name,$iterations,$salt);
89 print $hashedname;
90 results in:
91 92pqneegtaue7pjatc3l3qnk738c6v5m
92
93 Normally the salt and itterations would be fetched from an NSEC3PARAM
94 record.
95
97 Copyright (c) 2007, 2008 NLnet Labs. Author Olaf M. Kolkman
98 <olaf@net-dns.org>
99
100 All Rights Reserved
101
102 Permission to use, copy, modify, and distribute this software and its
103 documentation for any purpose and without fee is hereby granted,
104 provided that the above copyright notice appear in all copies and that
105 both that copyright notice and this permission notice appear in
106 supporting documentation, and that the name of the author not be used
107 in advertising or publicity pertaining to distribution of the software
108 without specific, written prior permission.
109
110 THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
111 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO
112 EVENT SHALL AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
113 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
114 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
115 ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
116 THIS SOFTWARE.
117
118 Based on, and contains, code by Copyright (c) 1997 Michael Fuhr.
119
120 Acknowledgements to Roy Arends who made a test version for this class
121 and whose code I've looked at before writing this module.
122
124 http://www.net-dns.org/ <http://www.net-dns.org/>
125 http://www.iana.org/assignments/dnssec-nsec3-parameters
126 <http://www.iana.org/assignments/dnssec-nsec3-parameters>
127 Net::DNS::RR::NSEC3PARAM, perl(1), Net::DNS, Net::DNS::Resolver,
128 Net::DNS::Packet, Net::DNS::Header, Net::DNS::Question, Net::DNS::RR,
129 RFC4033, RFC4034, RFC4035, RFC5155
130
131
132
133perl v5.12.3 2010-03-12 RR::NSEC3(3)