Skip to content

Commit

Permalink
Adding usedforsecurity=False for Python3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dpb-bah committed Mar 8, 2024
1 parent 84977c3 commit 69d1539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions botocore/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def total_seconds(delta):
# Checks to see if md5 is available on this system. A given system might not
# have access to it for various reasons, such as FIPS mode being enabled.
try:
hashlib.md5()
hashlib.md5(usedforsecurity=False)
MD5_AVAILABLE = True
except ValueError:
MD5_AVAILABLE = False
Expand All @@ -164,7 +164,7 @@ def get_md5(*args, **kwargs):
is returned if raise_error_if_unavailable is set to False.
"""
if MD5_AVAILABLE:
return hashlib.md5(*args, **kwargs)
return hashlib.md5(*args, **kwargs, usedforsecurity=False)
else:
raise MD5UnavailableError()

Expand Down

0 comments on commit 69d1539

Please sign in to comment.