From a95213d2f521bc281f2be102a1b7008bc6762a7c Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Tue, 1 Dec 2020 13:14:20 -0500 Subject: [PATCH] Switch to hashlib.sha256() for ansible-test (#72411) When FIPs mode is enable on centos-8, we are not able to load md5 functions. Signed-off-by: Paul Belanger --- changelogs/fragments/72411-fips-mode-ansible-test.yml | 2 ++ test/lib/ansible_test/_internal/executor.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/72411-fips-mode-ansible-test.yml 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 00000000000..67ce9a71515 --- /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 026d0040f4d..d452b1ac52b 100644 --- a/test/lib/ansible_test/_internal/executor.py +++ b/test/lib/ansible_test/_internal/executor.py @@ -2118,7 +2118,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))