From: Alan T. DeKok Date: Wed, 23 Jul 2025 13:28:42 +0000 (+0200) Subject: add tests for DPSK X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddd0960e1f39190eadb22a06c5f8f990993758a5;p=thirdparty%2Ffreeradius-server.git add tests for DPSK --- diff --git a/src/tests/auth/dpsk-pmk b/src/tests/auth/dpsk-pmk new file mode 100644 index 0000000000..30dc3631b0 --- /dev/null +++ b/src/tests/auth/dpsk-pmk @@ -0,0 +1,6 @@ +rewrite_called_station_id +dpsk +update control { + &Pairwise-Master-Key := &Class +} + diff --git a/src/tests/auth/dpsk-pmk.attrs b/src/tests/auth/dpsk-pmk.attrs new file mode 100644 index 0000000000..da6179dd55 --- /dev/null +++ b/src/tests/auth/dpsk-pmk.attrs @@ -0,0 +1,10 @@ +User-Name = "cae78dfa6504" +User-Password = "cae78dfa6504" +Called-Station-Id = "5c:df:89:11L3bL3c:SSID" +Calling-Station-Id = "ca:e7:8d:fa:65:04" +FreeRADIUS-802.1X-Anonce = 0x43426fd6469d4254eb0d5ba449eb9895360894f1948cece9196751336d4c5daf +FreeRADIUS-802.1X-EAPoL-Key-Msg = 0x0103007502010a00000000000000000001b16a8514b84d7843e53754f5c9131cb203fbe8277dbf216d6e87fd6e30b0577a0000000000000000000000000000000000000000000000000000000000000000dc81aec5a05ee8aa21a52947041fd2fc001630140100000fac040100000fac040100000fac028000 +Class = 0xd6175aed517504c40b8831d7ce7b7d1fe24c65ce0f92c2816ca14ba7acb47b13 + +# and the response +Response-Packet-Type == Access-Accept diff --git a/src/tests/auth/dpsk-psk b/src/tests/auth/dpsk-psk new file mode 100644 index 0000000000..9d1f2f6540 --- /dev/null +++ b/src/tests/auth/dpsk-psk @@ -0,0 +1,5 @@ +rewrite_called_station_id +dpsk +update control { + &Pre-Shared-Key := &Filter-Id +} diff --git a/src/tests/auth/dpsk-psk.attrs b/src/tests/auth/dpsk-psk.attrs new file mode 100644 index 0000000000..654227fa46 --- /dev/null +++ b/src/tests/auth/dpsk-psk.attrs @@ -0,0 +1,13 @@ +User-Name = "8ab3a0ebd5e5" +User-Password = "8ab3a0ebd5e5" +NAS-IP-Address = 127.0.0.1 +Called-Station-Id = "34:ef:b6:af:48:9e:Andrena_39_Lincoln" +Calling-Station-Id = "8a:b3:a0:eb:d5:e5" +NAS-Identifier = "34efb6af489e" +FreeRADIUS-802.1X-Anonce = 0x4df70a4285c5c61f177cdbfc29d7e3cac94167f6101f1bcab420dd50c4f8809d +FreeRADIUS-802.1X-EAPoL-Key-Msg = 0x0203007502010a00100000000000000001c3bb319516614aacfb44e933bf1671131fb1856e5b2721952d414ce3f5aa312b000000000000000000000000000000000000000000000000000000000000000035cddcedad0dfb6a12a2eca55c17c323001630140100000fac040100000fac040100000fac028c00 +Filter-ID = "Pancakes1124" + +# and the response +Response-Packet-Type == Access-Accept +Pre-Shared-Key == "Pancakes1124" diff --git a/src/tests/auth/radiusd.conf b/src/tests/auth/radiusd.conf index 2d822e7a37..3d5e9640f0 100644 --- a/src/tests/auth/radiusd.conf +++ b/src/tests/auth/radiusd.conf @@ -13,6 +13,10 @@ security { allow_vulnerable_openssl = yes } +policy { + $INCLUDE ${raddb}/policy.d/canonicalization +} + modules { $INCLUDE ${raddb}/mods-enabled/always @@ -23,6 +27,8 @@ modules { $INCLUDE ${raddb}/mods-enabled/expr $INCLUDE ${raddb}/mods-enabled/digest + + $INCLUDE ${raddb}/mods-enabled/dpsk } server default { @@ -46,5 +52,6 @@ server default { digest pap chap + dpsk } }