summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-15 14:26:16 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-11-15 14:26:16 (GMT)
commitb6f1b1741d3a998deb374609133482daf8c26993 (patch)
tree60b9e5181926829881334461bbe7ded5bc489e1f /Modules
parent2b7cc7644063778b26e60ab4f07bbfe06b539157 (diff)
parentf636d1e74a5a9d39d2f25b72b26c3d24813a5565 (diff)
downloadCMake-b6f1b1741d3a998deb374609133482daf8c26993.zip
CMake-b6f1b1741d3a998deb374609133482daf8c26993.tar.gz
CMake-b6f1b1741d3a998deb374609133482daf8c26993.tar.bz2
Merge topic 'add-SHA-3'
f636d1e7 Help: Add notes for topic 'add-SHA-3' cb5dba8e Tests: Add SHA-3 algorithm coverage to CPack checksum test a9fa6099 ExternalProject: Add support for SHA-3 algorithms b4ffd26f ExternalData: Add support for SHA-3 algorithms 60939702 file: Add support for SHA-3 algorithms 92f95aed string: Add support for SHA-3 algorithms c326209f cmCryptoHash: Add support for SHA-3 algorithms 979e8ba6 Help: De-duplicate and spell out supported hash algorithms 7a79f7e3 librhash: Activate SHA-3 implementation 87584b5e Merge branch 'upstream-librhash' into add-SHA-3 7fcbd47e librhash 2016-11-06 (de79828d) c50c32a3 librhash: Update import script to add SHA-3 implementation
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPack.cmake4
-rw-r--r--Modules/ExternalData.cmake9
-rw-r--r--Modules/ExternalProject.cmake2
3 files changed, 11 insertions, 4 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index cee1914..4e7546b 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -126,7 +126,9 @@
#
# ${CPACK_PACKAGE_FILE_NAME}.${CPACK_PACKAGE_CHECKSUM}
#
-# Current supported alogorithms: MD5|SHA1|SHA224|SHA256|SHA384|SHA512.
+# Supported algorithms are those listed by the
+# :ref:`string(\<HASH\>) <Supported Hash Algorithms>`
+# command.
#
# .. variable:: CPACK_PROJECT_CONFIG_FILE
#
diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake
index 07cd114..873f88d 100644
--- a/Modules/ExternalData.cmake
+++ b/Modules/ExternalData.cmake
@@ -279,6 +279,10 @@ The following hash algorithms are supported::
SHA256 .sha256 US Secure Hash Algorithms, RFC 4634
SHA384 .sha384 US Secure Hash Algorithms, RFC 4634
SHA512 .sha512 US Secure Hash Algorithms, RFC 4634
+ SHA3_224 .sha3-224 Keccak SHA-3
+ SHA3_256 .sha3-256 Keccak SHA-3
+ SHA3_384 .sha3-384 Keccak SHA-3
+ SHA3_512 .sha3-512 Keccak SHA-3
Note that the hashes are used only for unique data identification and
download verification.
@@ -508,8 +512,8 @@ endfunction()
#-----------------------------------------------------------------------------
# Private helper interface
-set(_ExternalData_REGEX_ALGO "MD5|SHA1|SHA224|SHA256|SHA384|SHA512")
-set(_ExternalData_REGEX_EXT "md5|sha1|sha224|sha256|sha384|sha512")
+set(_ExternalData_REGEX_ALGO "MD5|SHA1|SHA224|SHA256|SHA384|SHA512|SHA3_224|SHA3_256|SHA3_384|SHA3_512")
+set(_ExternalData_REGEX_EXT "md5|sha1|sha224|sha256|sha384|sha512|sha3-224|sha3-256|sha3-384|sha3-512")
set(_ExternalData_SELF "${CMAKE_CURRENT_LIST_FILE}")
get_filename_component(_ExternalData_SELF_DIR "${_ExternalData_SELF}" PATH)
@@ -1082,6 +1086,7 @@ if("${ExternalData_ACTION}" STREQUAL "fetch")
if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$")
string(TOUPPER "${CMAKE_MATCH_1}" algo)
+ string(REPLACE "-" "_" algo "${algo}")
else()
message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"")
endif()
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index b15b3f7..c20806d 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -427,7 +427,7 @@ if(_ep_func)
endif()
# Save regex matching supported hash algorithm names.
-set(_ep_hash_algos "MD5|SHA1|SHA224|SHA256|SHA384|SHA512")
+set(_ep_hash_algos "MD5|SHA1|SHA224|SHA256|SHA384|SHA512|SHA3_224|SHA3_256|SHA3_384|SHA3_512")
set(_ep_hash_regex "^(${_ep_hash_algos})=([0-9A-Fa-f]+)$")
set(_ExternalProject_SELF "${CMAKE_CURRENT_LIST_FILE}")