tests: DPP PKEX retry after incorrect PKEX code

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-11-03 17:15:08 +02:00 committed by Jouni Malinen
parent 039b8e7369
commit 84d53c775c

View file

@ -1563,6 +1563,21 @@ def test_dpp_pkex_code_mismatch(dev, apdev):
if "possible PKEX code mismatch" not in ev:
raise Exception("Unexpected result: " + ev)
dev[0].dump_monitor()
dev[1].dump_monitor()
cmd = "DPP_PKEX_ADD own=%d identifier=test init=1 code=secret" % id1
res = dev[1].request(cmd)
if "FAIL" in res:
raise Exception("Failed to set PKEX data (initiator, retry)")
ev = dev[1].wait_event(["DPP-AUTH-SUCCESS"], timeout=5)
if ev is None:
raise Exception("DPP authentication did not succeed (Initiator, retry)")
ev = dev[0].wait_event(["DPP-AUTH-SUCCESS"], timeout=5)
if ev is None:
raise Exception("DPP authentication did not succeed (Responder, retry)")
def test_dpp_pkex_curve_mismatch(dev, apdev):
"""DPP and PKEX with mismatching curve"""
check_dpp_capab(dev[0])