diff --git a/3rdparty/curl/CMakeLists.txt b/3rdparty/curl/CMakeLists.txt index 2b725169f9..0079315267 100644 --- a/3rdparty/curl/CMakeLists.txt +++ b/3rdparty/curl/CMakeLists.txt @@ -7,24 +7,24 @@ if(USE_SYSTEM_CURL) target_link_libraries(3rdparty_libcurl INTERFACE CURL::libcurl) else() message(STATUS "RPCS3: building libcurl + wolfssl submodules") - set(BUILD_CURL_EXE OFF CACHE BOOL "Set to ON to build curl executable.") - set(BUILD_STATIC_CURL OFF CACHE BOOL "Set to ON to build curl executable with static libcurl.") - set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libcurl.") - set(BUILD_SHARED_LIBS OFF CACHE BOOL "Set to ON to build shared libcurl.") + set(BUILD_CURL_EXE OFF CACHE INTERNAL "") + set(BUILD_STATIC_CURL OFF CACHE INTERNAL "") + set(BUILD_STATIC_LIBS ON CACHE INTERNAL "") + set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "") find_package(WolfSSL REQUIRED) - set(CURL_USE_WOLFSSL ON CACHE BOOL "enable wolfSSL for SSL/TLS") - set(CURL_USE_OPENSSL OFF CACHE BOOL "Use OpenSSL code. Experimental") - set(HTTP_ONLY ON CACHE BOOL "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)") - set(USE_LIBIDN2 OFF CACHE BOOL "Use libidn2 for IDN support") # Disabled because MacOS CI doesn't work otherwise - set(CURL_CA_PATH "none" CACHE STRING "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") - option(CURL_DISABLE_INSTALL "Disable installation targets" ON) + set(CURL_USE_WOLFSSL ON CACHE INTERNAL "") + set(CURL_USE_OPENSSL OFF CACHE INTERNAL "") + set(HTTP_ONLY ON CACHE INTERNAL "") + set(USE_LIBIDN2 OFF CACHE INTERNAL "") # Disabled because MacOS CI doesn't work otherwise + set(CURL_CA_PATH "none" CACHE INTERNAL "") + set(CURL_DISABLE_INSTALL ON CACHE INTERNAL "") if(WIN32) - set(ENABLE_UNICODE ON CACHE BOOL "enable Unicode") + set(ENABLE_UNICODE ON CACHE INTERNAL "") endif() - set(CURL_USE_LIBSSH2 OFF CACHE BOOL "Use libSSH2") - set(CURL_USE_LIBPSL OFF CACHE BOOL "Use libPSL") - option(BUILD_TESTING "Build tests" OFF) - option(BUILD_EXAMPLES "Build libcurl examples" OFF) + set(CURL_USE_LIBSSH2 OFF CACHE INTERNAL "") + set(CURL_USE_LIBPSL OFF CACHE INTERNAL "") + set(BUILD_TESTING OFF CACHE INTERNAL "") + set(BUILD_EXAMPLES OFF CACHE INTERNAL "") add_subdirectory(curl EXCLUDE_FROM_ALL) diff --git a/3rdparty/wolfssl/CMakeLists.txt b/3rdparty/wolfssl/CMakeLists.txt index cf1a66a1f5..2c19c37d2f 100644 --- a/3rdparty/wolfssl/CMakeLists.txt +++ b/3rdparty/wolfssl/CMakeLists.txt @@ -4,23 +4,22 @@ if(USE_SYSTEM_WOLFSSL) add_library(wolfssl INTERFACE) target_link_libraries(wolfssl INTERFACE PkgConfig::WolfSSL) else() - option(WOLFSSL_TLS13 "Enable wolfSSL TLS v1.3 (default: enabled)" OFF) - set(WOLFSSL_SHA3 ON CACHE STRING "Enable wolfSSL SHA-3 support (default: enabled on x86_64/aarch64)") - set(WOLFSSL_SHAKE256 ON CACHE STRING "Enable wolfSSL SHAKE256 support (default: enabled on x86_64/aarch64)") - option(WOLFSSL_BASE64_ENCODE "Enable Base64 encoding (default: enabled on x86_64)" OFF) - option(WOLFSSL_DES3 "Enable DES3 (default: disabled)" ON) - option(WOLFSSL_PWDBASED "Enable PWDBASED (default: disabled)" ON) - option(WOLFSSL_FAST_MATH "Enable fast math ops (default: disabled)" ON) - option(WOLFSSL_EXAMPLES "Enable examples (default: enabled)" OFF) - option(WOLFSSL_CRYPT_TESTS "Enable Crypt Bench/Test (default: enabled)" OFF) - option(WOLFSSL_ASYNC_THREADS "Enable Asynchronous Threading (default: enabled)" OFF) - option(WOLFSSL_BUILD_OUT_OF_TREE "Don't generate files in the source tree (default: yes)" ON) - option(WOLFSSL_SNI "Enable SNI (default: disabled)" ON) - option(WOLFSSL_OPENSSLEXTRA "Enable extra OpenSSL API, size+ (default: disabled)" ON) - option(WOLFSSL_HARDEN "Enable Hardened build, Enables Timing Resistance and Blinding (default: enabled)" OFF) - option(WOLFSSL_ALT_CERT_CHAINS "Enable support for Alternate certification chains (default: disabled)" ON) + set(WOLFSSL_TLS13 OFF CACHE INTERNAL "") + set(WOLFSSL_SHA3 ON CACHE INTERNAL "") + set(WOLFSSL_SHAKE256 ON CACHE INTERNAL "") + set(WOLFSSL_BASE64_ENCODE OFF CACHE INTERNAL "") + set(WOLFSSL_DES3 ON CACHE INTERNAL "") + set(WOLFSSL_PWDBASED ON CACHE INTERNAL "") + set(WOLFSSL_FAST_MATH ON CACHE INTERNAL "") + set(WOLFSSL_EXAMPLES OFF CACHE INTERNAL "") + set(WOLFSSL_CRYPT_TESTS OFF CACHE INTERNAL "") + set(WOLFSSL_ASYNC_THREADS OFF CACHE INTERNAL "") + set(WOLFSSL_BUILD_OUT_OF_TREE ON CACHE INTERNAL "") + set(WOLFSSL_SNI ON CACHE INTERNAL "") + set(WOLFSSL_OPENSSLEXTRA ON CACHE INTERNAL "") + set(WOLFSSL_ALT_CERT_CHAINS ON CACHE INTERNAL "") add_subdirectory(wolfssl EXCLUDE_FROM_ALL) - target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP FP_MAX_BITS=8192 WOLFSSL_NO_OPTIONS_H) + target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP FP_MAX_BITS=8192 WOLFSSL_USE_OPTIONS_H) endif() diff --git a/Utilities/Config.cpp b/Utilities/Config.cpp index ec2b4ca1c9..f242bd6172 100644 --- a/Utilities/Config.cpp +++ b/Utilities/Config.cpp @@ -479,8 +479,9 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str { case type::node: { - if (data.IsScalar() || data.IsSequence()) + if (!data.IsMap()) { + cfg_log.error("node node is not a map"); return false; } @@ -491,17 +492,22 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str if (!pair.first.IsScalar()) continue; // Find the key among existing nodes - for (const auto& node : static_cast(rhs).get_nodes()) - { - if (node->get_name() == pair.first.Scalar()) - { - if (!decode(pair.second, *node, dynamic, strict) && strict) - { - success = false; - } + const auto& nodes = static_cast(rhs).get_nodes(); + const auto it = std::find_if(nodes.cbegin(), nodes.cend(), [&pair](const auto& node) { return ensure(node)->get_name() == pair.first.Scalar(); }); - break; + if (it == nodes.cend()) + { + if (strict) + { + cfg_log.error("Unknown key found: '%s'", pair.first.Scalar()); + success = false; } + continue; + } + + if (!decode(pair.second, *ensure(*it), dynamic, strict) && strict) + { + success = false; } } @@ -513,7 +519,10 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str if (YAML::convert::decode(data, values)) { - rhs.from_list(std::move(values)); + if (!rhs.from_list(std::move(values)) && strict) + { + return false; + } } break; @@ -523,6 +532,7 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str { if (!data.IsMap()) { + cfg_log.error("map node is not a map"); return false; } @@ -540,8 +550,9 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str } case type::log: { - if (data.IsScalar() || data.IsSequence()) + if (!data.IsMap()) { + cfg_log.error("log node is not a map"); return false; } @@ -549,7 +560,18 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str for (const auto& pair : data) { - if (!pair.first.IsScalar() || !pair.second.IsScalar()) continue; + if (!pair.first.IsScalar() || !pair.second.IsScalar()) + { + if (strict) + { + if (!pair.first.IsScalar()) + cfg_log.error("Key in map is not a scalar"); + else + cfg_log.error("Value in map is not a scalar. key='%s'", pair.first.Scalar()); + return false; + } + continue; + } u64 value; if (!cfg::try_to_enum_value(&value, &fmt_class_string::format, pair.second.Scalar(), pair.first.Scalar()) && strict) @@ -567,6 +589,7 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str { if (!data.IsMap()) { + cfg_log.error("device node is not a map"); return false; } @@ -574,13 +597,35 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str for (const auto& pair : data) { - if (!pair.first.IsScalar() || !pair.second.IsMap()) continue; + if (!pair.first.IsScalar() || !pair.second.IsMap()) + { + if (strict) + { + if (!pair.first.IsScalar()) + cfg_log.error("Key in device map is not a scalar"); + else + cfg_log.error("Value in device map is not a map. key='%s'", pair.first.Scalar()); + return false; + } + continue; + } device_info info{}; for (const auto& key_value : pair.second) { - if (!key_value.first.IsScalar() || !key_value.second.IsScalar()) continue; + if (!key_value.first.IsScalar() || !key_value.second.IsScalar()) + { + if (strict) + { + if (!key_value.first.IsScalar()) + cfg_log.error("Key in device info map is not a scalar"); + else + cfg_log.error("Value in device map is not a scalar. key='%s'", key_value.first.Scalar()); + return false; + } + continue; + } if (key_value.first.Scalar() == "Path") info.path = key_value.second.Scalar(); diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 51e5ed6a33..d7073a4e47 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -520,10 +520,11 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr dirName return CELL_GAMEDATA_ERROR_PARAM; } - if (!fs::create_path(vfs::get(usrdir))) - { - return {CELL_GAME_ERROR_ACCESS_ERROR, usrdir}; - } + // Nuked until correctly reversed engineered + //if (!fs::create_path(vfs::get(usrdir))) + //{ + // return {CELL_GAME_ERROR_ACCESS_ERROR, usrdir}; + //} } // Nuked until correctly reversed engineered diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index ddb730672c..c5e7eb09b4 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -557,7 +557,7 @@ void main_window::Boot(const std::string& path, const std::string& title_id, boo // Get database config if possible or if we are in database_config mode (to ensure we see an error on invalid use) if (config_database* db = m_game_list_frame->GetConfigDatabase(); - db->has_config(title_id) || config_mode == cfg_mode::database_config) + db->has_config(title_id)) { const std::optional config = db->get_config(title_id);