diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f639e94eb..6bd2144186 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,6 +314,8 @@ mark_as_advanced(CURL_DISABLE_PROGRESS_METER) option(CURL_DISABLE_PROXY "Disable proxy support" OFF) mark_as_advanced(CURL_DISABLE_PROXY) option(CURL_DISABLE_RTSP "Disable RTSP" OFF) +mark_as_advanced(CURL_DISABLE_SHA512_256) +option(CURL_DISABLE_SHA512_256 "Disable SHA-512/256 hash algorithm" OFF) mark_as_advanced(CURL_DISABLE_RTSP) option(CURL_DISABLE_SHUFFLE_DNS "Disable shuffle DNS feature" OFF) mark_as_advanced(CURL_DISABLE_SHUFFLE_DNS) diff --git a/configure.ac b/configure.ac index 4e71d5821a..6db5e6b5af 100644 --- a/configure.ac +++ b/configure.ac @@ -4646,6 +4646,25 @@ AS_HELP_STRING([--disable-progress-meter],[Disable progress-meter]), AC_MSG_RESULT(yes) ) +dnl ************************************************************ +dnl disable SHA-512/256 hash algorithm +dnl +AC_MSG_CHECKING([whether to support the SHA-512/256 hash algorithm]) +AC_ARG_ENABLE(sha512-256, +AS_HELP_STRING([--enable-sha512-256],[Enable SHA-512/256 hash algorithm (default)]) +AS_HELP_STRING([--disable-sha512-256],[Disable SHA-512/256 hash algorithm]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_SHA512_256, 1, [disable SHA-512/256 hash algorithm]) + ;; + *) + AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + dnl ************************************************************ dnl disable shuffle DNS support dnl diff --git a/docs/CURL-DISABLE.md b/docs/CURL-DISABLE.md index 3409bec018..6080851dd5 100644 --- a/docs/CURL-DISABLE.md +++ b/docs/CURL-DISABLE.md @@ -144,6 +144,10 @@ Disable support for proxies Disable the RTSP protocol. +## `CURL_DISABLE_SHA512_256` + +Disable the SHA-512/256 hash algorithm. + ## `CURL_DISABLE_SHUFFLE_DNS` Disable the shuffle DNS feature diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index cba9984552..0a895aaa6e 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -134,6 +134,9 @@ /* disables RTSP */ #cmakedefine CURL_DISABLE_RTSP 1 +/* disables SHA-512/256 hash algorithm */ +#cmakedefine CURL_DISABLE_SHA512_256 1 + /* disabled shuffle DNS feature */ #cmakedefine CURL_DISABLE_SHUFFLE_DNS 1 diff --git a/tests/test1165.pl b/tests/test1165.pl index d26a97f733..621a93537e 100755 --- a/tests/test1165.pl +++ b/tests/test1165.pl @@ -93,9 +93,7 @@ sub scan_file { while() { while(s/(CURL_DISABLE_[A-Z0-9_]+)//) { my ($sym)=($1); - if(not $sym =~ /^(CURL_DISABLE_SHA512_256)/) { # Skip this symbol, to be implemented - $file{$sym} = $source; - } + $file{$sym} = $source; } } close F;