mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
WolfSSL: Use a custom UTF-8 aware fopen on Windows
Fixes loading cacert.pem from Unicode directories
This commit is contained in:
parent
ef66b002e0
commit
8c9090fd03
5 changed files with 100 additions and 41 deletions
74
3rdparty/wolfssl/extra/win32/user_settings.h
vendored
Normal file
74
3rdparty/wolfssl/extra/win32/user_settings.h
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
#ifndef _WIN_USER_SETTINGS_H_
|
||||
#define _WIN_USER_SETTINGS_H_
|
||||
|
||||
/* Verify this is Windows */
|
||||
#ifndef _WIN32
|
||||
#error This user_settings.h header is only designed for Windows
|
||||
#endif
|
||||
|
||||
/* Configurations */
|
||||
#define WOLFSSL_DES_ECB
|
||||
#define HAVE_FFDHE_2048
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define NO_DSA
|
||||
#define TFM_ECC256
|
||||
#define NO_RC4
|
||||
#define NO_HC128
|
||||
#define NO_RABBIT
|
||||
#define WOLFSSL_SHA224
|
||||
#define WOLFSSL_SHA384
|
||||
#define WOLFSSL_SHA3
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHAKE256
|
||||
#define HAVE_POLY1305
|
||||
#define HAVE_ONE_TIME_AUTH
|
||||
#define HAVE_CHACHA
|
||||
#define HAVE_HASHDRBG
|
||||
#define HAVE_SNI
|
||||
#define HAVE_ENCRYPT_THEN_MAC
|
||||
#define NO_MD4
|
||||
#define WC_NO_ASYNC_THREADING
|
||||
#define WC_NO_HARDEN
|
||||
#define HAVE_WRITE_DUP
|
||||
#define WC_RSA_BLINDING
|
||||
#define NO_MULTIBYTE_PRINT
|
||||
#define OPENSSL_EXTRA
|
||||
#define WOLFSSL_RIPEMD
|
||||
#define NO_PSK
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define WOLFSSL_SNIFFER
|
||||
#define HAVE_AESGCM
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_ECC
|
||||
#define ECC_SHAMIR
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
/* UTF-8 aware filesystem functions for Windows */
|
||||
#define WOLFSSL_USER_FILESYSTEM
|
||||
|
||||
#include <stdio.h>
|
||||
#define XFILE FILE*
|
||||
|
||||
extern FILE* wolfSSL_fopen_utf8(const char* name, const char* mode);
|
||||
#define XFOPEN wolfSSL_fopen_utf8
|
||||
|
||||
#define XFDOPEN fdopen
|
||||
#define XFSEEK fseek
|
||||
#define XFTELL ftell
|
||||
#define XREWIND rewind
|
||||
#define XFREAD fread
|
||||
#define XFWRITE fwrite
|
||||
#define XFCLOSE fclose
|
||||
#define XSEEK_END SEEK_END
|
||||
#define XBADFILE NULL
|
||||
#define XFGETS fgets
|
||||
#define XFPRINTF fprintf
|
||||
#define XFFLUSH fflush
|
||||
|
||||
#include <sys/stat.h>
|
||||
#define XSTAT _stat
|
||||
#define XS_ISREG(s) (s & _S_IFREG)
|
||||
#define SEPARATOR_CHAR ';'
|
||||
|
||||
#endif /* _WIN_USER_SETTINGS_H_ */
|
10
3rdparty/wolfssl/wolfssl.vcxproj
vendored
10
3rdparty/wolfssl/wolfssl.vcxproj
vendored
|
@ -47,8 +47,8 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>./wolfssl;./wolfssl/IDE/WIN;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_DES_ECB;HAVE_FFDHE_2048;TFM_TIMING_RESISTANT;NO_DSA;TFM_ECC256;NO_RC4;NO_HC128;NO_RABBIT;WOLFSSL_SHA224;WOLFSSL_SHA3;WOLFSSL_SHAKE256;HAVE_POLY1305;HAVE_ONE_TIME_AUTH;HAVE_CHACHA;HAVE_HASHDRBG;HAVE_SNI;HAVE_ENCRYPT_THEN_MAC;NO_MD4;WC_NO_ASYNC_THREADING;CYASSL_USER_SETTINGS;WC_NO_HARDEN;HAVE_WRITE_DUP;WC_RSA_BLINDING;NO_MULTIBYTE_PRINT;OPENSSL_EXTRA;WOLFSSL_RIPEMD;NO_PSK;HAVE_EXTENDED_MASTER;WOLFSSL_SNIFFER;HAVE_AESGCM;WOLFSSL_SHA384;WOLFSSL_SHA512;HAVE_SUPPORTED_CURVES;HAVE_TLS_EXTENSIONS;HAVE_ECC;ECC_SHAMIR;ECC_TIMING_RESISTANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./wolfssl;./extra/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
|
@ -61,8 +61,8 @@
|
|||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>./wolfssl;./wolfssl/IDE/WIN;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_DES_ECB;HAVE_FFDHE_2048;TFM_TIMING_RESISTANT;NO_DSA;TFM_ECC256;NO_RC4;NO_HC128;NO_RABBIT;WOLFSSL_SHA224;WOLFSSL_SHA3;WOLFSSL_SHAKE256;HAVE_POLY1305;HAVE_ONE_TIME_AUTH;HAVE_CHACHA;HAVE_HASHDRBG;HAVE_SNI;HAVE_ENCRYPT_THEN_MAC;NO_MD4;WC_NO_ASYNC_THREADING;CYASSL_USER_SETTINGS;WC_NO_HARDEN;HAVE_WRITE_DUP;WC_RSA_BLINDING;NO_MULTIBYTE_PRINT;OPENSSL_EXTRA;WOLFSSL_RIPEMD;NO_PSK;HAVE_EXTENDED_MASTER;WOLFSSL_SNIFFER;HAVE_AESGCM;WOLFSSL_SHA384;WOLFSSL_SHA512;HAVE_SUPPORTED_CURVES;HAVE_TLS_EXTENSIONS;HAVE_ECC;ECC_SHAMIR;ECC_TIMING_RESISTANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./wolfssl;./extra/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
|
@ -137,6 +137,7 @@
|
|||
<ClCompile Include="wolfssl\wolfcrypt\src\wolfevent.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="extra\win32\user_settings.h" />
|
||||
<ClInclude Include="wolfssl\resource.h" />
|
||||
<CustomBuild Include="wolfssl\wolfcrypt\src\aes_asm.asm">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
|
@ -152,7 +153,6 @@
|
|||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)%(Filename).obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(IntDir)%(Filename).obj</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="wolfssl\IDE\WIN\user_settings.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wolfssl\wolfssl.rc">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue