From 95fb531ccc71911eba20d9089651c96fe208a500 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 17 May 2014 23:39:16 +0300 Subject: [PATCH] tests: EAP-TTLS/EAP-AKA, EAP-PEAP/EAP-AKA, EAP-FAST/EAP-AKA These add some more EAP-TTLS/PEAP/FAST coverage to test pending Phase 2 response re-processing. Signed-off-by: Jouni Malinen --- tests/hwsim/auth_serv/eap_user.conf | 4 ++++ tests/hwsim/test_ap_eap.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/tests/hwsim/auth_serv/eap_user.conf b/tests/hwsim/auth_serv/eap_user.conf index 0f836fe63..2358a5902 100644 --- a/tests/hwsim/auth_serv/eap_user.conf +++ b/tests/hwsim/auth_serv/eap_user.conf @@ -29,6 +29,10 @@ radius_accept_attr=25:x:00112233445566778899aa "020000000000" MACACL "020000000000" +"0232010000000000@ttls" TTLS,AKA +"0232010000000000@peap" PEAP,AKA +"0232010000000000@fast" FAST,AKA + "0"* AKA "1"* SIM "2"* AKA diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index e9ecefb9a..43983bbb3 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -607,6 +607,35 @@ def test_ap_wpa2_eap_ttls_eap_mschapv2(dev, apdev): ca_cert="auth_serv/ca.pem", phase2="autheap=MSCHAPV2", expect_failure=True) +def test_ap_wpa2_eap_ttls_eap_aka(dev, apdev): + """WPA2-Enterprise connection using EAP-TTLS/EAP-AKA""" + params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap") + hostapd.add_ap(apdev[0]['ifname'], params) + eap_connect(dev[0], apdev[0], "TTLS", "0232010000000000", + anonymous_identity="0232010000000000@ttls", + password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123", + ca_cert="auth_serv/ca.pem", phase2="autheap=AKA") + +def test_ap_wpa2_eap_peap_eap_aka(dev, apdev): + """WPA2-Enterprise connection using EAP-PEAP/EAP-AKA""" + params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap") + hostapd.add_ap(apdev[0]['ifname'], params) + eap_connect(dev[0], apdev[0], "PEAP", "0232010000000000", + anonymous_identity="0232010000000000@peap", + password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123", + ca_cert="auth_serv/ca.pem", phase2="auth=AKA") + +def test_ap_wpa2_eap_fast_eap_aka(dev, apdev): + """WPA2-Enterprise connection using EAP-FAST/EAP-AKA""" + params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap") + hostapd.add_ap(apdev[0]['ifname'], params) + eap_connect(dev[0], apdev[0], "FAST", "0232010000000000", + anonymous_identity="0232010000000000@fast", + password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123", + phase1="fast_provisioning=2", + pac_file="blob://fast_pac_auth_aka", + ca_cert="auth_serv/ca.pem", phase2="auth=AKA") + def test_ap_wpa2_eap_peap_eap_mschapv2(dev, apdev): """WPA2-Enterprise connection using EAP-PEAP/EAP-MSCHAPv2""" params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")