From 20c41508f7768af50102b524db0e12ffde6a2c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Tue, 27 Oct 2020 14:16:14 +0100 Subject: [PATCH] Make test suite work in FIPS (140-2) Mode --- numpy-1.19.2-FIPS.patch | 135 ++++++++++++++++++++++++++++++++++++++++ numpy.spec | 7 ++- 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 numpy-1.19.2-FIPS.patch diff --git a/numpy-1.19.2-FIPS.patch b/numpy-1.19.2-FIPS.patch new file mode 100644 index 0000000..3768799 --- /dev/null +++ b/numpy-1.19.2-FIPS.patch @@ -0,0 +1,135 @@ +From f73d993bcb03701f4e9146005a65eb482689140a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Mon, 26 Oct 2020 18:54:22 +0100 +Subject: [PATCH] TST: Make test suite work in FIPS (140-2) Mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Tests using MD5 algorithms fail in FIPS Mode because MD5 is not FIPS +compliant. + +Mark usages of MD5 in test suite as not being used for security +purposes to overcome that. + +Signed-off-by: Nikola Forró +--- + numpy/core/tests/test_regression.py | 2 +- + numpy/random/tests/test_generator_mt19937.py | 10 +++++----- + numpy/random/tests/test_random.py | 4 ++-- + numpy/random/tests/test_randomstate.py | 6 +++--- + 4 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py +index 2e731d4fa..4633174d9 100644 +--- a/numpy/core/tests/test_regression.py ++++ b/numpy/core/tests/test_regression.py +@@ -1509,7 +1509,7 @@ class TestRegression: + from hashlib import md5 + + x = np.array([1, 2, 3], dtype=np.dtype(' - 1:1.19.2-2 +- Make test suite work in FIPS (140-2) Mode + * Thu Sep 10 2020 Gwyn Ciesla - 1:1.19.2-1 - 1.19.2