summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-07 20:57:02 -0400
committerLioncash <mathew1800@gmail.com>2019-06-07 22:51:58 -0400
commit55128768422710ee78c94b45262d6825479fb484 (patch)
treef34ab30a78bab89a104e3cd2f285d8332aa80810 /Source/Core/DiscIO/VolumeVerifier.cpp
parent3053fea160a3675a7b332edfed6bba80c6961bb6 (diff)
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.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index 9389ae0fbf..c86d9c498f 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -652,13 +652,13 @@ void VolumeVerifier::SetUpHashing()
if (m_hashes_to_calculate.md5)
{
mbedtls_md5_init(&m_md5_context);
- mbedtls_md5_starts(&m_md5_context);
+ mbedtls_md5_starts_ret(&m_md5_context);
}
if (m_hashes_to_calculate.sha1)
{
mbedtls_sha1_init(&m_sha1_context);
- mbedtls_sha1_starts(&m_sha1_context);
+ mbedtls_sha1_starts_ret(&m_sha1_context);
}
}
@@ -712,10 +712,10 @@ void VolumeVerifier::Process()
}
if (m_hashes_to_calculate.md5)
- mbedtls_md5_update(&m_md5_context, data.data(), bytes_to_read);
+ mbedtls_md5_update_ret(&m_md5_context, data.data(), bytes_to_read);
if (m_hashes_to_calculate.sha1)
- mbedtls_sha1_update(&m_sha1_context, data.data(), bytes_to_read);
+ mbedtls_sha1_update_ret(&m_sha1_context, data.data(), bytes_to_read);
}
}
@@ -773,7 +773,7 @@ bool VolumeVerifier::CheckContentIntegrity(const IOS::ES::Content& content)
encrypted_data.data(), decrypted_data.data());
std::array<u8, 20> sha1;
- mbedtls_sha1(decrypted_data.data(), content.size, sha1.data());
+ mbedtls_sha1_ret(decrypted_data.data(), content.size, sha1.data());
return sha1 == content.sha1;
}
@@ -806,13 +806,13 @@ void VolumeVerifier::Finish()
if (m_hashes_to_calculate.md5)
{
m_result.hashes.md5 = std::vector<u8>(16);
- mbedtls_md5_finish(&m_md5_context, m_result.hashes.md5.data());
+ mbedtls_md5_finish_ret(&m_md5_context, m_result.hashes.md5.data());
}
if (m_hashes_to_calculate.sha1)
{
m_result.hashes.sha1 = std::vector<u8>(20);
- mbedtls_sha1_finish(&m_sha1_context, m_result.hashes.sha1.data());
+ mbedtls_sha1_finish_ret(&m_sha1_context, m_result.hashes.sha1.data());
}
}