Skip to content

Commit

Permalink
Use usedforsecurity=False for md5() calls to make suds work on FIPS e…
Browse files Browse the repository at this point in the history
…nabled systems
  • Loading branch information
oalbrigt committed Feb 28, 2022
1 parent 17b3b66 commit 2ca2d05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion suds/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion suds/wsse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2ca2d05

Please sign in to comment.