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