Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx> --- tests/hwsim/test_ap_psk.py | 2 +- tests/hwsim/test_erp.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 92919b7f8..03be59cd3 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -2376,7 +2376,7 @@ def verify_not_present(buf, key, fname, keyname): return prefix = 2048 if pos > 2048 else pos - with open(fname + keyname, 'w') as f: + with open(fname + keyname, 'wb') as f: f.write(buf[pos - prefix:pos + 2048]) raise Exception(keyname + " found after disassociation") diff --git a/tests/hwsim/test_erp.py b/tests/hwsim/test_erp.py index 866dea4aa..64e77cd11 100644 --- a/tests/hwsim/test_erp.py +++ b/tests/hwsim/test_erp.py @@ -331,7 +331,7 @@ def test_erp_key_lifetime_in_memory(dev, apdev, params): get_key_locations(buf, emsk, "EMSK") get_key_locations(buf, rRK, "rRK") get_key_locations(buf, rIK, "rIK") - if password not in buf: + if password.encode() not in buf: raise HwsimSkip("Password not found while associated") if pmk not in buf: raise HwsimSkip("PMK not found while associated") @@ -423,7 +423,7 @@ def test_erp_key_lifetime_in_memory(dev, apdev, params): get_key_locations(buf, emsk, "EMSK") get_key_locations(buf, rRK, "rRK") get_key_locations(buf, rIK, "rIK") - verify_not_present(buf, password, fname, "password") + verify_not_present(buf, binascii.unhexlify(password), fname, "password") verify_not_present(buf, pmk, fname, "PMK") verify_not_present(buf, kck, fname, "KCK") verify_not_present(buf, kek, fname, "KEK") -- 2.17.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap