aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/hashlib.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2020-05-22 20:04:33 +0200
committerGitHub <noreply@github.com>2020-05-22 11:04:33 -0700
commit909b5714e1303357868bc5e281c1cf508d5d5a17 (patch)
tree107c672bb4d36471411b2c05333589bfa5dc8ade /Lib/hashlib.py
parent06a1b8915d6674e40f0dccc422ca2c06212392d8 (diff)
downloadcpython-909b5714e1303357868bc5e281c1cf508d5d5a17.tar.gz
cpython-909b5714e1303357868bc5e281c1cf508d5d5a17.zip
bpo-9216: hashlib usedforsecurity fixes (GH-20258)
func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor ``_hashlib.new()``. test_hashlib and test_smtplib handle strict security policy better. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
Diffstat (limited to 'Lib/hashlib.py')
-rw-r--r--Lib/hashlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/hashlib.py b/Lib/hashlib.py
index 0f81de094ca..8d119a4225d 100644
--- a/Lib/hashlib.py
+++ b/Lib/hashlib.py
@@ -154,7 +154,7 @@ def __hash_new(name, data=b'', **kwargs):
# salt, personal, tree hashing or SSE.
return __get_builtin_constructor(name)(data, **kwargs)
try:
- return _hashlib.new(name, data)
+ return _hashlib.new(name, data, **kwargs)
except ValueError:
# If the _hashlib module (OpenSSL) doesn't support the named
# hash, try using our builtin implementations.