tests: SAE + FT-SAE configuration
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
76fd782abe
commit
cdf5391013
1 changed files with 23 additions and 2 deletions
|
@ -133,7 +133,7 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False,
|
||||||
test_connectivity=True, eap_identity="gpsk user", conndev=False,
|
test_connectivity=True, eap_identity="gpsk user", conndev=False,
|
||||||
force_initial_conn_to_first_ap=False, sha384=False,
|
force_initial_conn_to_first_ap=False, sha384=False,
|
||||||
group_mgmt=None, ocv=None, sae_password=None,
|
group_mgmt=None, ocv=None, sae_password=None,
|
||||||
sae_password_id=None):
|
sae_password_id=None, sae_and_psk=False):
|
||||||
logger.info("Connect to first AP")
|
logger.info("Connect to first AP")
|
||||||
|
|
||||||
copts = {}
|
copts = {}
|
||||||
|
@ -154,7 +154,7 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False,
|
||||||
copts["password"] = "abcdefghijklmnop0123456789abcdef"
|
copts["password"] = "abcdefghijklmnop0123456789abcdef"
|
||||||
else:
|
else:
|
||||||
if sae:
|
if sae:
|
||||||
copts["key_mgmt"] = "FT-SAE"
|
copts["key_mgmt"] = "SAE FT-SAE" if sae_and_psk else "FT-SAE"
|
||||||
else:
|
else:
|
||||||
copts["key_mgmt"] = "FT-PSK"
|
copts["key_mgmt"] = "FT-PSK"
|
||||||
if passphrase:
|
if passphrase:
|
||||||
|
@ -930,6 +930,27 @@ def test_ap_ft_sae_pw_id(dev, apdev):
|
||||||
run_roams(dev[0], apdev, hapd0, hapd, ssid, passphrase=None, sae=True,
|
run_roams(dev[0], apdev, hapd0, hapd, ssid, passphrase=None, sae=True,
|
||||||
sae_password="secret", sae_password_id="pwid")
|
sae_password="secret", sae_password_id="pwid")
|
||||||
|
|
||||||
|
def test_ap_ft_sae_with_both_akms(dev, apdev):
|
||||||
|
"""SAE + FT-SAE configuration"""
|
||||||
|
if "SAE" not in dev[0].get_capability("auth_alg"):
|
||||||
|
raise HwsimSkip("SAE not supported")
|
||||||
|
ssid = "test-ft"
|
||||||
|
passphrase = "12345678"
|
||||||
|
|
||||||
|
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||||
|
params['wpa_key_mgmt'] = "FT-SAE SAE"
|
||||||
|
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||||
|
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||||
|
params['wpa_key_mgmt'] = "FT-SAE SAE"
|
||||||
|
hapd = hostapd.add_ap(apdev[1], params)
|
||||||
|
key_mgmt = hapd.get_config()['key_mgmt']
|
||||||
|
if key_mgmt.split(' ')[0] != "FT-SAE":
|
||||||
|
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||||
|
|
||||||
|
dev[0].request("SET sae_groups ")
|
||||||
|
run_roams(dev[0], apdev, hapd0, hapd, ssid, passphrase, sae=True,
|
||||||
|
sae_and_psk=True)
|
||||||
|
|
||||||
def generic_ap_ft_eap(dev, apdev, vlan=False, cui=False, over_ds=False,
|
def generic_ap_ft_eap(dev, apdev, vlan=False, cui=False, over_ds=False,
|
||||||
discovery=False, roams=1):
|
discovery=False, roams=1):
|
||||||
ssid = "test-ft"
|
ssid = "test-ft"
|
||||||
|
|
Loading…
Reference in a new issue