From: Jouni Malinen Date: Mon, 18 Feb 2019 16:41:43 +0000 (+0200) Subject: tests: Empty token in wpa_psk_file X-Git-Tag: hostap_2_8~349 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61929f4b0793bda2ea4f4f78118d4b6189b190d0;p=thirdparty%2Fhostap.git tests: Empty token in wpa_psk_file Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 5540f734a..bcb95ac26 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -375,6 +375,13 @@ def test_ap_wpa2_psk_file_errors(dev, apdev): raise Exception("Unexpected ENABLE success") hapd.request("DISABLE") + # empty token at the end of the line + with open(pskfile, "w") as f: + f.write("=\n") + if "FAIL" not in hapd.request("ENABLE"): + raise Exception("Unexpected ENABLE success") + hapd.request("DISABLE") + # valid PSK file with open(pskfile, "w") as f: f.write("00:11:22:33:44:55 12345678\n")