aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-02-07 19:05:02 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-07 19:05:02 (GMT)
commit2f60d1985f902edcbd0558d2ce61d1b60cdfa0ae (patch)
tree010b495bf01842fdbb43fc0b663bb4ef8f49ecd0
parentd1d8a2bd622a199e2f861cef100b6619d983fbec (diff)
downloadhostap-2f60d1985f902edcbd0558d2ce61d1b60cdfa0ae.zip
hostap-2f60d1985f902edcbd0558d2ce61d1b60cdfa0ae.tar.gz
hostap-2f60d1985f902edcbd0558d2ce61d1b60cdfa0ae.tar.bz2
tests: Additional EAP-Finish local error coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_erp.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/hwsim/test_erp.py b/tests/hwsim/test_erp.py
index d3caa97..519fc36 100644
--- a/tests/hwsim/test_erp.py
+++ b/tests/hwsim/test_erp.py
@@ -589,3 +589,33 @@ def test_erp_local_errors(dev, apdev):
erp="1", scan_freq="2412")
dev[0].request("DISCONNECT")
dev[0].wait_disconnected(timeout=15)
+
+ dev[0].request("ERP_FLUSH")
+ with alloc_fail(dev[0], 1, "eap_peer_finish"):
+ dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
+ identity="erp-ttls@example.com",
+ anonymous_identity="anonymous@example.com",
+ password="password",
+ ca_cert="auth_serv/ca.pem", phase2="auth=PAP",
+ erp="1", scan_freq="2412")
+ dev[0].request("DISCONNECT")
+ dev[0].wait_disconnected(timeout=15)
+ dev[0].request("RECONNECT")
+ wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
+ dev[0].request("REMOVE_NETWORK all")
+ dev[0].wait_disconnected()
+
+ dev[0].request("ERP_FLUSH")
+ with fail_test(dev[0], 1, "hmac_sha256_kdf;eap_peer_finish"):
+ dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
+ identity="erp-ttls@example.com",
+ anonymous_identity="anonymous@example.com",
+ password="password",
+ ca_cert="auth_serv/ca.pem", phase2="auth=PAP",
+ erp="1", scan_freq="2412")
+ dev[0].request("DISCONNECT")
+ dev[0].wait_disconnected(timeout=15)
+ dev[0].request("RECONNECT")
+ wait_fail_trigger(dev[0], "GET_FAIL")
+ dev[0].request("REMOVE_NETWORK all")
+ dev[0].wait_disconnected()