tests: WPS+SAE+H2E
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
49442194c4
commit
c3155a725d
1 changed files with 33 additions and 0 deletions
|
@ -10429,6 +10429,39 @@ def run_ap_wps_conf_and_sae(dev, apdev):
|
||||||
dev[1].connect(ssid, psk="12345678", scan_freq="2412", proto="WPA2",
|
dev[1].connect(ssid, psk="12345678", scan_freq="2412", proto="WPA2",
|
||||||
key_mgmt="WPA-PSK", ieee80211w="0")
|
key_mgmt="WPA-PSK", ieee80211w="0")
|
||||||
|
|
||||||
|
def test_ap_wps_conf_and_sae_h2e(dev, apdev):
|
||||||
|
"""WPS PIN provisioning with configured AP using PSK+SAE(H2E)"""
|
||||||
|
try:
|
||||||
|
run_ap_wps_conf_and_sae_h2e(dev, apdev)
|
||||||
|
finally:
|
||||||
|
dev[0].set("wps_cred_add_sae", "0")
|
||||||
|
dev[0].set("sae_pwe", "0")
|
||||||
|
|
||||||
|
def run_ap_wps_conf_and_sae_h2e(dev, apdev):
|
||||||
|
check_sae_capab(dev[0])
|
||||||
|
ssid = "test-wps-conf-sae"
|
||||||
|
hapd = hostapd.add_ap(apdev[0],
|
||||||
|
{"ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||||
|
"wpa_passphrase": "12345678", "wpa": "2",
|
||||||
|
"ieee80211w": "1", "sae_require_mfp": "1",
|
||||||
|
"sae_pwe": "1",
|
||||||
|
"wpa_key_mgmt": "WPA-PSK SAE",
|
||||||
|
"rsn_pairwise": "CCMP"})
|
||||||
|
|
||||||
|
dev[0].set("wps_cred_add_sae", "1")
|
||||||
|
dev[0].set("sae_pwe", "1")
|
||||||
|
dev[0].request("SET sae_groups ")
|
||||||
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||||
|
pin = dev[0].wps_read_pin()
|
||||||
|
hapd.request("WPS_PIN any " + pin)
|
||||||
|
dev[0].request("WPS_PIN " + apdev[0]['bssid'] + " " + pin)
|
||||||
|
dev[0].wait_connected(timeout=30)
|
||||||
|
status = dev[0].get_status()
|
||||||
|
if status['key_mgmt'] != "SAE":
|
||||||
|
raise Exception("SAE not used")
|
||||||
|
if 'pmf' not in status or status['pmf'] != "1":
|
||||||
|
raise Exception("PMF not enabled")
|
||||||
|
|
||||||
def test_ap_wps_reg_config_and_sae(dev, apdev):
|
def test_ap_wps_reg_config_and_sae(dev, apdev):
|
||||||
"""WPS registrar configuring an AP using AP PIN and using PSK+SAE"""
|
"""WPS registrar configuring an AP using AP PIN and using PSK+SAE"""
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue