]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: ap_wps_init to allow TKIP-disabled hostapd build
authorJouni Malinen <jouni@codeaurora.org>
Fri, 17 Apr 2020 18:46:12 +0000 (21:46 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 17 Apr 2020 20:51:58 +0000 (23:51 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_wps.py

index 2b07caac343eca21c2dc9f195d87f9baa990b6fe..fd778e8d65a3ede77f83b4cbfd8953a48402fcc8 100644 (file)
@@ -97,14 +97,20 @@ def test_ap_wps_init(dev, apdev):
     conf = hapd.request("GET_CONFIG")
     if "wps_state=configured" not in conf:
         raise Exception("AP not in WPS configured state")
-    if "wpa=3" not in conf:
-        raise Exception("AP not in WPA+WPA2 configuration")
-    if "rsn_pairwise_cipher=CCMP TKIP" not in conf:
-        raise Exception("Unexpected rsn_pairwise_cipher")
-    if "wpa_pairwise_cipher=CCMP TKIP" not in conf:
-        raise Exception("Unexpected wpa_pairwise_cipher")
-    if "group_cipher=TKIP" not in conf:
-        raise Exception("Unexpected group_cipher")
+    if "wpa=2" in conf:
+        if "rsn_pairwise_cipher=CCMP" not in conf:
+            raise Exception("Unexpected rsn_pairwise_cipher")
+        if "group_cipher=CCMP" not in conf:
+            raise Exception("Unexpected group_cipher")
+    else:
+        if "wpa=3" not in conf:
+            raise Exception("AP not in WPA+WPA2 configuration")
+        if "rsn_pairwise_cipher=CCMP TKIP" not in conf:
+            raise Exception("Unexpected rsn_pairwise_cipher")
+        if "wpa_pairwise_cipher=CCMP TKIP" not in conf:
+            raise Exception("Unexpected wpa_pairwise_cipher")
+        if "group_cipher=TKIP" not in conf:
+            raise Exception("Unexpected group_cipher")
 
     if len(dev[0].list_networks()) != 3:
         raise Exception("Unexpected number of network blocks")