Skip to content

Commit

Permalink
Use case-insensitive BlockName for Win32 GUI setups
Browse files Browse the repository at this point in the history
Fixes issue #135
  • Loading branch information
jetwhiz committed Jan 27, 2020
1 parent 34615cc commit aea111d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion encfs/encfs.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\;$(OPENSSL_ROOT)\include;$(DOKAN_ROOT)\dokan_fuse\include;$(DOKAN_ROOT)\sys;..\deps\tinyxml2;..\deps\easyloggingpp\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;ENCFS_EXPORTS;RLOG_COMPONENT=rlog;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;ENCFS_EXPORTS;RLOG_COMPONENT=rlog;_CRT_SECURE_NO_WARNINGS;DEFAULT_CASE_INSENSITIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down
2 changes: 1 addition & 1 deletion encfs/encfsw.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;DEFAULT_CASE_INSENSITIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
Expand Down
8 changes: 8 additions & 0 deletions encfs/win/maingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ static void createConfig(const std::string& rootDir, bool paranoid, const char*
keySize = 256;
blockSize = DefaultBlockSize;
alg = findCipherAlgorithm("AES", keySize);
#if defined(DEFAULT_CASE_INSENSITIVE)
nameIOIface = BlockNameIO::CurrentInterface(true);
#else
nameIOIface = BlockNameIO::CurrentInterface();
#endif
blockMACBytes = 8;
blockMACRandBytes = 0; // using uniqueIV, so this isn't necessary
uniqueIV = true;
Expand All @@ -293,7 +297,11 @@ static void createConfig(const std::string& rootDir, bool paranoid, const char*
alg = findCipherAlgorithm("AES", keySize);
blockMACBytes = 0;
externalIV = false;
#if defined(DEFAULT_CASE_INSENSITIVE)
nameIOIface = BlockNameIO::CurrentInterface(true);
#else
nameIOIface = BlockNameIO::CurrentInterface();
#endif

if (!reverseEncryption)
{
Expand Down

0 comments on commit aea111d

Please sign in to comment.