summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <mclay@redhat.com>2021-04-12 18:57:10 -0700
committerGitHub <noreply@github.com>2021-04-12 20:57:10 -0500
commit3d11b480d0f7bafbeff9ebb9681a64a9653d65e4 (patch)
tree92822ebd848dc0e6664b9af4a878f877cec19afe
parent19ab9ed7b9e4411cc8f0441d3e628fee485d84c1 (diff)
downloadansible-3d11b480d0f7bafbeff9ebb9681a64a9653d65e4.tar.gz
[stable-2.10] Switch to hashlib.sha256() for ansible-test (#72411) (#74169)
When FIPs mode is enable on centos-8, we are not able to load md5 functions. Signed-off-by: Paul Belanger <pabelanger@redhat.com> (cherry picked from commit a95213d2f521bc281f2be102a1b7008bc6762a7c) Co-authored-by: Paul Belanger <pabelanger@redhat.com> Co-authored-by: Paul Belanger <pabelanger@redhat.com>
-rw-r--r--changelogs/fragments/72411-fips-mode-ansible-test.yml2
-rw-r--r--test/lib/ansible_test/_internal/executor.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/72411-fips-mode-ansible-test.yml b/changelogs/fragments/72411-fips-mode-ansible-test.yml
new file mode 100644
index 0000000000..67ce9a7151
--- /dev/null
+++ b/changelogs/fragments/72411-fips-mode-ansible-test.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - Switch to hashlib.sha256() for ansible-test to allow for FIPs mode.
diff --git a/test/lib/ansible_test/_internal/executor.py b/test/lib/ansible_test/_internal/executor.py
index 3c9df084b3..22e3c2922c 100644
--- a/test/lib/ansible_test/_internal/executor.py
+++ b/test/lib/ansible_test/_internal/executor.py
@@ -2246,7 +2246,7 @@ class EnvironmentDescription:
if not os.path.exists(path):
return None
- file_hash = hashlib.md5()
+ file_hash = hashlib.sha256()
file_hash.update(read_binary_file(path))