mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: Make eap_check_auth() error on missing selectedMethod clearer
It was possible to hit an error case in ap_wpa2_eap_in_bridge where the selectedMethod STATUS field was not available. This resulted in not very helpful "'selectedMethod'" message in the test log file. Make this clearer by dumping all received STATUS fields and a clearer exception message indicating that selectedMethod was missing. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
4a539abdbd
commit
447fb0b0da
@ -176,6 +176,9 @@ def eap_check_auth(dev, method, initial, rsn=True, sha256=False,
|
||||
|
||||
if status["suppPortStatus"] != "Authorized":
|
||||
raise Exception("Port not authorized")
|
||||
if "selectedMethod" not in status:
|
||||
logger.info("Status: " + str(status))
|
||||
raise Exception("No selectedMethod in status")
|
||||
if method not in status["selectedMethod"]:
|
||||
raise Exception("Incorrect EAP method status")
|
||||
if sha256:
|
||||
|
Loading…
Reference in New Issue
Block a user