mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-40637: Add option to disable builtin hashes (GH-20121)
Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
This commit is contained in:
parent
a2b3cdd661
commit
9b60e55db2
6 changed files with 155 additions and 27 deletions
42
configure
vendored
42
configure
vendored
|
@ -845,6 +845,7 @@ with_computed_gotos
|
|||
with_ensurepip
|
||||
with_openssl
|
||||
with_ssl_default_suites
|
||||
with_builtin_hashlib_hashes
|
||||
with_experimental_isolated_subinterpreters
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
|
@ -1576,6 +1577,9 @@ Optional Packages:
|
|||
leave OpenSSL's defaults untouched, STRING: use a
|
||||
custom string, PROTOCOL_SSLv2 ignores the setting,
|
||||
see Doc/library/ssl.rst
|
||||
--with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
|
||||
builtin hash modules, md5, sha1, sha256, sha512,
|
||||
sha3 (with shake), blake2
|
||||
--with-experimental-isolated-subinterpreters
|
||||
better isolate subinterpreters, experimental build
|
||||
mode (default is no)
|
||||
|
@ -17493,6 +17497,44 @@ $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
|
|||
fi
|
||||
|
||||
|
||||
# builtin hash modules
|
||||
default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
|
||||
|
||||
$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
|
||||
$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
|
||||
|
||||
# Check whether --with-builtin-hashlib-hashes was given.
|
||||
if test "${with_builtin_hashlib_hashes+set}" = set; then :
|
||||
withval=$with_builtin_hashlib_hashes;
|
||||
case "$withval" in
|
||||
yes)
|
||||
withval=$default_hashlib_hashes
|
||||
;;
|
||||
no)
|
||||
withval=""
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
|
||||
$as_echo "$withval" >&6; }
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PY_BUILTIN_HASHLIB_HASHES "$withval"
|
||||
_ACEOF
|
||||
|
||||
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
|
||||
$as_echo "$default_hashlib_hashes" >&6; };
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# --with-experimental-isolated-subinterpreters
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue