From: Noel Power Date: Tue, 31 Jul 2018 16:02:54 +0000 (+0100) Subject: PY3: md5 related functions need to be passed bytes X-Git-Tag: tdb-1.3.17~1491 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d28b4fa3611a8b2aaac4c37ec79907a724d6f0f7;p=thirdparty%2Fsamba.git PY3: md5 related functions need to be passed bytes Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index fd61b8425d8..b4da3c5246f 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -358,13 +358,13 @@ try: # Even if hashlib.md5 exists, it may be unusable. # Try to use MD5 function. In FIPS mode this will cause an exception # and we'll get to the replacement code - foo = md5('abcd') + foo = md5(b'abcd') except: try: import md5 # repeat the same check here, mere success of import is not enough. # Try to use MD5 function. In FIPS mode this will cause an exception - foo = md5.md5('abcd') + foo = md5.md5(b'abcd') except: Context.SIG_NIL = hash('abcd') class replace_md5(object):