Fix tdutils CE without OpenSSL.

GitOrigin-RevId: 39cb31088a5405cac43d171313cbe870725abdac
This commit is contained in:
levlam 2018-12-24 06:44:39 +03:00
parent e0b5189f70
commit 1deccf5071

View File

@ -46,7 +46,11 @@ class RegressionTesterImpl : public RegressionTester {
}
Status verify_test(Slice name, Slice result) override {
#if TD_HAVE_OPENSSL
auto hash = PSTRING() << format::as_hex_dump<0>(Slice(sha256(result)));
#else
auto hash = to_string(crc64(result));
#endif
TestInfo &old_test_info = tests_[name.str()];
if (!old_test_info.result_hash.empty() && old_test_info.result_hash != hash) {
auto wa_path = db_cache_dir_ + "WA";