]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Empty token in wpa_psk_file
authorJouni Malinen <jouni@codeaurora.org>
Mon, 18 Feb 2019 16:41:43 +0000 (18:41 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 18 Feb 2019 16:41:43 +0000 (18:41 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_psk.py

index 5540f734a2fb47b63ee0ca1d2cf843b72baa4171..bcb95ac265b33e4eddc994c9e47b79e885dde903 100644 (file)
@@ -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")