aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-12-01 23:43:58 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-02 10:14:55 (GMT)
commit1fb0c105a4a99036436d0b590054d4a5b023ea02 (patch)
treed8d6c08279159b0c713b0f577368c01ffb7e3c58
parentafd3cf14a0e61d1167f58ea90fe77f2bdbe8ed1a (diff)
downloadhostap-1fb0c105a4a99036436d0b590054d4a5b023ea02.zip
hostap-1fb0c105a4a99036436d0b590054d4a5b023ea02.tar.gz
hostap-1fb0c105a4a99036436d0b590054d4a5b023ea02.tar.bz2
tests: WPS with other AES-based ciphers
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_ap_wps.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py
index c16c5cb..b8fcfb3 100644
--- a/tests/hwsim/test_ap_wps.py
+++ b/tests/hwsim/test_ap_wps.py
@@ -10000,3 +10000,31 @@ def test_ap_wps_random_uuid(dev, apdev, params):
logger.info("Seen UUIDs: " + str(uuid))
if uuid[0] == uuid[1] or uuid[0] == uuid[2] or uuid[1] == uuid[2]:
raise Exception("Same UUID used multiple times")
+
+def test_ap_wps_conf_pin_gcmp_128(dev, apdev):
+ """WPS PIN provisioning with configured AP using GCMP-128"""
+ run_ap_wps_conf_pin_cipher(dev, apdev, "GCMP")
+
+def test_ap_wps_conf_pin_gcmp_256(dev, apdev):
+ """WPS PIN provisioning with configured AP using GCMP-256"""
+ run_ap_wps_conf_pin_cipher(dev, apdev, "GCMP-256")
+
+def test_ap_wps_conf_pin_ccmp_256(dev, apdev):
+ """WPS PIN provisioning with configured AP using CCMP-256"""
+ run_ap_wps_conf_pin_cipher(dev, apdev, "CCMP-256")
+
+def run_ap_wps_conf_pin_cipher(dev, apdev, cipher):
+ if cipher not in dev[0].get_capability("pairwise"):
+ raise HwsimSkip("Cipher %s not supported" % cipher)
+ ssid = "test-wps-conf-pin"
+ hapd = hostapd.add_ap(apdev[0],
+ { "ssid": ssid, "eap_server": "1", "wps_state": "2",
+ "wpa_passphrase": "12345678", "wpa": "2",
+ "wpa_key_mgmt": "WPA-PSK",
+ "rsn_pairwise": cipher })
+ logger.info("WPS provisioning step")
+ pin = dev[0].wps_read_pin()
+ hapd.request("WPS_PIN any " + pin)
+ dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
+ dev[0].request("WPS_PIN %s %s" % (apdev[0]['bssid'], pin))
+ dev[0].wait_connected(timeout=15)