-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-40791: Use CRYPTO_memcmp() for compare_digest #20456
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
Conversation
:func:`hashlib.compare_digest` uses OpenSSL's ``CRYPTO_memcmp()`` function when OpenSSL is available. Note: The ``_operator`` module is a builtin module. I don't want to add libcrypto dependency to libpython. Therefore I duplicated the wrapper function and added a copy to ``_hashopenssl.c``. Signed-off-by: Christian Heimes <christian@python.org>
@gpshead 3.10-only or do you want to handle this as a security fix with backport to 3.7 to 3.9? |
Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
@tiran: Please replace |
Sorry, @tiran, I could not cleanly backport this to |
hashlib.compare_digest uses OpenSSL's CRYPTO_memcmp() function when OpenSSL is available. Note: The _operator module is a builtin module. I don't want to add libcrypto dependency to libpython. Therefore I duplicated the wrapper function and added a copy to _hashopenssl.c.. (cherry picked from commit db5aed9) Co-authored-by: Christian Heimes <christian@python.org>
GH-20461 is a backport of this pull request to the 3.9 branch. |
…H-20461) hashlib.compare_digest uses OpenSSL's CRYPTO_memcmp() function when OpenSSL is available. Note: The _operator module is a builtin module. I don't want to add libcrypto dependency to libpython. Therefore I duplicated the wrapper function and added a copy to _hashopenssl.c.. (cherry picked from commit db5aed9) Co-authored-by: Christian Heimes <christian@python.org>
:func:
hashlib.compare_digest
uses OpenSSL'sCRYPTO_memcmp()
functionwhen OpenSSL is available.
Note: The
_operator
module is a builtin module. I don't want to addlibcrypto dependency to libpython. Therefore I duplicated the wrapper
function and added a copy to
_hashopenssl.c
.Signed-off-by: Christian Heimes christian@python.org
https://bugs.python.org/issue40791