diff --git a/CMakeLists.txt b/CMakeLists.txt index fc988ac252..e513051a75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -386,7 +386,7 @@ if (YUZU_USE_BUNDLED_OPENSSL) endif() endif() -find_package(OpenSSL 1.1.1 REQUIRED) +find_package(OpenSSL 3 REQUIRED) if (YUZU_USE_CPM) message(STATUS "Fetching needed dependencies with CPM") diff --git a/cpmfile.json b/cpmfile.json index 80086797af..774f160360 100644 --- a/cpmfile.json +++ b/cpmfile.json @@ -5,7 +5,7 @@ "name": "openssl", "repo": "crueter-ci/OpenSSL", "version": "3.6.0-1cb0d36b39", - "min_version": "1.1.1" + "min_version": "3" }, "boost": { "package": "Boost", diff --git a/src/core/hle/service/ro/ro.cpp b/src/core/hle/service/ro/ro.cpp index 8547bfe6d2..bfa2412e40 100644 --- a/src/core/hle/service/ro/ro.cpp +++ b/src/core/hle/service/ro/ro.cpp @@ -4,6 +4,8 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include +#include #include #include "common/scope_exit.h" @@ -180,10 +182,16 @@ struct ProcessContext { std::vector nro_data(size); m_process->GetMemory().ReadBlock(base_address, nro_data.data(), size); - SHA256_CTX sha256; - SHA256_Init(&sha256); - SHA256_Update(&sha256, nro_data.data(), nro_data.size()); - SHA256_Final(hash.data(), &sha256); + + EVP_MD_CTX *ctx = EVP_MD_CTX_new(); + ASSERT(ctx); + + EVP_DigestInit(ctx, EVP_sha256()); + EVP_DigestUpdate(ctx, nro_data.data(), nro_data.size()); + u32 length = 0; + EVP_DigestFinal_ex(ctx, hash.data(), &length); + + EVP_MD_CTX_free(ctx); } for (size_t i = 0; i < MaxNrrInfos; i++) {