From 0403fa0a93abafb7e50084967929e695f8295e7d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 6 Apr 2014 00:52:13 +0300 Subject: [PATCH] tests: Increas EAP-pwd fragmentation coverage Verify fragmentation of additional message types. Signed-off-by: Jouni Malinen --- tests/hwsim/auth_serv/eap_user.conf | 1 + tests/hwsim/test_ap_eap.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/auth_serv/eap_user.conf b/tests/hwsim/auth_serv/eap_user.conf index 8a05a89d7..215f77956 100644 --- a/tests/hwsim/auth_serv/eap_user.conf +++ b/tests/hwsim/auth_serv/eap_user.conf @@ -1,4 +1,5 @@ "pwd user" PWD "secret password" +"pwd.user@test123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.example.com" PWD "secret password" "gpsk user" GPSK "abcdefghijklmnop0123456789abcdef" "sake user" SAKE 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef "eke user" EKE "hello" diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 8b2509feb..a9e53c6bc 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -704,16 +704,22 @@ def test_ap_wpa2_eap_pwd(dev, apdev): hostapd.add_ap(apdev[0]['ifname'], params) eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret password") eap_reauth(dev[0], "PWD") - dev[0].request("REMOVE_NETWORK all") - eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret password", + + eap_connect(dev[1], apdev[0], "PWD", + "pwd.user@test123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.example.com", + password="secret password", fragment_size="90") logger.info("Negative test with incorrect password") - dev[0].request("REMOVE_NETWORK all") - eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret-password", + eap_connect(dev[2], apdev[0], "PWD", "pwd user", password="secret-password", expect_failure=True, local_error_report=True) + eap_connect(dev[0], apdev[0], "PWD", + "pwd.user@test123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.example.com", + password="secret password", + fragment_size="31") + def test_ap_wpa2_eap_pwd_groups(dev, apdev): """WPA2-Enterprise connection using various EAP-pwd groups""" params = { "ssid": "test-wpa2-eap", "wpa": "2", "wpa_key_mgmt": "WPA-EAP",