Use usedforsecurity=False when calling hashlib.md5 (#1662)

This clears "ValueError: ...  disabled for FIPS" for systems with FIPS
mechanisms enabled.

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
This commit is contained in:
ddj116 2024-03-08 10:20:19 -06:00 committed by GitHub
parent e184db0eb8
commit 0db42a1012
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1284,8 +1284,8 @@ class TrickWorkflow(WorkflowCommon):
self.status = Job.Status.FAILED
if self.missing:
return self.status
if (hashlib.md5(open(self.test_data,'rb').read()).hexdigest() !=
hashlib.md5(open(self.baseline_data,'rb').read()).hexdigest()):
if (hashlib.md5(open(self.test_data,'rb').read(), usedforsecurity=False).hexdigest() !=
hashlib.md5(open(self.baseline_data,'rb').read(), usedforsecurity=False).hexdigest()):
self.status = Job.Status.FAILED
else:
self.status = Job.Status.SUCCESS