diff --git a/3rdparty/curl/CMakeLists.txt b/3rdparty/curl/CMakeLists.txt index ebf5b0c7dbcb..6f19710b4134 100644 --- a/3rdparty/curl/CMakeLists.txt +++ b/3rdparty/curl/CMakeLists.txt @@ -7,7 +7,7 @@ if(USE_SYSTEM_CURL) target_link_libraries(libcurl INTERFACE CURL::libcurl) else() message("-- RPCS3: building libcurl + wolfssl submodules") - add_compile_definitions(HAVE_SNI) + add_compile_definitions(HAVE_SNI OPENSSL_EXTRA) option(BUILD_CURL_EXE "Set to ON to build curl executable." OFF) option(CMAKE_USE_WOLFSSL "enable wolfSSL for SSL/TLS" ON) option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" ON) diff --git a/3rdparty/curl/libcurl.vcxproj b/3rdparty/curl/libcurl.vcxproj index 05a5ef06ff15..ffab014419ed 100644 --- a/3rdparty/curl/libcurl.vcxproj +++ b/3rdparty/curl/libcurl.vcxproj @@ -43,8 +43,8 @@ MaxSpeed OnlyExplicitInline - curl\include;curl\lib;extra;$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\wolfssl;%(AdditionalIncludeDirectories) - HAVE_SNI;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WOLFSSL;USE_IPV6;SIZEOF_LONG=4;SIZEOF_LONG_LONG=8;%(PreprocessorDefinitions) + curl\include;curl\lib;extra;$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\extra\win32;%(AdditionalIncludeDirectories) + HAVE_SNI;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WOLFSSL;WOLFSSL_USER_SETTINGS;USE_IPV6;SIZEOF_LONG=4;SIZEOF_LONG_LONG=8;%(PreprocessorDefinitions) true true Level4 diff --git a/3rdparty/wolfssl/extra/win32/user_settings.h b/3rdparty/wolfssl/extra/win32/user_settings.h index ea4c408331bb..4b84cd949dad 100644 --- a/3rdparty/wolfssl/extra/win32/user_settings.h +++ b/3rdparty/wolfssl/extra/win32/user_settings.h @@ -67,7 +67,9 @@ extern FILE* wolfSSL_fopen_utf8(const char* name, const char* mode); #define XFFLUSH fflush #include -#define XSTAT _stat +extern int wolfSSL_stat_utf8(const char* path, struct _stat* buffer); +#define XSTAT wolfSSL_stat_utf8 +#define XSTAT_TYPE struct _stat #define XS_ISREG(s) (s & _S_IFREG) #define SEPARATOR_CHAR ';' diff --git a/3rdparty/wolfssl/wolfssl b/3rdparty/wolfssl/wolfssl index 4bbf90d60419..dcaa218ed891 160000 --- a/3rdparty/wolfssl/wolfssl +++ b/3rdparty/wolfssl/wolfssl @@ -1 +1 @@ -Subproject commit 4bbf90d60419ffcdc2d2f402be794b98d155f2c9 +Subproject commit dcaa218ed891a13d57e435b19fbbd1f6ae2d4868 diff --git a/3rdparty/wolfssl/wolfssl.vcxproj b/3rdparty/wolfssl/wolfssl.vcxproj index 2574b934b9e3..ce796eca88a2 100644 --- a/3rdparty/wolfssl/wolfssl.vcxproj +++ b/3rdparty/wolfssl/wolfssl.vcxproj @@ -101,9 +101,7 @@ - - @@ -115,10 +113,11 @@ - + + diff --git a/rpcs3/rpcs3qt/curl_handle.cpp b/rpcs3/rpcs3qt/curl_handle.cpp index 47aad01b361e..c0d170aa1a93 100644 --- a/rpcs3/rpcs3qt/curl_handle.cpp +++ b/rpcs3/rpcs3qt/curl_handle.cpp @@ -67,9 +67,19 @@ std::string curl_handle::get_verbose_error(CURLcode code) } #ifdef _WIN32 -// Function exported from our user_settings.h in WolfSSL, implemented in RPCS3 -extern "C" FILE* wolfSSL_fopen_utf8(const char* name, const char* mode) +// Functions exported from our user_settings.h in WolfSSL, implemented in RPCS3 +extern "C" +{ + +FILE* wolfSSL_fopen_utf8(const char* name, const char* mode) { return _wfopen(utf8_to_wchar(name).c_str(), utf8_to_wchar(mode).c_str()); } + +int wolfSSL_stat_utf8(const char* path, struct _stat* buffer) +{ + return _wstat(utf8_to_wchar(path).c_str(), buffer); +} + +} #endif