This is an automated email from the ASF dual-hosted git repository. jdanek pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-python.git
commit d596150c876e31e22b5a9edab2aba606e64e6a8e Author: Jiri Daněk <jda...@redhat.com> AuthorDate: Thu Apr 13 19:04:30 2023 +0200 QPID-8631: HMAC in Python 3 has mandatory digestmod parameter, it is no longer defaulted to `hashlib.md5` --- qpid/saslmech/cram_md5.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qpid/saslmech/cram_md5.py b/qpid/saslmech/cram_md5.py index 5dec975..00f65b9 100644 --- a/qpid/saslmech/cram_md5.py +++ b/qpid/saslmech/cram_md5.py @@ -18,11 +18,14 @@ # from __future__ import absolute_import + +import hashlib + from .sasl import Sasl from hmac import HMAC class CRAM_MD5(Sasl): def response(self, challenge): - digest = HMAC( self.password, challenge).hexdigest() + digest = HMAC(self.password.encode(), challenge, digestmod=hashlib.md5).hexdigest() return "%s %s" % (self.user, digest) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org