From 0d2a7bad0fb2c432520afb622a05b50749eaf8e8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 10 Oct 2015 18:41:22 +0300 Subject: [PATCH] tests: MSCHAP UTF-8 to UCS-2 conversion error cases This triggers all three error cases in utf8_to_ucs2(). Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_eap.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 280cca267..3071b867f 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -951,6 +951,17 @@ def test_ap_wpa2_eap_ttls_mschapv2_utf8(dev, apdev): anonymous_identity="ttls", password_hex="hash:bd5844fad2489992da7fe8c5a01559cf", ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2") + for p in [ "80", "41c041e04141e041", 257*"41" ]: + dev[2].connect("test-wpa2-eap", key_mgmt="WPA-EAP", + eap="TTLS", identity="utf8-user-hash", + anonymous_identity="ttls", password_hex=p, + ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2", + wait_connect=False, scan_freq="2412") + ev = dev[2].wait_event(["CTRL-EVENT-EAP-FAILURE"], timeout=1) + if ev is None: + raise Exception("No failure reported") + dev[2].request("REMOVE_NETWORK all") + dev[2].wait_disconnected() def test_ap_wpa2_eap_ttls_eap_gtc(dev, apdev): """WPA2-Enterprise connection using EAP-TTLS/EAP-GTC"""