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