diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index 648f123e4..18e8dd6cb 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -499,21 +499,23 @@ def test_ft_psk_key_lifetime_in_memory(dev, apdev, params): if "FT: PMK-R1 - hexdump" in l: val = l.strip().split(':')[3].replace(' ', '') pmkr1 = binascii.unhexlify(val) - if "FT: PTK - hexdump" in l: + if "FT: KCK - hexdump" in l: val = l.strip().split(':')[3].replace(' ', '') - ptk = binascii.unhexlify(val) + kck = binascii.unhexlify(val) + if "FT: KEK - hexdump" in l: + val = l.strip().split(':')[3].replace(' ', '') + kek = binascii.unhexlify(val) + if "FT: TK - hexdump" in l: + val = l.strip().split(':')[3].replace(' ', '') + tk = binascii.unhexlify(val) if "WPA: Group Key - hexdump" in l: val = l.strip().split(':')[3].replace(' ', '') gtk = binascii.unhexlify(val) - if not pmkr0 or not pmkr1 or not ptk or not gtk: + if not pmkr0 or not pmkr1 or not kck or not kek or not tk or not gtk: raise Exception("Could not find keys from debug log") if len(gtk) != 16: raise Exception("Unexpected GTK length") - kck = ptk[0:16] - kek = ptk[16:32] - tk = ptk[32:48] - logger.info("Checking keys in memory while associated") get_key_locations(buf, pmk, "PMK") get_key_locations(buf, pmkr0, "PMK-R0")