wafsamba: Make sure md5 is really work before using it or overriding the hash function
authorAlexander Bokovoy <ab@samba.org>
Fri, 7 Dec 2012 15:36:02 +0000 (17:36 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sun, 9 Dec 2012 19:55:24 +0000 (20:55 +0100)
commit91d27520dfec5817e2e3e6826f7c7aa2ed42319b
tree63b5e60da8d32911230d6a8f5db78dfc80ed0aa9
parent25eb1af07cc09e5e019a0702c60a763cc3266196
wafsamba: Make sure md5 is really work before using it or overriding the hash function

In FIPS mode importing md5 Python module will not cause any error but calling md5.md5()
function will throw ValueError since md5 is not available.

Make sure md5.md5() actually works and if not, fall back to use hash replacement that
we already have in wafsamba.

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Sat Dec  8 13:30:07 CET 2012 on sn-devel-104
(cherry picked from commit 56d9c8c4bf29eb473f9f4e7a7ef16fc6020db6b5)

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9479 - Support FIPS mode when building Samba.
buildtools/wafsamba/samba_utils.py