This will fix the issue with LNST on FIPS enabled system. FIPS does not allow use of md5. Python's hashlib has a parameter that can be used to allow use of md5 for non-security purpose. LNST uses md5 for caching test modules and tools only.
Tested both with python2.6 and python2.7
Signed-off-by: Jan Tluka jtluka@redhat.com --- lnst/Common/Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Common/Utils.py b/lnst/Common/Utils.py index d6d6c57..1a7c926 100644 --- a/lnst/Common/Utils.py +++ b/lnst/Common/Utils.py @@ -98,7 +98,7 @@ def bool_it(val): return True if int_it(val) else False
def md5sum(file_path, block_size=2**20): - md5 = hashlib.md5() + md5 = hashlib.md5(usedforsecurity=False) with open(file_path, "rb") as f: while True: data = f.read(block_size)