cpython/Misc
Will Childs-Klein b8eaad3009
gh-117233: Detect support for several hashes at hashlib build time (GH-117234)
Detect libcrypto BLAKE2, Shake, SHA3, and Truncated-SHA512 support at hashlib build time

## BLAKE2

While OpenSSL supports both "b" and "s" variants of the BLAKE2 hash
function, other cryptographic libraries may lack support for one or both
of the variants. This commit modifies `hashlib`'s C code to detect
whether or not the linked libcrypto supports each BLAKE2 variant, and
elides references to each variant's NID accordingly. In cases where the
underlying libcrypto doesn't fully support BLAKE2, CPython's
`./configure` script can be given the following flag to use CPython's
interned BLAKE2 implementation: `--with-builtin-hashlib-hashes=blake2`.

## SHA3, Shake, & truncated SHA512.

Detect BLAKE2, SHA3, Shake, & truncated SHA512 support in the
OpenSSL-ish libcrypto library at build time.  This helps allow hashlib's
`_hashopenssl` to be used with libraries that do not to support every
algorithm that upstream OpenSSL does.  Such as AWS-LC & BoringSSL.

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2024-04-11 16:49:41 +02:00
..
NEWS.d gh-117233: Detect support for several hashes at hashlib build time (GH-117234) 2024-04-11 16:49:41 +02:00
rhel7 gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (#95964) 2022-08-16 13:44:02 +02:00
ACKS gh-117534: Add checking for input parameter in iso_to_ymd (#117543) 2024-04-09 13:53:00 -04:00
HISTORY Fix a misspelling of Interpeter -> Interpreter (GH-111040) 2023-10-18 15:09:45 -07:00
Porting
README gh-102809: Remove gdbinit mention in Misc/README (#103269) 2023-04-08 00:04:23 -07:00
README.AIX
README.coverity
README.valgrind
SpecialBuilds.txt gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
coverity_model.c
externals.spdx.json gh-115119: Switch Windows build to mpdecimal external (GH-115182) 2024-03-18 12:07:25 -05:00
indent.pro
platform_triplet.c gh-71052: Change Android's `sys.platform` from "linux" to "android" 2024-03-11 19:25:39 +00:00
python-config.in bpo-45101: Add consistency in usage message IO between 2 versions of python-config (GH-28162) 2024-02-26 22:04:44 +02:00
python-config.sh.in gh-116745: Remove all internal usage of @LIBPYTHON@ (#116746) 2024-03-22 00:54:50 +01:00
python-embed.pc.in
python.man gh-116167: Allow disabling the GIL with `PYTHON_GIL=0` or `-X gil=0` (#116338) 2024-03-11 11:02:58 -04:00
python.pc.in gh-116745: Remove all internal usage of @LIBPYTHON@ (#116746) 2024-03-22 00:54:50 +01:00
sbom.spdx.json gh-99108: Update and check HACL* version information (GH-117295) 2024-03-27 14:56:14 -07:00
stable_abi.toml gh-116936: Add PyType_GetModuleByDef() to the limited C API (#116937) 2024-03-25 16:32:20 +00:00
svnmap.txt
valgrind-python.supp gh-105182: Remove PyEval_AcquireLock() and PyEval_InitThreads() (#105183) 2023-06-01 13:41:56 +02:00
vgrindefs

README

Python Misc subdirectory
========================

This directory contains files that wouldn't fit in elsewhere.  Some
documents are only of historic importance.

Files found here
----------------

ACKS                    Acknowledgements
HISTORY                 News from previous releases -- oldest last
indent.pro              GNU indent profile approximating my C style
NEWS                    News for this release (for some meaning of "this")
Porting                 Mini-FAQ on porting to new platforms
python-config.in        Python script template for python-config
python.man              UNIX man page for the python interpreter
python.pc.in            Package configuration info template for pkg-config
README                  The file you're reading now
README.AIX              Information about using Python on AIX
README.coverity         Information about running Coverity's Prevent on Python
README.valgrind         Information for Valgrind users, see valgrind-python.supp
SpecialBuilds.txt       Describes extra symbols you can set for debug builds
svnmap.txt              Map of old SVN revs and branches to hg changeset ids,
                        help history-digging
valgrind-python.supp    Valgrind suppression file, see README.valgrind
vgrindefs               Python configuration for vgrind (a generic pretty printer)