]> git.ipfire.org Git - thirdparty/hostap.git/blob - tests/hwsim/test_owe.py
tests: Opportunistic Wireless Encryption - local errors on supplicant
[thirdparty/hostap.git] / tests / hwsim / test_owe.py
1 # Test cases for Opportunistic Wireless Encryption (OWE)
2 # Copyright (c) 2017, Jouni Malinen <j@w1.fi>
3 #
4 # This software may be distributed under the terms of the BSD license.
5 # See README for more details.
6
7 import logging
8 logger = logging.getLogger()
9 import time
10 import os
11
12 import hostapd
13 from wpasupplicant import WpaSupplicant
14 import hwsim_utils
15 from tshark import run_tshark
16 from utils import HwsimSkip, fail_test, alloc_fail, wait_fail_trigger
17
18 def test_owe(dev, apdev):
19 """Opportunistic Wireless Encryption"""
20 if "OWE" not in dev[0].get_capability("key_mgmt"):
21 raise HwsimSkip("OWE not supported")
22 params = {"ssid": "owe",
23 "wpa": "2",
24 "ieee80211w": "2",
25 "wpa_key_mgmt": "OWE",
26 "rsn_pairwise": "CCMP"}
27 hapd = hostapd.add_ap(apdev[0], params)
28 bssid = hapd.own_addr()
29
30 dev[0].scan_for_bss(bssid, freq="2412")
31 bss = dev[0].get_bss(bssid)
32 if "[WPA2-OWE-CCMP]" not in bss['flags']:
33 raise Exception("OWE AKM not recognized: " + bss['flags'])
34
35 dev[0].connect("owe", key_mgmt="OWE", ieee80211w="2",
36 scan_freq="2412")
37 hwsim_utils.test_connectivity(dev[0], hapd)
38 val = dev[0].get_status_field("key_mgmt")
39 if val != "OWE":
40 raise Exception("Unexpected key_mgmt: " + val)
41
42 def test_owe_groups(dev, apdev):
43 """Opportunistic Wireless Encryption - DH groups"""
44 if "OWE" not in dev[0].get_capability("key_mgmt"):
45 raise HwsimSkip("OWE not supported")
46 params = {"ssid": "owe",
47 "wpa": "2",
48 "wpa_key_mgmt": "OWE",
49 "rsn_pairwise": "CCMP"}
50 hapd = hostapd.add_ap(apdev[0], params)
51 bssid = hapd.own_addr()
52
53 dev[0].scan_for_bss(bssid, freq="2412")
54 for group in [19, 20, 21]:
55 dev[0].connect("owe", key_mgmt="OWE", owe_group=str(group))
56 hwsim_utils.test_connectivity(dev[0], hapd)
57 dev[0].request("REMOVE_NETWORK all")
58 dev[0].wait_disconnected()
59 dev[0].dump_monitor()
60
61 def test_owe_pmksa_caching(dev, apdev):
62 """Opportunistic Wireless Encryption and PMKSA caching"""
63 run_owe_pmksa_caching(dev, apdev)
64
65 def test_owe_pmksa_caching_connect_cmd(dev, apdev):
66 """Opportunistic Wireless Encryption and PMKSA caching using cfg80211 connect command"""
67 wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
68 wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
69 run_owe_pmksa_caching([wpas], apdev)
70
71 def run_owe_pmksa_caching(dev, apdev):
72 if "OWE" not in dev[0].get_capability("key_mgmt"):
73 raise HwsimSkip("OWE not supported")
74 params = {"ssid": "owe",
75 "wpa": "2",
76 "wpa_key_mgmt": "OWE",
77 "rsn_pairwise": "CCMP"}
78 hapd = hostapd.add_ap(apdev[0], params)
79 bssid = hapd.own_addr()
80
81 dev[0].scan_for_bss(bssid, freq="2412")
82 id = dev[0].connect("owe", key_mgmt="OWE")
83 hwsim_utils.test_connectivity(dev[0], hapd)
84 pmksa = dev[0].get_pmksa(bssid)
85 dev[0].request("DISCONNECT")
86 dev[0].wait_disconnected()
87 dev[0].dump_monitor()
88
89 dev[0].select_network(id, 2412)
90 dev[0].wait_connected()
91 hwsim_utils.test_connectivity(dev[0], hapd)
92 pmksa2 = dev[0].get_pmksa(bssid)
93 dev[0].request("DISCONNECT")
94 dev[0].wait_disconnected()
95 dev[0].dump_monitor()
96
97 if "OK" not in hapd.request("PMKSA_FLUSH"):
98 raise Exception("PMKSA_FLUSH failed")
99
100 dev[0].select_network(id, 2412)
101 dev[0].wait_connected()
102 hwsim_utils.test_connectivity(dev[0], hapd)
103 pmksa3 = dev[0].get_pmksa(bssid)
104 dev[0].request("DISCONNECT")
105 dev[0].wait_disconnected()
106 dev[0].dump_monitor()
107
108 if pmksa is None or pmksa2 is None or pmksa3 is None:
109 raise Exception("PMKSA entry missing")
110 if pmksa['pmkid'] != pmksa2['pmkid']:
111 raise Exception("Unexpected PMKID change when using PMKSA caching")
112 if pmksa['pmkid'] == pmksa3['pmkid']:
113 raise Exception("PMKID did not change after PMKSA cache flush")
114
115 def test_owe_and_psk(dev, apdev):
116 """Opportunistic Wireless Encryption and WPA2-PSK enabled"""
117 if "OWE" not in dev[0].get_capability("key_mgmt"):
118 raise HwsimSkip("OWE not supported")
119 params = {"ssid": "owe+psk",
120 "wpa": "2",
121 "wpa_key_mgmt": "OWE WPA-PSK",
122 "rsn_pairwise": "CCMP",
123 "wpa_passphrase": "12345678"}
124 hapd = hostapd.add_ap(apdev[0], params)
125 bssid = hapd.own_addr()
126
127 dev[0].scan_for_bss(bssid, freq="2412")
128 dev[0].connect("owe+psk", psk="12345678")
129 hwsim_utils.test_connectivity(dev[0], hapd)
130
131 dev[1].scan_for_bss(bssid, freq="2412")
132 dev[1].connect("owe+psk", key_mgmt="OWE")
133 hwsim_utils.test_connectivity(dev[1], hapd)
134
135 def test_owe_transition_mode(dev, apdev):
136 """Opportunistic Wireless Encryption transition mode"""
137 run_owe_transition_mode(dev, apdev)
138
139 def test_owe_transition_mode_connect_cmd(dev, apdev):
140 """Opportunistic Wireless Encryption transition mode using cfg80211 connect command"""
141 wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
142 wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
143 run_owe_transition_mode([wpas], apdev)
144
145 def run_owe_transition_mode(dev, apdev):
146 if "OWE" not in dev[0].get_capability("key_mgmt"):
147 raise HwsimSkip("OWE not supported")
148 dev[0].flush_scan_cache()
149 params = {"ssid": "owe-random",
150 "wpa": "2",
151 "wpa_key_mgmt": "OWE",
152 "rsn_pairwise": "CCMP",
153 "ieee80211w": "2",
154 "owe_transition_bssid": apdev[1]['bssid'],
155 "owe_transition_ssid": '"owe-test"',
156 "ignore_broadcast_ssid": "1"}
157 hapd = hostapd.add_ap(apdev[0], params)
158 bssid = hapd.own_addr()
159
160 params = {"ssid": "owe-test",
161 "owe_transition_bssid": apdev[0]['bssid'],
162 "owe_transition_ssid": '"owe-random"'}
163 hapd2 = hostapd.add_ap(apdev[1], params)
164 bssid2 = hapd2.own_addr()
165
166 dev[0].scan_for_bss(bssid, freq="2412")
167 dev[0].scan_for_bss(bssid2, freq="2412")
168
169 bss = dev[0].get_bss(bssid)
170 if "[WPA2-OWE-CCMP]" not in bss['flags']:
171 raise Exception("OWE AKM not recognized: " + bss['flags'])
172 if "[OWE-TRANS]" not in bss['flags']:
173 raise Exception("OWE transition not recognized: " + bss['flags'])
174
175 bss = dev[0].get_bss(bssid2)
176 if "[OWE-TRANS-OPEN]" not in bss['flags']:
177 raise Exception("OWE transition (open) not recognized: " + bss['flags'])
178
179 id = dev[0].connect("owe-test", key_mgmt="OWE", ieee80211w="2",
180 scan_freq="2412")
181 hwsim_utils.test_connectivity(dev[0], hapd)
182 val = dev[0].get_status_field("key_mgmt")
183 if val != "OWE":
184 raise Exception("Unexpected key_mgmt: " + val)
185
186 logger.info("Move to OWE only mode (disable transition mode)")
187
188 dev[0].request("DISCONNECT")
189 dev[0].wait_disconnected()
190 dev[0].dump_monitor()
191
192 hapd2.disable()
193 hapd.disable()
194 dev[0].flush_scan_cache()
195 hapd.set("owe_transition_bssid", "00:00:00:00:00:00")
196 hapd.set("ignore_broadcast_ssid", '0')
197 hapd.set("ssid", 'owe-test')
198 hapd.enable()
199
200 dev[0].scan_for_bss(bssid, freq="2412")
201 dev[0].select_network(id, 2412)
202 dev[0].wait_connected()
203 hwsim_utils.test_connectivity(dev[0], hapd)
204
205 def test_owe_transition_mode_open_only_ap(dev, apdev):
206 """Opportunistic Wireless Encryption transition mode connect to open-only AP"""
207 if "OWE" not in dev[0].get_capability("key_mgmt"):
208 raise HwsimSkip("OWE not supported")
209 dev[0].flush_scan_cache()
210 params = {"ssid": "owe-test-open"}
211 hapd = hostapd.add_ap(apdev[0], params)
212 bssid = hapd.own_addr()
213
214 dev[0].scan_for_bss(bssid, freq="2412")
215
216 bss = dev[0].get_bss(bssid)
217
218 id = dev[0].connect("owe-test-open", key_mgmt="OWE", ieee80211w="2",
219 scan_freq="2412")
220 hwsim_utils.test_connectivity(dev[0], hapd)
221 val = dev[0].get_status_field("key_mgmt")
222 if val != "NONE":
223 raise Exception("Unexpected key_mgmt: " + val)
224
225 def test_owe_transition_mode_open_multiple_scans(dev, apdev):
226 """Opportunistic Wireless Encryption transition mode and need for multiple scans"""
227 if "OWE" not in dev[0].get_capability("key_mgmt"):
228 raise HwsimSkip("OWE not supported")
229 dev[0].flush_scan_cache()
230 params = {"ssid": "owe-test",
231 "owe_transition_bssid": apdev[0]['bssid'],
232 "owe_transition_ssid": '"owe-random"'}
233 hapd2 = hostapd.add_ap(apdev[1], params)
234 bssid2 = hapd2.own_addr()
235
236 dev[0].scan_for_bss(bssid2, freq="2412")
237
238 dev[0].dump_monitor()
239 id = dev[0].connect("owe-test", key_mgmt="OWE", ieee80211w="2",
240 scan_freq="2412", wait_connect=False)
241 ev = dev[0].wait_event(["CTRL-EVENT-SCAN-RESULTS"], timeout=1)
242
243 params = {"ssid": "owe-random",
244 "wpa": "2",
245 "wpa_key_mgmt": "OWE",
246 "rsn_pairwise": "CCMP",
247 "ieee80211w": "2",
248 "owe_transition_bssid": apdev[1]['bssid'],
249 "owe_transition_ssid": '"owe-test"',
250 "ignore_broadcast_ssid": "1"}
251 hapd = hostapd.add_ap(apdev[0], params)
252 bssid = hapd.own_addr()
253
254 dev[0].wait_connected()
255
256 val = dev[0].get_status_field("key_mgmt")
257 if val != "OWE":
258 raise Exception("Unexpected key_mgmt: " + val)
259
260 def test_owe_transition_mode_multi_bss(dev, apdev):
261 """Opportunistic Wireless Encryption transition mode (multi BSS)"""
262 try:
263 run_owe_transition_mode_multi_bss(dev, apdev)
264 finally:
265 dev[0].request("SCAN_INTERVAL 5")
266
267 def run_owe_transition_mode_multi_bss(dev, apdev):
268 if "OWE" not in dev[0].get_capability("key_mgmt"):
269 raise HwsimSkip("OWE not supported")
270 ifname1 = apdev[0]['ifname']
271 ifname2 = apdev[0]['ifname'] + '-2'
272 hapd1 = hostapd.add_bss(apdev[0], ifname1, 'owe-bss-1.conf')
273 hapd2 = hostapd.add_bss(apdev[0], ifname2, 'owe-bss-2.conf')
274 hapd2.bssidx = 1
275
276 bssid = hapd1.own_addr()
277 bssid2 = hapd2.own_addr()
278
279 # Beaconing with the OWE Transition Mode element can start only once both
280 # BSSs are enabled, so the very first Beacon frame may go out without this
281 # element. Wait a bit to avoid getting incomplete scan results.
282 time.sleep(0.1)
283
284 dev[0].request("SCAN_INTERVAL 1")
285 dev[0].scan_for_bss(bssid2, freq="2412")
286 dev[0].scan_for_bss(bssid, freq="2412")
287 dev[0].connect("transition-mode-open", key_mgmt="OWE")
288 val = dev[0].get_status_field("bssid")
289 if val != bssid2:
290 raise Exception("Unexpected bssid: " + val)
291 val = dev[0].get_status_field("key_mgmt")
292 if val != "OWE":
293 raise Exception("Unexpected key_mgmt: " + val)
294 hwsim_utils.test_connectivity(dev[0], hapd2)
295
296 def test_owe_unsupported_group(dev, apdev):
297 """Opportunistic Wireless Encryption and unsupported group"""
298 try:
299 run_owe_unsupported_group(dev, apdev)
300 finally:
301 dev[0].request("VENDOR_ELEM_REMOVE 13 *")
302
303 def test_owe_unsupported_group_connect_cmd(dev, apdev):
304 """Opportunistic Wireless Encryption and unsupported group using cfg80211 connect command"""
305 try:
306 wpas = None
307 wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
308 wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
309 run_owe_unsupported_group([wpas], apdev)
310 finally:
311 if wpas:
312 wpas.request("VENDOR_ELEM_REMOVE 13 *")
313
314 def run_owe_unsupported_group(dev, apdev):
315 if "OWE" not in dev[0].get_capability("key_mgmt"):
316 raise HwsimSkip("OWE not supported")
317 # Override OWE Dh Parameters element with a payload that uses invalid group
318 # 0 (and actual group 19 data) to make the AP reject this with the specific
319 # status code 77.
320 dev[0].request("VENDOR_ELEM_ADD 13 ff23200000783590fb7440e03d5b3b33911f86affdcc6b4411b707846ac4ff08ddc8831ccd")
321
322 params = {"ssid": "owe",
323 "wpa": "2",
324 "wpa_key_mgmt": "OWE",
325 "rsn_pairwise": "CCMP"}
326 hapd = hostapd.add_ap(apdev[0], params)
327 bssid = hapd.own_addr()
328
329 dev[0].scan_for_bss(bssid, freq="2412")
330 dev[0].connect("owe", key_mgmt="OWE", wait_connect=False)
331 ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10)
332 dev[0].request("DISCONNECT")
333 if ev is None:
334 raise Exception("Association not rejected")
335 if "status_code=77" not in ev:
336 raise Exception("Unexpected rejection reason: " + ev)
337
338 def test_owe_limited_group_set(dev, apdev):
339 """Opportunistic Wireless Encryption and limited group set"""
340 if "OWE" not in dev[0].get_capability("key_mgmt"):
341 raise HwsimSkip("OWE not supported")
342 params = {"ssid": "owe",
343 "wpa": "2",
344 "wpa_key_mgmt": "OWE",
345 "rsn_pairwise": "CCMP",
346 "owe_groups": "20 21"}
347 hapd = hostapd.add_ap(apdev[0], params)
348 bssid = hapd.own_addr()
349
350 dev[0].scan_for_bss(bssid, freq="2412")
351 dev[0].connect("owe", key_mgmt="OWE", owe_group="19", wait_connect=False)
352 ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10)
353 dev[0].request("DISCONNECT")
354 if ev is None:
355 raise Exception("Association not rejected")
356 if "status_code=77" not in ev:
357 raise Exception("Unexpected rejection reason: " + ev)
358 dev[0].dump_monitor()
359
360 for group in [20, 21]:
361 dev[0].connect("owe", key_mgmt="OWE", owe_group=str(group))
362 dev[0].request("REMOVE_NETWORK all")
363 dev[0].wait_disconnected()
364 dev[0].dump_monitor()
365
366 def test_owe_limited_group_set_pmf(dev, apdev, params):
367 """Opportunistic Wireless Encryption and limited group set (PMF)"""
368 if "OWE" not in dev[0].get_capability("key_mgmt"):
369 raise HwsimSkip("OWE not supported")
370 pcapng = os.path.join(params['logdir'], "hwsim0.pcapng")
371
372 params = {"ssid": "owe",
373 "wpa": "2",
374 "ieee80211w": "2",
375 "wpa_key_mgmt": "OWE",
376 "rsn_pairwise": "CCMP",
377 "owe_groups": "21"}
378 hapd = hostapd.add_ap(apdev[0], params)
379 bssid = hapd.own_addr()
380
381 dev[0].scan_for_bss(bssid, freq="2412")
382 dev[0].connect("owe", key_mgmt="OWE", owe_group="19", ieee80211w="2",
383 scan_freq="2412", wait_connect=False)
384 ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10)
385 dev[0].request("DISCONNECT")
386 if ev is None:
387 raise Exception("Association not rejected")
388 if "status_code=77" not in ev:
389 raise Exception("Unexpected rejection reason: " + ev)
390 dev[0].dump_monitor()
391
392 dev[0].connect("owe", key_mgmt="OWE", owe_group="20", ieee80211w="2",
393 scan_freq="2412", wait_connect=False)
394 ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10)
395 dev[0].request("DISCONNECT")
396 if ev is None:
397 raise Exception("Association not rejected (2)")
398 if "status_code=77" not in ev:
399 raise Exception("Unexpected rejection reason (2): " + ev)
400 dev[0].dump_monitor()
401
402 dev[0].connect("owe", key_mgmt="OWE", owe_group="21", ieee80211w="2",
403 scan_freq="2412")
404 dev[0].request("REMOVE_NETWORK all")
405 dev[0].wait_disconnected()
406 dev[0].dump_monitor()
407
408 out = run_tshark(pcapng,
409 "wlan.fc.type_subtype == 1",
410 display=['wlan_mgt.fixed.status_code'])
411 status = out.splitlines()
412 logger.info("Association Response frame status codes: " + str(status))
413 if len(status) != 3:
414 raise Exception("Unexpected number of Association Response frames")
415 if int(status[0]) != 77 or int(status[1]) != 77 or int(status[2]) != 0:
416 raise Exception("Unexpected Association Response frame status code")
417
418 def test_owe_group_negotiation(dev, apdev):
419 """Opportunistic Wireless Encryption and group negotiation"""
420 run_owe_group_negotiation(dev[0], apdev)
421
422 def test_owe_group_negotiation_connect_cmd(dev, apdev):
423 """Opportunistic Wireless Encryption and group negotiation (connect command)"""
424 wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
425 wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
426 run_owe_group_negotiation(wpas, apdev)
427
428 def run_owe_group_negotiation(dev, apdev):
429 if "OWE" not in dev.get_capability("key_mgmt"):
430 raise HwsimSkip("OWE not supported")
431 params = {"ssid": "owe",
432 "wpa": "2",
433 "wpa_key_mgmt": "OWE",
434 "rsn_pairwise": "CCMP",
435 "owe_groups": "21"}
436 hapd = hostapd.add_ap(apdev[0], params)
437 bssid = hapd.own_addr()
438
439 dev.scan_for_bss(bssid, freq="2412")
440 dev.connect("owe", key_mgmt="OWE")
441
442 def test_owe_assoc_reject(dev, apdev):
443 """Opportunistic Wireless Encryption association rejection handling"""
444 if "OWE" not in dev[0].get_capability("key_mgmt"):
445 raise HwsimSkip("OWE not supported")
446 params = {"ssid": "owe",
447 "require_ht": "1",
448 "wpa": "2",
449 "ieee80211w": "2",
450 "wpa_key_mgmt": "OWE",
451 "rsn_pairwise": "CCMP",
452 "owe_groups": "19"}
453 hapd = hostapd.add_ap(apdev[0], params)
454 bssid = hapd.own_addr()
455
456 # First, reject two associations with HT-required (i.e., not OWE related)
457 dev[0].scan_for_bss(bssid, freq="2412")
458 dev[0].connect("owe", key_mgmt="OWE", ieee80211w="2",
459 disable_ht="1", scan_freq="2412", wait_connect=False)
460 for i in range(0, 2):
461 ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10)
462 if ev is None:
463 raise Exception("Association rejection not reported")
464
465 # Then, verify that STA tries OWE with the default group (19) on the next
466 # attempt instead of having moved to testing another group.
467 hapd.set("require_ht", "0")
468 for i in range(0, 2):
469 ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT",
470 "CTRL-EVENT-CONNECTED"], timeout=10)
471 if ev is None:
472 raise Exception("Association result not reported")
473 if "CTRL-EVENT-CONNECTED" in ev:
474 break
475 if "status_code=77" in ev:
476 raise Exception("Unexpected unsupport group rejection")
477 if "CTRL-EVENT-CONNECTED" not in ev:
478 raise Exception("Did not connect successfully")
479
480 def test_owe_local_errors(dev, apdev):
481 """Opportunistic Wireless Encryption - local errors on supplicant"""
482 if "OWE" not in dev[0].get_capability("key_mgmt"):
483 raise HwsimSkip("OWE not supported")
484 params = {"ssid": "owe",
485 "wpa": "2",
486 "ieee80211w": "2",
487 "wpa_key_mgmt": "OWE",
488 "rsn_pairwise": "CCMP"}
489 hapd = hostapd.add_ap(apdev[0], params)
490 bssid = hapd.own_addr()
491
492 dev[0].scan_for_bss(bssid, freq="2412")
493
494 tests = [(1, "crypto_ecdh_init;owe_build_assoc_req"),
495 (1, "crypto_ecdh_get_pubkey;owe_build_assoc_req"),
496 (1, "wpabuf_alloc;owe_build_assoc_req")]
497 for count, func in tests:
498 with alloc_fail(dev[0], count, func):
499 dev[0].connect("owe", key_mgmt="OWE", owe_group="20",
500 ieee80211w="2",
501 scan_freq="2412", wait_connect=False)
502 wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
503 dev[0].request("REMOVE_NETWORK all")
504 dev[0].dump_monitor()
505
506 tests = [(1, "crypto_ecdh_set_peerkey;owe_process_assoc_resp"),
507 (1, "crypto_ecdh_get_pubkey;owe_process_assoc_resp"),
508 (1, "wpabuf_alloc;=owe_process_assoc_resp")]
509 for count, func in tests:
510 with alloc_fail(dev[0], count, func):
511 dev[0].connect("owe", key_mgmt="OWE", owe_group="20",
512 ieee80211w="2",
513 scan_freq="2412", wait_connect=False)
514 dev[0].wait_disconnected()
515 dev[0].request("REMOVE_NETWORK all")
516 dev[0].dump_monitor()
517
518 tests = [(1, "hmac_sha256;owe_process_assoc_resp", 19),
519 (1, "hmac_sha256_kdf;owe_process_assoc_resp", 19),
520 (1, "hmac_sha384;owe_process_assoc_resp", 20),
521 (1, "hmac_sha384_kdf;owe_process_assoc_resp", 20),
522 (1, "hmac_sha512;owe_process_assoc_resp", 21),
523 (1, "hmac_sha512_kdf;owe_process_assoc_resp", 21)]
524 for count, func, group in tests:
525 with fail_test(dev[0], count, func):
526 dev[0].connect("owe", key_mgmt="OWE", owe_group=str(group),
527 ieee80211w="2",
528 scan_freq="2412", wait_connect=False)
529 dev[0].wait_disconnected()
530 dev[0].request("REMOVE_NETWORK all")
531 dev[0].dump_monitor()
532
533 dev[0].connect("owe", key_mgmt="OWE", owe_group="18",
534 ieee80211w="2",
535 scan_freq="2412", wait_connect=False)
536 ev = dev[0].wait_event(["SME: Trying to authenticate"], timeout=5)
537 if ev is None:
538 raise Exception("No authentication attempt")
539 time.sleep(0.5)
540 dev[0].request("REMOVE_NETWORK all")
541 dev[0].dump_monitor()