]> git.saurik.com Git - apple/network_cmds.git/blob - unbound/testdata/autotrust_init_sigs.rpl
050edf2a95f0b62ecef6e4750c3d0c0449bc87b9
[apple/network_cmds.git] / unbound / testdata / autotrust_init_sigs.rpl
1 ; config options
2 server:
3 target-fetch-policy: "0 0 0 0 0"
4 log-time-ascii: yes
5 stub-zone:
6 name: "."
7 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
8 ; initial content (say from dig example.com DNSKEY > example.com.key)
9 AUTOTRUST_FILE example.com
10 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
11 example.com. 10800 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
12 example.com. 10800 IN RRSIG DNSKEY 5 2 10800 20070926134150 20070829134150 55582 example.com. sT5Se0rwBm0oAOcrX37oidl3zxK9QwvgAyOH+08Jq3V8KS4iPehBjNqXi9OITLgos4dHU/up4Z1BwgwTNYJIgg== ;{id = 55582}
13 example.com. 10800 IN RRSIG DNSKEY 5 2 10800 20070926134150 20070829134150 30899 example.com. DnrdGYsSAjAX1z93FQvPL8eX66uS9ip7A21gPTkvGBDwDoNB8JTNdRlEyWeXlipatbcQoZeG8mo87Wgp9eT/PA== ;{id = 30899}
14 AUTOTRUST_END
15 CONFIG_END
16
17 SCENARIO_BEGIN Test autotrust with initial trust anchor with RRSIGs
18
19 ; K-ROOT
20 RANGE_BEGIN 0 100
21 ADDRESS 193.0.14.129
22 ENTRY_BEGIN
23 MATCH opcode qname qtype
24 ADJUST copy_id copy_query
25 REPLY QR AA
26 SECTION QUESTION
27 . IN NS
28 SECTION ANSWER
29 . IN NS k.root-servers.net.
30 SECTION ADDITIONAL
31 k.root-servers.net IN A 193.0.14.129
32 ENTRY_END
33
34 ENTRY_BEGIN
35 MATCH opcode subdomain
36 ADJUST copy_id copy_query
37 REPLY QR
38 SECTION QUESTION
39 com. IN NS
40 SECTION AUTHORITY
41 com. IN NS a.gtld-servers.net.
42 SECTION ADDITIONAL
43 a.gtld-servers.net. IN A 192.5.6.30
44 ENTRY_END
45 RANGE_END
46
47 ; a.gtld-servers.net.
48 RANGE_BEGIN 0 100
49 ADDRESS 192.5.6.30
50 ENTRY_BEGIN
51 MATCH opcode subdomain
52 ADJUST copy_id copy_query
53 REPLY QR
54 SECTION QUESTION
55 example.com. IN NS
56 SECTION AUTHORITY
57 example.com. IN NS ns.example.com.
58 SECTION ADDITIONAL
59 ns.example.com. IN A 1.2.3.4
60 ENTRY_END
61 RANGE_END
62
63 ; ns.example.com.
64 RANGE_BEGIN 0 100
65 ADDRESS 1.2.3.4
66 ENTRY_BEGIN
67 MATCH opcode qname qtype
68 ADJUST copy_id
69 REPLY QR AA
70 SECTION QUESTION
71 www.example.com. IN A
72 SECTION ANSWER
73 www.example.com. 3600 IN A 10.20.30.40
74 www.example.com. 3600 IN RRSIG A 5 3 3600 20090924111500 20090821111500 30899 example.com. pYGxVLsWUvOp1wSf0iwPap+JnECfC5GAm1lRqy3YEqecNGld7U7x/5Imo3CerbdZrVptUQs2oH0lcjwYJXMnsw== ;{id = 30899}
75 SECTION AUTHORITY
76 example.com. 3600 IN NS ns.example.com.
77 example.com. 3600 IN RRSIG NS 5 2 3600 20090924111500 20090821111500 30899 example.com. J5wxRq0jgwQL6yy530kvo9cHqNAUHV8IF4dvaYZL0bNraO2Oe6dVXqlJl4+cxNHI2TMsstwFPr2Zz8tv6Az2mQ== ;{id = 30899}
78 SECTION ADDITIONAL
79 ns.example.com. 3600 IN A 1.2.3.4
80 ns.example.com. 3600 IN RRSIG A 5 3 3600 20090924111500 20090821111500 30899 example.com. JsXbS18oyc0zkVaOWGSFdIQuOsZKflT0GraT9afDPoWLCgH4ApF7jNgfJV7Pqy1sTBRajME5IUAhpANwGBuW4A== ;{id = 30899}
81 ENTRY_END
82
83 ENTRY_BEGIN
84 MATCH opcode qname qtype
85 ADJUST copy_id
86 REPLY QR AA
87 SECTION QUESTION
88 example.com. IN DNSKEY
89 SECTION ANSWER
90 ; KSK 1
91 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
92 ; ZSK 1
93 example.com. 10800 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (ksk), size = 512b}
94 ; signatures
95 example.com. 10800 IN RRSIG DNSKEY 5 2 10800 20090924111500 20090821111500 30899 example.com. b/HK231jIQLX8IhlZfup3r0yhpXaasbPE6LzxoEVVvWaTZWcLmeV8jDIcn0qO7Yvs7bIJN20lwVAV0GcHH3hWQ== ;{id = 30899}
96 example.com. 10800 IN RRSIG DNSKEY 5 2 10800 20090924111500 20090821111500 55582 example.com. PCHme1QLoULxqjhg5tMlpR0qJlBfstEUVq18TtNoKQe9le1YhJ9caheXcTWoK+boLhXxg9u6Yyvq8FboQh0OjA== ;{id = 55582}
97
98 ENTRY_END
99 RANGE_END
100
101 ; set date/time to Aug 24 07:46:40 (2009).
102 STEP 5 TIME_PASSES ELAPSE 1251100000
103 STEP 6 ASSIGN t0 = ${time}
104 ; get probe time and check it. 4800 is about 10% less than 5400. And more than
105 ; the 3600 that a failure timeout would have.
106 STEP 7 ASSIGN probe = ${range 4800 ${timeout} 5400}
107
108
109 ; the auto probing should have been done now.
110 STEP 8 CHECK_AUTOTRUST example.com
111 FILE_BEGIN
112 ; autotrust trust anchor file
113 ;;id: example.com. 1
114 ;;last_queried: 1251100000 ;;Mon Aug 24 07:46:40 2009
115 ;;last_success: 1251100000 ;;Mon Aug 24 07:46:40 2009
116 ;;next_probe_time: ${$t0 + $probe} ;;${ctime $t0 + $probe}
117 ;;query_failed: 0
118 ;;query_interval: 5400
119 ;;retry_time: 3600
120 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [ VALID ] ;;count=0 ;;lastchange=1251100000 ;;Mon Aug 24 07:46:40 2009
121 FILE_END
122
123
124 STEP 10 QUERY
125 ENTRY_BEGIN
126 REPLY RD DO
127 SECTION QUESTION
128 www.example.com. IN A
129 ENTRY_END
130
131 STEP 20 CHECK_ANSWER
132 ENTRY_BEGIN
133 MATCH all
134 REPLY QR RD RA AD DO NOERROR
135 SECTION QUESTION
136 www.example.com. IN A
137 SECTION ANSWER
138 www.example.com. 3600 IN A 10.20.30.40
139 www.example.com. 3600 IN RRSIG A 5 3 3600 20090924111500 20090821111500 30899 example.com. pYGxVLsWUvOp1wSf0iwPap+JnECfC5GAm1lRqy3YEqecNGld7U7x/5Imo3CerbdZrVptUQs2oH0lcjwYJXMnsw== ;{id = 30899}
140 SECTION AUTHORITY
141 example.com. 3600 IN NS ns.example.com.
142 example.com. 3600 IN RRSIG NS 5 2 3600 20090924111500 20090821111500 30899 example.com. J5wxRq0jgwQL6yy530kvo9cHqNAUHV8IF4dvaYZL0bNraO2Oe6dVXqlJl4+cxNHI2TMsstwFPr2Zz8tv6Az2mQ== ;{id = 30899}
143 SECTION ADDITIONAL
144 ns.example.com. 3600 IN A 1.2.3.4
145 ns.example.com. 3600 IN RRSIG A 5 3 3600 20090924111500 20090821111500 30899 example.com. JsXbS18oyc0zkVaOWGSFdIQuOsZKflT0GraT9afDPoWLCgH4ApF7jNgfJV7Pqy1sTBRajME5IUAhpANwGBuW4A== ;{id = 30899}
146 ENTRY_END
147
148 ; The autotrust anchor was probed due to the query.
149
150 STEP 30 CHECK_AUTOTRUST example.com
151 FILE_BEGIN
152 ; autotrust trust anchor file
153 ;;id: example.com. 1
154 ;;last_queried: 1251100000 ;;Mon Aug 24 07:46:40 2009
155 ;;last_success: 1251100000 ;;Mon Aug 24 07:46:40 2009
156 ;;next_probe_time: ${$t0 + $probe} ;;${ctime $t0 + $probe}
157 ;;query_failed: 0
158 ;;query_interval: 5400
159 ;;retry_time: 3600
160 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [ VALID ] ;;count=0 ;;lastchange=1251100000 ;;Mon Aug 24 07:46:40 2009
161 FILE_END
162
163 ; wait and see if autotrust probes (the unchanged) domain again.
164 STEP 40 TIME_PASSES EVAL ${$probe}
165
166 STEP 50 TRAFFIC
167
168 STEP 65 ASSIGN probe2 = ${range 4800 ${timeout} 5400}
169
170 STEP 70 CHECK_AUTOTRUST example.com
171 FILE_BEGIN
172 ; autotrust trust anchor file
173 ;;id: example.com. 1
174 ;;last_queried: ${time} ;;${ctime ${time}}
175 ;;last_success: ${time} ;;${ctime ${time}}
176 ;;next_probe_time: ${$t0 + $probe + $probe2} ;;${ctime $t0 + $probe + $probe2}
177 ;;query_failed: 0
178 ;;query_interval: 5400
179 ;;retry_time: 3600
180 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [ VALID ] ;;count=0 ;;lastchange=1251100000 ;;Mon Aug 24 07:46:40 2009
181 FILE_END
182
183 SCENARIO_END