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))
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))
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))
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))