diff options
author | Christian Heimes <christian@python.org> | 2020-05-28 12:09:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 12:09:38 (GMT) |
commit | 8183e11d87388e4e44e3242c42085b87a878f781 (patch) | |
tree | 0b0302ad36f4a4b67a64eb68dc5b280ce84f90f7 /Doc | |
parent | d23ee5d652ba69a32504dac43131be782b6afdc7 (diff) | |
download | cpython-8183e11d87388e4e44e3242c42085b87a878f781.zip cpython-8183e11d87388e4e44e3242c42085b87a878f781.tar.gz cpython-8183e11d87388e4e44e3242c42085b87a878f781.tar.bz2 |
[3.9] bpo-40791: Use CRYPTO_memcmp() for compare_digest (GH-20456) (GH-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 db5aed931f8a617f7b63e773f62db468fe9c5ca1)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/hmac.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst index 5ad3484..897edc2 100644 --- a/Doc/library/hmac.rst +++ b/Doc/library/hmac.rst @@ -138,6 +138,11 @@ This module also provides the following helper function: .. versionadded:: 3.3 + .. versionchanged:: 3.9 + + The function uses OpenSSL's ``CRYPTO_memcmp()`` internally when + available. + .. seealso:: |