From ff7cae34447c939d15a70bdcbcc17d89b37f2d2f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 23 Nov 2020 20:35:00 +0200 Subject: [PATCH] tests: ANQP protection indication Signed-off-by: Jouni Malinen --- tests/hwsim/test_gas.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index 5d60779e9..cb4a1a8d6 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -1670,6 +1670,11 @@ def test_gas_anqp_venue_url(dev, apdev): if not bss['anqp_capability_list'].startswith(binascii.hexlify(ids).decode()): raise Exception("Unexpected Capability List ANQP-element value: " + bss['anqp_capability_list']) + if "anqp[277]" not in bss: + raise Exception("Venue-URL ANQP info not available") + if "protected-anqp-info[277]" in bss: + raise Exception("Unexpected Venue-URL protection info") + def test_gas_anqp_venue_url2(dev, apdev): """GAS/ANQP and Venue URL (hostapd venue_url)""" venue_group = 1 @@ -1775,6 +1780,14 @@ def test_gas_anqp_venue_url_pmf(dev, apdev): if "2 " + url2 not in ev: raise Exception("Unexpected Venue URL information (2): " + ev) + bss = dev[0].get_bss(bssid) + if "anqp[277]" not in bss: + raise Exception("Venue-URL ANQP info not available") + if "protected-anqp-info[277]" not in bss: + raise Exception("Venue-URL protection info not available") + if bss["protected-anqp-info[277]"] != "1": + raise Exception("Venue-URL was not indicated to be protected") + def test_gas_anqp_capab_list(dev, apdev): """GAS/ANQP and Capability List ANQP-element""" params = {"ssid": "gas/anqp",