diff options
| author | 2019-11-12 08:37:58 -0500 | |
|---|---|---|
| committer | 2019-11-12 08:45:56 -0500 | |
| commit | e0c46e6879be4720a89429a3151b84103456e4b6 (patch) | |
| tree | d287cceff5445e19b5c68ed4141b0bef5d61ef83 /src/core/hle | |
| parent | Merge pull request #3085 from bunnei/web-token-b64 (diff) | |
| download | yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar.gz yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar.xz yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.zip | |
core: Migrate off deprecated mbedtls functions
These functions are marked for deprecation and it's recommended that the
*_ret variants be used instead.
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/bcat/backend/boxcat.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/bcat/module.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index 918159e11..1411a646f 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp | |||
| @@ -255,7 +255,7 @@ private: | |||
| 255 | using Digest = std::array<u8, 0x20>; | 255 | using Digest = std::array<u8, 0x20>; |
| 256 | static Digest DigestFile(std::vector<u8> bytes) { | 256 | static Digest DigestFile(std::vector<u8> bytes) { |
| 257 | Digest out{}; | 257 | Digest out{}; |
| 258 | mbedtls_sha256(bytes.data(), bytes.size(), out.data(), 0); | 258 | mbedtls_sha256_ret(bytes.data(), bytes.size(), out.data(), 0); |
| 259 | return out; | 259 | return out; |
| 260 | } | 260 | } |
| 261 | 261 | ||
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp index 6d9d1527d..8a7304f86 100644 --- a/src/core/hle/service/bcat/module.cpp +++ b/src/core/hle/service/bcat/module.cpp | |||
| @@ -46,7 +46,7 @@ u64 GetCurrentBuildID(const Core::System::CurrentBuildProcessID& id) { | |||
| 46 | BCATDigest DigestFile(const FileSys::VirtualFile& file) { | 46 | BCATDigest DigestFile(const FileSys::VirtualFile& file) { |
| 47 | BCATDigest out{}; | 47 | BCATDigest out{}; |
| 48 | const auto bytes = file->ReadAllBytes(); | 48 | const auto bytes = file->ReadAllBytes(); |
| 49 | mbedtls_md5(bytes.data(), bytes.size(), out.data()); | 49 | mbedtls_md5_ret(bytes.data(), bytes.size(), out.data()); |
| 50 | return out; | 50 | return out; |
| 51 | } | 51 | } |
| 52 | 52 | ||
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index 499376bfc..88f903bfd 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp | |||
| @@ -294,7 +294,7 @@ public: | |||
| 294 | Memory::ReadBlock(nro_address, nro_data.data(), nro_size); | 294 | Memory::ReadBlock(nro_address, nro_data.data(), nro_size); |
| 295 | 295 | ||
| 296 | SHA256Hash hash{}; | 296 | SHA256Hash hash{}; |
| 297 | mbedtls_sha256(nro_data.data(), nro_data.size(), hash.data(), 0); | 297 | mbedtls_sha256_ret(nro_data.data(), nro_data.size(), hash.data(), 0); |
| 298 | 298 | ||
| 299 | // NRO Hash is already loaded | 299 | // NRO Hash is already loaded |
| 300 | if (std::any_of(nro.begin(), nro.end(), [&hash](const std::pair<VAddr, NROInfo>& info) { | 300 | if (std::any_of(nro.begin(), nro.end(), [&hash](const std::pair<VAddr, NROInfo>& info) { |