diff options
author | Christian Heimes <christian@python.org> | 2022-03-22 15:40:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 15:40:43 (GMT) |
commit | e03db6d5be7cf2e6b7b55284985c404de98a9420 (patch) | |
tree | 5ced2b580243704bec7882e4013eb08612e74ddc /Lib/test/test_hashlib.py | |
parent | 492d4109f4d953c478cb48f17aa32adbb912623b (diff) | |
download | cpython-e03db6d5be7cf2e6b7b55284985c404de98a9420.zip cpython-e03db6d5be7cf2e6b7b55284985c404de98a9420.tar.gz cpython-e03db6d5be7cf2e6b7b55284985c404de98a9420.tar.bz2 |
bpo-45150: Fix testing under FIPS mode (GH-32046)
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r-- | Lib/test/test_hashlib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index daf6e38..369bbde 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -379,6 +379,11 @@ class HashLibTestCase(unittest.TestCase): def check_file_digest(self, name, data, hexdigest): hexdigest = hexdigest.lower() + try: + hashlib.new(name) + except ValueError: + # skip, algorithm is blocked by security policy. + return digests = [name] digests.extend(self.constructors_to_test[name]) |