|
@@ -21,7 +21,8 @@ def eap_connect(dev, ap, method, identity, anonymous_identity=None,
|
|
domain_suffix_match=None, password_hex=None,
|
|
domain_suffix_match=None, password_hex=None,
|
|
client_cert=None, private_key=None, sha256=False,
|
|
client_cert=None, private_key=None, sha256=False,
|
|
fragment_size=None, expect_failure=False,
|
|
fragment_size=None, expect_failure=False,
|
|
- local_error_report=False):
|
|
|
|
|
|
+ local_error_report=False,
|
|
|
|
+ ca_cert2=None, client_cert2=None, private_key2=None):
|
|
hapd = hostapd.Hostapd(ap['ifname'])
|
|
hapd = hostapd.Hostapd(ap['ifname'])
|
|
id = dev.connect("test-wpa2-eap", key_mgmt="WPA-EAP WPA-EAP-SHA256",
|
|
id = dev.connect("test-wpa2-eap", key_mgmt="WPA-EAP WPA-EAP-SHA256",
|
|
eap=method, identity=identity,
|
|
eap=method, identity=identity,
|
|
@@ -31,7 +32,9 @@ def eap_connect(dev, ap, method, identity, anonymous_identity=None,
|
|
wait_connect=False, scan_freq="2412",
|
|
wait_connect=False, scan_freq="2412",
|
|
password_hex=password_hex,
|
|
password_hex=password_hex,
|
|
client_cert=client_cert, private_key=private_key,
|
|
client_cert=client_cert, private_key=private_key,
|
|
- ieee80211w="1", fragment_size=fragment_size)
|
|
|
|
|
|
+ ieee80211w="1", fragment_size=fragment_size,
|
|
|
|
+ ca_cert2=ca_cert2, client_cert2=client_cert2,
|
|
|
|
+ private_key2=private_key2)
|
|
eap_check_auth(dev, method, True, sha256=sha256,
|
|
eap_check_auth(dev, method, True, sha256=sha256,
|
|
expect_failure=expect_failure,
|
|
expect_failure=expect_failure,
|
|
local_error_report=local_error_report)
|
|
local_error_report=local_error_report)
|
|
@@ -283,6 +286,17 @@ def test_ap_wpa2_eap_peap_crypto_binding(dev, apdev):
|
|
hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
|
|
hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
|
|
eap_reauth(dev[0], "PEAP")
|
|
eap_reauth(dev[0], "PEAP")
|
|
|
|
|
|
|
|
+def test_ap_wpa2_eap_peap_eap_tls(dev, apdev):
|
|
|
|
+ """WPA2-Enterprise connection using EAP-PEAP/EAP-TLS"""
|
|
|
|
+ params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
|
|
|
+ hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
+ eap_connect(dev[0], apdev[0], "PEAP", "cert user",
|
|
|
|
+ ca_cert="auth_serv/ca.pem", phase2="auth=TLS",
|
|
|
|
+ ca_cert2="auth_serv/ca.pem",
|
|
|
|
+ client_cert2="auth_serv/user.pem",
|
|
|
|
+ private_key2="auth_serv/user.key")
|
|
|
|
+ eap_reauth(dev[0], "PEAP")
|
|
|
|
+
|
|
def test_ap_wpa2_eap_tls(dev, apdev):
|
|
def test_ap_wpa2_eap_tls(dev, apdev):
|
|
"""WPA2-Enterprise connection using EAP-TLS"""
|
|
"""WPA2-Enterprise connection using EAP-TLS"""
|
|
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
|
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|