]> granicus.if.org Git - python/commit
bpo-38270: More fixes for strict crypto policy (GH-16418)
authorChristian Heimes <christian@python.org>
Fri, 27 Sep 2019 13:03:53 +0000 (15:03 +0200)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 27 Sep 2019 13:03:53 +0000 (06:03 -0700)
commit90558158093c0ad893102158fd3c2dd9f864e82e
tree75085b7aaef52d558894a0ec1bc4a31b6f4ef2a2
parent5faff977adbe089e1f91a5916ccb2160a22dd292
bpo-38270: More fixes for strict crypto policy (GH-16418)

test_hmac and test_hashlib test built-in hashing implementations and
OpenSSL-based hashing implementations. Add more checks to skip OpenSSL
implementations when a strict crypto policy is active.

Use EVP_DigestInit_ex() instead of EVP_DigestInit() to initialize the
EVP context. The EVP_DigestInit() function clears alls flags and breaks
usedforsecurity flag again.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38270
Lib/test/support/__init__.py
Lib/test/test_hashlib.py
Lib/test/test_hmac.py
Modules/_hashopenssl.c