]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - testdata/autotrust_rollalgo_unknown.rpl
Vendor import of Unbound 1.6.2.
[FreeBSD/FreeBSD.git] / testdata / autotrust_rollalgo_unknown.rpl
1 ; config options
2 server:
3         target-fetch-policy: "0 0 0 0 0"
4         log-time-ascii: yes
5         fake-sha1: yes
6 stub-zone:
7         name: "."
8         stub-addr: 193.0.14.129         # K.ROOT-SERVERS.NET.
9 ; initial content (say from dig example.com DNSKEY > example.com.key) 
10 AUTOTRUST_FILE example.com
11 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
12 example.com.    10800   IN      DNSKEY  256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
13 AUTOTRUST_END
14 CONFIG_END
15
16 SCENARIO_BEGIN Test autotrust with algorithm rollover to unknown algo
17 ; from RSASHA1(5) to 'unknown' (157)
18 ; 157 is really the algocode for HMACMD5, which is not used for DNSSEC.
19 ; the signatures are made with a DSA key (02855) but the algorithm is
20 ; edited (afterwards) to be 157.  So the RRSIGs do not verify.
21
22 ; K-ROOT
23 RANGE_BEGIN 0 100
24         ADDRESS 193.0.14.129
25 ENTRY_BEGIN
26 MATCH opcode qname qtype
27 ADJUST copy_id copy_query
28 REPLY QR AA
29 SECTION QUESTION
30 . IN NS
31 SECTION ANSWER
32 . IN NS k.root-servers.net.
33 SECTION ADDITIONAL
34 k.root-servers.net IN A 193.0.14.129
35 ENTRY_END
36
37 ENTRY_BEGIN
38 MATCH opcode subdomain
39 ADJUST copy_id copy_query
40 REPLY QR
41 SECTION QUESTION
42 com. IN NS
43 SECTION AUTHORITY
44 com. IN NS a.gtld-servers.net.
45 SECTION ADDITIONAL
46 a.gtld-servers.net. IN A 192.5.6.30
47 ENTRY_END
48 RANGE_END
49
50 ; a.gtld-servers.net.
51 RANGE_BEGIN 0 100
52         ADDRESS 192.5.6.30
53 ENTRY_BEGIN
54 MATCH opcode subdomain
55 ADJUST copy_id copy_query
56 REPLY QR
57 SECTION QUESTION
58 example.com. IN NS
59 SECTION AUTHORITY
60 example.com. IN NS ns.example.com.
61 SECTION ADDITIONAL
62 ns.example.com. IN A 1.2.3.4
63 ENTRY_END
64 RANGE_END
65
66 ; ns.example.com.  KSK 55582
67 RANGE_BEGIN 0 10
68         ADDRESS 1.2.3.4
69 ENTRY_BEGIN
70 MATCH opcode qname qtype
71 ADJUST copy_id
72 REPLY QR AA
73 SECTION QUESTION
74 www.example.com. IN A
75 SECTION ANSWER
76 www.example.com.        3600    IN      A       10.20.30.40
77 www.example.com.        3600    IN      RRSIG   A 5 3 3600 20090924111500 20090821111500 30899 example.com. pYGxVLsWUvOp1wSf0iwPap+JnECfC5GAm1lRqy3YEqecNGld7U7x/5Imo3CerbdZrVptUQs2oH0lcjwYJXMnsw== ;{id = 30899}
78 SECTION AUTHORITY
79 example.com.    3600    IN      NS      ns.example.com.
80 example.com.    3600    IN      RRSIG   NS 5 2 3600 20090924111500 20090821111500 30899 example.com. J5wxRq0jgwQL6yy530kvo9cHqNAUHV8IF4dvaYZL0bNraO2Oe6dVXqlJl4+cxNHI2TMsstwFPr2Zz8tv6Az2mQ== ;{id = 30899}
81 SECTION ADDITIONAL
82 ns.example.com. 3600    IN      A       1.2.3.4
83 ns.example.com. 3600    IN      RRSIG   A 5 3 3600 20090924111500 20090821111500 30899 example.com. JsXbS18oyc0zkVaOWGSFdIQuOsZKflT0GraT9afDPoWLCgH4ApF7jNgfJV7Pqy1sTBRajME5IUAhpANwGBuW4A== ;{id = 30899}
84 ENTRY_END
85
86 ENTRY_BEGIN
87 MATCH opcode qname qtype
88 ADJUST copy_id
89 REPLY QR AA
90 SECTION QUESTION
91 example.com. IN DNSKEY
92 SECTION ANSWER
93 ; KSK 1
94 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
95 ; ZSK 1
96 example.com.    10800   IN      DNSKEY  256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
97 ; signatures
98 example.com.    10800   IN      RRSIG   DNSKEY 5 2 10800 20090924111500 20090821111500 30899 example.com. b/HK231jIQLX8IhlZfup3r0yhpXaasbPE6LzxoEVVvWaTZWcLmeV8jDIcn0qO7Yvs7bIJN20lwVAV0GcHH3hWQ== ;{id = 30899}
99 example.com.    10800   IN      RRSIG   DNSKEY 5 2 10800 20090924111500 20090821111500 55582 example.com. PCHme1QLoULxqjhg5tMlpR0qJlBfstEUVq18TtNoKQe9le1YhJ9caheXcTWoK+boLhXxg9u6Yyvq8FboQh0OjA== ;{id = 55582}
100 ENTRY_END
101 RANGE_END
102
103 ; ns.example.com.  KSK 55582 and 02855
104 RANGE_BEGIN 11 40
105         ADDRESS 1.2.3.4
106 ENTRY_BEGIN
107 MATCH opcode qname qtype
108 ADJUST copy_id
109 REPLY QR AA
110 SECTION QUESTION
111 example.com. IN DNSKEY
112 SECTION ANSWER
113 ; KSK 1
114 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
115 ; KSK 2
116 example.com.    10800   IN      DNSKEY  257 3 157 ALXLUsWqUrY3JYER3T4TBJIIs70j+sDS/UT2QRp61SE7S3EEXopNXoFE73JLRmvpi/UrOO/Vz4Se6wXv/CYCKjGw06U4WRgRYXcpEhJROyNapmdIKSxhOzfLVE1gqA0PweZR8dtY3aNQSRn3sPpwJr6Mi/PqQKAMMrZ9ckJpf1+bQMOOvxgzz2U1GS18b3yZKcgTMEaJzd/GZYzi/BN2DzQ0MsrSwYXfsNLFOBbs8PJMW4LYIxeeOe6rUgkWOF7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2855 (ksk), size = 1688b}
117 ; and two ZSKs (omitted) for both algorithms.
118 ; signatures
119 example.com.    10800   IN      RRSIG   DNSKEY 5 2 10800 20091024111500 20090921111500 55582 example.com. Wp40P+Odx5gh1Zpjwa1YBwwKnqhobPSkv55sEb21vvKpLE2NNt7B6vZqRLg+bBiW0T/vRdo4w+7whKANVuPrtA== ;{id = 55582}
120 example.com.    10800   IN      RRSIG   DNSKEY 157 2 10800 20091024111500 20090921111500 2855 example.com. AKdhmjqEbe0STsFNq/UxOidElaWHWCy2hSPQ7oN0Tsq56w6Hsk72PpM= ;{id = 2855}
121 ENTRY_END
122 RANGE_END
123
124 ; ns.example.com.  KSK 55582 and 02855 (signatures updated)
125 RANGE_BEGIN 41 50
126         ADDRESS 1.2.3.4
127 ENTRY_BEGIN
128 MATCH opcode qname qtype
129 ADJUST copy_id
130 REPLY QR AA
131 SECTION QUESTION
132 example.com. IN DNSKEY
133 SECTION ANSWER
134 ; KSK 1
135 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
136 ; KSK 2
137 example.com.    10800   IN      DNSKEY  257 3 157 ALXLUsWqUrY3JYER3T4TBJIIs70j+sDS/UT2QRp61SE7S3EEXopNXoFE73JLRmvpi/UrOO/Vz4Se6wXv/CYCKjGw06U4WRgRYXcpEhJROyNapmdIKSxhOzfLVE1gqA0PweZR8dtY3aNQSRn3sPpwJr6Mi/PqQKAMMrZ9ckJpf1+bQMOOvxgzz2U1GS18b3yZKcgTMEaJzd/GZYzi/BN2DzQ0MsrSwYXfsNLFOBbs8PJMW4LYIxeeOe6rUgkWOF7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2855 (ksk), size = 1688b}
138 ; signatures
139 example.com.    10800   IN      RRSIG   DNSKEY 5 2 10800 20091124111500 20091018111500 55582 example.com. FXY4N99Udr/2Q+9oU4Dil9B8XQCBcaU0NlqJ9HnwZoLqzKiPhtxNlldU2Ab5TmuXfnkTT1bTYvsq5Dz6P3ezbw== ;{id = 55582}
140 example.com.    10800   IN      RRSIG   DNSKEY 157 2 10800 20091124111500 20091018111500 2855 example.com. ABJyZ97htJyBFk5wsKml3YAz81FpXkQKdJeC++fB5ysvl3i+zKJFzTo= ;{id = 2855}
141 ENTRY_END
142 RANGE_END
143
144 ; ns.example.com.  KSK 55582-REVOKED and 02855
145 RANGE_BEGIN 51 60
146         ADDRESS 1.2.3.4
147 ENTRY_BEGIN
148 MATCH opcode qname qtype
149 ADJUST copy_id
150 REPLY QR AA
151 SECTION QUESTION
152 example.com. IN DNSKEY
153 SECTION ANSWER
154 ; KSK 1
155 example.com.    10800   IN      DNSKEY  385 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55710 (ksk), size = 512b}
156 ; KSK 2
157 example.com.    10800   IN      DNSKEY  257 3 157 ALXLUsWqUrY3JYER3T4TBJIIs70j+sDS/UT2QRp61SE7S3EEXopNXoFE73JLRmvpi/UrOO/Vz4Se6wXv/CYCKjGw06U4WRgRYXcpEhJROyNapmdIKSxhOzfLVE1gqA0PweZR8dtY3aNQSRn3sPpwJr6Mi/PqQKAMMrZ9ckJpf1+bQMOOvxgzz2U1GS18b3yZKcgTMEaJzd/GZYzi/BN2DzQ0MsrSwYXfsNLFOBbs8PJMW4LYIxeeOe6rUgkWOF7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2855 (ksk), size = 1688b}
158 ; signatures
159 example.com.    10800   IN      RRSIG   DNSKEY 5 2 10800 20091224111500 20091118111500 55710 example.com. w5hXwGyeLHWTzdStx4yjB7LNzt86u9A+Qpl3rtQlTKN/qkWIT+Hxa3M32P6jhFTpf+Iq1K9T06mKM21L3TQAOg== ;{id = 55710}
160 example.com.    10800   IN      RRSIG   DNSKEY 157 2 10800 20091224111500 20091118111500 2855 example.com. AFAbqLJsTDBfwAipE84ETdFTfzKHs7pzdyzjTKHR2VXygGvHY4QsBaA= ;{id = 2855}
161 ; wrong keytag: 55582
162 ENTRY_END
163 RANGE_END
164
165 ; ns.example.com.  KSK 02855
166 RANGE_BEGIN 61 70
167         ADDRESS 1.2.3.4
168 ENTRY_BEGIN
169 MATCH opcode qname qtype
170 ADJUST copy_id
171 REPLY QR AA
172 SECTION QUESTION
173 example.com. IN DNSKEY
174 SECTION ANSWER
175 ; KSK 2
176 example.com.    10800   IN      DNSKEY  257 3 157 ALXLUsWqUrY3JYER3T4TBJIIs70j+sDS/UT2QRp61SE7S3EEXopNXoFE73JLRmvpi/UrOO/Vz4Se6wXv/CYCKjGw06U4WRgRYXcpEhJROyNapmdIKSxhOzfLVE1gqA0PweZR8dtY3aNQSRn3sPpwJr6Mi/PqQKAMMrZ9ckJpf1+bQMOOvxgzz2U1GS18b3yZKcgTMEaJzd/GZYzi/BN2DzQ0MsrSwYXfsNLFOBbs8PJMW4LYIxeeOe6rUgkWOF7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2855 (ksk), size = 1688b}
177 ; signatures
178 example.com.    10800   IN      RRSIG   DNSKEY 157 2 10800 20101224111500 20101118111500 2855 example.com. AJv9ujre3iUykHlhJpLYPqsXq12lmQp+AHUPSPpE5zuUhXAPjbnbewk= ;{id = 2855}
179 ENTRY_END
180 RANGE_END
181
182 ; set date/time to Aug 24 07:46:40  (2009).
183 STEP 5 TIME_PASSES ELAPSE 1251100000
184 STEP 6 TRAFFIC   ; the initial probe
185 STEP 7 ASSIGN t0 = ${time}
186 STEP 8 ASSIGN probe0 = ${range 4800 ${timeout} 5400}
187
188 ; the auto probing should have been done now.
189 STEP 10 CHECK_AUTOTRUST example.com
190 FILE_BEGIN
191 ; autotrust trust anchor file
192 ;;id: example.com. 1
193 ;;last_queried: ${$t0} ;;${ctime $t0}
194 ;;last_success: ${$t0} ;;${ctime $t0}
195 ;;next_probe_time: ${$t0 + $probe0} ;;${ctime $t0 + $probe0}
196 ;;query_failed: 0
197 ;;query_interval: 5400
198 ;;retry_time: 3600
199 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [  VALID  ] ;;count=0 ;;lastchange=${$t0} ;;${ctime $t0}
200 FILE_END
201
202 ; key prepublished.  First poll. 30 days later
203 STEP 11 TIME_PASSES EVAL ${30*24*3600}
204 STEP 12 TRAFFIC
205 STEP 13 ASSIGN t1 = ${time}
206 STEP 14 ASSIGN probe1 = ${range 4800 ${timeout} 5400}
207 STEP 15 CHECK_AUTOTRUST example.com
208 FILE_BEGIN
209 ; autotrust trust anchor file
210 ;;id: example.com. 1
211 ;;last_queried: ${$t1} ;;${ctime $t1}
212 ;;last_success: ${$t1} ;;${ctime $t1}
213 ;;next_probe_time: ${$t1 + $probe1} ;;${ctime $t1 + $probe1}
214 ;;query_failed: 0
215 ;;query_interval: 5400
216 ;;retry_time: 3600
217 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [  VALID  ] ;;count=0 ;;lastchange=${$t0} ;;${ctime $t0}
218 FILE_END
219
220 ; Second poll. 10 days later
221 STEP 21 TIME_PASSES EVAL ${10*24*3600}
222 STEP 22 TRAFFIC
223 STEP 23 ASSIGN t2 = ${time}
224 STEP 24 ASSIGN probe2 = ${range 4800 ${timeout} 5400}
225 STEP 25 CHECK_AUTOTRUST example.com
226 FILE_BEGIN
227 ; autotrust trust anchor file
228 ;;id: example.com. 1
229 ;;last_queried: ${$t2} ;;${ctime $t2}
230 ;;last_success: ${$t2} ;;${ctime $t2}
231 ;;next_probe_time: ${$t2 + $probe2} ;;${ctime $t2 + $probe2}
232 ;;query_failed: 0
233 ;;query_interval: 5400
234 ;;retry_time: 3600
235 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [  VALID  ] ;;count=0 ;;lastchange=${$t0} ;;${ctime $t0}
236 FILE_END
237
238 ; Third poll. 10 days later
239 STEP 31 TIME_PASSES EVAL ${10*24*3600}
240 STEP 32 TRAFFIC
241 STEP 33 ASSIGN t3 = ${time}
242 STEP 34 ASSIGN probe3 = ${range 4800 ${timeout} 5400}
243 STEP 35 CHECK_AUTOTRUST example.com
244 FILE_BEGIN
245 ; autotrust trust anchor file
246 ;;id: example.com. 1
247 ;;last_queried: ${$t3} ;;${ctime $t3}
248 ;;last_success: ${$t3} ;;${ctime $t3}
249 ;;next_probe_time: ${$t3 + $probe3} ;;${ctime $t3 + $probe3}
250 ;;query_failed: 0
251 ;;query_interval: 5400
252 ;;retry_time: 3600
253 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [  VALID  ] ;;count=0 ;;lastchange=${$t0} ;;${ctime $t0}
254 FILE_END
255
256 ; 11 days later, hold down has lapsed.
257 STEP 41 TIME_PASSES EVAL ${11*24*3600}
258 STEP 42 TRAFFIC
259 STEP 43 ASSIGN t4 = ${time}
260 STEP 44 ASSIGN probe4 = ${range 4800 ${timeout} 5400}
261 STEP 45 CHECK_AUTOTRUST example.com
262 FILE_BEGIN
263 ; autotrust trust anchor file
264 ;;id: example.com. 1
265 ;;last_queried: ${$t4} ;;${ctime $t4}
266 ;;last_success: ${$t4} ;;${ctime $t4}
267 ;;next_probe_time: ${$t4 + $probe4} ;;${ctime $t4 + $probe4}
268 ;;query_failed: 0
269 ;;query_interval: 5400
270 ;;retry_time: 3600
271 example.com.    10800   IN      DNSKEY  257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b} ;;state=2 [  VALID  ] ;;count=0 ;;lastchange=${$t0} ;;${ctime $t0}
272 FILE_END
273
274 ; 30 days later, the old key is revoked
275 STEP 51 TIME_PASSES EVAL ${30*24*3600}
276 STEP 52 TRAFFIC
277 STEP 53 ASSIGN t5 = ${time}
278 ; no more timeout
279 STEP 54 ASSIGN probe5 = ${range 0 ${timeout} 0}
280 STEP 55 CHECK_AUTOTRUST example.com
281 FILE_BEGIN
282 ; autotrust trust anchor file
283 ;;REVOKED
284 ; The zone has all keys revoked, and is
285 ; considered as if it has no trust anchors.
286 ; the remainder of the file is the last probe.
287 ; to restart the trust anchor, overwrite this file.
288 ; with one containing valid DNSKEYs or DSes.
289 ;;id: example.com. 1
290 ;;last_queried: ${$t5} ;;${ctime $t5}
291 ;;last_success: ${$t5} ;;${ctime $t5}
292 ;;next_probe_time: 0 ;;${ctime 0}
293 ;;query_failed: 0
294 ;;query_interval: 5400
295 ;;retry_time: 3600
296 example.com.    10800   IN      DNSKEY  385 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55710 (ksk), size = 512b} ;;state=4 [ REVOKED ] ;;count=0 ;;lastchange=${$t5} ;;${ctime $t5}
297 FILE_END
298
299 ; 370 days later, the old key is removed from storage
300 STEP 61 TIME_PASSES EVAL ${370*24*3600}
301 STEP 62 TRAFFIC
302 STEP 63 ASSIGN t6 = ${time}
303 STEP 64 ASSIGN probe6 = ${range 0 ${timeout} 0}
304 STEP 65 CHECK_AUTOTRUST example.com
305 FILE_BEGIN
306 ; autotrust trust anchor file
307 ;;REVOKED
308 ; The zone has all keys revoked, and is
309 ; considered as if it has no trust anchors.
310 ; the remainder of the file is the last probe.
311 ; to restart the trust anchor, overwrite this file.
312 ; with one containing valid DNSKEYs or DSes.
313 ;;id: example.com. 1
314 ;;last_queried: ${$t5} ;;${ctime $t5}
315 ;;last_success: ${$t5} ;;${ctime $t5}
316 ;;next_probe_time: 0 ;;${ctime 0}
317 ;;query_failed: 0
318 ;;query_interval: 5400
319 ;;retry_time: 3600
320 example.com.    10800   IN      DNSKEY  385 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55710 (ksk), size = 512b} ;;state=4 [ REVOKED ] ;;count=0 ;;lastchange=${$t5} ;;${ctime $t5}
321 FILE_END
322
323
324 SCENARIO_END