mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-24 16:28:23 -05:00
tests: Provide digestmod to hmac.new() for Python 3.8
Python 3.8 removed the previously used default of MD5 algorithm, so provide the explicit digestmod=hashlib.md5 parameter to the couple of places that were missing it. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
a7d6098fb4
commit
674758ed59
@ -106,7 +106,7 @@ def start_radius_server(eap_handler):
|
||||
logger.info("No EAP request available")
|
||||
reply.code = pyrad.packet.AccessChallenge
|
||||
|
||||
hmac_obj = hmac.new(reply.secret)
|
||||
hmac_obj = hmac.new(reply.secret, digestmod=hashlib.md5)
|
||||
hmac_obj.update(struct.pack("B", reply.code))
|
||||
hmac_obj.update(struct.pack("B", reply.id))
|
||||
|
||||
|
@ -760,7 +760,7 @@ def test_radius_das_disconnect(dev, apdev):
|
||||
|
||||
def add_message_auth_req(req):
|
||||
req.authenticator = req.CreateAuthenticator()
|
||||
hmac_obj = hmac.new(req.secret)
|
||||
hmac_obj = hmac.new(req.secret, digestmod=hashlib.md5)
|
||||
hmac_obj.update(struct.pack("B", req.code))
|
||||
hmac_obj.update(struct.pack("B", req.id))
|
||||
|
||||
@ -1046,7 +1046,7 @@ def test_radius_protocol(dev, apdev):
|
||||
pw = b"incorrect"
|
||||
else:
|
||||
pw = reply.secret
|
||||
hmac_obj = hmac.new(pw)
|
||||
hmac_obj = hmac.new(pw, digestmod=hashlib.md5)
|
||||
hmac_obj.update(struct.pack("B", reply.code))
|
||||
hmac_obj.update(struct.pack("B", reply.id))
|
||||
|
||||
@ -1389,7 +1389,7 @@ def test_radius_auth_force_invalid_client_addr(dev, apdev):
|
||||
|
||||
def add_message_auth(req):
|
||||
req.authenticator = req.CreateAuthenticator()
|
||||
hmac_obj = hmac.new(req.secret)
|
||||
hmac_obj = hmac.new(req.secret, digestmod=hashlib.md5)
|
||||
hmac_obj.update(struct.pack("B", req.code))
|
||||
hmac_obj.update(struct.pack("B", req.id))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user