local_error_report=False,
ca_cert2=None, client_cert2=None, private_key2=None,
pac_file=None, subject_match=None, altsubject_match=None,
- private_key_passwd=None, ocsp=None):
+ private_key_passwd=None, ocsp=None, dh_file=None):
hapd = hostapd.Hostapd(ap['ifname'])
id = dev.connect("test-wpa2-eap", key_mgmt="WPA-EAP WPA-EAP-SHA256",
eap=method, identity=identity,
subject_match=subject_match,
altsubject_match=altsubject_match,
private_key_passwd=private_key_passwd,
- ocsp=ocsp)
+ ocsp=ocsp, dh_file=dh_file)
eap_check_auth(dev, method, True, sha256=sha256,
expect_failure=expect_failure,
local_error_report=local_error_report)
ev = dev[0].wait_event(["CTRL-EVENT-EAP-FAILURE"])
if ev is None:
raise Exception("Timeout on EAP failure report")
+
+def test_ap_wpa2_eap_ttls_dh_params(dev, apdev):
+ """WPA2-Enterprise connection using EAP-TTLS/CHAP and setting DH params"""
+ params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
+ hostapd.add_ap(apdev[0]['ifname'], params)
+ eap_connect(dev[0], apdev[0], "TTLS", "chap user",
+ anonymous_identity="ttls", password="password",
+ ca_cert="auth_serv/ca.der", phase2="auth=CHAP",
+ dh_file="auth_serv/dh.conf")
ca_cert2=None, client_cert2=None, private_key2=None,
scan_ssid=None, raw_psk=None, pac_file=None,
subject_match=None, altsubject_match=None,
- private_key_passwd=None, ocsp=None, auth_alg=None):
+ private_key_passwd=None, ocsp=None, auth_alg=None,
+ dh_file=None):
logger.info("Connect STA " + self.ifname + " to AP")
id = self.add_network()
if ssid:
self.set_network(id, "ocsp", str(ocsp))
if auth_alg:
self.set_network(id, "auth_alg", auth_alg)
+ if dh_file:
+ self.set_network_quoted(id, "dh_file", dh_file)
if only_add_network:
return id
if wait_connect: