summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2020-05-15 21:54:53 (GMT)
committerGitHub <noreply@github.com>2020-05-15 21:54:53 (GMT)
commit9b60e55db2897acc30d6b9ef1dbc49674eed40c7 (patch)
tree7b664911353173da34a6eced7e7fb9a5750fa5b8 /configure
parenta2b3cdd661a4b6c6c74adbfcb6ac1865bfd2a011 (diff)
downloadcpython-9b60e55db2897acc30d6b9ef1dbc49674eed40c7.zip
cpython-9b60e55db2897acc30d6b9ef1dbc49674eed40c7.tar.gz
cpython-9b60e55db2897acc30d6b9ef1dbc49674eed40c7.tar.bz2
bpo-40637: Add option to disable builtin hashes (GH-20121)
Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure42
1 files changed, 42 insertions, 0 deletions
diff --git a/configure b/configure
index 26e9aa9..64bcde6 100755
--- a/configure
+++ b/configure
@@ -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