Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx> --- tests/hwsim/test_ap_psk.py | 2 +- tests/hwsim/test_erp.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 3078658c1..58cca68d3 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -2281,7 +2281,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..0f16919a4 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") @@ -515,7 +515,7 @@ def test_erp_home_realm_oom(dev, apdev): ca_cert="auth_serv/ca.pem", phase2="auth=PAP", erp="1", scan_freq="2412", wait_connect=False) dev[0].wait_connected(timeout=10) - if range > 1: + if count > 1: continue with alloc_fail(dev[0], count, "eap_get_realm"): dev[0].request("DISCONNECT") -- 2.17.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap