Hashlib to generate SHA256 instead of MD5 for FIPS

Changed hashlib to generate a SHA256 instead of MD5 in order for
podman-compose to function on systems with FIPS mode enabled.
This commit is contained in:
Chris Hozian 2020-06-15 12:50:52 -05:00 committed by Muayyad Alsadi
parent 105b129b08
commit 294f8ee37b

View File

@ -126,7 +126,7 @@ def fix_mount_dict(mount_dict, proj_name, srv_name):
# missing source
mount_dict["source"] = "_".join([
proj_name, srv_name,
hashlib.md5(mount_dict["target"].encode("utf-8")).hexdigest(),
hashlib.sha256(mount_dict["target"].encode("utf-8")).hexdigest(),
])
else:
# prefix with proj_name