From 55128768422710ee78c94b45262d6825479fb484 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 7 Jun 2019 20:57:02 -0400 Subject: 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. --- Source/Core/DiscIO/VolumeVerifier.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp') 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 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(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(20); - mbedtls_sha1_finish(&m_sha1_context, m_result.hashes.sha1.data()); + mbedtls_sha1_finish_ret(&m_sha1_context, m_result.hashes.sha1.data()); } } -- cgit v1.2.3