]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add tests for simple password auth type
authorAlan T. DeKok <aland@freeradius.org>
Fri, 21 Jun 2024 14:53:44 +0000 (10:53 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 21 Jun 2024 16:14:00 +0000 (12:14 -0400)
share/dictionary/bfd/dictionary.rfc5880
src/tests/unit/protocols/bfd/base.txt

index 2b35c8b69228c094315f23c96db780718245e082..1e61683e4abbfc57278ea4b3248ded75ac890cf4 100644 (file)
@@ -46,7 +46,7 @@ VALUE state                           up                      3
 STRUCT simple-password                 auth-type               1 length=uint8,offset=2
 MEMBER         key-id                                  uint8
 MEMBER         reserved                                uint8
-MEMBER         password                                string[1]       # really 1..16
+MEMBER         password                                string          # really 1..16
 
 STRUCT keyed-md5                       auth-type               2 length=uint8,offset=2
 MEMBER         key-id                                  uint8
index 23ad47eeca3e56a841872b13c7f86b74b1e226c9..e70ea6a28e15f8b28ba4591f5cef24497f53d64e 100644 (file)
@@ -27,5 +27,14 @@ match 20 c0 03 18 de ad be ef 21 12 68 09 00 00 00 1f 00 00 00 7f 00 00 00 ff 21
 decode-proto -
 match Packet-Type = Up, Packet = { version = 1, diagnostic = none, state = up, poll = no, final = no, control-plane-independent = no, auth-present = no, demand = no, multipoint = no, detect-multi = 3, length = 24, my-discriminator = 3735928559, your-discriminator = 554854409, desired-min-tx-interval = 31, required-min-tx-interval = 127, required-min-echo-interval = 255 }, Additional-Data = { Stripped-User-Name = "foo" }
 
+#
+#  With authentication type
+#
+encode-proto Packet-Type = Up, Packet = { version = 1, diagnostic = none, state = up, poll = no, final = no, control-plane-independent = no, auth-present = yes, demand = no, multipoint = no, detect-multi = 3, length = 24, my-discriminator = 3735928559, your-discriminator = 554854409, desired-min-tx-interval = 31, required-min-tx-interval = 127, required-min-echo-interval = 255, auth-type.simple-password = { key-id = 0, reserved = 0, password = "hello" } }
+match 20 c4 03 21 de ad be ef 21 12 68 09 00 00 00 1f 00 00 00 7f 00 00 00 ff 00 09 00 00 68 65 6c 6c 6f
+
+#decode-proto -
+#match Packet-Type = Up, raw.Packet = 0x20c40321deadbeef211268090000001f0000007f000000ff0009000068656c6c6f
+
 count
-match 11
+match 13