xref: /netbsd-src/external/bsd/unbound/dist/testdata/svcb.tdir/svcb.test-vectors-wf.zone (revision 7a540f2bd4f5b968566c2607d6462c7f2fb452cf)
1$ORIGIN test-vectors.
2$TTL 3600
3
4@	SOA	primary admin 1 3600 1800 7200 3600
5
6	NS	primary
7primary	A	127.0.0.1
8
9; D.1. AliasForm
10
11v01	SVCB	\# 19 (
1200 00                                              ; priority
1303 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
14)
15
16; D.2. ServiceForm
17; The first form is the simple "use the ownername".
18
19v02	SVCB	\# 3 (
2000 01      ; priority
2100         ; target (root label)
22)
23
24; This vector only has a port.
25
26v03	SVCB	\# 25 (
2700 10                                              ; priority
2803 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
2900 03                                              ; key 3
3000 02                                              ; length 2
3100 35                                              ; value
32)
33
34; This example has a key that is not registered, its value is unquoted.
35
36v04	SVCB	\# 28 (
3700 01                                              ; priority
3803 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
3902 9b                                              ; key 667
4000 05                                              ; length 5
4168 65 6c 6c 6f                                     ; value
42)
43
44; This example has a key that is not registered, its value is quoted and
45; contains a decimal-escaped character.
46
47v05	SVCB	\# 32 (
4800 01                                              ; priority
4903 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
5002 9b                                              ; key 667
5100 09                                              ; length 9
5268 65 6c 6c 6f d2 71 6f 6f                         ; value
53)
54
55; Here, two IPv6 hints are quoted in the presentation format.
56
57v06	SVCB	\# 55 (
5800 01                                              ; priority
5903 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
6000 06                                              ; key 6
6100 20                                              ; length 32
6220 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 01    ; first address
6320 01 0d b8 00 00 00 00 00 00 00 00 00 53 00 01    ; second address
64)
65
66; This example shows a single IPv6 hint in IPv4 mapped IPv6 presentation format.
67
68v07	SVCB	\# 35 (
6900 01                                              ; priority
7007 65 78 61 6d 70 6c 65 03 63 6f 6d 00             ; target
7100 06                                              ; key 6
7200 10                                              ; length 16
7320 01 0d b8 ff ff ff ff ff ff ff ff c6 33 64 64    ; address
74)
75
76; In the next vector, neither the SvcParamValues nor the mandatory keys are
77; sorted in presentation format, but are correctly sorted in the wire-format.
78
79v08	SVCB	\# 48 (
8000 10                                              ; priority
8103 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
8200 00                                              ; key 0
8300 04                                              ; param length 4
8400 01                                              ; value: key 1
8500 04                                              ; value: key 4
8600 01                                              ; key 1
8700 09                                              ; param length 9
8802                                                 ; alpn length 2
8968 32                                              ; alpn value
9005                                                 ; alpn length 5
9168 33 2d 31 39                                     ; alpn value
9200 04                                              ; key 4
9300 04                                              ; param length 4
94c0 00 02 01                                        ; param value
95)
96
97; This last (two) vectors has an alpn value with an escaped comma and an
98; escaped backslash in two presentation formats.
99
100v09	SVCB	\# 35 (
10100 10                                              ; priority
10203 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
10300 01                                              ; key 1
10400 0c                                              ; param length 12
10508                                                 ; alpn length 8
10666 5c 6f 6f 2c 62 61 72                            ; alpn value
10702                                                 ; alpn length 2
10868 32                                              ; alpn value
109)
110v10	SVCB	\# 35 (
11100 10                                              ; priority
11203 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
11300 01                                              ; key 1
11400 0c                                              ; param length 12
11508                                                 ; alpn length 8
11666 5c 6f 6f 2c 62 61 72                            ; alpn value
11702                                                 ; alpn length 2
11868 32                                              ; alpn value
119)
120
121; D.1. AliasForm
122
123v11	HTTPS	\# 19 (
12400 00                                              ; priority
12503 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
126)
127
128; D.2. ServiceForm
129; The first form is the simple "use the ownername".
130
131v12	HTTPS	\# 3 (
13200 01      ; priority
13300         ; target (root label)
134)
135
136; This vector only has a port.
137
138v13	HTTPS	\# 25 (
13900 10                                              ; priority
14003 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
14100 03                                              ; key 3
14200 02                                              ; length 2
14300 35                                              ; value
144)
145
146; This example has a key that is not registered, its value is unquoted.
147
148v14	HTTPS	\# 28 (
14900 01                                              ; priority
15003 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
15102 9b                                              ; key 667
15200 05                                              ; length 5
15368 65 6c 6c 6f                                     ; value
154)
155
156; This example has a key that is not registered, its value is quoted and
157; contains a decimal-escaped character.
158
159v15	HTTPS	\# 32 (
16000 01                                              ; priority
16103 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
16202 9b                                              ; key 667
16300 09                                              ; length 9
16468 65 6c 6c 6f d2 71 6f 6f                         ; value
165)
166
167; Here, two IPv6 hints are quoted in the presentation format.
168
169v16	HTTPS	\# 55 (
17000 01                                              ; priority
17103 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
17200 06                                              ; key 6
17300 20                                              ; length 32
17420 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 01    ; first address
17520 01 0d b8 00 00 00 00 00 00 00 00 00 53 00 01    ; second address
176)
177
178; This example shows a single IPv6 hint in IPv4 mapped IPv6 presentation format.
179
180v17	HTTPS	\# 35 (
18100 01                                              ; priority
18207 65 78 61 6d 70 6c 65 03 63 6f 6d 00             ; target
18300 06                                              ; key 6
18400 10                                              ; length 16
18520 01 0d b8 ff ff ff ff ff ff ff ff c6 33 64 64    ; address
186)
187
188; In the next vector, neither the SvcParamValues nor the mandatory keys are
189; sorted in presentation format, but are correctly sorted in the wire-format.
190
191v18	HTTPS	\# 48 (
19200 10                                              ; priority
19303 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
19400 00                                              ; key 0
19500 04                                              ; param length 4
19600 01                                              ; value: key 1
19700 04                                              ; value: key 4
19800 01                                              ; key 1
19900 09                                              ; param length 9
20002                                                 ; alpn length 2
20168 32                                              ; alpn value
20205                                                 ; alpn length 5
20368 33 2d 31 39                                     ; alpn value
20400 04                                              ; key 4
20500 04                                              ; param length 4
206c0 00 02 01                                        ; param value
207)
208
209; This last (two) vectors has an alpn value with an escaped comma and an
210; escaped backslash in two presentation formats.
211
212v19	HTTPS	\# 35 (
21300 10                                              ; priority
21403 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
21500 01                                              ; key 1
21600 0c                                              ; param length 12
21708                                                 ; alpn length 8
21866 5c 6f 6f 2c 62 61 72                            ; alpn value
21902                                                 ; alpn length 2
22068 32                                              ; alpn value
221)
222v20	HTTPS	\# 35 (
22300 10                                              ; priority
22403 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
22500 01                                              ; key 1
22600 0c                                              ; param length 12
22708                                                 ; alpn length 8
22866 5c 6f 6f 2c 62 61 72                            ; alpn value
22902                                                 ; alpn length 2
23068 32                                              ; alpn value
231)
232
233