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 <markus.theil@tu-ilmenau.de>
This commit is contained in:
parent
f7b2fe99ea
commit
2ffdf32eb8
1 changed files with 1 additions and 1 deletions
|
@ -244,7 +244,7 @@ def test_ieee8021x_held(dev, apdev):
|
||||||
def send_eapol_key(dev, bssid, signkey, frame_start, frame_end):
|
def send_eapol_key(dev, bssid, signkey, frame_start, frame_end):
|
||||||
zero_sign = "00000000000000000000000000000000"
|
zero_sign = "00000000000000000000000000000000"
|
||||||
frame = frame_start + zero_sign + frame_end
|
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))
|
hmac_obj.update(binascii.unhexlify(frame))
|
||||||
sign = hmac_obj.digest()
|
sign = hmac_obj.digest()
|
||||||
frame = frame_start + binascii.hexlify(sign).decode() + frame_end
|
frame = frame_start + binascii.hexlify(sign).decode() + frame_end
|
||||||
|
|
Loading…
Reference in a new issue