Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-9216: hashlib usedforsecurity fixes #20258

Merged
merged 1 commit into from
May 22, 2020

Conversation

tiran
Copy link
Member

@tiran tiran commented May 20, 2020

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 [email protected]

https://bugs.python.org/issue9216

Automerge-Triggered-By: @tiran

@tiran tiran added the needs backport to 3.9 only security fixes label May 20, 2020
@tiran tiran requested review from gpshead and vstinner May 20, 2020 10:58
@tiran tiran requested a review from a team as a code owner May 20, 2020 10:58
@tiran tiran force-pushed the bpo9216-fix branch 2 times, most recently from 71887fe to 0838bd5 Compare May 22, 2020 10:23
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 <[email protected]>
@@ -0,0 +1,3 @@
func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A user reading this shouldn't need to be aware of the internal implementation details behind the Python hashlib "usedforsecurity" construct. I'd just simplify this news entry:

func:`hashlib.new` now passes the ``usedforsecurity`` flag to the internal OpenSSL hash constructors.

and probably omit the final "test_hashlib and test_smtplib handle strict security policy better." part entirely as we don't need a NEWS entry to mention updates to our internal test suite. (though it is harmless to do so)

@miss-islington
Copy link
Contributor

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-20320 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label May 22, 2020
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 22, 2020
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 <[email protected]>

Automerge-Triggered-By: @tiran
(cherry picked from commit 909b571)

Co-authored-by: Christian Heimes <[email protected]>
miss-islington added a commit that referenced this pull request May 22, 2020
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 <[email protected]>

Automerge-Triggered-By: @tiran
(cherry picked from commit 909b571)

Co-authored-by: Christian Heimes <[email protected]>
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
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 <[email protected]>

Automerge-Triggered-By: @tiran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants