◐ Shell
clean mode source ↗

[3.8] bpo-38270: More fixes for strict crypto policy (GH-16418) by tiran · Pull Request #16437 · python/cpython

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.
(cherry picked from commit 9055815)

Co-authored-by: Christian Heimes <christian@python.org>

stratakis pushed a commit to stratakis/cpython that referenced this pull request

Dec 2, 2019
…python#16437)

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.
(cherry picked from commit 9055815)

Co-authored-by: Christian Heimes <christian@python.org>

stratakis pushed a commit to stratakis/cpython that referenced this pull request

May 5, 2020
…python#16437)

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.
(cherry picked from commit 9055815)

Co-authored-by: Christian Heimes <christian@python.org>

@tiran tiran mentioned this pull request

Sep 9, 2022