Skip to content

Commit

Permalink
Don't use md5 for computing the lockfile filename
Browse files Browse the repository at this point in the history
md5 is forbidden in FIPS mode, rely on SHA256 instead
  • Loading branch information
dcermak committed Jul 1, 2024
1 parent 27989dd commit 0eabd4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytest_container/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from dataclasses import field
from datetime import datetime
from datetime import timedelta
from hashlib import md5
from hashlib import sha256
from os.path import exists
from os.path import isabs
from os.path import join
Expand Down Expand Up @@ -619,7 +619,7 @@ def filelock_filename(self) -> str:
all_elements.append("".join(value.values()))
else:
all_elements.append(str(value))
return f"{md5((''.join(all_elements)).encode()).hexdigest()}.lock"
return f"{sha256((''.join(all_elements)).encode()).hexdigest()}.lock"


class ContainerBaseABC(ABC):
Expand Down

0 comments on commit 0eabd4d

Please sign in to comment.