tests: EAP-TEAP with and without EAP method sequence optimization

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-12-01 17:03:43 +02:00 committed by Jouni Malinen
parent 1a800a9400
commit 12d8b8a91e

View file

@ -11,7 +11,8 @@ from test_ap_eap import check_eap_capa, int_eap_server_params, eap_connect, \
eap_reauth
def int_teap_server_params(eap_teap_auth=None, eap_teap_pac_no_inner=None,
eap_teap_separate_result=None, eap_teap_id=None):
eap_teap_separate_result=None, eap_teap_id=None,
eap_teap_method_sequence=None):
params = int_eap_server_params()
params['pac_opaque_encr_key'] = "000102030405060708090a0b0c0dff00"
params['eap_fast_a_id'] = "101112131415161718191a1b1c1dff00"
@ -24,6 +25,8 @@ def int_teap_server_params(eap_teap_auth=None, eap_teap_pac_no_inner=None,
params['eap_teap_separate_result'] = eap_teap_separate_result
if eap_teap_id:
params['eap_teap_id'] = eap_teap_id
if eap_teap_method_sequence:
params['eap_teap_method_sequence'] = eap_teap_method_sequence
return params
def test_eap_teap_eap_mschapv2(dev, apdev):
@ -301,6 +304,19 @@ def test_eap_teap_eap_mschapv2_user_and_machine(dev, apdev):
ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
pac_file="blob://teap_pac")
def test_eap_teap_eap_mschapv2_user_and_machine_seq1(dev, apdev):
"""EAP-TEAP with inner EAP-MSCHAPv2 using user and machine credentials (seq1)"""
check_eap_capa(dev[0], "TEAP")
check_eap_capa(dev[0], "MSCHAPV2")
params = int_teap_server_params(eap_teap_id="5",
eap_teap_method_sequence="1")
hapd = hostapd.add_ap(apdev[0], params)
eap_connect(dev[0], hapd, "TEAP", "user", password="password",
anonymous_identity="TEAP",
machine_identity="machine", machine_password="machine-password",
ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
pac_file="blob://teap_pac")
def test_eap_teap_eap_mschapv2_user_and_machine_fail_user(dev, apdev):
"""EAP-TEAP with inner EAP-MSCHAPv2 using user and machine credentials (fail user)"""
check_eap_capa(dev[0], "TEAP")