Browse Source

tests: EAP-SIM server using GSM triplets

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 11 years ago
parent
commit
a0f350fd79
3 changed files with 24 additions and 1 deletions
  1. 17 0
      tests/hwsim/auth_serv/hlr_auc_gw.gsm
  2. 1 1
      tests/hwsim/start.sh
  3. 6 0
      tests/hwsim/test_ap_eap.py

+ 17 - 0
tests/hwsim/auth_serv/hlr_auc_gw.gsm

@@ -0,0 +1,17 @@
+# Test triplets generated with GSM-Milenage using
+# Ki = 90dca4eda45b53cf0f12d7c9c3bc6a89
+# OPc = cb9cccc4b9258e6dca4760379fb82581
+
+# GSM authentication triplet file for EAP-SIM authenticator
+# IMSI:Kc:SRES:RAND
+# IMSI: ASCII string (numbers)
+# Kc: hex, 8 octets
+# SRES: hex, 4 octets
+# RAND: hex, 16 octets
+
+232010000000001:79747302dd684291:fbe55c44:d29b2f51f1fd20304ad0c447b4dcdc37
+232010000000001:2f2eaa1d83e43813:6e2e3ea3:e19a8e96255b88e8a8be104637d165b2
+232010000000001:b7c935bfb51f2c5a:257581f5:8079c338eb4195d0fe2d46b357979054
+232010000000001:bc93df6af0412a69:dae1faa0:a48b8e2a59b8bed468ea3d57ef9ee118
+232010000000001:626db3b0e9e321c3:a3e33208:38e7e65d0c0ef82185d1697410f2b31a
+232010000000001:df3cab53d00c622e:0b785f5d:d8a4a9efe1689d232468f316d2a84270

+ 1 - 1
tests/hwsim/start.sh

@@ -83,7 +83,7 @@ if [ "x$VALGRIND" = "xy" ]; then
 fi
 fi
 
 
 if [ -x $HLR_AUC_GW ]; then
 if [ -x $HLR_AUC_GW ]; then
-    sudo $HLR_AUC_GW -m $DIR/auth_serv/hlr_auc_gw.milenage_db > $LOGDIR/hlr_auc_gw &
+    sudo $HLR_AUC_GW -m $DIR/auth_serv/hlr_auc_gw.milenage_db -g $DIR/auth_serv/hlr_auc_gw.gsm > $LOGDIR/hlr_auc_gw &
 fi
 fi
 
 
 sudo $HAPD_AS -ddKt $LOGDIR/as.conf > $LOGDIR/auth_serv &
 sudo $HAPD_AS -ddKt $LOGDIR/as.conf > $LOGDIR/auth_serv &

+ 6 - 0
tests/hwsim/test_ap_eap.py

@@ -111,6 +111,12 @@ def test_ap_wpa2_eap_sim(dev, apdev):
     hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
     hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
     eap_reauth(dev[0], "SIM")
     eap_reauth(dev[0], "SIM")
 
 
+    eap_connect(dev[1], apdev[0], "SIM", "1232010000000001",
+                password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581")
+    eap_connect(dev[2], apdev[0], "SIM", "1232010000000002",
+                password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581",
+                expect_failure=True)
+
     logger.info("Negative test with incorrect key")
     logger.info("Negative test with incorrect key")
     dev[0].request("REMOVE_NETWORK all")
     dev[0].request("REMOVE_NETWORK all")
     eap_connect(dev[0], apdev[0], "SIM", "1232010000000000",
     eap_connect(dev[0], apdev[0], "SIM", "1232010000000000",