diff options
author | Brad King <brad.king@kitware.com> | 2017-07-18 15:12:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-07-18 15:12:57 (GMT) |
commit | 407c7415f41fc27578bb0ab2c831e767de575531 (patch) | |
tree | 524a20772e67be615cc71f77f8b12d81cfc28963 /Source/CTest | |
parent | b10d919de763000801cbffd4f58cbd0c4a1ad7a0 (diff) | |
parent | c4de0a25ac8b7bb94205e24b5557331ed80d79b8 (diff) | |
download | CMake-407c7415f41fc27578bb0ab2c831e767de575531.zip CMake-407c7415f41fc27578bb0ab2c831e767de575531.tar.gz CMake-407c7415f41fc27578bb0ab2c831e767de575531.tar.bz2 |
Merge topic 'cmake-E-sha'
c4de0a25 Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command mode
c4647d84 Change ComputeFileMD5 to ComputeFileHash
501a4fee Add some unit tests for md5sum
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1021
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 8d62fa1..689668d 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -13,6 +13,7 @@ #include "cmCTest.h" #include "cmCTestCurl.h" #include "cmCTestScriptHandler.h" +#include "cmCryptoHash.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" #include "cmProcessOutput.h" @@ -428,10 +429,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, if (cmSystemTools::IsOn(this->GetOption("InternalTest"))) { upload_as += "bad_md5sum"; } else { - char md5[33]; - cmSystemTools::ComputeFileMD5(local_file, md5); - md5[32] = 0; - upload_as += md5; + upload_as += + cmSystemTools::ComputeFileHash(local_file, cmCryptoHash::AlgoMD5); } if (!cmSystemTools::FileExists(local_file.c_str())) { @@ -1058,9 +1057,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file, } } - char md5sum[33]; - md5sum[32] = 0; - cmSystemTools::ComputeFileMD5(file, md5sum); + std::string md5sum = + cmSystemTools::ComputeFileHash(file, cmCryptoHash::AlgoMD5); // 1. request the buildid and check to see if the file // has already been uploaded // TODO I added support for subproject. You would need to add |