From 2ca2d058c6c61f8d09f463a6d7fcca7c42e69721 Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Mon, 28 Feb 2022 11:23:55 +0100 Subject: [PATCH] Use usedforsecurity=False for md5() calls to make suds work on FIPS enabled systems --- suds/reader.py | 2 +- suds/wsse.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/suds/reader.py b/suds/reader.py index 31c5ee74..7136a449 100644 --- a/suds/reader.py +++ b/suds/reader.py @@ -58,7 +58,7 @@ def mangle(self, name, x): @rtype: str """ - h = md5(name.encode()).hexdigest() + h = md5(name.encode(), usedforsecurity=False).hexdigest() return '%s-%s' % (h, x) diff --git a/suds/wsse.py b/suds/wsse.py index 96d9eb64..2787f33b 100644 --- a/suds/wsse.py +++ b/suds/wsse.py @@ -158,7 +158,7 @@ def setnonce(self, text=None): s.append(self.username) s.append(self.password) s.append(Token.sysdate()) - m = md5() + m = md5(usedforsecurity=False) m.update(':'.join(s).encode('utf-8')) self.nonce = m.hexdigest() else: