tests: More coverage for WPS NFC error and uncommon cases
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e946c8e682
commit
1490eff500
2 changed files with 13 additions and 0 deletions
|
@ -40,6 +40,9 @@ def test_nfc_wps_password_token_sta(dev, apdev):
|
|||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step using password token from station")
|
||||
wps = dev[0].request("WPS_NFC_TOKEN WPS").rstrip()
|
||||
if "FAIL" in wps:
|
||||
raise Exception("Failed to generate password token (WPS only)")
|
||||
pw = dev[0].request("WPS_NFC_TOKEN NDEF").rstrip()
|
||||
if "FAIL" in pw:
|
||||
raise Exception("Failed to generate password token")
|
||||
|
@ -437,6 +440,9 @@ def test_nfc_wps_er_config_token(dev, apdev):
|
|||
start_ap_er(dev[0], apdev[0], ssid)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step using configuration token from ER")
|
||||
wps = dev[0].request("WPS_ER_NFC_CONFIG_TOKEN WPS " + apdev[0]['bssid']).rstrip()
|
||||
if "FAIL" in wps:
|
||||
raise Exception("Failed to generate configuration token (WPS format)")
|
||||
conf = dev[0].request("WPS_ER_NFC_CONFIG_TOKEN NDEF " + apdev[0]['bssid']).rstrip()
|
||||
if "FAIL" in conf:
|
||||
raise Exception("Failed to generate configuration token")
|
||||
|
|
|
@ -540,6 +540,13 @@ def test_wpas_ctrl_wps_errors(dev):
|
|||
if "FAIL" not in dev[0].request("WPS_ER_NFC_CONFIG_TOKEN NDEF 00:11:22:33:44:55"):
|
||||
raise Exception("Unexpected success on invalid WPS_ER_NFC_CONFIG_TOKEN")
|
||||
|
||||
if "FAIL" not in dev[0].request("WPS_NFC_CONFIG_TOKEN FOO"):
|
||||
raise Exception("Unexpected success on invalid WPS_NFC_CONFIG_TOKEN")
|
||||
if "FAIL" not in dev[0].request("WPS_NFC_CONFIG_TOKEN WPS FOO"):
|
||||
raise Exception("Unexpected success on invalid WPS_NFC_CONFIG_TOKEN")
|
||||
if "FAIL" not in dev[0].request("WPS_NFC_TOKEN FOO"):
|
||||
raise Exception("Unexpected success on invalid WPS_NFC_TOKEN")
|
||||
|
||||
def test_wpas_ctrl_config_parser(dev):
|
||||
"""wpa_supplicant ctrl_iface SET config parser"""
|
||||
if "FAIL" not in dev[0].request("SET pbc_in_m1 qwerty"):
|
||||
|
|
Loading…
Reference in a new issue