Skip to content

Commit

Permalink
Use usedforsecurity=False when calling hashlib.md5 (#1662)
Browse files Browse the repository at this point in the history
This clears "ValueError: ...  disabled for FIPS" for systems with FIPS
mechanisms enabled.

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
  • Loading branch information
ddj116 and Dan Jordan committed Mar 8, 2024
1 parent e184db0 commit 0db42a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/trick/trickops/TrickWorkflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,8 +1284,8 @@ def compare(self):
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
Expand Down

0 comments on commit 0db42a1

Please sign in to comment.