summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-20 16:23:06 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-20 16:23:06 (GMT)
commit634919a9fa1fffe3d36b13b4248f99508b5999ed (patch)
treeb60c9ca7e04ad97e11385712b3405fc9b42d7803 /Lib/smtplib.py
parent7f48396cb5d19a40f571b0aec4916612f117a13d (diff)
downloadcpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.zip
cpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.tar.gz
cpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.tar.bz2
Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
module supports digestmod names, e.g. hmac.HMAC('sha1').
Diffstat (limited to 'Lib/smtplib.py')
-rw-r--r--Lib/smtplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index e1a32ed..69ae845 100644
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -579,7 +579,7 @@ class SMTP:
def encode_cram_md5(challenge, user, password):
challenge = base64.decodebytes(challenge)
response = user + " " + hmac.HMAC(password.encode('ascii'),
- challenge).hexdigest()
+ challenge, 'md5').hexdigest()
return encode_base64(response.encode('ascii'), eol='')
def encode_plain(user, password):