From 1deccf5071224fc0193ff00d79de5fdbe2d171da Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 24 Dec 2018 06:44:39 +0300 Subject: [PATCH] Fix tdutils CE without OpenSSL. GitOrigin-RevId: 39cb31088a5405cac43d171313cbe870725abdac --- tdutils/td/utils/tests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tdutils/td/utils/tests.cpp b/tdutils/td/utils/tests.cpp index 9fe0410bd..2418567de 100644 --- a/tdutils/td/utils/tests.cpp +++ b/tdutils/td/utils/tests.cpp @@ -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";