diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-06-29 00:06:20 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-06-29 00:06:20 +0200 |
commit | 034b64f4153550cbe5849bcbfc27e187377cc512 (patch) | |
tree | d831496163c3891031765010bf1934406b0c4a3c /src/Format | |
parent | 502ab9112a7624dbd7c1c90c2e12ed45512b8b3c (diff) | |
download | VeraCrypt-034b64f4153550cbe5849bcbfc27e187377cc512.tar.gz VeraCrypt-034b64f4153550cbe5849bcbfc27e187377cc512.zip |
EMV keyfile support: Overall code improvements and bug fixes
Diffstat (limited to 'src/Format')
-rw-r--r-- | src/Format/Format.vcxproj | 26 | ||||
-rw-r--r-- | src/Format/Format.vcxproj.filters | 50 | ||||
-rw-r--r-- | src/Format/Format_vs2019.vcxproj | 22 | ||||
-rw-r--r-- | src/Format/Tcformat.c | 2 |
4 files changed, 89 insertions, 11 deletions
diff --git a/src/Format/Format.vcxproj b/src/Format/Format.vcxproj index 9f5abbc0..06e3dca7 100644 --- a/src/Format/Format.vcxproj +++ b/src/Format/Format.vcxproj @@ -218,7 +218,7 @@ copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >N <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;..\Common\x64\Debug\lzma.lib;mpr.lib;winscard.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;..\Common\x64\Debug\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> @@ -301,7 +301,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;winscard.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> @@ -385,7 +385,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;winscard.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> @@ -429,7 +429,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;winscard.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> @@ -497,8 +497,15 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\Common\CommandAPDU.cpp" /> + <ClCompile Include="..\Common\EMVCard.cpp" /> <ClCompile Include="..\Common\EMVToken.cpp" /> - <ClCompile Include="..\Common\IccDataExtractor.cpp" /> + <ClCompile Include="..\Common\PCSCException.cpp" /> + <ClCompile Include="..\Common\ResponseAPDU.cpp" /> + <ClCompile Include="..\Common\SCard.cpp" /> + <ClCompile Include="..\Common\SCardLoader.cpp" /> + <ClCompile Include="..\Common\SCardManager.cpp" /> + <ClCompile Include="..\Common\SCardReader.cpp" /> <ClCompile Include="..\Common\TLVParser.cpp" /> <ClCompile Include="..\Common\Token.cpp" /> <ClCompile Include="FormatCom.cpp" /> @@ -581,18 +588,25 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: </ItemGroup> <ItemGroup> <ClInclude Include="..\Common\BaseCom.h" /> + <ClInclude Include="..\Common\CommandAPDU.h" /> <ClInclude Include="..\Common\Common.h" /> <ClInclude Include="..\Common\Crc.h" /> <ClInclude Include="..\Common\Crypto.h" /> <ClInclude Include="..\Common\Dictionary.h" /> <ClInclude Include="..\Common\Dlgcode.h" /> + <ClInclude Include="..\Common\EMVCard.h" /> <ClInclude Include="..\Common\EMVToken.h" /> <ClInclude Include="..\Common\EncryptionThreadPool.h" /> <ClInclude Include="..\Common\Endian.h" /> <ClInclude Include="..\Common\Exception.h" /> <ClInclude Include="..\Common\Fat.h" /> <ClInclude Include="..\Common\Format.h" /> - <ClInclude Include="..\Common\IccDataExtractor.h" /> + <ClInclude Include="..\Common\PCSCException.h" /> + <ClInclude Include="..\Common\ResponseAPDU.h" /> + <ClInclude Include="..\Common\SCard.h" /> + <ClInclude Include="..\Common\SCardLoader.h" /> + <ClInclude Include="..\Common\SCardManager.h" /> + <ClInclude Include="..\Common\SCardReader.h" /> <ClInclude Include="..\Common\TLVParser.h" /> <ClInclude Include="..\Common\Token.h" /> <ClInclude Include="FormatCom.h" /> diff --git a/src/Format/Format.vcxproj.filters b/src/Format/Format.vcxproj.filters index e6615982..dbba0b57 100644 --- a/src/Format/Format.vcxproj.filters +++ b/src/Format/Format.vcxproj.filters @@ -114,10 +114,31 @@ <ClCompile Include="..\Common\Token.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\IccDataExtractor.cpp"> + <ClCompile Include="..\Common\TLVParser.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\TLVParser.cpp"> + <ClCompile Include="..\Common\CommandAPDU.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\PCSCException.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\ResponseAPDU.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCardLoader.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCardManager.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCardReader.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\EMVCard.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCard.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> </ItemGroup> @@ -226,10 +247,31 @@ <ClInclude Include="..\Common\Token.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\IccDataExtractor.h"> + <ClInclude Include="..\Common\TLVParser.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\TLVParser.h"> + <ClInclude Include="..\Common\CommandAPDU.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\PCSCException.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\ResponseAPDU.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCardLoader.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCardManager.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCardReader.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\EMVCard.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCard.h"> <Filter>Header Files</Filter> </ClInclude> </ItemGroup> diff --git a/src/Format/Format_vs2019.vcxproj b/src/Format/Format_vs2019.vcxproj index e6fe017f..819724f2 100644 --- a/src/Format/Format_vs2019.vcxproj +++ b/src/Format/Format_vs2019.vcxproj @@ -557,6 +557,17 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\Common\CommandAPDU.cpp" /> + <ClCompile Include="..\Common\EMVCard.cpp" /> + <ClCompile Include="..\Common\EMVToken.cpp" /> + <ClCompile Include="..\Common\PCSCException.cpp" /> + <ClCompile Include="..\Common\ResponseAPDU.cpp" /> + <ClCompile Include="..\Common\SCard.cpp" /> + <ClCompile Include="..\Common\SCardLoader.cpp" /> + <ClCompile Include="..\Common\SCardManager.cpp" /> + <ClCompile Include="..\Common\SCardReader.cpp" /> + <ClCompile Include="..\Common\TLVParser.cpp" /> + <ClCompile Include="..\Common\Token.cpp" /> <ClCompile Include="FormatCom.cpp" /> <ClCompile Include="InPlace.c"> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> @@ -642,16 +653,27 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: </ItemGroup> <ItemGroup> <ClInclude Include="..\Common\BaseCom.h" /> + <ClInclude Include="..\Common\CommandAPDU.h" /> <ClInclude Include="..\Common\Common.h" /> <ClInclude Include="..\Common\Crc.h" /> <ClInclude Include="..\Common\Crypto.h" /> <ClInclude Include="..\Common\Dictionary.h" /> <ClInclude Include="..\Common\Dlgcode.h" /> + <ClInclude Include="..\Common\EMVCard.h" /> + <ClInclude Include="..\Common\EMVToken.h" /> <ClInclude Include="..\Common\EncryptionThreadPool.h" /> <ClInclude Include="..\Common\Endian.h" /> <ClInclude Include="..\Common\Exception.h" /> <ClInclude Include="..\Common\Fat.h" /> <ClInclude Include="..\Common\Format.h" /> + <ClInclude Include="..\Common\PCSCException.h" /> + <ClInclude Include="..\Common\ResponseAPDU.h" /> + <ClInclude Include="..\Common\SCard.h" /> + <ClInclude Include="..\Common\SCardLoader.h" /> + <ClInclude Include="..\Common\SCardManager.h" /> + <ClInclude Include="..\Common\SCardReader.h" /> + <ClInclude Include="..\Common\TLVParser.h" /> + <ClInclude Include="..\Common\Token.h" /> <ClInclude Include="FormatCom.h" /> <ClInclude Include="..\Common\GfMul.h" /> <ClInclude Include="InPlace.h" /> diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 1e605c4d..a2eb828d 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -802,7 +802,7 @@ static void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified, ConfigReadCompareInt ("UseLegacyMaxPasswordLength", FALSE, &bUseLegacyMaxPasswordLength, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("ActivateEMVOption", 0, &ActivateEMVOption, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("EMVSupportEnabled", 0, &EMVSupportEnabled, bOnlyCheckModified, pbSettingsModified); { char szTmp[MAX_PATH] = {0}; |