tests: Add AP Location Public Identifier into gas_anqp_extra_elements
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
f2dfb1dafa
commit
47eac38a63
1 changed files with 11 additions and 0 deletions
|
@ -975,11 +975,17 @@ def test_gas_anqp_extra_elements(dev, apdev):
|
||||||
"""GAS/ANQP and extra ANQP elements"""
|
"""GAS/ANQP and extra ANQP elements"""
|
||||||
geo_loc = "001052834d12efd2b08b9b4bf1cc2c00004104050000000000060100"
|
geo_loc = "001052834d12efd2b08b9b4bf1cc2c00004104050000000000060100"
|
||||||
civic_loc = "0000f9555302f50102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5"
|
civic_loc = "0000f9555302f50102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5"
|
||||||
|
held_uri = "https://held.example.com/location"
|
||||||
|
held = struct.pack('BBB', 0, 1 + len(held_uri), 1) + held_uri
|
||||||
|
supl_fqdn = "supl.example.com"
|
||||||
|
supl = struct.pack('BBB', 0, 1 + len(supl_fqdn), 1) + supl_fqdn
|
||||||
|
public_id = binascii.hexlify(held + supl)
|
||||||
params = { "ssid": "gas/anqp",
|
params = { "ssid": "gas/anqp",
|
||||||
"interworking": "1",
|
"interworking": "1",
|
||||||
"anqp_elem": [ "265:" + geo_loc,
|
"anqp_elem": [ "265:" + geo_loc,
|
||||||
"266:" + civic_loc,
|
"266:" + civic_loc,
|
||||||
"262:1122334455",
|
"262:1122334455",
|
||||||
|
"267:" + public_id,
|
||||||
"275:01020304",
|
"275:01020304",
|
||||||
"60000:01",
|
"60000:01",
|
||||||
"299:0102" ] }
|
"299:0102" ] }
|
||||||
|
@ -1024,6 +1030,11 @@ def test_gas_anqp_extra_elements(dev, apdev):
|
||||||
if 'anqp[266]' in bss:
|
if 'anqp[266]' in bss:
|
||||||
raise Exception("AP Civic Location ANQP-element unexpectedly seen")
|
raise Exception("AP Civic Location ANQP-element unexpectedly seen")
|
||||||
|
|
||||||
|
if 'anqp[267]' not in bss:
|
||||||
|
raise Exception("AP Location Public Identifier ANQP-element not seen")
|
||||||
|
if bss['anqp[267]'] != public_id:
|
||||||
|
raise Exception("Unexpected AP Location Public Identifier ANQP-element value: " + bss['anqp[267]'])
|
||||||
|
|
||||||
if 'anqp[275]' not in bss:
|
if 'anqp[275]' not in bss:
|
||||||
raise Exception("ANQP-element Info ID 275 not seen")
|
raise Exception("ANQP-element Info ID 275 not seen")
|
||||||
if bss['anqp[275]'] != "01020304":
|
if bss['anqp[275]'] != "01020304":
|
||||||
|
|
Loading…
Reference in a new issue