From 6a1a8ce14be8b4625eaf4f2b4d18ddfbdbbb4289 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Wed, 16 Mar 2022 13:51:02 -0700 Subject: [PATCH] Stop partial()ing hashlib.new Seems to be causing issues on (some?) FIPS nodes. Change-Id: I4fcacc76ab52b45510aee82156a7cbf6ad72467d (cherry picked from commit 471a559a4ded3591429aebf0c98b46806923d238) --- swift/common/middleware/tempurl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swift/common/middleware/tempurl.py b/swift/common/middleware/tempurl.py index 1fcd5bcdd0..4c404fd414 100644 --- a/swift/common/middleware/tempurl.py +++ b/swift/common/middleware/tempurl.py @@ -299,7 +299,6 @@ __all__ = ['TempURL', 'filter_factory', import binascii from calendar import timegm -import functools import hashlib import six from os.path import basename @@ -750,7 +749,7 @@ class TempURL(object): if not request_method: request_method = env['REQUEST_METHOD'] - digest = functools.partial(hashlib.new, hash_algorithm) + digest = getattr(hashlib, hash_algorithm) return [ (get_hmac(