tests: WPS registrar learning configuration from WPA+WPA2 AP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
6b46bfa751
commit
e60be3b3d4
1 changed files with 21 additions and 0 deletions
|
@ -456,6 +456,27 @@ def test_ap_wps_reg_connect(dev, apdev):
|
||||||
if status['key_mgmt'] != 'WPA2-PSK':
|
if status['key_mgmt'] != 'WPA2-PSK':
|
||||||
raise Exception("Unexpected key_mgmt")
|
raise Exception("Unexpected key_mgmt")
|
||||||
|
|
||||||
|
def test_ap_wps_reg_connect_mixed_mode(dev, apdev):
|
||||||
|
"""WPS registrar using AP PIN to connect (WPA+WPA2)"""
|
||||||
|
ssid = "test-wps-reg-ap-pin"
|
||||||
|
appin = "12345670"
|
||||||
|
hostapd.add_ap(apdev[0]['ifname'],
|
||||||
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||||
|
"wpa_passphrase": "12345678", "wpa": "3",
|
||||||
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||||
|
"wpa_pairwise": "TKIP", "ap_pin": appin})
|
||||||
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||||
|
dev[0].wps_reg(apdev[0]['bssid'], appin)
|
||||||
|
status = dev[0].get_status()
|
||||||
|
if status['wpa_state'] != 'COMPLETED' or status['bssid'] != apdev[0]['bssid']:
|
||||||
|
raise Exception("Not fully connected")
|
||||||
|
if status['ssid'] != ssid:
|
||||||
|
raise Exception("Unexpected SSID")
|
||||||
|
if status['pairwise_cipher'] != 'CCMP' or status['group_cipher'] != 'TKIP':
|
||||||
|
raise Exception("Unexpected encryption configuration")
|
||||||
|
if status['key_mgmt'] != 'WPA2-PSK':
|
||||||
|
raise Exception("Unexpected key_mgmt")
|
||||||
|
|
||||||
def check_wps_reg_failure(dev, ap, appin):
|
def check_wps_reg_failure(dev, ap, appin):
|
||||||
dev.request("WPS_REG " + ap['bssid'] + " " + appin)
|
dev.request("WPS_REG " + ap['bssid'] + " " + appin)
|
||||||
ev = dev.wait_event(["WPS-SUCCESS", "WPS-FAIL"], timeout=15)
|
ev = dev.wait_event(["WPS-SUCCESS", "WPS-FAIL"], timeout=15)
|
||||||
|
|
Loading…
Reference in a new issue