]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Add digestmod for Python 3.8
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Wed, 8 Jan 2020 10:04:53 +0000 (11:04 +0100)
committerJouni Malinen <j@w1.fi>
Wed, 8 Jan 2020 12:57:13 +0000 (14:57 +0200)
The digestmod argument also exists in earlier Python versions,
version 3.8 does not set a default argument anymore.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
tests/hwsim/test_ieee8021x.py

index b759847987f6e078dca2283247526a2c76c3c2f9..bc1c3c9392732fbcb202e1641003196698ff332c 100644 (file)
@@ -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