General: Migrate from deprecated mbedTLS functions

As indicated by mbedTLS' documentation, all of the relevant functions
have been superseded by _ret-suffixed variants in mbedTLS version
2.7.0.
This commit is contained in:
Lioncash
2019-06-07 20:57:02 -04:00
parent 3053fea160
commit 5512876842
11 changed files with 28 additions and 27 deletions

View File

@ -158,7 +158,8 @@ std::optional<std::string> GzipInflate(const std::string& data)
Manifest::Hash ComputeHash(const std::string& contents)
{
std::array<u8, 32> full;
mbedtls_sha256(reinterpret_cast<const u8*>(contents.data()), contents.size(), full.data(), false);
mbedtls_sha256_ret(reinterpret_cast<const u8*>(contents.data()), contents.size(), full.data(),
false);
Manifest::Hash out;
std::copy(full.begin(), full.begin() + 16, out.begin());