From 2ffdf32eb83dbf2753e2dc46e78b8b4077084015 Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Wed, 8 Jan 2020 11:04:53 +0100 Subject: [PATCH] tests: Add digestmod for Python 3.8 The digestmod argument also exists in earlier Python versions, version 3.8 does not set a default argument anymore. Signed-off-by: Markus Theil --- tests/hwsim/test_ieee8021x.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hwsim/test_ieee8021x.py b/tests/hwsim/test_ieee8021x.py index b75984798..bc1c3c939 100644 --- a/tests/hwsim/test_ieee8021x.py +++ b/tests/hwsim/test_ieee8021x.py @@ -244,7 +244,7 @@ def test_ieee8021x_held(dev, apdev): def send_eapol_key(dev, bssid, signkey, frame_start, frame_end): zero_sign = "00000000000000000000000000000000" frame = frame_start + zero_sign + frame_end - hmac_obj = hmac.new(binascii.unhexlify(signkey)) + hmac_obj = hmac.new(binascii.unhexlify(signkey), digestmod='MD5') hmac_obj.update(binascii.unhexlify(frame)) sign = hmac_obj.digest() frame = frame_start + binascii.hexlify(sign).decode() + frame_end