summaryrefslogtreecommitdiff
path: root/tests/svcb_test_vectors.generic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/svcb_test_vectors.generic')
-rw-r--r--tests/svcb_test_vectors.generic103
1 files changed, 103 insertions, 0 deletions
diff --git a/tests/svcb_test_vectors.generic b/tests/svcb_test_vectors.generic
new file mode 100644
index 0000000..104eb32
--- /dev/null
+++ b/tests/svcb_test_vectors.generic
@@ -0,0 +1,103 @@
+; Alias form
+\# 19 (
+00 00 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
+)
+
+; Service form
+
+; The first form is the simple "use the ownername".
+\# 3 (
+00 01 ; priority
+00 ; target (root label)
+)
+
+; This vector only has a port.
+\# 25 (
+00 10 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
+00 03 ; key 3
+00 02 ; length 2
+00 35 ; value
+)
+
+; This example has a key that is not registered, its value is unquoted.
+\# 28 (
+00 01 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
+02 9b ; key 667
+00 05 ; length 5
+68 65 6c 6c 6f ; value
+)
+
+; This example has a key that is not registered, its value is quoted and
+; contains a decimal-escaped character.
+\# 32 (
+00 01 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
+02 9b ; key 667
+00 09 ; length 9
+68 65 6c 6c 6f d2 71 6f 6f ; value
+)
+
+; Here, two IPv6 hints are quoted in the presentation format.
+\# 55 (
+00 01 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
+00 06 ; key 6
+00 20 ; length 32
+20 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 01 ; first address
+20 01 0d b8 00 00 00 00 00 00 00 00 00 53 00 01 ; second address
+)
+
+; This example shows a single IPv6 hint in IPv4 mapped IPv6 presentation format.
+\# 35 (
+00 01 ; priority
+07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 ; target
+00 06 ; key 6
+00 10 ; length 16
+20 01 0d b8 ff ff ff ff ff ff ff ff c6 33 64 64 ; address
+)
+
+; In the next vector, neither the SvcParamValues nor the mandatory keys are
+; sorted in presentation format, but are correctly sorted in the wire-format.
+\# 48 (
+00 10 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
+00 00 ; key 0
+00 04 ; param length 4
+00 01 ; value: key 1
+00 04 ; value: key 4
+00 01 ; key 1
+00 09 ; param length 9
+02 ; alpn length 2
+68 32 ; alpn value
+05 ; alpn length 5
+68 33 2d 31 39 ; alpn value
+00 04 ; key 4
+00 04 ; param length 4
+c0 00 02 01 ; param value
+)
+
+; This last vector has an alpn value with an escaped comma and an escaped
+; backslash in two presentation formats.
+\# 35 (
+00 10 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
+00 01 ; key 1
+00 0c ; param length 12
+08 ; alpn length 8
+66 5c 6f 6f 2c 62 61 72 ; alpn value
+02 ; alpn length 2
+68 32 ; alpn value
+)
+\# 35 (
+00 10 ; priority
+03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 6f 72 67 00 ; target
+00 01 ; key 1
+00 0c ; param length 12
+08 ; alpn length 8
+66 5c 6f 6f 2c 62 61 72 ; alpn value
+02 ; alpn length 2
+68 32 ; alpn value
+)