]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add tests for DPSK
authorAlan T. DeKok <aland@freeradius.org>
Wed, 23 Jul 2025 13:28:42 +0000 (15:28 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 23 Jul 2025 13:28:42 +0000 (15:28 +0200)
src/tests/auth/dpsk-pmk [new file with mode: 0644]
src/tests/auth/dpsk-pmk.attrs [new file with mode: 0644]
src/tests/auth/dpsk-psk [new file with mode: 0644]
src/tests/auth/dpsk-psk.attrs [new file with mode: 0644]
src/tests/auth/radiusd.conf

diff --git a/src/tests/auth/dpsk-pmk b/src/tests/auth/dpsk-pmk
new file mode 100644 (file)
index 0000000..30dc363
--- /dev/null
@@ -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 (file)
index 0000000..da6179d
--- /dev/null
@@ -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 (file)
index 0000000..9d1f2f6
--- /dev/null
@@ -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 (file)
index 0000000..654227f
--- /dev/null
@@ -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"
index 2d822e7a37b7f12b37c8b09a4236f84985facc53..3d5e9640f02d035e7a0ab8a73b1deb9b127fea37 100644 (file)
@@ -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
        }
 }