From: Jouni Malinen Date: Mon, 26 Dec 2016 19:21:10 +0000 (+0200) Subject: tests: WPA2-PSK AP and no PSK configured X-Git-Tag: hostap_2_7~1942 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78f00634babe3de75026517729b3aeb811af967a;p=thirdparty%2Fhostap.git tests: WPA2-PSK AP and no PSK configured Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_params.py b/tests/hwsim/test_ap_params.py index e0d402297..4804f05d0 100644 --- a/tests/hwsim/test_ap_params.py +++ b/tests/hwsim/test_ap_params.py @@ -538,3 +538,17 @@ def test_ap_wep_to_wpa(dev, apdev): dev[0].connect("wep-to-wpa", psk="12345678", scan_freq="2412") hwsim_utils.test_connectivity(dev[0], hapd) + +def test_ap_missing_psk(dev, apdev): + """WPA2-PSK AP and no PSK configured""" + ssid = "test-wpa2-psk" + params = hostapd.wpa2_params(ssid=ssid) + try: + # "WPA-PSK enabled, but PSK or passphrase is not configured." + hostapd.add_ap(apdev[0], params) + raise Exception("AP setup succeeded unexpectedly") + except Exception, e: + if "Failed to enable hostapd" in str(e): + pass + else: + raise