VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-29 00:06:20 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-29 00:06:20 +0200
commit034b64f4153550cbe5849bcbfc27e187377cc512 (patch)
treed831496163c3891031765010bf1934406b0c4a3c /src/ExpandVolume
parent502ab9112a7624dbd7c1c90c2e12ed45512b8b3c (diff)
downloadVeraCrypt-034b64f4153550cbe5849bcbfc27e187377cc512.tar.gz
VeraCrypt-034b64f4153550cbe5849bcbfc27e187377cc512.zip
EMV keyfile support: Overall code improvements and bug fixes
Diffstat (limited to 'src/ExpandVolume')
-rw-r--r--src/ExpandVolume/ExpandVolume.vcxproj26
-rw-r--r--src/ExpandVolume/ExpandVolume.vcxproj.filters50
-rw-r--r--src/ExpandVolume/ExpandVolume_vs2019.vcxproj22
-rw-r--r--src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters66
-rw-r--r--src/ExpandVolume/WinMain.cpp2
5 files changed, 155 insertions, 11 deletions
diff --git a/src/ExpandVolume/ExpandVolume.vcxproj b/src/ExpandVolume/ExpandVolume.vcxproj
index c182afe5..ce87f4fb 100644
--- a/src/ExpandVolume/ExpandVolume.vcxproj
+++ b/src/ExpandVolume/ExpandVolume.vcxproj
@@ -245,7 +245,7 @@ copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" &gt;NUL:
<DisableSpecificWarnings>4311;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)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
@@ -336,7 +336,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<DisableSpecificWarnings>4311;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)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
@@ -428,7 +428,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<DisableSpecificWarnings>4311;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)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
@@ -476,7 +476,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<DisableSpecificWarnings>4311;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)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
@@ -575,8 +575,15 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
</ProjectReference>
</ItemGroup>
<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="..\Setup\SelfExtract.c" />
@@ -659,8 +666,15 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
</ClCompile>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\Common\CommandAPDU.h" />
+ <ClInclude Include="..\Common\EMVCard.h" />
<ClInclude Include="..\Common\EMVToken.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="..\Common\Wipe.h" />
diff --git a/src/ExpandVolume/ExpandVolume.vcxproj.filters b/src/ExpandVolume/ExpandVolume.vcxproj.filters
index 3997d07f..c168cfc2 100644
--- a/src/ExpandVolume/ExpandVolume.vcxproj.filters
+++ b/src/ExpandVolume/ExpandVolume.vcxproj.filters
@@ -132,10 +132,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\SCardReader.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\ResponseAPDU.cpp">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\PCSCException.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>
@@ -248,10 +269,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\SCardLoader.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\PCSCException.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\ResponseAPDU.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/ExpandVolume/ExpandVolume_vs2019.vcxproj b/src/ExpandVolume/ExpandVolume_vs2019.vcxproj
index 835a4d3b..555c6d8f 100644
--- a/src/ExpandVolume/ExpandVolume_vs2019.vcxproj
+++ b/src/ExpandVolume/ExpandVolume_vs2019.vcxproj
@@ -641,6 +641,17 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" &gt;NUL:
</ProjectReference>
</ItemGroup>
<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="..\Setup\SelfExtract.c" />
<ClCompile Include="DlgExpandVolume.cpp" />
<ClCompile Include="ExpandVolume.c" />
@@ -726,6 +737,17 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" &gt;NUL:
</ClCompile>
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\Common\CommandAPDU.h" />
+ <ClInclude Include="..\Common\EMVCard.h" />
+ <ClInclude Include="..\Common\EMVToken.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="..\Common\Wipe.h" />
<ClInclude Include="..\Common\Apidrvr.h" />
<ClInclude Include="..\Common\BaseCom.h" />
diff --git a/src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters b/src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters
index 007757ff..17ed8515 100644
--- a/src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters
+++ b/src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters
@@ -126,6 +126,39 @@
<ClCompile Include="..\Setup\SelfExtract.c">
<Filter>Source Files\Setup</Filter>
</ClCompile>
+ <ClCompile Include="..\Common\EMVToken.cpp">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\TLVParser.cpp">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Token.cpp">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <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>
<ItemGroup>
<ClInclude Include="..\Common\Wipe.h">
@@ -230,6 +263,39 @@
<ClInclude Include="..\Common\Xts.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\Common\EMVToken.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\TLVParser.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Token.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <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>
<ItemGroup>
<Midl Include="..\Mount\MainCom.idl">
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp
index 57e58b4f..69f4c23b 100644
--- a/src/ExpandVolume/WinMain.cpp
+++ b/src/ExpandVolume/WinMain.cpp
@@ -321,7 +321,7 @@ void LoadSettings (HWND hwndDlg)
mountOptions = defaultMountOptions;
CloseSecurityTokenSessionsAfterMount = ConfigReadInt ("CloseSecurityTokenSessionsAfterMount", 0);
- ActivateEMVOption = ConfigReadInt ("ActivateEMVOption", 0);
+ EMVSupportEnabled = ConfigReadInt ("EMVSupportEnabled", 0);
{
char szTmp[TC_MAX_PATH] = {0};