mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-30102: Call OPENSSL_add_all_algorithms_noconf (#3112)
The ssl and hashlib modules now call OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function detects CPU features and enables optimizations on some CPU architectures such as POWER8. Patch is based on research from Gustavo Serra Scalet. Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
52451fbaaf
commit
c941e6238a
3 changed files with 13 additions and 2 deletions
|
@ -1022,8 +1022,11 @@ PyInit__hashlib(void)
|
|||
{
|
||||
PyObject *m, *openssl_md_meth_names;
|
||||
|
||||
OpenSSL_add_all_digests();
|
||||
#ifndef OPENSSL_VERSION_1_1
|
||||
/* Load all digest algorithms and initialize cpuid */
|
||||
OPENSSL_add_all_algorithms_noconf();
|
||||
ERR_load_crypto_strings();
|
||||
#endif
|
||||
|
||||
/* TODO build EVP_functions openssl_* entries dynamically based
|
||||
* on what hashes are supported rather than listing many
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue