diff options
Diffstat (limited to 'src')
720 files changed, 16907 insertions, 19877 deletions
diff --git a/src/Boot/EFI/DcsBoot32.efi b/src/Boot/EFI/DcsBoot32.efi Binary files differdeleted file mode 100644 index 1447e98b..00000000 --- a/src/Boot/EFI/DcsBoot32.efi +++ /dev/null diff --git a/src/Boot/EFI/DcsCfg32.efi b/src/Boot/EFI/DcsCfg32.efi Binary files differdeleted file mode 100644 index 899197ff..00000000 --- a/src/Boot/EFI/DcsCfg32.efi +++ /dev/null diff --git a/src/Boot/EFI/DcsInfo32.efi b/src/Boot/EFI/DcsInfo32.efi Binary files differdeleted file mode 100644 index ddb1e64b..00000000 --- a/src/Boot/EFI/DcsInfo32.efi +++ /dev/null diff --git a/src/Boot/EFI/DcsInt32.efi b/src/Boot/EFI/DcsInt32.efi Binary files differdeleted file mode 100644 index 36d7b61f..00000000 --- a/src/Boot/EFI/DcsInt32.efi +++ /dev/null diff --git a/src/Boot/EFI/DcsRe32.efi b/src/Boot/EFI/DcsRe32.efi Binary files differdeleted file mode 100644 index f2a935b7..00000000 --- a/src/Boot/EFI/DcsRe32.efi +++ /dev/null diff --git a/src/Boot/EFI/LegacySpeaker32.efi b/src/Boot/EFI/LegacySpeaker32.efi Binary files differdeleted file mode 100644 index 5b52ba9f..00000000 --- a/src/Boot/EFI/LegacySpeaker32.efi +++ /dev/null diff --git a/src/Boot/Windows/Bios.h b/src/Boot/Windows/Bios.h index 7085e7a2..a8a3c731 100644 --- a/src/Boot/Windows/Bios.h +++ b/src/Boot/Windows/Bios.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -26,8 +26,8 @@ enum BiosResultSuccess = 0x00, BiosResultInvalidFunction = 0x01, BiosResultTimeout = 0x80 }; -typedef byte BiosResult; +typedef uint8 BiosResult; #endif // TC_HEADER_Boot_Bios diff --git a/src/Boot/Windows/Boot.vcproj b/src/Boot/Windows/Boot.vcproj deleted file mode 100644 index c73b099e..00000000 --- a/src/Boot/Windows/Boot.vcproj +++ /dev/null @@ -1,250 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="Boot" - ProjectGUID="{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}" - RootNamespace="Boot" - Keyword="MakeFileProj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Release|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="0" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="md Release 2>NUL:
nmake.exe /nologo RELEASE=1

md Release_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2

md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

md Release_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2

md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

md Release_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2

md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH

md Release_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2

md Release_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA

md Release_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA SINGLE_PRF=SHA2

md Rescue 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1

md Rescue_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1

md Rescue_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1

md Rescue_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1

md Rescue_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1

md Rescue_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 SINGLE_PRF=SHA2" - ReBuildCommandLine="del /q /s Release >NUL:
md Release 2>NUL:
nmake.exe /nologo RELEASE=1

del /q /s Release_SHA2 >NUL:
md Release_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2

del /q /s Release_AES >NUL:
md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

del /q /s Release_AES_SHA2 >NUL:
md Release_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2

del /q /s Release_Serpent >NUL:
md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

del /q /s Release_Serpent_SHA2 >NUL:
md Release_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2

del /q /s Release_Twofish >NUL:
md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH

del /q /s Release_Twofish_SHA2 >NUL:
md Release_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2

del /q /s Release_Camellia >NUL:
md Release_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA

del /q /s Release_Camellia_SHA2 >NUL:
md Release_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA SINGLE_PRF=SHA2

del /q /s Rescue >NUL:
md Rescue 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1

del /q /s Rescue_SHA2 >NUL:
md Rescue_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_AES >NUL:
md Rescue_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1

del /q /s Rescue_AES_SHA2 >NUL:
md Rescue_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Serpent >NUL:
md Rescue_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1

del /q /s Rescue_Serpent_SHA2 >NUL:
md Rescue_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Twofish >NUL:
md Rescue_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1

del /q /s Rescue_Twofish_SHA2 >NUL:
md Rescue_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Camellia >NUL:
md Rescue_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1

del /q /s Rescue_Camellia_SHA2 >NUL:
md Rescue_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 SINGLE_PRF=SHA2" - CleanCommandLine="del /q /s Release Release_AES Release_Serpent Release_Twofish Release_Camellia Rescue Rescue_AES Rescue_Serpent Rescue_Twofish Rescue_Camellia >NUL:
del /q /s Release_SHA2 Release_AES_SHA2 Release_Serpent_SHA2 Release_Twofish_SHA2 Release_Camellia_SHA2 Rescue_SHA2 Rescue_AES_SHA2 Rescue_Serpent_SHA2 Rescue_Twofish_SHA2 Rescue_Camellia_SHA2 >NUL:
" - Output="Release\BootLoader.com" - PreprocessorDefinitions="WIN32;NDEBUG" - IncludeSearchPath=""$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(MSVC16_ROOT)\Include"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - <Configuration - Name="Release Loader|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="0" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="md Release 2>NUL:
nmake.exe /nologo RELEASE=1

md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH" - ReBuildCommandLine="del /q /s Release >NUL:
md Release 2>NUL:
nmake.exe /nologo RELEASE=1

del /q /s Release_AES >NUL:
md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

del /q /s Release_Serpent >NUL:
md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

del /q /s Release_Twofish >NUL:
md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH" - CleanCommandLine="del /q /s Release Release_AES Release_Serpent Release_Twofish >NUL:" - Output="Release\BootLoader.com" - PreprocessorDefinitions="WIN32;NDEBUG" - IncludeSearchPath=""$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(MSVC16_ROOT)\Include"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\BootConfig.cpp" - > - </File> - <File - RelativePath=".\BootConsoleIo.cpp" - > - </File> - <File - RelativePath=".\BootCrt.asm" - > - </File> - <File - RelativePath=".\BootDebug.cpp" - > - </File> - <File - RelativePath=".\BootDiskIo.cpp" - > - </File> - <File - RelativePath=".\BootEncryptedIo.cpp" - > - </File> - <File - RelativePath=".\BootMain.cpp" - > - </File> - <File - RelativePath=".\BootMemory.cpp" - > - </File> - <File - RelativePath=".\BootSector.asm" - > - </File> - <File - RelativePath=".\Decompressor.c" - > - </File> - <File - RelativePath=".\IntFilter.cpp" - > - </File> - <File - RelativePath=".\Platform.cpp" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\..\Common\Crc.c" - > - </File> - <File - RelativePath="..\..\Common\Crypto.c" - > - </File> - <File - RelativePath="..\..\Common\Endian.c" - > - </File> - <File - RelativePath="..\..\Common\Pkcs5.c" - > - </File> - <File - RelativePath="..\..\Common\Volumes.c" - > - </File> - <File - RelativePath="..\..\Common\Xts.c" - > - </File> - </Filter> - <Filter - Name="Crypto" - > - <File - RelativePath="..\..\Crypto\Aes_hw_cpu.asm" - > - </File> - <File - RelativePath="..\..\Crypto\AesSmall.c" - > - </File> - <File - RelativePath="..\..\Crypto\AesSmall_x86.asm" - > - </File> - <File - RelativePath="..\..\Crypto\CamelliaSmall.c" - > - </File> - <File - RelativePath="..\..\Crypto\Rmd160.c" - > - </File> - <File - RelativePath="..\..\Crypto\Serpent.c" - > - </File> - <File - RelativePath="..\..\Crypto\Sha2Small.c" - > - </File> - <File - RelativePath="..\..\Crypto\Twofish.c" - > - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\Bios.h" - > - </File> - <File - RelativePath=".\BootCommon.h" - > - </File> - <File - RelativePath=".\BootConfig.h" - > - </File> - <File - RelativePath=".\BootConsoleIo.h" - > - </File> - <File - RelativePath=".\BootDebug.h" - > - </File> - <File - RelativePath=".\BootDefs.h" - > - </File> - <File - RelativePath=".\BootDiskIo.h" - > - </File> - <File - RelativePath=".\BootEncryptedIo.h" - > - </File> - <File - RelativePath=".\BootMain.h" - > - </File> - <File - RelativePath=".\BootMemory.h" - > - </File> - <File - RelativePath=".\BootStrings.h" - > - </File> - <File - RelativePath=".\IntFilter.h" - > - </File> - <File - RelativePath=".\Platform.h" - > - </File> - </Filter> - <Filter - Name="Build Files" - > - <File - RelativePath=".\Makefile" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/Boot/Windows/BootCommon.h b/src/Boot/Windows/BootCommon.h index d2ee42a1..38cd4361 100644 --- a/src/Boot/Windows/BootCommon.h +++ b/src/Boot/Windows/BootCommon.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -41,11 +41,11 @@ #pragma pack (1) typedef struct { - byte Flags; + uint8 Flags; } BootSectorConfiguration; // Modifying this value can introduce incompatibility with previous versions #define TC_BOOT_LOADER_ARGS_OFFSET 0x10 @@ -118,11 +118,11 @@ typedef struct _SECREGION_BOOT_PARAMS { typedef struct { uint32 Data1; uint16 Data2; uint16 Data3; - byte Data4[8]; + uint8 Data4[8]; } DCS_GUID; // DE types typedef struct _DCS_DISK_ENTRY_SECTORS { uint32 Type; @@ -153,11 +153,11 @@ CSTATIC_ASSERT(sizeof(DCS_DISK_ENTRY_DISKID) == 32, Wrong_size_DCS_DISK_ENTRY_DI typedef struct _DCS_DISK_ENTRY { union { struct { uint32 Type; uint32 Offset; - byte reserved[16]; + uint8 reserved[16]; uint64 Length; // size of structure at Offset }; DCS_DISK_ENTRY_SECTORS Sectors; DCS_DISK_ENTRY_DISKID DiskId; DCS_DISK_ENTRY_PARAMS Prm; @@ -206,11 +206,11 @@ typedef struct _DCS_DEP_PWD_CACHE { uint64 Sign; uint32 CRC; uint32 Count; PasswordLegacy Pwd[4]; int32 Pim[4]; - byte pad[512 - 8 - 4 - 4 - (sizeof(PasswordLegacy) + 4) * 4]; + uint8 pad[512 - 8 - 4 - 4 - (sizeof(PasswordLegacy) + 4) * 4]; } DCS_DEP_PWD_CACHE; CSTATIC_ASSERT(sizeof(DCS_DEP_PWD_CACHE) == 512, Wrong_size_DCS_DEP_PWD_CACHE); #pragma pack() #endif // #if !defined(TC_WINDOWS_BOOT) diff --git a/src/Boot/Windows/BootConfig.cpp b/src/Boot/Windows/BootConfig.cpp index 0412d082..77286f92 100644 --- a/src/Boot/Windows/BootConfig.cpp +++ b/src/Boot/Windows/BootConfig.cpp @@ -2,22 +2,22 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "BootConfig.h" -byte BootSectorFlags; +uint8 BootSectorFlags; -byte BootLoaderDrive; -byte BootDrive; +uint8 BootLoaderDrive; +uint8 BootDrive; bool BootDriveGeometryValid = false; bool PreventNormalSystemBoot = false; bool PreventBootMenu = false; char CustomUserMessage[TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH + 1]; uint32 OuterVolumeBackupHeaderCrc; @@ -37,11 +37,11 @@ uint64 HiddenVolumeStartSector; #ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE void ReadBootSectorUserConfiguration () { - byte userConfig; + uint8 userConfig; AcquireSectorBuffer(); if (ReadWriteMBR (false, BootLoaderDrive, true) != BiosResultSuccess) goto ret; @@ -81,11 +81,11 @@ void ReadBootSectorUserConfiguration () ret: ReleaseSectorBuffer(); } -BiosResult UpdateBootSectorConfiguration (byte drive) +BiosResult UpdateBootSectorConfiguration (uint8 drive) { uint64 mbrSector; mbrSector.HighPart = 0; mbrSector.LowPart = 0; diff --git a/src/Boot/Windows/BootConfig.h b/src/Boot/Windows/BootConfig.h index b66dc233..27270c56 100644 --- a/src/Boot/Windows/BootConfig.h +++ b/src/Boot/Windows/BootConfig.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -15,14 +15,14 @@ #include "Crypto.h" #include "Platform.h" #include "BootDiskIo.h" -extern byte BootSectorFlags; +extern uint8 BootSectorFlags; -extern byte BootLoaderDrive; -extern byte BootDrive; +extern uint8 BootLoaderDrive; +extern uint8 BootDrive; extern bool BootDriveGeometryValid; extern DriveGeometry BootDriveGeometry; extern bool PreventNormalSystemBoot; extern bool PreventBootMenu; extern char CustomUserMessage[TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH + 1]; @@ -39,8 +39,8 @@ extern bool ExtraBootPartitionPresent; extern uint64 PimValueOrHiddenVolumeStartUnitNo; // reuse this variable for stored PIM value to reduce memory usage extern uint64 HiddenVolumeStartSector; void ReadBootSectorUserConfiguration (); -BiosResult UpdateBootSectorConfiguration (byte drive); +BiosResult UpdateBootSectorConfiguration (uint8 drive); #endif // TC_HEADER_Boot_BootConfig diff --git a/src/Boot/Windows/BootConsoleIo.cpp b/src/Boot/Windows/BootConsoleIo.cpp index 706e36f6..e1dea4ed 100644 --- a/src/Boot/Windows/BootConsoleIo.cpp +++ b/src/Boot/Windows/BootConsoleIo.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -99,21 +99,21 @@ void Print (const uint64 &number) else PrintHex (number); } -void PrintHex (byte b) +void PrintHex (uint8 b) { PrintChar (((b >> 4) >= 0xA ? 'A' - 0xA : '0') + (b >> 4)); PrintChar (((b & 0xF) >= 0xA ? 'A' - 0xA : '0') + (b & 0xF)); } void PrintHex (uint16 data) { - PrintHex (byte (data >> 8)); - PrintHex (byte (data)); + PrintHex (uint8 (data >> 8)); + PrintHex (uint8 (data)); } void PrintHex (uint32 data) { @@ -217,13 +217,13 @@ void PrintErrorNoEndl (const char *message) Print (message); Beep(); } -byte GetShiftFlags () +uint8 GetShiftFlags () { - byte flags; + uint8 flags; __asm { mov ah, 2 int 0x16 mov flags, al @@ -231,11 +231,11 @@ byte GetShiftFlags () return flags; } -byte GetKeyboardChar () +uint8 GetKeyboardChar () { return GetKeyboardChar (nullptr); } /* @@ -251,11 +251,11 @@ inline void Sleep () int 0x15 } } */ -byte GetKeyboardChar (byte *scanCode) +uint8 GetKeyboardChar (uint8 *scanCode) { // Work around potential BIOS bugs (Windows boot manager polls the keystroke buffer) while (!IsKeyboardCharAvailable()) { // reduce CPU usage by halting CPU until the next external interrupt is fired @@ -263,12 +263,12 @@ byte GetKeyboardChar (byte *scanCode) { hlt } } - byte asciiCode; - byte scan; + uint8 asciiCode; + uint8 scan; __asm { mov ah, 0 int 0x16 mov asciiCode, al @@ -300,11 +300,11 @@ bool IsKeyboardCharAvailable () bool EscKeyPressed () { if (IsKeyboardCharAvailable ()) { - byte keyScanCode; + uint8 keyScanCode; GetKeyboardChar (&keyScanCode); return keyScanCode == TC_BIOS_KEY_ESC; } return false; @@ -344,12 +344,12 @@ bool IsDigit (char c) } int GetString (char *buffer, size_t bufferSize) { - byte c; - byte scanCode; + uint8 c; + uint8 scanCode; size_t pos = 0; while (pos < bufferSize) { c = GetKeyboardChar (&scanCode); diff --git a/src/Boot/Windows/BootConsoleIo.h b/src/Boot/Windows/BootConsoleIo.h index 349782eb..99ae860d 100644 --- a/src/Boot/Windows/BootConsoleIo.h +++ b/src/Boot/Windows/BootConsoleIo.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -43,13 +43,13 @@ void Beep (); void ClearBiosKeystrokeBuffer (); void ClearScreen (); void DisableScreenOutput (); void EnableScreenOutput (); bool EscKeyPressed (); -byte GetKeyboardChar (); -byte GetKeyboardChar (byte *scanCode); -byte GetShiftFlags (); +uint8 GetKeyboardChar (); +uint8 GetKeyboardChar (uint8 *scanCode); +uint8 GetShiftFlags (); int GetString (char *buffer, size_t bufferSize); void InitVideoMode (); bool IsKeyboardCharAvailable (); bool IsPrintable (char c); bool IsDigit (char c); @@ -62,11 +62,11 @@ void PrintCharAtCursor (char c); void PrintEndl (); void PrintEndl (int cnt); void PrintRepeatedChar (char c, int n); void PrintError (const char *message); void PrintErrorNoEndl (const char *message); -void PrintHex (byte b); +void PrintHex (uint8 b); void PrintHex (uint16 data); void PrintHex (uint32 data); void PrintHex (const uint64 &data); #endif // TC_HEADER_Boot_BootConsoleIo diff --git a/src/Boot/Windows/BootDebug.cpp b/src/Boot/Windows/BootDebug.cpp index bea063c1..9295cd31 100644 --- a/src/Boot/Windows/BootDebug.cpp +++ b/src/Boot/Windows/BootDebug.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -32,11 +32,11 @@ void InitDebugPort () int 0x17 } } -void WriteDebugPort (byte dataByte) +void WriteDebugPort (uint8 dataByte) { __asm { mov al, dataByte mov dx, TC_DEBUG_PORT @@ -80,21 +80,21 @@ void PrintVal (const char *message, const uint64 &value, bool newLine, bool hex) if (newLine) PrintEndl(); } -void PrintHexDump (byte *mem, size_t size, uint16 *memSegment) +void PrintHexDump (uint8 *mem, size_t size, uint16 *memSegment) { const size_t width = 16; for (size_t pos = 0; pos < size; ) { for (int pass = 1; pass <= 2; ++pass) { size_t i; for (i = 0; i < width && pos < size; ++i) { - byte dataByte; + uint8 dataByte; if (memSegment) { __asm { push es @@ -132,11 +132,11 @@ void PrintHexDump (byte *mem, size_t size, uint16 *memSegment) } void PrintHexDump (uint16 memSegment, uint16 memOffset, size_t size) { - PrintHexDump ((byte *) memOffset, size, &memSegment); + PrintHexDump ((uint8 *) memOffset, size, &memSegment); } #endif // TC_BOOT_DEBUG_ENABLED diff --git a/src/Boot/Windows/BootDebug.h b/src/Boot/Windows/BootDebug.h index f94ab900..febb12af 100644 --- a/src/Boot/Windows/BootDebug.h +++ b/src/Boot/Windows/BootDebug.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -49,12 +49,12 @@ # define assert(COND) #endif void InitDebugPort (); void InitStackChecker (); -void WriteDebugPort (byte dataByte); -void PrintHexDump (byte *mem, size_t size, uint16 *memSegment = nullptr); +void WriteDebugPort (uint8 dataByte); +void PrintHexDump (uint8 *mem, size_t size, uint16 *memSegment = nullptr); void PrintHexDump (uint16 memSegment, uint16 memOffset, size_t size); void PrintVal (const char *message, const uint32 value, bool newLine = true, bool hex = false); void PrintVal (const char *message, const uint64 &value, bool newLine = true, bool hex = false); #endif // TC_HEADER_Boot_BootDebug diff --git a/src/Boot/Windows/BootDefs.h b/src/Boot/Windows/BootDefs.h index 3d65f0a0..8191fb71 100644 --- a/src/Boot/Windows/BootDefs.h +++ b/src/Boot/Windows/BootDefs.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Boot/Windows/BootDiskIo.cpp b/src/Boot/Windows/BootDiskIo.cpp index 437c462e..f9ac359a 100644 --- a/src/Boot/Windows/BootDiskIo.cpp +++ b/src/Boot/Windows/BootDiskIo.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -17,11 +17,11 @@ #include "BootDefs.h" #include "BootDiskIo.h" #include "BootStrings.h" -byte SectorBuffer[TC_LB_SIZE]; +uint8 SectorBuffer[TC_LB_SIZE]; #ifdef TC_BOOT_DEBUG_ENABLED static bool SectorBufferInUse = false; void AcquireSectorBuffer () @@ -39,13 +39,13 @@ void ReleaseSectorBuffer () } #endif -bool IsLbaSupported (byte drive) +bool IsLbaSupported (uint8 drive) { - static byte CachedDrive = TC_INVALID_BIOS_DRIVE; + static uint8 CachedDrive = TC_INVALID_BIOS_DRIVE; static bool CachedStatus; uint16 result = 0; if (CachedDrive == drive) goto ret; @@ -66,11 +66,11 @@ bool IsLbaSupported (byte drive) ret: return CachedStatus; } -void PrintDiskError (BiosResult error, bool write, byte drive, const uint64 *sector, const ChsAddress *chs) +void PrintDiskError (BiosResult error, bool write, uint8 drive, const uint64 *sector, const ChsAddress *chs) { PrintEndl(); Print (write ? "Write" : "Read"); Print (" error:"); Print (error); Print (" Drive:"); @@ -107,21 +107,21 @@ void PrintSectorCountInMB (const uint64 §orCount) { Print (sectorCount >> (TC_LB_SIZE_BIT_SHIFT_DIVISOR + 2)); Print (" MiB "); } -BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffset, byte drive, const ChsAddress &chs, byte sectorCount, bool silent) +BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffset, uint8 drive, const ChsAddress &chs, uint8 sectorCount, bool silent) { CheckStack(); - byte cylinderLow = (byte) chs.Cylinder; - byte sector = chs.Sector; - sector |= byte (chs.Cylinder >> 2) & 0xc0; - byte function = write ? 0x03 : 0x02; + uint8 cylinderLow = (uint8) chs.Cylinder; + uint8 sector = chs.Sector; + sector |= uint8 (chs.Cylinder >> 2) & 0xc0; + uint8 function = write ? 0x03 : 0x02; BiosResult result; - byte tryCount = TC_MAX_BIOS_DISK_IO_RETRIES; + uint8 tryCount = TC_MAX_BIOS_DISK_IO_RETRIES; do { result = BiosResultSuccess; @@ -157,32 +157,32 @@ BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffs return result; } #ifdef TC_WINDOWS_BOOT_RESCUE_DISK_MODE -BiosResult ReadWriteSectors (bool write, byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent) +BiosResult ReadWriteSectors (bool write, uint8 *buffer, uint8 drive, const ChsAddress &chs, uint8 sectorCount, bool silent) { uint16 codeSeg; __asm mov codeSeg, cs return ReadWriteSectors (write, codeSeg, (uint16) buffer, drive, chs, sectorCount, silent); } -BiosResult ReadSectors (byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent) +BiosResult ReadSectors (uint8 *buffer, uint8 drive, const ChsAddress &chs, uint8 sectorCount, bool silent) { return ReadWriteSectors (false, buffer, drive, chs, sectorCount, silent); } #if 0 -BiosResult WriteSectors (byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent) +BiosResult WriteSectors (uint8 *buffer, uint8 drive, const ChsAddress &chs, uint8 sectorCount, bool silent) { return ReadWriteSectors (true, buffer, drive, chs, sectorCount, silent); } #endif #endif -static BiosResult ReadWriteSectors (bool write, BiosLbaPacket &dapPacket, byte drive, const uint64 §or, uint16 sectorCount, bool silent) +static BiosResult ReadWriteSectors (bool write, BiosLbaPacket &dapPacket, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent) { CheckStack(); if (!IsLbaSupported (drive)) { @@ -200,14 +200,14 @@ static BiosResult ReadWriteSectors (bool write, BiosLbaPacket &dapPacket, byte d dapPacket.Size = sizeof (dapPacket); dapPacket.Reserved = 0; dapPacket.SectorCount = sectorCount; dapPacket.Sector = sector; - byte function = write ? 0x43 : 0x42; + uint8 function = write ? 0x43 : 0x42; BiosResult result; - byte tryCount = TC_MAX_BIOS_DISK_IO_RETRIES; + uint8 tryCount = TC_MAX_BIOS_DISK_IO_RETRIES; do { result = BiosResultSuccess; @@ -235,32 +235,32 @@ static BiosResult ReadWriteSectors (bool write, BiosLbaPacket &dapPacket, byte d return result; } -BiosResult ReadWriteSectors (bool write, byte *buffer, byte drive, const uint64 §or, uint16 sectorCount, bool silent) +BiosResult ReadWriteSectors (bool write, uint8 *buffer, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent) { BiosLbaPacket dapPacket; dapPacket.Buffer = (uint32) buffer; return ReadWriteSectors (write, dapPacket, drive, sector, sectorCount, silent); } -BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffset, byte drive, const uint64 §or, uint16 sectorCount, bool silent) +BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffset, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent) { BiosLbaPacket dapPacket; dapPacket.Buffer = ((uint32) bufferSegment << 16) | bufferOffset; return ReadWriteSectors (write, dapPacket, drive, sector, sectorCount, silent); } -BiosResult ReadSectors (uint16 bufferSegment, uint16 bufferOffset, byte drive, const uint64 §or, uint16 sectorCount, bool silent) +BiosResult ReadSectors (uint16 bufferSegment, uint16 bufferOffset, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent) { return ReadWriteSectors (false, bufferSegment, bufferOffset, drive, sector, sectorCount, silent); } -BiosResult ReadSectors (byte *buffer, byte drive, const uint64 §or, uint16 sectorCount, bool silent) +BiosResult ReadSectors (uint8 *buffer, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent) { BiosResult result; uint16 codeSeg; __asm mov codeSeg, cs @@ -272,21 +272,21 @@ BiosResult ReadSectors (byte *buffer, byte drive, const uint64 §or, uint16 s return result; } -BiosResult WriteSectors (byte *buffer, byte drive, const uint64 §or, uint16 sectorCount, bool silent) +BiosResult WriteSectors (uint8 *buffer, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent) { return ReadWriteSectors (true, buffer, drive, sector, sectorCount, silent); } -BiosResult GetDriveGeometry (byte drive, DriveGeometry &geometry, bool silent) +BiosResult GetDriveGeometry (uint8 drive, DriveGeometry &geometry, bool silent) { CheckStack(); - byte maxCylinderLow, maxHead, maxSector; + uint8 maxCylinderLow, maxHead, maxSector; BiosResult result; __asm { push es mov dl, drive @@ -327,13 +327,13 @@ void ChsToLba (const DriveGeometry &geometry, const ChsAddress &chs, uint64 &lba } void LbaToChs (const DriveGeometry &geometry, const uint64 &lba, ChsAddress &chs) { - chs.Sector = (byte) ((lba.LowPart % geometry.Sectors) + 1); + chs.Sector = (uint8) ((lba.LowPart % geometry.Sectors) + 1); uint32 ch = lba.LowPart / geometry.Sectors; - chs.Head = (byte) (ch % geometry.Heads); + chs.Head = (uint8) (ch % geometry.Heads); chs.Cylinder = (uint16) (ch / geometry.Heads); } void PartitionEntryMBRToPartition (const PartitionEntryMBR &partEntry, Partition &partition) @@ -347,11 +347,11 @@ void PartitionEntryMBRToPartition (const PartitionEntryMBR &partEntry, Partition partition.StartSector.LowPart = partEntry.StartLBA; partition.Type = partEntry.Type; } -BiosResult ReadWriteMBR (bool write, byte drive, bool silent) +BiosResult ReadWriteMBR (bool write, uint8 drive, bool silent) { uint64 mbrSector; mbrSector.HighPart = 0; mbrSector.LowPart = 0; @@ -360,11 +360,11 @@ BiosResult ReadWriteMBR (bool write, byte drive, bool silent) return ReadSectors (SectorBuffer, drive, mbrSector, 1, silent); // Uses alternative segment } -BiosResult GetDrivePartitions (byte drive, Partition *partitionArray, size_t partitionArrayCapacity, size_t &partitionCount, bool activeOnly, Partition *findPartitionFollowingThis, bool silent) +BiosResult GetDrivePartitions (uint8 drive, Partition *partitionArray, size_t partitionArrayCapacity, size_t &partitionCount, bool activeOnly, Partition *findPartitionFollowingThis, bool silent) { Partition *followingPartition; Partition tmpPartition; if (findPartitionFollowingThis) @@ -417,11 +417,11 @@ BiosResult GetDrivePartitions (byte drive, Partition *partitionArray, size_t par uint64 firstExtStartLBA = partition.StartSector; uint64 extStartLBA = partition.StartSector; MBR *extMbr = (MBR *) SectorBuffer; while (partitionArrayPos < partitionArrayCapacity && - (result = ReadSectors ((byte *) extMbr, drive, extStartLBA, 1, silent)) == BiosResultSuccess + (result = ReadSectors ((uint8 *) extMbr, drive, extStartLBA, 1, silent)) == BiosResultSuccess && extMbr->Signature == 0xaa55) { if (extMbr->Partitions[0].SectorCountLBA > 0) { Partition &logPart = partitionArray[partitionArrayPos]; @@ -476,11 +476,11 @@ BiosResult GetDrivePartitions (byte drive, Partition *partitionArray, size_t par partitionCount = partitionArrayPos; return result; } -bool GetActivePartition (byte drive) +bool GetActivePartition (uint8 drive) { size_t partCount; if (GetDrivePartitions (drive, &ActivePartition, 1, partCount, true) != BiosResultSuccess || partCount < 1) { diff --git a/src/Boot/Windows/BootDiskIo.h b/src/Boot/Windows/BootDiskIo.h index 621acd8f..7936430c 100644 --- a/src/Boot/Windows/BootDiskIo.h +++ b/src/Boot/Windows/BootDiskIo.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -26,37 +26,37 @@ enum #pragma pack(1) struct PartitionEntryMBR { - byte BootIndicator; + uint8 BootIndicator; - byte StartHead; - byte StartCylSector; - byte StartCylinder; + uint8 StartHead; + uint8 StartCylSector; + uint8 StartCylinder; - byte Type; + uint8 Type; - byte EndHead; - byte EndSector; - byte EndCylinder; + uint8 EndHead; + uint8 EndSector; + uint8 EndCylinder; uint32 StartLBA; uint32 SectorCountLBA; }; struct MBR { - byte Code[446]; + uint8 Code[446]; PartitionEntryMBR Partitions[4]; uint16 Signature; }; struct BiosLbaPacket { - byte Size; - byte Reserved; + uint8 Size; + uint8 Reserved; uint16 SectorCount; uint32 Buffer; uint64 Sector; }; @@ -64,31 +64,31 @@ struct BiosLbaPacket struct ChsAddress { uint16 Cylinder; - byte Head; - byte Sector; + uint8 Head; + uint8 Sector; }; struct Partition { - byte Number; - byte Drive; + uint8 Number; + uint8 Drive; bool Active; uint64 EndSector; bool Primary; uint64 SectorCount; uint64 StartSector; - byte Type; + uint8 Type; }; struct DriveGeometry { uint16 Cylinders; - byte Heads; - byte Sectors; + uint8 Heads; + uint8 Sectors; }; #ifdef TC_BOOT_DEBUG_ENABLED void AcquireSectorBuffer (); @@ -97,25 +97,25 @@ void ReleaseSectorBuffer (); # define AcquireSectorBuffer() # define ReleaseSectorBuffer() #endif void ChsToLba (const DriveGeometry &geometry, const ChsAddress &chs, uint64 &lba); -bool GetActivePartition (byte drive); -BiosResult GetDriveGeometry (byte drive, DriveGeometry &geometry, bool silent = false); -BiosResult GetDrivePartitions (byte drive, Partition *partitionArray, size_t partitionArrayCapacity, size_t &partitionCount, bool activeOnly = false, Partition *findPartitionFollowingThis = nullptr, bool silent = false); -bool IsLbaSupported (byte drive); +bool GetActivePartition (uint8 drive); +BiosResult GetDriveGeometry (uint8 drive, DriveGeometry &geometry, bool silent = false); +BiosResult GetDrivePartitions (uint8 drive, Partition *partitionArray, size_t partitionArrayCapacity, size_t &partitionCount, bool activeOnly = false, Partition *findPartitionFollowingThis = nullptr, bool silent = false); +bool IsLbaSupported (uint8 drive); void LbaToChs (const DriveGeometry &geometry, const uint64 &lba, ChsAddress &chs); void Print (const ChsAddress &chs); -void PrintDiskError (BiosResult error, bool write, byte drive, const uint64 *sector, const ChsAddress *chs = nullptr); +void PrintDiskError (BiosResult error, bool write, uint8 drive, const uint64 *sector, const ChsAddress *chs = nullptr); void PrintSectorCountInMB (const uint64 §orCount); -BiosResult ReadWriteMBR (bool write, byte drive, bool silent = false); -BiosResult ReadSectors (uint16 bufferSegment, uint16 bufferOffset, byte drive, const uint64 §or, uint16 sectorCount, bool silent = false); -BiosResult ReadSectors (byte *buffer, byte drive, const uint64 §or, uint16 sectorCount, bool silent = false); -BiosResult ReadSectors (byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent = false); -BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffset, byte drive, const uint64 §or, uint16 sectorCount, bool silent); -BiosResult ReadWriteSectors (bool write, byte *buffer, byte drive, const uint64 §or, uint16 sectorCount, bool silent); -BiosResult WriteSectors (byte *buffer, byte drive, const uint64 §or, uint16 sectorCount, bool silent = false); -BiosResult WriteSectors (byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent = false); - -extern byte SectorBuffer[TC_LB_SIZE]; +BiosResult ReadWriteMBR (bool write, uint8 drive, bool silent = false); +BiosResult ReadSectors (uint16 bufferSegment, uint16 bufferOffset, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent = false); +BiosResult ReadSectors (uint8 *buffer, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent = false); +BiosResult ReadSectors (uint8 *buffer, uint8 drive, const ChsAddress &chs, uint8 sectorCount, bool silent = false); +BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffset, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent); +BiosResult ReadWriteSectors (bool write, uint8 *buffer, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent); +BiosResult WriteSectors (uint8 *buffer, uint8 drive, const uint64 §or, uint16 sectorCount, bool silent = false); +BiosResult WriteSectors (uint8 *buffer, uint8 drive, const ChsAddress &chs, uint8 sectorCount, bool silent = false); + +extern uint8 SectorBuffer[TC_LB_SIZE]; #endif // TC_HEADER_Boot_BootDiskIo diff --git a/src/Boot/Windows/BootEncryptedIo.cpp b/src/Boot/Windows/BootEncryptedIo.cpp index 8ca55635..731fae44 100644 --- a/src/Boot/Windows/BootEncryptedIo.cpp +++ b/src/Boot/Windows/BootEncryptedIo.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -17,11 +17,11 @@ #include "BootDefs.h" #include "BootDiskIo.h" #include "BootEncryptedIo.h" -BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, byte drive, uint64 sector, uint16 sectorCount) +BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, uint8 drive, uint64 sector, uint16 sectorCount) { BiosResult result; bool decrypt = true; if (BootCryptoInfo->hiddenVolume) @@ -74,11 +74,11 @@ BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, byte dri return result; } -BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount) +BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, uint8 drive, uint64 sector, uint16 sectorCount) { BiosResult result = BiosResultSuccess; AcquireSectorBuffer(); uint64 dataUnitNo; uint64 writeOffset; diff --git a/src/Boot/Windows/BootEncryptedIo.h b/src/Boot/Windows/BootEncryptedIo.h index d1c9e5f3..1ada93ec 100644 --- a/src/Boot/Windows/BootEncryptedIo.h +++ b/src/Boot/Windows/BootEncryptedIo.h @@ -2,21 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_Boot_BootEncryptionIo #define TC_HEADER_Boot_BootEncryptionIo #include "Platform.h" -BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, byte drive, uint64 sector, uint16 sectorCount); -BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount); +BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, uint8 drive, uint64 sector, uint16 sectorCount); +BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, uint8 drive, uint64 sector, uint16 sectorCount); static bool ReadWritePartiallyCoversEncryptedArea (const uint64 §or, uint16 sectorCount); #endif // TC_HEADER_Boot_BootEncryptionIo diff --git a/src/Boot/Windows/BootMain.cpp b/src/Boot/Windows/BootMain.cpp index 8bfbe4b3..9f4b8613 100644 --- a/src/Boot/Windows/BootMain.cpp +++ b/src/Boot/Windows/BootMain.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -82,11 +82,11 @@ static void PrintMainMenu () PrintEndl (3); } -static bool IsMenuKey (byte scanCode) +static bool IsMenuKey (uint8 scanCode) { #ifdef TC_WINDOWS_BOOT_RESCUE_DISK_MODE return scanCode == TC_MENU_KEY_REPAIR; #else return false; @@ -147,16 +147,16 @@ static int AskSelection (const char *options[], size_t optionCount) PrintBackspace(); } } -static byte AskPassword (Password &password, int& pim) +static uint8 AskPassword (Password &password, int& pim) { size_t pos = 0; - byte scanCode; - byte asciiCode; - byte hidePassword = 1; + uint8 scanCode; + uint8 asciiCode; + uint8 hidePassword = 1; pim = 0; Print ("Enter password"); Print (PreventNormalSystemBoot ? " for hidden system:\r\n" : ": "); @@ -310,11 +310,11 @@ static byte AskPassword (Password &password, int& pim) } } } -static void ExecuteBootSector (byte drive, byte *sectorBuffer) +static void ExecuteBootSector (uint8 drive, uint8 *sectorBuffer) { Print ("Booting...\r\n"); CopyMemory (sectorBuffer, 0x0000, 0x7c00, TC_LB_SIZE); BootStarted = true; @@ -336,11 +336,11 @@ static void ExecuteBootSector (byte drive, byte *sectorBuffer) jmp cs:addr } } -static bool OpenVolume (byte drive, Password &password, int pim, CRYPTO_INFO **cryptoInfo, uint32 *headerSaltCrc32, bool skipNormal, bool skipHidden) +static bool OpenVolume (uint8 drive, Password &password, int pim, CRYPTO_INFO **cryptoInfo, uint32 *headerSaltCrc32, bool skipNormal, bool skipHidden) { int volumeType; bool hiddenVolume; uint64 headerSec; @@ -367,11 +367,11 @@ static bool OpenVolume (byte drive, Password &password, int pim, CRYPTO_INFO **c } if (ReadSectors (SectorBuffer, drive, headerSec, 1) != BiosResultSuccess) continue; - if (ReadVolumeHeader (!hiddenVolume, (char *) SectorBuffer, &password, pim, cryptoInfo, nullptr) == ERR_SUCCESS) + if (ReadVolumeHeader (!hiddenVolume, SectorBuffer, &password, pim, cryptoInfo, nullptr) == ERR_SUCCESS) { // Prevent opening a non-system hidden volume if (hiddenVolume && !((*cryptoInfo)->HeaderFlags & TC_HEADER_FLAG_ENCRYPTED_SYSTEM)) { crypto_close (*cryptoInfo); @@ -418,11 +418,11 @@ static bool CheckMemoryRequirements () return true; } -static bool MountVolume (byte drive, byte &exitKey, bool skipNormal, bool skipHidden) +static bool MountVolume (uint8 drive, uint8 &exitKey, bool skipNormal, bool skipHidden) { BootArguments *bootArguments = (BootArguments *) TC_BOOT_LOADER_ARGS_OFFSET; int incorrectPasswordCount = 0, pim = 0; EraseMemory (bootArguments, sizeof (*bootArguments)); @@ -497,11 +497,11 @@ static bool MountVolume (byte drive, byte &exitKey, bool skipNormal, bool skipHi return true; } -static bool GetSystemPartitions (byte drive) +static bool GetSystemPartitions (uint8 drive) { size_t partCount; if (!GetActivePartition (drive)) return false; @@ -522,14 +522,14 @@ static bool GetSystemPartitions (byte drive) return true; } -static byte BootEncryptedDrive () +static uint8 BootEncryptedDrive () { BootArguments *bootArguments = (BootArguments *) TC_BOOT_LOADER_ARGS_OFFSET; - byte exitKey; + uint8 exitKey; BootCryptoInfo = NULL; if (!GetSystemPartitions (BootDrive)) goto err; @@ -554,11 +554,11 @@ static byte BootEncryptedDrive () bootArguments->BootDriveSignature = *(uint32 *) (SectorBuffer + 0x1b8); if (!InstallInterruptFilters()) goto err; - bootArguments->BootArgumentsCrc32 = GetCrc32 ((byte *) bootArguments, (byte *) &bootArguments->BootArgumentsCrc32 - (byte *) bootArguments); + bootArguments->BootArgumentsCrc32 = GetCrc32 ((uint8 *) bootArguments, (uint8 *) &bootArguments->BootArgumentsCrc32 - (uint8 *) bootArguments); while (true) { // Execute boot sector of the active partition if (ReadSectors (SectorBuffer, ActivePartition.Drive, ActivePartition.StartSector, 1) == BiosResultSuccess) @@ -585,11 +585,11 @@ err: PimValueOrHiddenVolumeStartUnitNo.LowPart = -1; #endif EncryptedVirtualPartition.Drive = TC_INVALID_BIOS_DRIVE; EraseMemory ((void *) TC_BOOT_LOADER_ARGS_OFFSET, sizeof (BootArguments)); - byte scanCode; + uint8 scanCode; GetKeyboardChar (&scanCode); return scanCode; } @@ -599,11 +599,11 @@ static void BootMenu () Partition partitions[16]; Partition bootablePartitions[9]; size_t partitionCount; size_t bootablePartitionCount = 0; - for (byte drive = TC_FIRST_BIOS_DRIVE; drive <= TC_LAST_BIOS_DRIVE; ++drive) + for (uint8 drive = TC_FIRST_BIOS_DRIVE; drive <= TC_LAST_BIOS_DRIVE; ++drive) { if (GetDrivePartitions (drive, partitions, array_capacity (partitions), partitionCount, false, nullptr, true) == BiosResultSuccess) { for (size_t i = 0; i < partitionCount; ++i) { @@ -687,11 +687,11 @@ static void BootMenu () } #ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE -static bool CopySystemPartitionToHiddenVolume (byte drive, byte &exitKey) +static bool CopySystemPartitionToHiddenVolume (uint8 drive, uint8 &exitKey) { bool status = false; uint64 sectorsRemaining; uint64 sectorOffset; @@ -810,13 +810,13 @@ ret: #else // TC_WINDOWS_BOOT_RESCUE_DISK_MODE -static void DecryptDrive (byte drive) +static void DecryptDrive (uint8 drive) { - byte exitKey; + uint8 exitKey; if (!MountVolume (drive, exitKey, false, true)) return; BootArguments *bootArguments = (BootArguments *) TC_BOOT_LOADER_ARGS_OFFSET; @@ -915,27 +915,27 @@ askBadSectorSkip: // Update encrypted area size in volume header CRYPTO_INFO *headerCryptoInfo = crypto_open(); while (ReadSectors (SectorBuffer, drive, headerSector, 1) != BiosResultSuccess); - if (ReadVolumeHeader (TRUE, (char *) SectorBuffer, &bootArguments->BootPassword, (int) (bootArguments->Flags >> 16), NULL, headerCryptoInfo) == 0) + if (ReadVolumeHeader (TRUE, SectorBuffer, &bootArguments->BootPassword, (int) (bootArguments->Flags >> 16), NULL, headerCryptoInfo) == 0) { DecryptBuffer (SectorBuffer + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, headerCryptoInfo); uint64 encryptedAreaLength = sectorsRemaining << TC_LB_SIZE_BIT_SHIFT_DIVISOR; for (int i = 7; i >= 0; --i) { - SectorBuffer[TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH + i] = (byte) encryptedAreaLength.LowPart; + SectorBuffer[TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH + i] = (uint8) encryptedAreaLength.LowPart; encryptedAreaLength = encryptedAreaLength >> 8; } uint32 headerCrc32 = GetCrc32 (SectorBuffer + TC_HEADER_OFFSET_MAGIC, TC_HEADER_OFFSET_HEADER_CRC - TC_HEADER_OFFSET_MAGIC); for (i = 3; i >= 0; --i) { - SectorBuffer[TC_HEADER_OFFSET_HEADER_CRC + i] = (byte) headerCrc32; + SectorBuffer[TC_HEADER_OFFSET_HEADER_CRC + i] = (uint8) headerCrc32; headerCrc32 >>= 8; } EncryptBuffer (SectorBuffer + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, headerCryptoInfo); } @@ -1018,11 +1018,11 @@ static void RepairMenu () uint64 sector; sector.HighPart = 0; ChsAddress chs; - byte mbrPartTable[TC_LB_SIZE - TC_MAX_MBR_BOOT_CODE_SIZE]; + uint8 mbrPartTable[TC_LB_SIZE - TC_MAX_MBR_BOOT_CODE_SIZE]; AcquireSectorBuffer(); for (int i = (selection == RestoreVolumeHeader ? TC_BOOT_VOLUME_HEADER_SECTOR : TC_MBR_SECTOR); i < TC_BOOT_LOADER_AREA_SECTOR_COUNT; ++i) { @@ -1071,11 +1071,11 @@ static void RepairMenu () bool validHeaderPresent = false; uint32 masterKeyScheduleCrc; Password password; int pim; - byte exitKey = AskPassword (password, pim); + uint8 exitKey = AskPassword (password, pim); if (exitKey != TC_BIOS_KEY_ENTER) goto abort; CRYPTO_INFO *cryptoInfo; @@ -1092,11 +1092,11 @@ static void RepairMenu () } AcquireSectorBuffer(); CopyMemory (TC_BOOT_LOADER_BUFFER_SEGMENT, 0, SectorBuffer, TC_LB_SIZE); - if (ReadVolumeHeader (TRUE, (char *) SectorBuffer, &password, pim, &cryptoInfo, nullptr) == 0) + if (ReadVolumeHeader (TRUE, SectorBuffer, &password, pim, &cryptoInfo, nullptr) == 0) { if (validHeaderPresent) { if (masterKeyScheduleCrc == GetCrc32 (cryptoInfo->ks, sizeof (cryptoInfo->ks))) { @@ -1219,17 +1219,17 @@ void main () // Main menu while (true) { - byte exitKey; + uint8 exitKey; InitScreen(); #ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE // Hidden system setup - byte hiddenSystemCreationPhase = BootSectorFlags & TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE; + uint8 hiddenSystemCreationPhase = BootSectorFlags & TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE; if (hiddenSystemCreationPhase != TC_HIDDEN_OS_CREATION_PHASE_NONE) { PreventNormalSystemBoot = true; PrintMainMenu(); diff --git a/src/Boot/Windows/BootMain.h b/src/Boot/Windows/BootMain.h index 52d5c8cc..77a662b4 100644 --- a/src/Boot/Windows/BootMain.h +++ b/src/Boot/Windows/BootMain.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -14,20 +14,20 @@ #define TC_HEADER_Boot_BootMain #include "TCdefs.h" #include "Platform.h" -static byte AskPassword (Password &password, int& pim); +static uint8 AskPassword (Password &password, int& pim); static int AskSelection (const char *options[], size_t optionCount); static bool AskYesNo (const char *message); -static byte BootEncryptedDrive (); +static uint8 BootEncryptedDrive (); static void BootMenu (); -static void ExecuteBootSector (byte drive, byte *sectorBuffer); +static void ExecuteBootSector (uint8 drive, uint8 *sectorBuffer); static void InitScreen (); -static bool IsMenuKey (byte scanCode); -static bool MountVolume (byte drive, byte &exitKey); -static bool OpenVolume (byte drive, Password &password, CRYPTO_INFO **cryptoInfo, uint32 *headerSaltCrc32 = nullptr, bool skipNormal = false, bool skipHidden = false); +static bool IsMenuKey (uint8 scanCode); +static bool MountVolume (uint8 drive, uint8 &exitKey); +static bool OpenVolume (uint8 drive, Password &password, CRYPTO_INFO **cryptoInfo, uint32 *headerSaltCrc32 = nullptr, bool skipNormal = false, bool skipHidden = false); static void PrintMainMenu (); static void RepairMenu (); #define TC_MENU_KEY_REPAIR TC_BIOS_KEY_F8 diff --git a/src/Boot/Windows/BootMemory.cpp b/src/Boot/Windows/BootMemory.cpp index 9eed757f..2fedb308 100644 --- a/src/Boot/Windows/BootMemory.cpp +++ b/src/Boot/Windows/BootMemory.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Boot/Windows/BootMemory.h b/src/Boot/Windows/BootMemory.h index 183c4469..96f56374 100644 --- a/src/Boot/Windows/BootMemory.h +++ b/src/Boot/Windows/BootMemory.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Boot/Windows/BootStrings.h b/src/Boot/Windows/BootStrings.h index b7cfe703..4d0dd3b4 100644 --- a/src/Boot/Windows/BootStrings.h +++ b/src/Boot/Windows/BootStrings.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Boot/Windows/IntFilter.cpp b/src/Boot/Windows/IntFilter.cpp index 9e5c8536..5ec07622 100644 --- a/src/Boot/Windows/IntFilter.cpp +++ b/src/Boot/Windows/IntFilter.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -36,11 +36,11 @@ bool Int13Filter () __asm sti static int ReEntryCount = -1; ++ReEntryCount; - byte function = (byte) (regs.AX >> 8); + uint8 function = (uint8) (regs.AX >> 8); #ifdef TC_TRACE_INT13 DisableScreenOutput(); PrintHex (function); @@ -61,18 +61,18 @@ bool Int13Filter () switch (function) { case 0x2: // Read sectors case 0x3: // Write sectors { - byte drive = (byte) regs.DX; + uint8 drive = (uint8) regs.DX; ChsAddress chs; chs.Cylinder = ((regs.CX << 2) & 0x300) | (regs.CX >> 8); chs.Head = regs.DX >> 8; chs.Sector = regs.CX & 0x3f; - byte sectorCount = (byte) regs.AX; + uint8 sectorCount = (uint8) regs.AX; #ifdef TC_TRACE_INT13 PrintVal (": Drive", drive - TC_FIRST_BIOS_DRIVE, false); Print (" Chs: "); Print (chs); #endif @@ -123,14 +123,14 @@ bool Int13Filter () break; case 0x42: // Read sectors LBA case 0x43: // Write sectors LBA { - byte drive = (byte) regs.DX; + uint8 drive = (uint8) regs.DX; BiosLbaPacket lba; - CopyMemory (regs.DS, regs.SI, (byte *) &lba, sizeof (lba)); + CopyMemory (regs.DS, regs.SI, (uint8 *) &lba, sizeof (lba)); #ifdef TC_TRACE_INT13 PrintVal (": Drive", drive - TC_FIRST_BIOS_DRIVE, false); PrintVal (" Sec", lba.Sector.LowPart, false); PrintVal (" Count", lba.SectorCount, false); @@ -335,11 +335,11 @@ bool Int15Filter () IntRegisters.EBX = 0; IntRegisters.AX = -1; } else { - CopyMemory ((byte *) &BiosMemoryMap[IntRegisters.EBX], IntRegisters.ES, IntRegisters.DI, sizeof (BiosMemoryMap[0])); + CopyMemory ((uint8 *) &BiosMemoryMap[IntRegisters.EBX], IntRegisters.ES, IntRegisters.DI, sizeof (BiosMemoryMap[0])); IntRegisters.Flags &= ~TC_X86_CARRY_FLAG; IntRegisters.EAX = 0x534D4150UL; ++IntRegisters.EBX; @@ -378,11 +378,11 @@ bool Int15Filter () } } #ifdef TC_TRACE_INT15 BiosMemoryMapEntry entry; - CopyMemory (IntRegisters.ES, IntRegisters.DI, (byte *) &entry, sizeof (entry)); + CopyMemory (IntRegisters.ES, IntRegisters.DI, (uint8 *) &entry, sizeof (entry)); PrintHex (entry.Type); PrintChar (' '); PrintHex (entry.BaseAddress); PrintChar (' '); PrintHex (entry.Length); PrintChar (' '); PrintHex (entry.BaseAddress + entry.Length); PrintEndl(); diff --git a/src/Boot/Windows/IntFilter.h b/src/Boot/Windows/IntFilter.h index 65b0c7ce..e9625b64 100644 --- a/src/Boot/Windows/IntFilter.h +++ b/src/Boot/Windows/IntFilter.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Boot/Windows/Platform.cpp b/src/Boot/Windows/Platform.cpp index 046fa4a4..f592e26d 100644 --- a/src/Boot/Windows/Platform.cpp +++ b/src/Boot/Windows/Platform.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -82,11 +82,11 @@ uint64 operator>> (const uint64 &a, int shiftCount) while (shiftCount--) { r.LowPart >>= 1; - if ((byte) r.HighPart & 1) + if ((uint8) r.HighPart & 1) r.LowPart |= 0x80000000UL; r.HighPart >>= 1; } diff --git a/src/Boot/Windows/Platform.h b/src/Boot/Windows/Platform.h index 1c41ec03..cec9d0c7 100644 --- a/src/Boot/Windows/Platform.h +++ b/src/Boot/Windows/Platform.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Boot/Windows/Release/BootLoader.com.gz b/src/Boot/Windows/Release/BootLoader.com.gz Binary files differindex 45555bfa..23c921f8 100644 --- a/src/Boot/Windows/Release/BootLoader.com.gz +++ b/src/Boot/Windows/Release/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_AES/BootLoader.com.gz b/src/Boot/Windows/Release_AES/BootLoader.com.gz Binary files differindex a7111e97..ab262fed 100644 --- a/src/Boot/Windows/Release_AES/BootLoader.com.gz +++ b/src/Boot/Windows/Release_AES/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gz Binary files differindex 5de03fc5..25a89b3e 100644 --- a/src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_Camellia/BootLoader.com.gz b/src/Boot/Windows/Release_Camellia/BootLoader.com.gz Binary files differindex 55713c75..5cf49d63 100644 --- a/src/Boot/Windows/Release_Camellia/BootLoader.com.gz +++ b/src/Boot/Windows/Release_Camellia/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gz Binary files differindex f491a544..2a231431 100644 --- a/src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_SHA2/BootLoader.com.gz Binary files differindex ecee0346..33413df5 100644 --- a/src/Boot/Windows/Release_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Release_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_Serpent/BootLoader.com.gz b/src/Boot/Windows/Release_Serpent/BootLoader.com.gz Binary files differindex 08076d89..7f330347 100644 --- a/src/Boot/Windows/Release_Serpent/BootLoader.com.gz +++ b/src/Boot/Windows/Release_Serpent/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gz Binary files differindex acf22c9b..50592bba 100644 --- a/src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_Twofish/BootLoader.com.gz b/src/Boot/Windows/Release_Twofish/BootLoader.com.gz Binary files differindex 22952d23..64d147af 100644 --- a/src/Boot/Windows/Release_Twofish/BootLoader.com.gz +++ b/src/Boot/Windows/Release_Twofish/BootLoader.com.gz diff --git a/src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gz Binary files differindex 2b08d8e7..8b4664fe 100644 --- a/src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue/BootLoader.com.gz b/src/Boot/Windows/Rescue/BootLoader.com.gz Binary files differindex 48b893a2..a12b1cab 100644 --- a/src/Boot/Windows/Rescue/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_AES/BootLoader.com.gz b/src/Boot/Windows/Rescue_AES/BootLoader.com.gz Binary files differindex 4001ab92..edbe080b 100644 --- a/src/Boot/Windows/Rescue_AES/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_AES/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gz Binary files differindex e75fcb0f..c10db1c7 100644 --- a/src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_Camellia/BootLoader.com.gz b/src/Boot/Windows/Rescue_Camellia/BootLoader.com.gz Binary files differindex 2b799301..c260583a 100644 --- a/src/Boot/Windows/Rescue_Camellia/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_Camellia/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gz Binary files differindex 734de5e9..04c98ddb 100644 --- a/src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_SHA2/BootLoader.com.gz Binary files differindex 9a8bd28a..fdddea41 100644 --- a/src/Boot/Windows/Rescue_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_Serpent/BootLoader.com.gz b/src/Boot/Windows/Rescue_Serpent/BootLoader.com.gz Binary files differindex 1ecf35a4..27b9418a 100644 --- a/src/Boot/Windows/Rescue_Serpent/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_Serpent/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gz Binary files differindex b44e8829..5fbde6fc 100644 --- a/src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_Twofish/BootLoader.com.gz b/src/Boot/Windows/Rescue_Twofish/BootLoader.com.gz Binary files differindex 947623be..06df2b66 100644 --- a/src/Boot/Windows/Rescue_Twofish/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_Twofish/BootLoader.com.gz diff --git a/src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gz Binary files differindex a999cc70..375de162 100644 --- a/src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gz +++ b/src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gz diff --git a/src/Build/CMakeLists.txt b/src/Build/CMakeLists.txt index 255e3c27..e3426495 100644 --- a/src/Build/CMakeLists.txt +++ b/src/Build/CMakeLists.txt @@ -9,12 +9,12 @@ if ( NOT DEFINED VERACRYPT_BUILD_DIR ) elseif ( NOT DEFINED NOGUI ) MESSAGE(FATAL_ERROR "NOGUI variable MUST BE set to TRUE if building 'Console' version, 'FALSE' otherwise") endif() # - Set version of the package -set( FULL_VERSION "1.26.8" ) -set( VERSION "1.26.8" ) +set( FULL_VERSION "1.26.20" ) +set( VERSION "1.26.20" ) set( RELEASE "1" ) # - Set PROJECT_NAME and CONFLICT_PACKAGE values if (NOGUI) set( PROJECT_NAME "veracrypt-console" ) @@ -109,10 +109,19 @@ if ( UNIX ) set ( PLATFORM "CentOS" ) file(READ "/etc/centos-release" CENTOS_RELEASE) string(REGEX MATCH "release ([0-9 /\\.]+)" _ ${CENTOS_RELEASE}) set(PLATFORM_VERSION ${CMAKE_MATCH_1}) + + # Get fedora release version + elseif(EXISTS "/etc/fedora-release") + + set ( PLATFORM "Fedora" ) + + file(READ "/etc/fedora-release" FEDORA_RELEASE) + string(REGEX MATCH "release ([0-9 /\\.]+)" _ ${FEDORA_RELEASE}) + set(PLATFORM_VERSION ${CMAKE_MATCH_1}) # Only if distribution uses systemd and if all previous files didn't exist # i.e OpenSUSE elseif(EXISTS "/etc/os-release") @@ -126,10 +135,12 @@ if ( UNIX ) set ( PLATFORM "Ubuntu" ) elseif ( FULL_PLATFORM MATCHES "^.*Debian.*$") set ( PLATFORM "Debian" ) elseif ( FULL_PLATFORM MATCHES "^.*CentOS.*$" ) set ( PLATFORM "CentOS" ) + elseif ( FULL_PLATFORM MATCHES "^.*Fedora.*$" ) + set ( PLATFORM "Fedora" ) endif ( ) # Get ditribution release version file(READ "/etc/os-release" OS_RELEASE) string(REGEX MATCH "VERSION=\"([a-zA-Z0-9 /\\.]+)\"" _ ${OS_RELEASE}) @@ -162,11 +173,11 @@ if ( PLATFORM STREQUAL "Debian" OR PLATFORM STREQUAL "Ubuntu" ) endif() else( ) execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) endif( ) -elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) ) +elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) OR ( PLATFORM STREQUAL "Fedora" )) execute_process(COMMAND arch OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) else () @@ -239,21 +250,46 @@ if ( ( PLATFORM STREQUAL "Debian" ) OR ( PLATFORM STREQUAL "Ubuntu" ) ) set( DEBIAN_PRERM ${CMAKE_CURRENT_BINARY_DIR}/Packaging/debian-control/prerm) set( CPACK_GENERATOR "DEB" ) # mandatory set( CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME} ) # mandatory set( CPACK_DEBIAN_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.deb ) # mandatory - set( CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION} ) # mandatory + # -- Use a distro-specific version string to avoid repository conflicts -- + # e.g. 1.26.17-1~deb11, 1.26.17-1~deb12, 1.26.17-1~ubuntu20.04, etc. + if (PLATFORM STREQUAL "Ubuntu") + # For something like "24.04", it becomes 1.26.17-1~ubuntu24.04 + set(CPACK_DEBIAN_PACKAGE_VERSION + "${VERSION}-${RELEASE}~ubuntu${PLATFORM_VERSION}") + else() # Debian + # Usually just take the major number from e.g. "11.7" => "11" + string(REGEX MATCH "^[0-9]+" PLATFORM_VERSION_MAJOR "${PLATFORM_VERSION}") + set(CPACK_DEBIAN_PACKAGE_VERSION + "${VERSION}-${RELEASE}~deb${PLATFORM_VERSION_MAJOR}") + endif() + set( CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE} ) set( CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCHITECTURE} ) # mandatory if (NOGUI) # Link against statically built wxWidgets so that we don't depend on any GTK library - set( CPACK_DEBIAN_PACKAGE_DEPENDS "libfuse2, dmsetup, sudo, libpcsclite1, pcscd" ) + # In case of Ubuntu 24.04/ Debian 13 or newer, libfuse2 package was renamed libfuse2t64 + if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "13" ) ) + OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "24.04" ) ) ) + set( CPACK_DEBIAN_PACKAGE_DEPENDS "libfuse2t64, dmsetup, sudo, libpcsclite1, pcscd" ) + else () + set( CPACK_DEBIAN_PACKAGE_DEPENDS "libfuse2, dmsetup, sudo, libpcsclite1, pcscd" ) + endif() else () # Link against gtk3 version of wxWidgets if >= Debian 10 or >= Ubuntu 18.04 # Otherwise, link against gtk2 version of wxWidgets - if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "12" ) ) + # In case of Ubuntu 24.04, we depend on libfuse2t64 instead of libfuse2 and we link statically against wxWidgets + # because there is a bug in wxWidgets that ships with Ubuntu 24.04 and which was fixed in wxWidgets 3.2.5 + if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "13" ) ) + OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "24.04" ) ) ) + + set( CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0t64, libayatana-appindicator3-1, libfuse2t64, dmsetup, sudo, libpcsclite1, pcscd" ) + + elseif ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "12" ) ) OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "23.04" ) ) ) set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.2-1, libayatana-appindicator3-1, libfuse2, dmsetup, sudo, libpcsclite1, pcscd" ) elseif ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "10" ) ) @@ -280,11 +316,11 @@ if ( ( PLATFORM STREQUAL "Debian" ) OR ( PLATFORM STREQUAL "Ubuntu" ) ) set( CPACK_DEBIAN_PACKAGE_PRIORITY "optional" ) # mandatory set( CPACK_DEBIAN_PACKAGE_SECTION "libs" ) # recommended, Section relative to Debian sections (https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${DEBIAN_PREINST};${DEBIAN_POSTINST};${DEBIAN_PRERM};${DEBIAN_POSTRM}) set(CPACK_DEBIAN_PACKAGE_CONFLICTS "${CONFLICT_PACKAGE}") -elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) ) +elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) OR ( PLATFORM STREQUAL "Fedora" )) # RPM control script(s) file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Packaging/rpm-control) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Packaging/rpm-control/prerm.sh ${CMAKE_CURRENT_BINARY_DIR}/Packaging/rpm-control/prerm.sh) set( RPM_PRERM ${CMAKE_CURRENT_BINARY_DIR}/Packaging/rpm-control/prerm.sh) @@ -303,21 +339,17 @@ elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) ) set( CPACK_RPM_PACKAGE_AUTOREQ "no" ) # disable automatic shared libraries dependency detection (most of the time buggy) if (NOGUI) set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, sudo" ) else () - if ( PLATFORM STREQUAL "CentOS" ) - - if ( DEFINED WITHGTK3 AND WITHGTK3 ) - set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo, pcsc-lite" ) - else () - set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo, pcsc-lite" ) - endif() - - elseif ( PLATFORM STREQUAL "openSUSE" ) - - set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo, pcsc-lite" ) + find_package(PkgConfig REQUIRED) + pkg_check_modules(GTK3 gtk+-3.0) + + if(GTK3_FOUND) + set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo, pcsc-lite" ) + else() + set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo, pcsc-lite" ) endif() endif() set( CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${RPM_PRERM}) # optional diff --git a/src/Build/Include/Makefile.inc b/src/Build/Include/Makefile.inc index b7ed20c9..281d206a 100644 --- a/src/Build/Include/Makefile.inc +++ b/src/Build/Include/Makefile.inc @@ -12,11 +12,11 @@ $(NAME): $(NAME).a clean: @echo Cleaning $(NAME) - rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJSEX) $(OBJSNOOPT) $(OBJSSSE41) $(OBJSSSSE3) $(OBJS:.o=.d) $(OBJSEX:.oo=.d) $(OBJSNOOPT:.o0=.d) $(OBJSSSE41:.osse41=.d) $(OBJSSSSE3:.ossse3=.d) *.gch + rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJSEX) $(OBJSNOOPT) $(OBJSHANI) $(OBJSSSE41) $(OBJSSSSE3) $(OBJARMV8CRYPTO) $(OBJS:.o=.d) $(OBJSEX:.oo=.d) $(OBJSNOOPT:.o0=.d) $(OBJSHANI:.oshani=.d) $(OBJSSSE41:.osse41=.d) $(OBJSSSSE3:.ossse3=.d) $(OBJARMV8CRYPTO:.oarmv8crypto=.d) *.gch %.o: %.c @echo Compiling $(<F) $(CC) $(CFLAGS) -c $< -o $@ @@ -25,22 +25,34 @@ clean: $(CC) $(CFLAGS) -O0 -c $< -o $@ %.osse41: %.c @echo Compiling $(<F) $(CC) $(CFLAGS) -mssse3 -msse4.1 -c $< -o $@ + +%.oshani: %.c + @echo Compiling $(<F) + $(CC) $(CFLAGS) -mssse3 -msse4.1 -msha -c $< -o $@ %.ossse3: %.c @echo Compiling $(<F) $(CC) $(CFLAGS) -mssse3 -c $< -o $@ +%.oarmv8crypto: %.c + @echo Compiling $(<F) + $(CC) $(CFLAGS) -march=armv8-a+crypto -c $< -o $@ + %.o: %.cpp @echo Compiling $(<F) $(CXX) $(CXXFLAGS) -c $< -o $@ %.osse41: %.cpp @echo Compiling $(<F) $(CXX) $(CXXFLAGS) -mssse3 -msse4.1 -c $< -o $@ + +%.oshani: %.cpp + @echo Compiling $(<F) + $(CXX) $(CXXFLAGS) -mssse3 -msse4.1 -msha -c $< -o $@ %.ossse3: %.cpp @echo Compiling $(<F) $(CXX) $(CXXFLAGS) -mssse3 -c $< -o $@ @@ -86,12 +98,12 @@ TR_SED_BIN := tr '\n' ' ' | tr -s ' ' ',' | sed -e 's/^,//g' -e 's/,$$/n/' | tr @echo Converting $(<F) $(OD_BIN) $< | $(TR_SED_BIN) >$@ # Dependencies --include $(OBJS:.o=.d) $(OBJSEX:.oo=.d) $(OBJSNOOPT:.o0=.d) $(OBJSSSE41:.osse41=.d) $(OBJSSSSE3:.ossse3=.d) +-include $(OBJS:.o=.d) $(OBJSEX:.oo=.d) $(OBJSNOOPT:.o0=.d) $(OBJSHANI:.oshani=.d) $(OBJSSSE41:.osse41=.d) $(OBJSSSSE3:.ossse3=.d) $(OBJARMV8CRYPTO:.oarmv8crypto=.d) -$(NAME).a: $(OBJS) $(OBJSEX) $(OBJSNOOPT) $(OBJSSSE41) $(OBJSSSSE3) +$(NAME).a: $(OBJS) $(OBJSEX) $(OBJSNOOPT) $(OBJSHANI) $(OBJSSSE41) $(OBJSSSSE3) $(OBJARMV8CRYPTO) @echo Updating library $@ - $(AR) $(AFLAGS) -rcu $@ $(OBJS) $(OBJSEX) $(OBJSNOOPT) $(OBJSSSE41) $(OBJSSSSE3) + $(AR) $(AFLAGS) -rc $@ $(OBJS) $(OBJSEX) $(OBJSNOOPT) $(OBJSHANI) $(OBJSSSE41) $(OBJSSSSE3) $(OBJARMV8CRYPTO) $(RANLIB) $@ diff --git a/src/Build/Resources/MacOSX/Info.plist.legacy.xml b/src/Build/Resources/MacOSX/Info.plist.legacy.xml index ccb97831..5b9ced6e 100644 --- a/src/Build/Resources/MacOSX/Info.plist.legacy.xml +++ b/src/Build/Resources/MacOSX/Info.plist.legacy.xml @@ -72,11 +72,11 @@ <key>CFBundleSignature</key> <string>TRUE</string> <key>CFBundleVersion</key> - <string>1.26.8</string> + <string>_VERSION_</string> <key>CFBundleShortVersionString</key> <string>_VERSION_</string> <key>CFBundleLongVersionString</key> diff --git a/src/Build/Resources/MacOSX/Info.plist.xml b/src/Build/Resources/MacOSX/Info.plist.xml index ec190b59..04ed21c1 100644 --- a/src/Build/Resources/MacOSX/Info.plist.xml +++ b/src/Build/Resources/MacOSX/Info.plist.xml @@ -72,20 +72,20 @@ <key>CFBundleSignature</key> <string>TRUE</string> <key>CFBundleVersion</key> - <string>1.26.8</string> + <string>_VERSION_</string> <key>CFBundleShortVersionString</key> <string>_VERSION_</string> <key>CFBundleLongVersionString</key> <string>VeraCrypt _VERSION_</string> <key>LSMinimumSystemVersion</key> - <string>10.9.0</string> + <string>12.0.0</string> <key>LSRequiresCarbon</key> <false/> <key>CSResourcesFileMapped</key> diff --git a/src/Build/Tools/MacOSX/yasm b/src/Build/Tools/MacOSX/yasm Binary files differindex d17889a9..36a9c0d4 100755 --- a/src/Build/Tools/MacOSX/yasm +++ b/src/Build/Tools/MacOSX/yasm diff --git a/src/Build/build_cmake_deb.sh b/src/Build/build_cmake_deb.sh index a6263a90..8bceb886 100755 --- a/src/Build/build_cmake_deb.sh +++ b/src/Build/build_cmake_deb.sh @@ -1,8 +1,8 @@ #!/bin/sh # -# Copyright (c) 2013-2022 IDRIX +# Copyright (c) 2013-2024 IDRIX # Governed by the Apache License 2.0 the full text of which is contained # in the file License.txt included in VeraCrypt binary and source # code distribution packages. # @@ -16,71 +16,99 @@ export SCRIPTPATH=$(dirname "$SCRIPT") # Source directory which contains the Makefile export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # Directory where the VeraCrypt has been checked out export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") -# The sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" - -cd $SOURCEPATH - -if [ "$#" = "1" ] && [ "$1" = "WXSTATIC" ] -then -echo "Building GUI version of VeraCrypt for DEB using wxWidgets static libraries" - -# This will be the temporary wxWidgets directory -export WX_BUILD_DIR=$PARENTDIR/wxBuildGUI - -# To build wxWidgets without GUI -make WXSTATIC=1 wxbuild || exit 1 -make WXSTATIC=1 clean || exit 1 -make WXSTATIC=1 || exit 1 -make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 - +# Check the condition of wxBuildConsole and wxWidgets-3.2.5 in the original PARENTDIR +if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxBuildConsole is present." +elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxWidgets-3.2.5 is present." else - -echo "Building GUI version of VeraCrypt for DEB using system wxWidgets" -make clean || exit 1 - -if [ "$#" = "1" ] && [ "$1" = "INDICATOR" ] -then - -make INDICATOR=1 || exit 1 -make INDICATOR=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 - -else - -make || exit 1 -make install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 - + # Change PARENTDIR to /tmp and check conditions again + export PARENTDIR="/tmp" + if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Switched to PARENTDIR: /tmp, wxBuildConsole is present in /tmp." + elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Switched to PARENTDIR: /tmp, wxWidgets-3.2.5 is present in /tmp." + else + echo "Error: Neither wxBuildConsole nor wxWidgets-3.2.5 found in /tmp. Exiting." + exit 1 + fi fi -fi +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory +export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 -echo "Building console version of VeraCrypt for DEB using wxWidgets static libraries" - -# This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?" -# when building over SSH without X11 Forwarding -# export DISPLAY=:0.0 +cd $SOURCEPATH -# This will be the temporary wxWidgets directory -export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole +build_and_install() { + target=$1 + wxstatic=$2 + indicator=$3 + nogui="" + + # Determine wxWidgets build directory based on target + if [ "$target" = "Console" ]; then + export WX_BUILD_DIR="$PARENTDIR/wxBuildConsole" + nogui="NOGUI=1" + else + export WX_BUILD_DIR="$PARENTDIR/wxBuildGUI" + fi + + wxstatic_value="" + if [ "$wxstatic" = "WXSTATIC" ]; then + wxstatic_value="WXSTATIC=1" + # Check if wx-config exists in WX_BUILD_DIR + if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." + else + echo "Using wxWidgets sources in $WX_ROOT" + make $wxstatic_value $nogui wxbuild || exit 1 + fi + fi + + indicator_value="" + if [ "$indicator" = "INDICATOR" ]; then + indicator_value="INDICATOR=1" + fi + + make $wxstatic_value $indicator_value $nogui clean || exit 1 + make $wxstatic_value $indicator_value $nogui || exit 1 + make $wxstatic_value $indicator_value $nogui install DESTDIR="$PARENTDIR/VeraCrypt_Setup/$target" || exit 1 +} + +# Handle arguments +case "$1$2" in +"WXSTATIC") + echo "Building GUI version of VeraCrypt for DEB using wxWidgets static libraries" + build_and_install "GUI" "WXSTATIC" "" + ;; +"INDICATOR") + echo "Building GUI version of VeraCrypt for DEB using system wxWidgets and indicator" + build_and_install "GUI" "" "INDICATOR" + ;; +"WXSTATICINDICATOR"|"INDICATORWXSTATIC") + echo "Building GUI version of VeraCrypt for DEB using wxWidgets static libraries and indicator" + build_and_install "GUI" "WXSTATIC" "INDICATOR" + ;; +*) + echo "Building GUI version of VeraCrypt for DEB using system wxWidgets" + build_and_install "GUI" "" "" + ;; +esac -# To build wxWidgets without GUI -make WXSTATIC=1 NOGUI=1 wxbuild || exit 1 -make WXSTATIC=1 NOGUI=1 clean || exit 1 -make WXSTATIC=1 NOGUI=1 || exit 1 -make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1 +echo "Building console version of VeraCrypt for DEB using wxWidgets static libraries" +build_and_install "Console" "WXSTATIC" "" echo "Creating VeraCrypt DEB packages" # -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack DEB # -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack DEB -mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI -mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console +mkdir -p $PARENTDIR/VeraCrypt_Packaging/{GUI,Console} cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE || exit 1 cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1 + cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE || exit 1 -cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake || exit 1 +cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake || exit 1 diff --git a/src/Build/build_cmake_opensuse.sh b/src/Build/build_cmake_opensuse.sh index 622eb4cd..13a75bec 100644 --- a/src/Build/build_cmake_opensuse.sh +++ b/src/Build/build_cmake_opensuse.sh @@ -1,8 +1,8 @@ #!/bin/sh # -# Copyright (c) 2013-2022 IDRIX +# Copyright (c) 2013-2024 IDRIX # Governed by the Apache License 2.0 the full text of which is contained # in the file License.txt included in VeraCrypt binary and source # code distribution packages. # @@ -16,62 +16,81 @@ export SCRIPTPATH=$(dirname "$SCRIPT") # Source directory which contains the Makefile export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # Directory where the VeraCrypt has been checked out export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") -# The sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" +# Check the condition of wxBuildConsole and wxWidgets-3.2.5 in the original PARENTDIR +if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxBuildConsole is present." +elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxWidgets-3.2.5 is present." +else + # Change PARENTDIR to /tmp and check conditions again + export PARENTDIR="/tmp" + if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Switched to PARENTDIR: /tmp, wxBuildConsole is present in /tmp." + elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Switched to PARENTDIR: /tmp, wxWidgets-3.2.5 is present in /tmp." + else + echo "Error: Neither wxBuildConsole nor wxWidgets-3.2.5 found in /tmp. Exiting." + exit 1 + fi +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory +export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 cd $SOURCEPATH echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries" # This will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildGui -# To build wxWidgets using GTK-2 -make WXSTATIC=1 wxbuild || exit 1 -ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64 +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 wxbuild || exit 1 + ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64 +fi + make WXSTATIC=1 clean || exit 1 make WXSTATIC=1 || exit 1 make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 -# Uncomment below and comment lines above to reuse existing wxWidgets build -# make WXSTATIC=1 clean || exit 1 -# make WXSTATIC=1 || exit 1 -# make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 - echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries" # This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?" # when building over SSH without X11 Forwarding # export DISPLAY=:0.0 # This will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole -# To build wxWidgets using GTK-2 -make WXSTATIC=1 NOGUI=1 wxbuild || exit 1 -ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64 +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 NOGUI=1 wxbuild || exit 1 + ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64 +fi + make WXSTATIC=1 NOGUI=1 clean || exit 1 make WXSTATIC=1 NOGUI=1 || exit 1 make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1 -# Uncomment below and comment lines above to reuse existing wxWidgets build -# make WXSTATIC=1 NOGUI=1 clean || exit 1 -# make WXSTATIC=1 NOGUI=1 || exit 1 -# make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1 - echo "Creating VeraCrypt RPM packages " # -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM # -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console -# wxWidgets was built using GTK-2 -cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DWITHGTK3=FALSE -DNOGUI=FALSE || exit 1 +# wxWidgets was built using native GTK version +cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE || exit 1 cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1 -cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DWITHGTK3=FALSE -DNOGUI=TRUE || exit 1 +cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE || exit 1 cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake|| exit 1 diff --git a/src/Build/build_cmake_rpm_gtk2.sh b/src/Build/build_cmake_rpm.sh index 3f33cc1c..ba6ea355 100644 --- a/src/Build/build_cmake_rpm_gtk2.sh +++ b/src/Build/build_cmake_rpm.sh @@ -1,8 +1,8 @@ #!/bin/sh # -# Copyright (c) 2013-2022 IDRIX +# Copyright (c) 2013-2024 IDRIX # Governed by the Apache License 2.0 the full text of which is contained # in the file License.txt included in VeraCrypt binary and source # code distribution packages. # @@ -16,60 +16,79 @@ export SCRIPTPATH=$(dirname "$SCRIPT") # Source directory which contains the Makefile export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # Directory where the VeraCrypt has been checked out export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") -# The sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" +# Check the condition of wxBuildConsole and wxWidgets-3.2.5 in the original PARENTDIR +if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxBuildConsole is present." +elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxWidgets-3.2.5 is present." +else + # Change PARENTDIR to /tmp and check conditions again + export PARENTDIR="/tmp" + if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Switched to PARENTDIR: /tmp, wxBuildConsole is present in /tmp." + elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Switched to PARENTDIR: /tmp, wxWidgets-3.2.5 is present in /tmp." + else + echo "Error: Neither wxBuildConsole nor wxWidgets-3.2.5 found in /tmp. Exiting." + exit 1 + fi +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory +export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 cd $SOURCEPATH echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries" # This will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildGui -# To build wxWidgets using GTK-2 -make WXSTATIC=1 wxbuild || exit 1 +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 wxbuild || exit 1 +fi + make WXSTATIC=1 clean || exit 1 make WXSTATIC=1 || exit 1 make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 -# Uncomment below and comment lines above to reuse existing wxWidgets build -# make WXSTATIC=1 clean || exit 1 -# make WXSTATIC=1 || exit 1 -# make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 - echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries" # This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?" # when building over SSH without X11 Forwarding # export DISPLAY=:0.0 # This will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole -# To build wxWidgets using GTK-2 -make WXSTATIC=1 NOGUI=1 wxbuild || exit 1 +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 NOGUI=1 wxbuild || exit 1 +fi + make WXSTATIC=1 NOGUI=1 clean || exit 1 make WXSTATIC=1 NOGUI=1 || exit 1 make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1 -# Uncomment below and comment lines above to reuse existing wxWidgets build -# make WXSTATIC=1 NOGUI=1 clean || exit 1 -# make WXSTATIC=1 NOGUI=1 || exit 1 -# make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1 - echo "Creating VeraCrypt RPM packages " # -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM # -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console -# wxWidgets was built using GTK-2 -cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DWITHGTK3=FALSE -DNOGUI=FALSE || exit 1 +# wxWidgets was built using native GTK version +cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE || exit 1 cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1 -cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DWITHGTK3=FALSE -DNOGUI=TRUE || exit 1 +cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE || exit 1 cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake || exit 1 diff --git a/src/Build/build_cmake_rpm_gtk3.sh b/src/Build/build_cmake_rpm_gtk3.sh deleted file mode 100644 index 72556dcf..00000000 --- a/src/Build/build_cmake_rpm_gtk3.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2013-2022 IDRIX -# Governed by the Apache License 2.0 the full text of which is contained -# in the file License.txt included in VeraCrypt binary and source -# code distribution packages. -# - -# Errors should cause script to exit -set -e - -# Absolute path to this script -export SCRIPT=$(readlink -f "$0") -# Absolute path this script is in -export SCRIPTPATH=$(dirname "$SCRIPT") -# Source directory which contains the Makefile -export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") -# Directory where the VeraCrypt has been checked out -export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") - -# The sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" - -cd $SOURCEPATH - -echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries" - -# This will be the temporary wxWidgets directory -export WX_BUILD_DIR=$PARENTDIR/wxBuildGui - -# To build wxWidgets using GTK-3 -make WXSTATIC=1 WITHGTK3=1 wxbuild || exit 1 -make WXSTATIC=1 clean || exit 1 -make WXSTATIC=1 || exit 1 -make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 - -# Uncomment below and comment lines above to reuse existing wxWidgets build -# make WXSTATIC=1 clean || exit 1 -# make WXSTATIC=1 || exit 1 -# make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1 - -echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries" - -# This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?" -# when building over SSH without X11 Forwarding -# export DISPLAY=:0.0 - -# This will be the temporary wxWidgets directory -export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole - -# To build wxWidgets using GTK-3 -make WXSTATIC=1 WITHGTK3=1 NOGUI=1 wxbuild || exit 1 -make WXSTATIC=1 NOGUI=1 clean || exit 1 -make WXSTATIC=1 NOGUI=1 || exit 1 -make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1 - -# Uncomment below and comment lines above to reuse existing wxWidgets build -# make WXSTATIC=1 NOGUI=1 clean || exit 1 -# make WXSTATIC=1 NOGUI=1 || exit 1 -# make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1 - -echo "Creating VeraCrypt RPM packages " - -# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM -# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM - -mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI -mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console - -# wxWidgets was built using GTK-3 -cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DWITHGTK3=TRUE -DNOGUI=FALSE || exit 1 -cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1 -cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DWITHGTK3=TRUE -DNOGUI=TRUE || exit 1 -cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake|| exit 1 diff --git a/src/Build/build_veracrypt_freebsd.sh b/src/Build/build_veracrypt_freebsd.sh index 176c8499..892a7eed 100755 --- a/src/Build/build_veracrypt_freebsd.sh +++ b/src/Build/build_veracrypt_freebsd.sh @@ -1,8 +1,8 @@ #!/bin/sh # -# Copyright (c) 2013-2022 IDRIX +# Copyright (c) 2013-2024 IDRIX # Governed by the Apache License 2.0 the full text of which is contained # in the file License.txt included in VeraCrypt binary and source # code distribution packages. # @@ -13,36 +13,60 @@ SCRIPTPATH=$(dirname "$SCRIPT") # source directory which contains the Makefile SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # directory where the VeraCrypt has been checked out PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") -# Make sure only root can run our script -if [ "$(id -u)" != "0" ]; then - echo "VeraCrypt must be built by root" 1>&2 - exit 1 +# Check the condition of wxBuildConsole and wxWidgets-3.2.5 in the original PARENTDIR +if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxBuildConsole is present." +elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxWidgets-3.2.5 is present." +else + # Change PARENTDIR to /tmp and check conditions again + export PARENTDIR="/tmp" + if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Switched to PARENTDIR: /tmp, wxBuildConsole is present in /tmp." + elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Switched to PARENTDIR: /tmp, wxWidgets-3.2.5 is present in /tmp." + else + echo "Error: Neither wxBuildConsole nor wxWidgets-3.2.5 found in /tmp. Exiting." + exit 1 + fi fi -# the sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory +export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 cd $SOURCEPATH echo "Building GUI version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildGui -gmake WXSTATIC=1 wxbuild && gmake WXSTATIC=1 clean && gmake WXSTATIC=1 && gmake WXSTATIC=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + gmake WXSTATIC=1 wxbuild || exit 1 +fi -# Uncomment below and comment line above to reuse existing wxWidgets build -#gmake WXSTATIC=1 clean && gmake WXSTATIC=1 && gmake WXSTATIC=1 package +gmake WXSTATIC=1 clean || exit 1 +gmake WXSTATIC=1 || exit 1 +gmake WXSTATIC=1 package || exit 1 echo "Building console version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole -gmake WXSTATIC=1 NOGUI=1 wxbuild && gmake WXSTATIC=1 NOGUI=1 clean && gmake WXSTATIC=1 NOGUI=1 && gmake WXSTATIC=1 NOGUI=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -#gmake WXSTATIC=1 NOGUI=1 clean && gmake WXSTATIC=1 NOGUI=1 && gmake WXSTATIC=1 NOGUI=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + gmake WXSTATIC=1 NOGUI=1 wxbuild || exit 1 +fi +gmake WXSTATIC=1 NOGUI=1 clean || exit 1 +gmake WXSTATIC=1 NOGUI=1 || exit 1 +gmake WXSTATIC=1 NOGUI=1 package || exit 1 diff --git a/src/Build/build_veracrypt_linux.sh b/src/Build/build_veracrypt_linux.sh index fa928556..b6ac39ed 100755 --- a/src/Build/build_veracrypt_linux.sh +++ b/src/Build/build_veracrypt_linux.sh @@ -1,7 +1,7 @@ # -# Copyright (c) 2013-2022 IDRIX +# Copyright (c) 2013-2024 IDRIX # Governed by the Apache License 2.0 the full text of which is contained # in the file License.txt included in VeraCrypt binary and source # code distribution packages. # @@ -18,30 +18,59 @@ PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") if [ "$(id -u)" != "0" ]; then echo "VeraCrypt must be built by root" 1>&2 exit 1 fi -# the sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" +# Check the condition of wxBuildConsole and wxWidgets-3.2.5 in the original PARENTDIR +if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxBuildConsole is present." +elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxWidgets-3.2.5 is present." +else + # Change PARENTDIR to /tmp and check conditions again + export PARENTDIR="/tmp" + if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Switched to PARENTDIR: /tmp, wxBuildConsole is present in /tmp." + elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Switched to PARENTDIR: /tmp, wxWidgets-3.2.5 is present in /tmp." + else + echo "Error: Neither wxBuildConsole nor wxWidgets-3.2.5 found in /tmp. Exiting." + exit 1 + fi +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory +export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 cd $SOURCEPATH echo "Building GUI version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildGui -make WXSTATIC=1 wxbuild && make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -# make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 wxbuild || exit 1 +fi +make WXSTATIC=1 clean || exit 1 +make WXSTATIC=1 || exit 1 +make WXSTATIC=1 package || exit 1 echo "Building console version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole -make WXSTATIC=1 NOGUI=1 wxbuild && make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1 && make WXSTATIC=1 NOGUI=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -# make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1 && make WXSTATIC=1 NOGUI=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 NOGUI=1 wxbuild || exit 1 +fi +make WXSTATIC=1 NOGUI=1 clean || exit 1 +make WXSTATIC=1 NOGUI=1 || exit 1 +make WXSTATIC=1 NOGUI=1 package || exit 1 diff --git a/src/Build/build_veracrypt_linux_gtk3.sh b/src/Build/build_veracrypt_linux_gtk3.sh deleted file mode 100644 index bae6a856..00000000 --- a/src/Build/build_veracrypt_linux_gtk3.sh +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (c) 2013-2022 IDRIX -# Governed by the Apache License 2.0 the full text of which is contained -# in the file License.txt included in VeraCrypt binary and source -# code distribution packages. -# - -# Absolute path to this script -SCRIPT=$(readlink -f "$0") -# Absolute path this script is in -SCRIPTPATH=$(dirname "$SCRIPT") -# source directory which contains the Makefile -SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") -# directory where the VeraCrypt has been checked out -PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") - -# Make sure only root can run our script -if [ "$(id -u)" != "0" ]; then - echo "VeraCrypt must be built by root" 1>&2 - exit 1 -fi - -# the sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" - -cd $SOURCEPATH - -echo "Building GUI version of VeraCrypt" - -# this will be the temporary wxWidgets directory -export WX_BUILD_DIR=$PARENTDIR/wxBuildGui - -make WXSTATIC=1 WITHGTK3=1 wxbuild && make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -#make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package - -echo "Building console version of VeraCrypt" - -# this will be the temporary wxWidgets directory -export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole - -make WXSTATIC=1 WITHGTK3=1 NOGUI=1 wxbuild && make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1 && make WXSTATIC=1 NOGUI=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -#make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1 && make WXSTATIC=1 NOGUI=1 package diff --git a/src/Build/build_veracrypt_linux_no_sse2.sh b/src/Build/build_veracrypt_linux_no_sse2.sh index f68641b9..6f0739c7 100755 --- a/src/Build/build_veracrypt_linux_no_sse2.sh +++ b/src/Build/build_veracrypt_linux_no_sse2.sh @@ -1,7 +1,7 @@ # -# Copyright (c) 2013-2022 IDRIX +# Copyright (c) 2013-2024 IDRIX # Governed by the Apache License 2.0 the full text of which is contained # in the file License.txt included in VeraCrypt binary and source # code distribution packages. # @@ -18,30 +18,59 @@ PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") if [ "$(id -u)" != "0" ]; then echo "VeraCrypt must be built by root" 1>&2 exit 1 fi -# the sources of wxWidgets 3.2.2.1 must be extracted to the parent directory -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" +# Check the condition of wxBuildConsole and wxWidgets-3.2.5 in the original PARENTDIR +if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxBuildConsole is present." +elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxWidgets-3.2.5 is present." +else + # Change PARENTDIR to /tmp and check conditions again + export PARENTDIR="/tmp" + if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Switched to PARENTDIR: /tmp, wxBuildConsole is present in /tmp." + elif [ -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + echo "Switched to PARENTDIR: /tmp, wxWidgets-3.2.5 is present in /tmp." + else + echo "Error: Neither wxBuildConsole nor wxWidgets-3.2.5 found in /tmp. Exiting." + exit 1 + fi +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory +export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 cd $SOURCEPATH echo "Building GUI version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildGuiNoSSE2 -make WXSTATIC=1 NOSSE2=1 wxbuild && make WXSTATIC=1 NOSSE2=1 clean && make WXSTATIC=1 NOSSE2=1 && make WXSTATIC=1 NOSSE2=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -# make WXSTATIC=1 NOSSE2=1 clean && make WXSTATIC=1 NOSSE2=1 && make WXSTATIC=1 NOSSE2=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 NOSSE2=1 wxbuild || exit 1 +fi +make WXSTATIC=1 NOSSE2=1 clean || exit 1 +make WXSTATIC=1 NOSSE2=1 || exit 1 +make WXSTATIC=1 NOSSE2=1 package || exit 1 echo "Building console version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildConsoleNoSSE2 -make WXSTATIC=1 NOGUI=1 NOSSE2=1 wxbuild && make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean && make WXSTATIC=1 NOGUI=1 NOSSE2=1 && make WXSTATIC=1 NOGUI=1 NOSSE2=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -# make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean && make WXSTATIC=1 NOGUI=1 NOSSE2=1 && make WXSTATIC=1 NOGUI=1 NOSSE2=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=1 NOGUI=1 NOSSE2=1 wxbuild || exit 1 +fi +make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean || exit 1 +make WXSTATIC=1 NOGUI=1 NOSSE2=1 || exit 1 +make WXSTATIC=1 NOGUI=1 NOSSE2=1 package || exit diff --git a/src/Build/build_veracrypt_macosx.sh b/src/Build/build_veracrypt_macosx.sh index 12899620..13302442 100755 --- a/src/Build/build_veracrypt_macosx.sh +++ b/src/Build/build_veracrypt_macosx.sh @@ -1,34 +1,150 @@ +#!/usr/bin/env bash + # -# Copyright (c) 2013-2019 IDRIX +# Copyright (c) 2013-2024 IDRIX # Governed by the Apache License 2.0 the full text of which is contained # in the file License.txt included in VeraCrypt binary and source # code distribution packages. # +# Exit immediately if a command exits with a non-zero status +set -e + # Absolute path this script is in -SCRIPTPATH=$(cd "$(dirname "$0")"; pwd) +SCRIPTPATH=$(cd "$(dirname "$0")" && pwd) # source directory which contains the Makefile -SOURCEPATH=$(cd "$(dirname "$SCRIPTPATH/../.")"; pwd) +SOURCEPATH=$(cd "$(dirname "$SCRIPTPATH/../.")" && pwd) # directory where the VeraCrypt project has been checked out -PARENTDIR=$(cd "$(dirname "$SCRIPTPATH/../../../.")"; pwd) +PARENTDIR=$(cd "$(dirname "$SCRIPTPATH/../../../.")" && pwd) + +# Default wxWidgets version +DEFAULT_WX_VERSION="3.2.5" +WX_VERSION="$DEFAULT_WX_VERSION" + +# Initialize flags +brew=false +package=false +fuset=false +local_build=false + +# Function to display usage information +usage() { + echo "Usage: $0 [options]" + echo "Options:" + echo " -b Use Homebrew to build with precompiled packages" + echo " -p Create a package after building" + echo " -f Build with FUSE-T support" + echo " -l Use local wxWidgets and disable universal binaries" + echo " -v <version> Specify wxWidgets version (default: $DEFAULT_WX_VERSION)" + echo " -h Display this help message" + exit 1 +} + +# Parse command-line options +while getopts "bpflv:h" flag +do + case "${flag}" in + b) brew=true;; + p) package=true;; + f) fuset=true;; + l) local_build=true;; + v) + if [ -z "$OPTARG" ]; then + echo "Error: -v requires a version argument." + usage + fi + WX_VERSION=${OPTARG} + ;; + h) usage;; + *) usage;; + esac +done + +export VC_OSX_FUSET=$([ "$fuset" = true ] && echo 1 || echo 0) -# the sources of wxWidgets 3.1.2 must be extracted to the parent directory (for night mode) -export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1 -echo "Using wxWidgets sources in $WX_ROOT" +if [ "$fuset" = true ]; then + echo "Building VeraCrypt with FUSE-T support" +else + echo "Building VeraCrypt with MacFUSE support" +fi + +if [ "$brew" = true ]; then + if ! command -v brew &> /dev/null; then + echo "Homebrew is not installed. Please install Homebrew or run without the -b flag." + exit 1 + fi + + export VC_OSX_SDK=$(xcrun --show-sdk-version) # use the latest version installed, this might fail + export VC_OSX_TARGET=${VC_OSX_SDK} + echo "Using MacOSX SDK $VC_OSX_SDK with target set to $VC_OSX_TARGET" + cd "$SOURCEPATH" + + echo "Building VeraCrypt with precompiled homebrew packages" + cellar=$(brew --cellar "wxwidgets") + version=$(brew list --versions "wxwidgets" | head -1 | awk '{print $2}') + export WX_BUILD_DIR="$cellar/$version/bin" + # skip signing and build only for local arch + export LOCAL_DEVELOPMENT_BUILD=true + # set the correct CPU arch for Makefile + export CPU_ARCH=$(uname -m) + export AS=$(which yasm) + export COMPILE_ASM=$( if [[ "$CPU_ARCH" != "arm64" ]]; then echo true; else echo false; fi ) + make clean + make + if [ "$package" = true ]; then + make package + fi + exit 0 +fi + +if [ "$local_build" = true ]; then + echo "Building VeraCrypt with local wxWidgets support and no universal binary" + export LOCAL_DEVELOPMENT_BUILD=true +fi + +# Check the condition of wxBuildConsole and wxWidgets-$WX_VERSION in the original PARENTDIR +if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxBuildConsole is present." +elif [ -d "$PARENTDIR/wxWidgets-$WX_VERSION" ]; then + echo "Using existing PARENTDIR: $PARENTDIR, wxWidgets-$WX_VERSION is present." +else + # Change PARENTDIR to /tmp and check conditions again + export PARENTDIR="/tmp" + if [ -d "$PARENTDIR/wxBuildConsole" ]; then + echo "Switched to PARENTDIR: /tmp, wxBuildConsole is present in /tmp." + elif [ -d "$PARENTDIR/wxWidgets-$WX_VERSION" ]; then + echo "Switched to PARENTDIR: /tmp, wxWidgets-$WX_VERSION is present in /tmp." + else + echo "Error: Neither wxBuildConsole nor wxWidgets-$WX_VERSION found in /tmp. Exiting." + exit 1 + fi +fi + +# The sources of wxWidgets $WX_VERSION must be extracted to the parent directory +export WX_ROOT="$PARENTDIR/wxWidgets-$WX_VERSION" # this will be the temporary wxWidgets directory -export WX_BUILD_DIR=$PARENTDIR/wxBuild-3.2.2.1 +export WX_BUILD_DIR="$PARENTDIR/wxBuild-$WX_VERSION" -# define the SDK version to use and OSX minimum target. We target 10.9 by default +# define the SDK version to use and OSX minimum target. We target 12 by default export VC_OSX_TARGET=12 -export VC_OSX_SDK=13 +export VC_OSX_SDK=$(xcrun --show-sdk-version) #use the latest version installed echo "Using MacOSX SDK $VC_OSX_SDK with target set to $VC_OSX_TARGET" -cd $SOURCEPATH +cd "$SOURCEPATH" echo "Building VeraCrypt" -make WXSTATIC=FULL wxbuild && make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package - -# Uncomment below and comment line above to reuse existing wxWidgets build -# make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + echo "Using wxWidgets sources in $WX_ROOT" + make WXSTATIC=FULL wxbuild +fi +make WXSTATIC=FULL clean +make WXSTATIC=FULL +if [ "$package" = true ]; then + make WXSTATIC=FULL package +fi +echo "VeraCrypt build completed successfully." diff --git a/src/Build/sign_rpm.sh b/src/Build/sign_rpm.sh new file mode 100644 index 00000000..9abc041e --- /dev/null +++ b/src/Build/sign_rpm.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Function to display usage information +usage() { + echo "Usage: $0 <directory>" + exit 1 +} + +# Check if a directory was provided as an argument +if [ $# -ne 1 ]; then + usage +fi + +DIRECTORY="$1" + +# Check if the specified directory exists +if [ ! -d "$DIRECTORY" ]; then + echo "Error: Directory '$DIRECTORY' does not exist." + exit 1 +fi + +# Check if there are any RPM files in the directory +shopt -s nullglob # Make the glob return an empty array if no match +rpm_files=("$DIRECTORY"/*.rpm) + +if [ ${#rpm_files[@]} -eq 0 ]; then + echo "No RPM files found in directory '$DIRECTORY'." + exit 0 +fi + +# Iterate over each RPM file in the directory +for rpm_file in "${rpm_files[@]}"; do + echo "Processing $rpm_file..." + + # Remove the existing signature if any + echo "Removing existing signature from $rpm_file (if any)..." + rpmsign --delsign "$rpm_file" || { + echo "Failed to remove signature from $rpm_file." + exit 1 + } + + # Sign the RPM file + echo "Signing $rpm_file..." + rpmsign --define "_gpg_name veracrypt@idrix.fr" \ + --define "_gpg_digest_algo sha512" \ + --define "_source_filedigest_algorithm 10" \ + --define "_binary_filedigest_algorithm 10" \ + --addsign "$rpm_file" || { + echo "Failed to sign $rpm_file. Aborting." + exit 1 + } + + echo "Successfully signed $rpm_file." +done diff --git a/src/COMReg/COMReg.rc b/src/COMReg/COMReg.rc index 1c0c0d8f..d0fd5284 100644 --- a/src/COMReg/COMReg.rc +++ b/src/COMReg/COMReg.rc @@ -25,12 +25,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -43,15 +43,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt COMReg" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt COMReg.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 diff --git a/src/COMReg/COMReg.vcxproj b/src/COMReg/COMReg.vcxproj index 91a440e1..8af84056 100644 --- a/src/COMReg/COMReg.vcxproj +++ b/src/COMReg/COMReg.vcxproj @@ -12,22 +12,26 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{C8914211-32AC-4F48-ACD9-8212E8DE53F3}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>COMReg</RootNamespace> + <ProjectName>COMReg</ProjectName> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> @@ -38,18 +42,18 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <LinkIncremental>true</LinkIncremental> <TargetName>VeraCryptCOMRegBase</TargetName> - <OutDir>Debug\</OutDir> - <IntDir>Debug\</IntDir> + <OutDir>$(ProjectDir)$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <LinkIncremental>false</LinkIncremental> <TargetName>VeraCryptCOMRegBase</TargetName> - <OutDir>Release\</OutDir> - <IntDir>Release\</IntDir> + <OutDir>$(ProjectDir)$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Configuration)\</IntDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> @@ -59,11 +63,11 @@ <AdditionalIncludeDirectories>..\Setup;..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalDependencies>..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> <PostBuildEvent> <Command>copy Debug\VeraCryptCOMRegBase.exe "..\Debug\Setup Files\VeraCryptCOMRegBase.exe"</Command> </PostBuildEvent> </ItemDefinitionGroup> @@ -75,17 +79,20 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;VC_COMREG;NDEBUG;_WINDOWS;HAVE_CONFIG_H;ZIP_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <AdditionalIncludeDirectories>..\Setup;..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>false</GenerateDebugInformation> + <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> - <AdditionalDependencies>..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <GenerateMapFile>true</GenerateMapFile> + <DelayLoadDLLs>bcrypt.dll</DelayLoadDLLs> </Link> <PostBuildEvent> <Command>copy Release\VeraCryptCOMRegBase.exe "..\Release\Setup Files\VeraCryptCOMRegBase.exe"</Command> </PostBuildEvent> </ItemDefinitionGroup> @@ -106,14 +113,9 @@ <ItemGroup> <ClInclude Include="..\Common\Crc.h" /> <ClInclude Include="..\Common\Dlgcode.h" /> <ClInclude Include="..\Setup\SelfExtract.h" /> </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Common\Lzma.vcxproj"> - <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> - </ProjectReference> - </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/Common/Apidrvr.h b/src/Common/Apidrvr.h index 463d4fa6..84a3de91 100644 --- a/src/Common/Apidrvr.h +++ b/src/Common/Apidrvr.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #pragma once @@ -40,15 +40,15 @@ // IN OUT - MOUNT_STRUCT #define TC_IOCTL_MOUNT_VOLUME TC_IOCTL (3) // Dismount volume // IN OUT - UNMOUNT_STRUCT -#define TC_IOCTL_DISMOUNT_VOLUME TC_IOCTL (4) +#define TC_IOCTL_UNMOUNT_VOLUME TC_IOCTL (4) // Dismount all volumes // IN OUT - UNMOUNT_STRUCT -#define TC_IOCTL_DISMOUNT_ALL_VOLUMES TC_IOCTL (5) +#define TC_IOCTL_UNMOUNT_ALL_VOLUMES TC_IOCTL (5) // Get list of all mounted volumes // IN OUT - MOUNT_LIST_STRUCT (only 26 volumes possible) #define TC_IOCTL_GET_MOUNTED_VOLUMES TC_IOCTL (6) @@ -175,10 +175,11 @@ typedef struct BOOL bDriverSetLabel; BOOL bCachePim; ULONG MaximumTransferLength; ULONG MaximumPhysicalPages; ULONG AlignmentMask; + BOOL VolumeMasterKeyVulnerable; } MOUNT_STRUCT; typedef struct { int nDosDriveNo; /* Drive letter to unmount */ @@ -314,10 +315,12 @@ typedef struct // Number of times the filter driver answered that an unencrypted volume // is read-only (or mounted an outer/normal TrueCrypt volume as read only) uint32 HiddenSysLeakProtectionCount; + BOOL MasterKeyVulnerable; + } BootEncryptionStatus; typedef struct { @@ -342,27 +345,27 @@ typedef struct char BootPrfAlgorithmName[256]; } GetBootEncryptionAlgorithmNameRequest; typedef struct { - byte Fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; + uint8 Fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; } BootLoaderFingerprintRequest; typedef struct { wchar_t DevicePath[TC_MAX_PATH]; - byte Configuration; + uint8 Configuration; BOOL DriveIsDynamic; uint16 BootLoaderVersion; - byte UserConfiguration; + uint8 UserConfiguration; char CustomUserMessage[TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH + 1]; } GetSystemDriveConfigurationRequest; typedef struct { WipeAlgorithmId WipeAlgorithm; - CRYPTOPP_ALIGN_DATA(16) byte WipeKey[MASTER_KEYDATA_SIZE]; + CRYPTOPP_ALIGN_DATA(16) uint8 WipeKey[MASTER_KEYDATA_SIZE]; } WipeDecoySystemRequest; typedef struct { BOOL WipeInProgress; @@ -371,11 +374,11 @@ typedef struct } DecoySystemWipeStatus; typedef struct { LARGE_INTEGER Offset; - byte Data[TC_SECTOR_SIZE_BIOS]; + uint8 Data[TC_SECTOR_SIZE_BIOS]; } WriteBootDriveSectorRequest; typedef struct { BOOL PagingFileCreationPrevented; @@ -391,10 +394,11 @@ typedef struct typedef struct { int EncryptionIoRequestCount; int EncryptionItemCount; int EncryptionFragmentSize; + int EncryptionMaxWorkItems; } EncryptionQueueParameters; #pragma pack (pop) #define DRIVER_STR WIDE @@ -413,10 +417,11 @@ typedef struct #define TC_ENCRYPTION_FREE_CPU_COUNT_REG_VALUE_NAME DRIVER_STR("VeraCryptEncryptionFreeCpuCount") #define VC_ENCRYPTION_IO_REQUEST_COUNT DRIVER_STR("VeraCryptEncryptionIoRequestCount") #define VC_ENCRYPTION_ITEM_COUNT DRIVER_STR("VeraCryptEncryptionItemCount") #define VC_ENCRYPTION_FRAGMENT_SIZE DRIVER_STR("VeraCryptEncryptionFragmentSize") +#define VC_ENCRYPTION_MAX_WORK_ITEMS DRIVER_STR("VeraCryptEncryptionMaxWorkItems") #define VC_ERASE_KEYS_SHUTDOWN DRIVER_STR("VeraCryptEraseKeysShutdown") #define VC_ENABLE_MEMORY_PROTECTION DRIVER_STR("VeraCryptEnableMemoryProtection") diff --git a/src/Common/BaseCom.cpp b/src/Common/BaseCom.cpp index 3eaaf809..3b502ef0 100644 --- a/src/Common/BaseCom.cpp +++ b/src/Common/BaseCom.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -448,11 +448,11 @@ DWORD BaseCom::WriteEfiBootSectorUserConfig (DWORD userConfig, BSTR customUserMe char* msg = (char*) *customUserMessage; if (maxSize > 0) msg [maxSize - 1] = 0; std::string msgStr = maxSize > 0 ? msg : ""; BootEncryption bootEnc (NULL); - bootEnc.WriteEfiBootSectorUserConfig ((byte) userConfig, msgStr, pim, hashAlg); + bootEnc.WriteEfiBootSectorUserConfig ((uint8) userConfig, msgStr, pim, hashAlg); } catch (SystemException &) { return GetLastError(); } diff --git a/src/Common/BaseCom.h b/src/Common/BaseCom.h index 431b0257..1a7b68d2 100644 --- a/src/Common/BaseCom.h +++ b/src/Common/BaseCom.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index d3dc249e..833a67fd 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -273,14 +273,14 @@ bool ZipAdd (zip_t *z, const char* name, const unsigned char* pbData, DWORD cbDa } return true; } -static BOOL IsWindowsMBR (const byte *buffer, size_t bufferSize) +static BOOL IsWindowsMBR (const uint8 *buffer, size_t bufferSize) { BOOL bRet = FALSE; - byte g_pbMsSignature[4] = {0x33, 0xc0, 0x8e, 0xd0}; + uint8 g_pbMsSignature[4] = {0x33, 0xc0, 0x8e, 0xd0}; const char* g_szStr1 = "Invalid partition table"; const char* g_szStr2 = "Error loading operating system"; const char* g_szStr3 = "Missing operating system"; if ((0 == memcmp (buffer, g_pbMsSignature, 4)) && @@ -388,11 +388,11 @@ namespace VeraCrypt SetLastError (result); throw SystemException(SRC_POS); } } - static void ReadWriteFile (BOOL write, BOOL device, const wstring &filePath, byte *buffer, uint64 offset, uint32 size, DWORD *sizeDone) + static void ReadWriteFile (BOOL write, BOOL device, const wstring &filePath, uint8 *buffer, uint64 offset, uint32 size, DWORD *sizeDone) { Elevate(); DWORD result; CComBSTR bufferBstr, fileBstr; @@ -629,11 +629,11 @@ namespace VeraCrypt SetLastError (result); throw SystemException(SRC_POS); } } - static void WriteEfiBootSectorUserConfig (byte userConfig, const string &customUserMessage, int pim, int hashAlg) + static void WriteEfiBootSectorUserConfig (uint8 userConfig, const string &customUserMessage, int pim, int hashAlg) { Elevate(); DWORD result; CComBSTR customUserMessageBstr; @@ -740,21 +740,21 @@ namespace VeraCrypt class Elevator { public: static void AddReference () { } static void CallDriver (DWORD ioctl, void *input, DWORD inputSize, void *output, DWORD outputSize) { throw ParameterIncorrect (SRC_POS); } - static void ReadWriteFile (BOOL write, BOOL device, const wstring &filePath, byte *buffer, uint64 offset, uint32 size, DWORD *sizeDone) { throw ParameterIncorrect (SRC_POS); } + static void ReadWriteFile (BOOL write, BOOL device, const wstring &filePath, uint8 *buffer, uint64 offset, uint32 size, DWORD *sizeDone) { throw ParameterIncorrect (SRC_POS); } static void RegisterFilterDriver (bool registerDriver, BootEncryption::FilterType filterType) { throw ParameterIncorrect (SRC_POS); } static void Release () { } static void SetDriverServiceStartType (DWORD startType) { throw ParameterIncorrect (SRC_POS); } static void GetFileSize (const wstring &filePath, unsigned __int64 *pSize) { throw ParameterIncorrect (SRC_POS); } static BOOL DeviceIoControl (BOOL readOnly, BOOL device, const wstring &filePath, DWORD dwIoControlCode, LPVOID input, DWORD inputSize, LPVOID output, DWORD outputSize) { throw ParameterIncorrect (SRC_POS); } static void InstallEfiBootLoader (bool preserveUserConfig, bool hiddenOSCreation, int pim, int hashAlg) { throw ParameterIncorrect (SRC_POS); } static void BackupEfiSystemLoader () { throw ParameterIncorrect (SRC_POS); } static void RestoreEfiSystemLoader () { throw ParameterIncorrect (SRC_POS); } static void GetEfiBootDeviceNumber (PSTORAGE_DEVICE_NUMBER pSdn) { throw ParameterIncorrect (SRC_POS); } - static void WriteEfiBootSectorUserConfig (byte userConfig, const string &customUserMessage, int pim, int hashAlg) { throw ParameterIncorrect (SRC_POS); } + static void WriteEfiBootSectorUserConfig (uint8 userConfig, const string &customUserMessage, int pim, int hashAlg) { throw ParameterIncorrect (SRC_POS); } static void UpdateSetupConfigFile (bool bForInstall) { throw ParameterIncorrect (SRC_POS); } static void GetSecureBootConfig (BOOL* pSecureBootEnabled, BOOL *pVeraCryptKeysLoaded) { throw ParameterIncorrect (SRC_POS); } }; #endif // SETUP @@ -771,15 +771,17 @@ namespace VeraCrypt FileOpen = true; } else { LastError = GetLastError(); +#ifndef SETUP if (LastError == ERROR_ACCESS_DENIED && IsUacSupported()) { Elevated = true; FileOpen = true; } +#endif } FilePointerPosition = 0; IsDevice = false; Path = path; @@ -794,26 +796,28 @@ namespace VeraCrypt } FileOpen = false; } - DWORD File::Read (byte *buffer, DWORD size) + DWORD File::Read (uint8 *buffer, DWORD size) { DWORD bytesRead; if (!FileOpen) { SetLastError (LastError); throw SystemException (SRC_POS); } +#ifndef SETUP if (Elevated) { Elevator::ReadWriteFile (false, IsDevice, Path, buffer, FilePointerPosition, size, &bytesRead); FilePointerPosition += bytesRead; return bytesRead; } +#endif if (!ReadFile (Handle, buffer, size, &bytesRead, NULL)) { DWORD dwLastError = GetLastError(); if ((dwLastError == ERROR_INVALID_PARAMETER) && IsDevice && (size % 4096)) @@ -899,11 +903,11 @@ namespace VeraCrypt unsigned __int64 size64; GetFileSize (size64); dwSize = (DWORD) size64; } - void File::Write (byte *buffer, DWORD size) + void File::Write (uint8 *buffer, DWORD size) { DWORD bytesWritten; if (!FileOpen) { @@ -911,17 +915,19 @@ namespace VeraCrypt throw SystemException (SRC_POS); } try { +#ifndef SETUP if (Elevated) { Elevator::ReadWriteFile (true, IsDevice, Path, buffer, FilePointerPosition, size, &bytesWritten); FilePointerPosition += bytesWritten; throw_sys_if (bytesWritten != size); } else +#endif { if (!WriteFile (Handle, buffer, size, &bytesWritten, NULL)) { DWORD dwLastError = GetLastError (); if ((ERROR_INVALID_PARAMETER == dwLastError) && IsDevice && !ReadOnly && (size % 4096)) @@ -1044,15 +1050,17 @@ namespace VeraCrypt FileOpen = true; } else { LastError = GetLastError (); +#ifndef SETUP if (LastError == ERROR_ACCESS_DENIED && IsUacSupported()) { Elevated = true; FileOpen = true; } +#endif } FilePointerPosition = 0; IsDevice = true; Path = path; @@ -1139,11 +1147,11 @@ namespace VeraCrypt if (!config.SystemPartition.IsGPT) { // throw ParameterIncorrect (SRC_POS); // It is assumed that CheckRequirements() had been called // Find the first active partition on the system drive - foreach (const Partition &partition, config.Partitions) + for (const Partition& partition : config.Partitions) { if (partition.Info.BootIndicator) { if (partition.Info.PartitionNumber != config.SystemPartition.Number) { @@ -1152,17 +1160,17 @@ namespace VeraCrypt { int64 minOffsetFound = config.DrivePartition.Info.PartitionLength.QuadPart; Partition bootPartition = partition; Partition partitionBehindBoot; - foreach (const Partition &partition, config.Partitions) + for (const Partition &otherPartition : config.Partitions) { - if (partition.Info.StartingOffset.QuadPart > bootPartition.Info.StartingOffset.QuadPart - && partition.Info.StartingOffset.QuadPart < minOffsetFound) + if (otherPartition.Info.StartingOffset.QuadPart > bootPartition.Info.StartingOffset.QuadPart + && otherPartition.Info.StartingOffset.QuadPart < minOffsetFound) { - minOffsetFound = partition.Info.StartingOffset.QuadPart; - partitionBehindBoot = partition; + minOffsetFound = otherPartition.Info.StartingOffset.QuadPart; + partitionBehindBoot = otherPartition; } } if (minOffsetFound != config.DrivePartition.Info.PartitionLength.QuadPart && partitionBehindBoot.Number == config.SystemPartition.Number) @@ -1349,15 +1357,15 @@ namespace VeraCrypt part.Number = partNumber; part.Info = diskPartInfo.partInfo; part.IsGPT = diskPartInfo.IsGPT; // Mount point - int driveNumber = GetDiskDeviceDriveLetter ((wchar_t *) partPath.str().c_str()); + int driveLetter = GetDiskDeviceDriveLetter ((wchar_t *) partPath.str().c_str()); - if (driveNumber >= 0) + if (driveLetter >= 0) { - part.MountPoint += (wchar_t) (driveNumber + L'A'); + part.MountPoint += (wchar_t) (driveLetter + L'A'); part.MountPoint += L":"; } // Volume ID wchar_t volumePath[TC_MAX_PATH]; @@ -1421,11 +1429,11 @@ namespace VeraCrypt uint16 version; CallDriver (TC_IOCTL_GET_BOOT_LOADER_VERSION, NULL, 0, &version, sizeof (version)); return version; } - void BootEncryption::GetInstalledBootLoaderFingerprint (byte fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]) + void BootEncryption::GetInstalledBootLoaderFingerprint (uint8 fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]) { BootLoaderFingerprintRequest request; CallDriver (VC_IOCTL_GET_BOOT_LOADER_FINGERPRINT, NULL, 0, &request, sizeof (request)); memcpy (fingerprint, request.Fingerprint, sizeof (request.Fingerprint)); } @@ -1460,10 +1468,11 @@ namespace VeraCrypt BootEncryptionStatus BootEncryption::GetStatus () { /* IMPORTANT: Do NOT add any potentially time-consuming operations to this function. */ BootEncryptionStatus status; + memset (&status, 0, sizeof(status)); CallDriver (TC_IOCTL_GET_BOOT_ENCRYPTION_STATUS, NULL, 0, &status, sizeof (status)); return status; } @@ -1483,16 +1492,16 @@ namespace VeraCrypt CallDriver (TC_IOCTL_IS_HIDDEN_SYSTEM_RUNNING, nullptr, 0, &hiddenSystemStatus, sizeof (hiddenSystemStatus)); return hiddenSystemStatus != 0; } - bool BootEncryption::SystemDriveContainsPartitionType (byte type) + bool BootEncryption::SystemDriveContainsPartitionType (uint8 type) { Device device (GetSystemDriveConfiguration().DevicePath, true); device.CheckOpened (SRC_POS); - byte mbrBuf[TC_SECTOR_SIZE_BIOS]; + uint8 mbrBuf[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbrBuf, sizeof (mbrBuf)); MBR *mbr = reinterpret_cast <MBR *> (mbrBuf); if (mbr->Signature != 0xaa55) @@ -1530,11 +1539,11 @@ namespace VeraCrypt case PARTITION_XINT13: case PARTITION_XINT13_EXTENDED: continue; } - if (SystemDriveContainsPartitionType ((byte) partitionType)) + if (SystemDriveContainsPartitionType ((uint8) partitionType)) return true; } return false; } @@ -1648,11 +1657,11 @@ namespace VeraCrypt return config.Partitions.size() == 1 && config.DrivePartition.Info.PartitionLength.QuadPart - config.SystemPartition.Info.PartitionLength.QuadPart < 64 * BYTES_PER_MB; } - uint32 BootEncryption::GetChecksum (byte *data, size_t size) + uint32 BootEncryption::GetChecksum (uint8 *data, size_t size) { uint32 sum = 0; while (size-- > 0) { @@ -1662,11 +1671,11 @@ namespace VeraCrypt return sum; } - void BootEncryption::CreateBootLoaderInMemory (byte *buffer, size_t bufferSize, bool rescueDisk, bool hiddenOSCreation) + void BootEncryption::CreateBootLoaderInMemory (uint8 *buffer, size_t bufferSize, bool rescueDisk, bool hiddenOSCreation) { if (bufferSize < TC_BOOT_LOADER_AREA_SIZE - TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE) throw ParameterIncorrect (SRC_POS); ZeroMemory (buffer, bufferSize); @@ -1685,27 +1694,30 @@ namespace VeraCrypt ZeroMemory(&request, sizeof(request)); CallDriver (TC_IOCTL_GET_BOOT_ENCRYPTION_ALGORITHM_NAME, NULL, 0, &request, sizeof (request)); if (_stricmp (request.BootEncryptionAlgorithmName, "AES") == 0) ea = AES; - else if (_stricmp (request.BootEncryptionAlgorithmName, "Serpent") == 0) + #ifndef WOLFCRYPT_BACKEND + else if (_stricmp (request.BootEncryptionAlgorithmName, "Camellia") == 0) + ea = CAMELLIA; + else if (_stricmp (request.BootEncryptionAlgorithmName, "Serpent") == 0) ea = SERPENT; else if (_stricmp (request.BootEncryptionAlgorithmName, "Twofish") == 0) ea = TWOFISH; - else if (_stricmp (request.BootEncryptionAlgorithmName, "Camellia") == 0) - ea = CAMELLIA; - + #endif if (_stricmp(request.BootPrfAlgorithmName, "SHA-256") == 0) pkcs5_prf = SHA256; - else if (_stricmp(request.BootPrfAlgorithmName, "BLAKE2s-256") == 0) - pkcs5_prf = BLAKE2S; - else if (_stricmp(request.BootPrfAlgorithmName, "SHA-512") == 0) + else if (_stricmp(request.BootPrfAlgorithmName, "SHA-512") == 0) pkcs5_prf = SHA512; + #ifndef WOLFCRYPT_BACKEND + else if (_stricmp(request.BootPrfAlgorithmName, "BLAKE2s-256") == 0) + pkcs5_prf = BLAKE2S; else if (_stricmp(request.BootPrfAlgorithmName, "Whirlpool") == 0) pkcs5_prf = WHIRLPOOL; else if (_stricmp(request.BootPrfAlgorithmName, "Streebog") == 0) pkcs5_prf = STREEBOG; + #endif else if (strlen(request.BootPrfAlgorithmName) == 0) // case of version < 1.0f pkcs5_prf = BLAKE2S; } catch (...) { @@ -1804,11 +1816,11 @@ namespace VeraCrypt break; } // Boot sector DWORD size; - byte *bootSecResourceImg = MapResource (L"BIN", bootSectorId, &size); + uint8 *bootSecResourceImg = MapResource (L"BIN", bootSectorId, &size); if (!bootSecResourceImg || size != TC_SECTOR_SIZE_BIOS) throw ParameterIncorrect (SRC_POS); memcpy (buffer, bootSecResourceImg, size); @@ -1822,27 +1834,27 @@ namespace VeraCrypt // Checksum of the backup header of the outer volume for the hidden system if (hiddenOSCreation) { Device device (GetSystemDriveConfiguration().DevicePath); device.CheckOpened (SRC_POS); - byte headerSector[TC_SECTOR_SIZE_BIOS]; + uint8 headerSector[TC_SECTOR_SIZE_BIOS]; device.SeekAt (HiddenOSCandidatePartition.Info.StartingOffset.QuadPart + HiddenOSCandidatePartition.Info.PartitionLength.QuadPart - TC_VOLUME_HEADER_GROUP_SIZE + TC_VOLUME_HEADER_EFFECTIVE_SIZE); device.Read (headerSector, sizeof (headerSector)); *(uint32 *) (buffer + TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_OFFSET) = GetCrc32 (headerSector, sizeof (headerSector)); } // Decompressor - byte *decompressor = MapResource (L"BIN", IDR_BOOT_LOADER_DECOMPRESSOR, &size); + uint8 *decompressor = MapResource (L"BIN", IDR_BOOT_LOADER_DECOMPRESSOR, &size); if (!decompressor || size > TC_BOOT_LOADER_DECOMPRESSOR_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS) throw ParameterIncorrect (SRC_POS); memcpy (buffer + TC_SECTOR_SIZE_BIOS, decompressor, size); // Compressed boot loader - byte *bootLoader = MapResource (L"BIN", bootLoaderId, &size); + uint8 *bootLoader = MapResource (L"BIN", bootLoaderId, &size); if (!bootLoader || size > TC_MAX_BOOT_LOADER_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS) throw ParameterIncorrect (SRC_POS); memcpy (buffer + TC_SECTOR_SIZE_BIOS + TC_BOOT_LOADER_DECOMPRESSOR_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS, bootLoader, size); @@ -1864,11 +1876,11 @@ namespace VeraCrypt throw ParameterIncorrect (SRC_POS); } } // return false when the user cancel an elevation request - bool BootEncryption::ReadBootSectorConfig (byte *config, size_t bufLength, byte *userConfig, string *customUserMessage, uint16 *bootLoaderVersion) + bool BootEncryption::ReadBootSectorConfig (uint8 *config, size_t bufLength, uint8 *userConfig, string *customUserMessage, uint16 *bootLoaderVersion) { bool bCanceled = false, bExceptionOccured = false; try { if (GetSystemDriveConfiguration().SystemPartition.IsGPT) @@ -1957,33 +1969,33 @@ namespace VeraCrypt return !bCanceled; } - void BootEncryption::WriteBootSectorConfig (const byte newConfig[]) + void BootEncryption::WriteBootSectorConfig (const uint8 newConfig[]) { Device device (GetSystemDriveConfiguration().DevicePath); device.CheckOpened (SRC_POS); - byte mbr[TC_SECTOR_SIZE_BIOS]; + uint8 mbr[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbr, sizeof (mbr)); memcpy (mbr + TC_BOOT_SECTOR_CONFIG_OFFSET, newConfig, TC_BOOT_CFG_FLAG_AREA_SIZE); device.SeekAt (0); device.Write (mbr, sizeof (mbr)); - byte mbrVerificationBuf[TC_SECTOR_SIZE_BIOS]; + uint8 mbrVerificationBuf[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbrVerificationBuf, sizeof (mbr)); if (memcmp (mbr, mbrVerificationBuf, sizeof (mbr)) != 0) throw ErrorException ("ERROR_MBR_PROTECTED", SRC_POS); } - void BootEncryption::WriteEfiBootSectorUserConfig (byte userConfig, const string &customUserMessage, int pim, int hashAlg) + void BootEncryption::WriteEfiBootSectorUserConfig (uint8 userConfig, const string &customUserMessage, int pim, int hashAlg) { if (!IsAdmin() && IsUacSupported()) { Elevator::WriteEfiBootSectorUserConfig (userConfig, customUserMessage, pim, hashAlg); } @@ -1998,21 +2010,21 @@ namespace VeraCrypt EfiBootInst.UpdateConfig (L"\\EFI\\VeraCrypt\\DcsProp", pim, hashAlg, ParentWindow); } } - void BootEncryption::WriteBootSectorUserConfig (byte userConfig, const string &customUserMessage, int pim, int hashAlg) + void BootEncryption::WriteBootSectorUserConfig (uint8 userConfig, const string &customUserMessage, int pim, int hashAlg) { if (GetSystemDriveConfiguration().SystemPartition.IsGPT) { WriteEfiBootSectorUserConfig (userConfig, customUserMessage, pim, hashAlg); } else { Device device (GetSystemDriveConfiguration().DevicePath); device.CheckOpened (SRC_POS); - byte mbr[TC_SECTOR_SIZE_BIOS]; + uint8 mbr[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbr, sizeof (mbr)); if (!BufferContainsString (mbr, sizeof (mbr), TC_APP_NAME) @@ -2043,11 +2055,11 @@ namespace VeraCrypt memset (mbr + TC_BOOT_SECTOR_PIM_VALUE_OFFSET, 0, TC_BOOT_SECTOR_PIM_VALUE_SIZE); device.SeekAt (0); device.Write (mbr, sizeof (mbr)); - byte mbrVerificationBuf[TC_SECTOR_SIZE_BIOS]; + uint8 mbrVerificationBuf[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbrVerificationBuf, sizeof (mbr)); if (memcmp (mbr, mbrVerificationBuf, sizeof (mbr)) != 0) throw ErrorException ("ERROR_MBR_PROTECTED", SRC_POS); @@ -2055,11 +2067,11 @@ namespace VeraCrypt } unsigned int BootEncryption::GetHiddenOSCreationPhase () { - byte configFlags [TC_BOOT_CFG_FLAG_AREA_SIZE]; + uint8 configFlags [TC_BOOT_CFG_FLAG_AREA_SIZE]; ReadBootSectorConfig (configFlags, sizeof(configFlags)); return (configFlags[0] & TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE); } @@ -2068,15 +2080,15 @@ namespace VeraCrypt void BootEncryption::SetHiddenOSCreationPhase (unsigned int newPhase) { #if TC_BOOT_CFG_FLAG_AREA_SIZE != 1 # error TC_BOOT_CFG_FLAG_AREA_SIZE != 1; revise GetHiddenOSCreationPhase() and SetHiddenOSCreationPhase() #endif - byte configFlags [TC_BOOT_CFG_FLAG_AREA_SIZE]; + uint8 configFlags [TC_BOOT_CFG_FLAG_AREA_SIZE]; ReadBootSectorConfig (configFlags, sizeof(configFlags)); - configFlags[0] &= (byte) ~TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE; + configFlags[0] &= (uint8) ~TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE; configFlags[0] |= newPhase; WriteBootSectorConfig (configFlags); } @@ -2149,11 +2161,11 @@ namespace VeraCrypt throw CryptoApiFailed (SRC_POS, CryptoAPILastError); } Device device (GetSystemDriveConfiguration().DevicePath); device.CheckOpened(SRC_POS); - byte mbr[TC_SECTOR_SIZE_BIOS]; + uint8 mbr[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbr, sizeof (mbr)); finally_do_arg (BootEncryption *, this, @@ -2166,22 +2178,22 @@ namespace VeraCrypt #if PRAND_DISK_WIPE_PASSES > RNG_POOL_SIZE # error PRAND_DISK_WIPE_PASSES > RNG_POOL_SIZE #endif - byte randData[PRAND_DISK_WIPE_PASSES]; + uint8 randData[PRAND_DISK_WIPE_PASSES]; if (!RandgetBytes (ParentWindow, randData, sizeof (randData), FALSE)) throw ParameterIncorrect (SRC_POS); for (int wipePass = 0; wipePass < PRAND_DISK_WIPE_PASSES; wipePass++) { for (int i = 0; i < TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_SIZE; ++i) { mbr[TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_OFFSET + i] = randData[wipePass]; } - mbr[TC_BOOT_SECTOR_CONFIG_OFFSET] &= (byte) ~TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE; + mbr[TC_BOOT_SECTOR_CONFIG_OFFSET] &= (uint8) ~TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE; mbr[TC_BOOT_SECTOR_CONFIG_OFFSET] |= randData[wipePass] & TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE; if (wipePass == PRAND_DISK_WIPE_PASSES - 1) memset (mbr + TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_OFFSET, 0, TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_SIZE); @@ -2379,11 +2391,11 @@ namespace VeraCrypt bool bModifiedMsBoot = true; EfiBootInst.GetFileSize(L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi", loaderSize); if (loaderSize > 32768) { - std::vector<byte> bootLoaderBuf ((size_t) loaderSize); + std::vector<uint8> bootLoaderBuf ((size_t) loaderSize); EfiBootInst.ReadFile(L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi", &bootLoaderBuf[0], (DWORD) loaderSize); // look for bootmgfw.efi identifiant string const char* g_szMsBootString = "bootmgfw.pdb"; @@ -2435,11 +2447,12 @@ namespace VeraCrypt filePath = ""; if (!fieldValue.empty() && strlen (fieldValue.c_str())) { string copieValue = fieldValue; - std::transform(copieValue.begin(), copieValue.end(), copieValue.begin(), ::tolower); + std::transform(copieValue.begin(), copieValue.end(), copieValue.begin(), + [](unsigned char c) { return static_cast<char>(std::tolower(c)); }); if (strstr (copieValue.c_str(), "postexec") && strstr (copieValue.c_str(), "file(")) { char c; const char* ptr = strstr (copieValue.c_str(), "file("); @@ -2630,18 +2643,28 @@ namespace VeraCrypt } bool EfiBoot::IsEfiBoot() { DWORD BootOrderLen; BootOrderLen = GetFirmwareEnvironmentVariable(L"BootOrder", EfiVarGuid, tempBuf, sizeof(tempBuf)); - return BootOrderLen != 0; + return (BootOrderLen != 0) || (GetLastError() != ERROR_INVALID_FUNCTION); } void EfiBoot::DeleteStartExec(uint16 statrtOrderNum, wchar_t* type) { - SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, TRUE); + DWORD dwLastError; + BOOL bPrivilegesSet = IsPrivilegeEnabled (SE_SYSTEM_ENVIRONMENT_NAME); + if (!bPrivilegesSet && !SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, TRUE)) + { + dwLastError = GetLastError(); + wchar_t szMsg[128]; + StringCchPrintfW(szMsg, ARRAYSIZE(szMsg), L"Failed to set SE_SYSTEM_ENVIRONMENT_NAME privilege (error code 0x%.8X)", dwLastError); + throw ErrorException(szMsg, SRC_POS); + } // Check EFI if (!IsEfiBoot()) { - throw ErrorException(L"can not detect EFI environment", SRC_POS); + if (!bPrivilegesSet) + SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, FALSE); + throw ErrorException(L"Failed to detect EFI environment (error ERROR_INVALID_FUNCTION)", SRC_POS); } wchar_t varName[256]; StringCchPrintfW(varName, ARRAYSIZE (varName), L"%s%04X", type == NULL ? L"Boot" : type, statrtOrderNum); SetFirmwareEnvironmentVariable(varName, EfiVarGuid, NULL, 0); @@ -2680,26 +2703,39 @@ namespace VeraCrypt ) { SetFirmwareEnvironmentVariable(next.c_str(), EfiVarGuid, startOrder, 0); } } + + if (!bPrivilegesSet) + SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, FALSE); } void EfiBoot::SetStartExec(wstring description, wstring execPath, bool setBootEntry, bool forceFirstBootEntry, bool setBootNext, uint16 statrtOrderNum , wchar_t* type, uint32 attr) { - SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, TRUE); + DWORD dwLastError; + BOOL bPrivilegesSet = IsPrivilegeEnabled (SE_SYSTEM_ENVIRONMENT_NAME); + if (!bPrivilegesSet && !SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, TRUE)) + { + dwLastError = GetLastError(); + wchar_t szMsg[128]; + StringCchPrintfW(szMsg, ARRAYSIZE(szMsg), L"Failed to set SE_SYSTEM_ENVIRONMENT_NAME privilege (error code 0x%.8X)", dwLastError); + throw ErrorException(szMsg, SRC_POS); + } // Check EFI if (!IsEfiBoot()) { - throw ErrorException(L"can not detect EFI environment", SRC_POS); + if (!bPrivilegesSet) + SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, FALSE); + throw ErrorException(L"Failed to detect EFI environment (error ERROR_INVALID_FUNCTION)", SRC_POS); } if (bDeviceInfoValid) { uint32 varSize = 56; varSize += ((uint32) description.length()) * 2 + 2; varSize += ((uint32) execPath.length()) * 2 + 2; - byte *startVar = new byte[varSize]; - byte *pVar = startVar; + uint8 *startVar = new uint8[varSize]; + uint8 *pVar = startVar; // Attributes (1b Active, 1000b - Hidden) *(uint32 *)pVar = attr; pVar += sizeof(uint32); @@ -2716,16 +2752,16 @@ namespace VeraCrypt pVar += sizeof(uint16); /* EFI_DEVICE_PATH_PROTOCOL (HARDDRIVE_DEVICE_PATH \ FILE_PATH \ END) */ // Type - *(byte *)pVar = 0x04; - pVar += sizeof(byte); + *(uint8 *)pVar = 0x04; + pVar += sizeof(uint8); // SubType - *(byte *)pVar = 0x01; - pVar += sizeof(byte); + *(uint8 *)pVar = 0x01; + pVar += sizeof(uint8); // HDD dev path length *(uint16 *)pVar = 0x2A; // 42 pVar += sizeof(uint16); @@ -2744,16 +2780,16 @@ namespace VeraCrypt // GptGuid memcpy(pVar, &partInfo.Gpt.PartitionId, 16); pVar += 16; // MbrType - *(byte *)pVar = 0x02; - pVar += sizeof(byte); + *(uint8 *)pVar = 0x02; + pVar += sizeof(uint8); // SigType - *(byte *)pVar = 0x02; - pVar += sizeof(byte); + *(uint8 *)pVar = 0x02; + pVar += sizeof(uint8); // Type and sub type 04 04 (file path) *(uint16 *)pVar = 0x0404; pVar += sizeof(uint16); @@ -2776,11 +2812,11 @@ namespace VeraCrypt // Set variable wchar_t varName[256]; StringCchPrintfW(varName, ARRAYSIZE (varName), L"%s%04X", type == NULL ? L"Boot" : type, statrtOrderNum); // only set value if it doesn't already exist - byte* existingVar = new byte[varSize]; + uint8* existingVar = new uint8[varSize]; DWORD existingVarLen = GetFirmwareEnvironmentVariableW (varName, EfiVarGuid, existingVar, varSize); if ((existingVarLen != varSize) || (0 != memcmp (existingVar, startVar, varSize))) SetFirmwareEnvironmentVariable(varName, EfiVarGuid, startVar, varSize); delete [] startVar; delete [] existingVar; @@ -2808,11 +2844,11 @@ namespace VeraCrypt if (startOrderNumPos != 0) { wchar_t varName[256]; StringCchPrintfW(varName, ARRAYSIZE (varName), L"%s%04X", type == NULL ? L"Boot" : type, startOrder[0]); - byte* existingVar = new byte[512]; + uint8* existingVar = new uint8[512]; DWORD existingVarLen = GetFirmwareEnvironmentVariableW (varName, EfiVarGuid, existingVar, 512); if (existingVarLen > 0) { if (BufferContainsWideString (existingVar, existingVarLen, L"EFI\\Microsoft\\Boot\\bootmgfw.efi")) bFirstEntryIsWindows = true; @@ -2860,10 +2896,13 @@ namespace VeraCrypt next.insert(0, type == NULL ? L"Boot" : type); SetFirmwareEnvironmentVariable(next.c_str(), EfiVarGuid, &statrtOrderNum, 2); } + + if (!bPrivilegesSet) + SetPrivilege(SE_SYSTEM_ENVIRONMENT_NAME, FALSE); } bool EfiBoot::CompareFiles (const wchar_t* fileName1, const wchar_t* fileName2) { bool bRet = false; @@ -2879,12 +2918,12 @@ namespace VeraCrypt f2.GetFileSize (size2); if (size1 == size2) { // same size, so now we compare content - std::vector<byte> file1Buf (8096); - std::vector<byte> file2Buf (8096); + std::vector<uint8> file1Buf (8096); + std::vector<uint8> file2Buf (8096); DWORD remainingBytes = size1, dataToRead; while (remainingBytes) { dataToRead = VC_MIN (remainingBytes, (DWORD) file1Buf.size()); @@ -2915,11 +2954,11 @@ namespace VeraCrypt f2.Close(); return bRet; } - bool EfiBoot::CompareFileData (const wchar_t* fileName, const byte* data, DWORD size) + bool EfiBoot::CompareFileData (const wchar_t* fileName, const uint8* data, DWORD size) { bool bRet = false; File f(fileName, true); if (f.IsOpened ()) @@ -2932,11 +2971,11 @@ namespace VeraCrypt f.GetFileSize(existingSize); if (existingSize == size) { - std::vector<byte> fileBuf (8096); + std::vector<uint8> fileBuf (8096); DWORD remainingBytes = size, dataOffset = 0, dataToRead; while (remainingBytes) { dataToRead = VC_MIN (remainingBytes, (DWORD) fileBuf.size()); @@ -2966,11 +3005,11 @@ namespace VeraCrypt f.Close(); return bRet; } - void EfiBoot::SaveFile(const wchar_t* name, byte* data, DWORD size) { + void EfiBoot::SaveFile(const wchar_t* name, uint8* data, DWORD size) { wstring path = EfiBootPartPath; path += name; if (!CompareFileData (path.c_str(), data, size)) { @@ -2995,11 +3034,11 @@ namespace VeraCrypt File f(path, true); f.GetFileSize(size); f.Close(); } - void EfiBoot::ReadFile(const wchar_t* name, byte* data, DWORD size) { + void EfiBoot::ReadFile(const wchar_t* name, uint8* data, DWORD size) { wstring path = EfiBootPartPath; path += name; File f(path, true); f.Read(data, size); f.Close(); @@ -3161,11 +3200,11 @@ namespace VeraCrypt } void BootEncryption::UpdateSetupConfigFile (bool bForInstall) { // starting from Windows 10 1607 (Build 14393), ReflectDrivers in Setupconfig.ini is supported - if (IsOSVersionAtLeast (WIN_10, 0) && CurrentOSBuildNumber >= 14393) + if (IsWin10BuildAtLeast(WIN_10_1607_BUILD)) { wchar_t szInstallPath [TC_MAX_PATH]; wchar_t szSetupconfigLocation [TC_MAX_PATH + 20]; if (bForInstall) @@ -3291,57 +3330,33 @@ namespace VeraCrypt { Warning ("ADMIN_PRIVILEGES_WARN_DEVICES", ParentWindow); } } DWORD sizeDcsBoot; -#ifdef _WIN64 - byte *dcsBootImg = MapResource(L"BIN", IDR_EFI_DCSBOOT, &sizeDcsBoot); -#else - byte *dcsBootImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSBOOT : IDR_EFI_DCSBOOT32, &sizeDcsBoot); -#endif + uint8 *dcsBootImg = MapResource(L"BIN", IDR_EFI_DCSBOOT, &sizeDcsBoot); if (!dcsBootImg) throw ErrorException(L"Out of resource DcsBoot", SRC_POS); DWORD sizeDcsInt; -#ifdef _WIN64 - byte *dcsIntImg = MapResource(L"BIN", IDR_EFI_DCSINT, &sizeDcsInt); -#else - byte *dcsIntImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSINT: IDR_EFI_DCSINT32, &sizeDcsInt); -#endif + uint8 *dcsIntImg = MapResource(L"BIN", IDR_EFI_DCSINT, &sizeDcsInt); if (!dcsIntImg) throw ErrorException(L"Out of resource DcsInt", SRC_POS); DWORD sizeDcsCfg; -#ifdef _WIN64 - byte *dcsCfgImg = MapResource(L"BIN", IDR_EFI_DCSCFG, &sizeDcsCfg); -#else - byte *dcsCfgImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSCFG: IDR_EFI_DCSCFG32, &sizeDcsCfg); -#endif + uint8 *dcsCfgImg = MapResource(L"BIN", IDR_EFI_DCSCFG, &sizeDcsCfg); if (!dcsCfgImg) throw ErrorException(L"Out of resource DcsCfg", SRC_POS); DWORD sizeLegacySpeaker; -#ifdef _WIN64 - byte *LegacySpeakerImg = MapResource(L"BIN", IDR_EFI_LEGACYSPEAKER, &sizeLegacySpeaker); -#else - byte *LegacySpeakerImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_LEGACYSPEAKER: IDR_EFI_LEGACYSPEAKER32, &sizeLegacySpeaker); -#endif + uint8 *LegacySpeakerImg = MapResource(L"BIN", IDR_EFI_LEGACYSPEAKER, &sizeLegacySpeaker); if (!LegacySpeakerImg) throw ErrorException(L"Out of resource LegacySpeaker", SRC_POS); #ifdef VC_EFI_CUSTOM_MODE DWORD sizeBootMenuLocker; -#ifdef _WIN64 - byte *BootMenuLockerImg = MapResource(L"BIN", IDR_EFI_DCSBML, &sizeBootMenuLocker); -#else - byte *BootMenuLockerImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSBML: IDR_EFI_DCSBML32, &sizeBootMenuLocker); -#endif + uint8 *BootMenuLockerImg = MapResource(L"BIN", IDR_EFI_DCSBML, &sizeBootMenuLocker); if (!BootMenuLockerImg) throw ErrorException(L"Out of resource DcsBml", SRC_POS); #endif DWORD sizeDcsInfo; -#ifdef _WIN64 - byte *DcsInfoImg = MapResource(L"BIN", IDR_EFI_DCSINFO, &sizeDcsInfo); -#else - byte *DcsInfoImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSINFO: IDR_EFI_DCSINFO32, &sizeDcsInfo); -#endif + uint8 *DcsInfoImg = MapResource(L"BIN", IDR_EFI_DCSINFO, &sizeDcsInfo); if (!DcsInfoImg) throw ErrorException(L"Out of resource DcsInfo", SRC_POS); EfiBootInst.PrepareBootPartition(PostOOBEMode); @@ -3349,12 +3364,12 @@ namespace VeraCrypt { // Save modules bool bAlreadyExist; const char* g_szMsBootString = "bootmgfw.pdb"; unsigned __int64 loaderSize = 0; - const wchar_t * szStdEfiBootloader = Is64BitOs()? L"\\EFI\\Boot\\bootx64.efi": L"\\EFI\\Boot\\bootia32.efi"; - const wchar_t * szBackupEfiBootloader = Is64BitOs()? L"\\EFI\\Boot\\original_bootx64.vc_backup": L"\\EFI\\Boot\\original_bootia32.vc_backup"; + const wchar_t * szStdEfiBootloader = L"\\EFI\\Boot\\bootx64.efi"; + const wchar_t * szBackupEfiBootloader = L"\\EFI\\Boot\\original_bootx64.vc_backup"; if (preserveUserConfig) { bool bModifiedMsBoot = true, bMissingMsBoot = false;; if (EfiBootInst.FileExists (L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi")) @@ -3368,11 +3383,11 @@ namespace VeraCrypt if (EfiBootInst.FileExists (L"\\EFI\\Microsoft\\Boot\\bootmgfw_ms.vc")) { if (loaderSize > 32768) { - std::vector<byte> bootLoaderBuf ((size_t) loaderSize); + std::vector<uint8> bootLoaderBuf ((size_t) loaderSize); EfiBootInst.ReadFile(L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi", &bootLoaderBuf[0], (DWORD) loaderSize); // look for bootmgfw.efi identifiant string if (BufferHasPattern (bootLoaderBuf.data (), (size_t) loaderSize, g_szMsBootString, strlen (g_szMsBootString))) @@ -3386,11 +3401,11 @@ namespace VeraCrypt else { // DcsBoot.efi is always smaller than 32KB if (loaderSize > 32768) { - std::vector<byte> bootLoaderBuf ((size_t) loaderSize); + std::vector<uint8> bootLoaderBuf ((size_t) loaderSize); EfiBootInst.ReadFile(L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi", &bootLoaderBuf[0], (DWORD) loaderSize); // look for bootmgfw.efi identifiant string if (BufferHasPattern (bootLoaderBuf.data (), (size_t) loaderSize, g_szMsBootString, strlen (g_szMsBootString))) @@ -3415,11 +3430,11 @@ namespace VeraCrypt && (EfiBootInst.FileExists (loaderPath.c_str())) ) { // look for bootmgfw.efi identifiant string EfiBootInst.GetFileSize(loaderPath.c_str(), loaderSize); - std::vector<byte> bootLoaderBuf ((size_t) loaderSize); + std::vector<uint8> bootLoaderBuf ((size_t) loaderSize); EfiBootInst.ReadFile(loaderPath.c_str(), &bootLoaderBuf[0], (DWORD) loaderSize); // look for bootmgfw.efi identifiant string if (BufferHasPattern (bootLoaderBuf.data (), (size_t) loaderSize, g_szMsBootString, strlen (g_szMsBootString))) @@ -3448,11 +3463,11 @@ namespace VeraCrypt // check if standard bootloader under EFI\Boot has been set to Microsoft version // if yes, replace it with our bootloader EfiBootInst.GetFileSize(szStdEfiBootloader, loaderSize); if (loaderSize > 32768) { - std::vector<byte> bootLoaderBuf ((size_t) loaderSize); + std::vector<uint8> bootLoaderBuf ((size_t) loaderSize); EfiBootInst.ReadFile(szStdEfiBootloader, &bootLoaderBuf[0], (DWORD) loaderSize); // look for bootmgfw.efi identifiant string if (BufferHasPattern (bootLoaderBuf.data (), (size_t) loaderSize, g_szMsBootString, strlen (g_szMsBootString))) @@ -3482,11 +3497,11 @@ namespace VeraCrypt if (EfiBootInst.FileExists (szStdEfiBootloader)) { // check if standard bootloader under EFI\Boot is Microsoft one or if it is ours // if both cases, replace it with our bootloader otherwise do nothing EfiBootInst.GetFileSize(szStdEfiBootloader, loaderSize); - std::vector<byte> bootLoaderBuf ((size_t) loaderSize); + std::vector<uint8> bootLoaderBuf ((size_t) loaderSize); EfiBootInst.ReadFile(szStdEfiBootloader, &bootLoaderBuf[0], (DWORD) loaderSize); // look for bootmgfw.efi or VeraCrypt identifiant strings if ( ((loaderSize > 32768) && BufferHasPattern (bootLoaderBuf.data (), (size_t) loaderSize, g_szMsBootString, strlen (g_szMsBootString))) ) @@ -3506,14 +3521,11 @@ namespace VeraCrypt EfiBootInst.RenameFile (L"\\DcsProp", L"\\EFI\\VeraCrypt\\DcsProp", FALSE); EfiBootInst.RenameFile (L"\\DcsBoot", L"\\EFI\\VeraCrypt\\DcsBoot", FALSE); // move the original bootloader backup from old location (if it exists) to new location // we don't force the move operation if the new location already exists - if (Is64BitOs()) - EfiBootInst.RenameFile (L"\\EFI\\Boot\\original_bootx64_vc_backup.efi", L"\\EFI\\Boot\\original_bootx64.vc_backup", FALSE); - else - EfiBootInst.RenameFile (L"\\EFI\\Boot\\original_bootia32_vc_backup.efi", L"\\EFI\\Boot\\original_bootia32.vc_backup", FALSE); + EfiBootInst.RenameFile (L"\\EFI\\Boot\\original_bootx64_vc_backup.efi", L"\\EFI\\Boot\\original_bootx64.vc_backup", FALSE); // Clean beta9 EfiBootInst.DelFile(L"\\DcsBoot.efi"); EfiBootInst.DelFile(L"\\DcsInt.efi"); EfiBootInst.DelFile(L"\\DcsCfg.efi"); @@ -3534,15 +3546,15 @@ namespace VeraCrypt } else { try { - byte bootLoaderBuf[TC_BOOT_LOADER_AREA_SIZE - TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE] = {0}; + uint8 bootLoaderBuf[TC_BOOT_LOADER_AREA_SIZE - TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE] = {0}; CreateBootLoaderInMemory (bootLoaderBuf, sizeof (bootLoaderBuf), false, hiddenOSCreation); // Write MBR - byte mbr[TC_SECTOR_SIZE_BIOS]; + uint8 mbr[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbr, sizeof (mbr)); if (preserveUserConfig && BufferContainsString (mbr, sizeof (mbr), TC_APP_NAME)) @@ -3573,11 +3585,11 @@ namespace VeraCrypt memcpy (mbr, bootLoaderBuf, TC_MAX_MBR_BOOT_CODE_SIZE); device.SeekAt (0); device.Write (mbr, sizeof (mbr)); - byte mbrVerificationBuf[TC_SECTOR_SIZE_BIOS]; + uint8 mbrVerificationBuf[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbrVerificationBuf, sizeof (mbr)); if (memcmp (mbr, mbrVerificationBuf, sizeof (mbr)) != 0) throw ErrorException ("ERROR_MBR_PROTECTED", SRC_POS); @@ -3615,13 +3627,13 @@ namespace VeraCrypt // return true for now when EFI system encryption is used until we implement // a dedicated EFI fingerprinting mechanism in VeraCrypt driver if (config.SystemPartition.IsGPT) return true; - byte bootLoaderBuf[TC_BOOT_LOADER_AREA_SIZE - TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE] = {0}; - byte fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; - byte expectedFingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; + uint8 bootLoaderBuf[TC_BOOT_LOADER_AREA_SIZE - TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE] = {0}; + uint8 fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; + uint8 expectedFingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; bool bRet = false; try { // read bootloader fingerprint @@ -3688,65 +3700,37 @@ namespace VeraCrypt BOOL bIsGPT = GetSystemDriveConfiguration().SystemPartition.IsGPT; if (bIsGPT) { // create EFI disk structure DWORD sizeDcsBoot; -#ifdef _WIN64 - byte *dcsBootImg = MapResource(L"BIN", IDR_EFI_DCSBOOT, &sizeDcsBoot); -#else - byte *dcsBootImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSBOOT : IDR_EFI_DCSBOOT32, &sizeDcsBoot); -#endif + uint8 *dcsBootImg = MapResource(L"BIN", IDR_EFI_DCSBOOT, &sizeDcsBoot); if (!dcsBootImg) throw ParameterIncorrect (SRC_POS); DWORD sizeDcsInt; -#ifdef _WIN64 - byte *dcsIntImg = MapResource(L"BIN", IDR_EFI_DCSINT, &sizeDcsInt); -#else - byte *dcsIntImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSINT: IDR_EFI_DCSINT32, &sizeDcsInt); -#endif + uint8 *dcsIntImg = MapResource(L"BIN", IDR_EFI_DCSINT, &sizeDcsInt); if (!dcsIntImg) throw ParameterIncorrect (SRC_POS); DWORD sizeDcsCfg; -#ifdef _WIN64 - byte *dcsCfgImg = MapResource(L"BIN", IDR_EFI_DCSCFG, &sizeDcsCfg); -#else - byte *dcsCfgImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSCFG: IDR_EFI_DCSCFG32, &sizeDcsCfg); -#endif + uint8 *dcsCfgImg = MapResource(L"BIN", IDR_EFI_DCSCFG, &sizeDcsCfg); if (!dcsCfgImg) throw ParameterIncorrect (SRC_POS); DWORD sizeLegacySpeaker; -#ifdef _WIN64 - byte *LegacySpeakerImg = MapResource(L"BIN", IDR_EFI_LEGACYSPEAKER, &sizeLegacySpeaker); -#else - byte *LegacySpeakerImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_LEGACYSPEAKER: IDR_EFI_LEGACYSPEAKER32, &sizeLegacySpeaker); -#endif + uint8 *LegacySpeakerImg = MapResource(L"BIN", IDR_EFI_LEGACYSPEAKER, &sizeLegacySpeaker); if (!LegacySpeakerImg) throw ParameterIncorrect (SRC_POS); #ifdef VC_EFI_CUSTOM_MODE DWORD sizeBootMenuLocker; -#ifdef _WIN64 - byte *BootMenuLockerImg = MapResource(L"BIN", IDR_EFI_DCSBML, &sizeBootMenuLocker); -#else - byte *BootMenuLockerImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSBML: IDR_EFI_DCSBML32, &sizeBootMenuLocker); -#endif + uint8 *BootMenuLockerImg = MapResource(L"BIN", IDR_EFI_DCSBML, &sizeBootMenuLocker); if (!BootMenuLockerImg) throw ParameterIncorrect (SRC_POS); #endif DWORD sizeDcsRescue; -#ifdef _WIN64 - byte *DcsRescueImg = MapResource(L"BIN", IDR_EFI_DCSRE, &sizeDcsRescue); -#else - byte *DcsRescueImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSRE: IDR_EFI_DCSRE32, &sizeDcsRescue); -#endif + uint8 *DcsRescueImg = MapResource(L"BIN", IDR_EFI_DCSRE, &sizeDcsRescue); if (!DcsRescueImg) throw ParameterIncorrect (SRC_POS); DWORD sizeDcsInfo; -#ifdef _WIN64 - byte *DcsInfoImg = MapResource(L"BIN", IDR_EFI_DCSINFO, &sizeDcsInfo); -#else - byte *DcsInfoImg = MapResource(L"BIN", Is64BitOs()? IDR_EFI_DCSINFO: IDR_EFI_DCSINFO32, &sizeDcsInfo); -#endif + uint8 *DcsInfoImg = MapResource(L"BIN", IDR_EFI_DCSINFO, &sizeDcsInfo); if (!DcsInfoImg) throw ParameterIncorrect (SRC_POS); WCHAR szTmpPath[MAX_PATH + 1], szTmpFilePath[MAX_PATH + 1]; if (!GetTempPathW (MAX_PATH, szTmpPath)) @@ -3768,11 +3752,11 @@ namespace VeraCrypt if (!z) throw ParameterIncorrect (SRC_POS); finally_do_arg (zip_t**, &z, { if (*finally_arg) zip_discard (*finally_arg);}); - if (!ZipAdd (z, Is64BitOs()? "EFI/Boot/bootx64.efi": "EFI/Boot/bootia32.efi", DcsRescueImg, sizeDcsRescue)) + if (!ZipAdd (z, "EFI/Boot/bootx64.efi", DcsRescueImg, sizeDcsRescue)) throw ParameterIncorrect (SRC_POS); #ifdef VC_EFI_CUSTOM_MODE if (!ZipAdd (z, "EFI/VeraCrypt/DcsBml.dcs", BootMenuLockerImg, sizeBootMenuLocker)) throw ParameterIncorrect (SRC_POS); #endif @@ -3817,11 +3801,11 @@ namespace VeraCrypt File sysBakFile (GetSystemLoaderBackupPath(), true); sysBakFile.CheckOpened (SRC_POS); sysBakFile.GetFileSize(fileSize); fileBuf.Resize ((DWORD) fileSize); DWORD sizeLoader = sysBakFile.Read (fileBuf.Ptr (), fileSize); - bLoadAdded = ZipAdd (z, Is64BitOs()? "EFI/Boot/original_bootx64.vc_backup": "EFI/Boot/original_bootia32.vc_backup", fileBuf.Ptr (), sizeLoader); + bLoadAdded = ZipAdd (z, "EFI/Boot/original_bootx64.vc_backup", fileBuf.Ptr (), sizeLoader); } catch (Exception &e) { e.Show (ParentWindow); Warning ("SYS_LOADER_UNAVAILABLE_FOR_RESCUE_DISK", ParentWindow); @@ -3861,11 +3845,11 @@ namespace VeraCrypt throw ParameterIncorrect (SRC_POS); finally_do_arg (FILE*, ftmpFile, { fclose (finally_arg); }); unsigned long ulZipSize = (unsigned long) _filelength (_fileno (ftmpFile)); - RescueZipData = new byte[ulZipSize]; + RescueZipData = new uint8[ulZipSize]; if (!RescueZipData) throw bad_alloc(); if (ulZipSize != fread (RescueZipData, 1, ulZipSize, ftmpFile)) { @@ -3884,11 +3868,11 @@ namespace VeraCrypt } else { Buffer imageBuf (RescueIsoImageSize); - byte *image = imageBuf.Ptr(); + uint8 *image = imageBuf.Ptr(); memset (image, 0, RescueIsoImageSize); // Primary volume descriptor const char* szPrimVolDesc = "\001CD001\001"; const char* szPrimVolLabel = "VeraCrypt Rescue Disk "; @@ -3992,11 +3976,11 @@ namespace VeraCrypt } // Boot loader backup CreateBootLoaderInMemory (image + TC_CD_BOOTSECTOR_OFFSET + TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR_OFFSET, TC_BOOT_LOADER_AREA_SIZE, false); - RescueIsoImage = new byte[RescueIsoImageSize]; + RescueIsoImage = new uint8[RescueIsoImageSize]; if (!RescueIsoImage) throw bad_alloc(); memcpy (RescueIsoImage, image, RescueIsoImageSize); if (!isoImagePath.empty()) @@ -4044,23 +4028,10 @@ namespace VeraCrypt L"EFI/VeraCrypt/DcsInt.dcs", L"EFI/VeraCrypt/LegacySpeaker.dcs", L"EFI/VeraCrypt/svh_bak", L"EFI/Boot/original_bootx64.vc_backup" }; - - const wchar_t* efi32Files[] = { - L"EFI/Boot/bootia32.efi", -#ifdef VC_EFI_CUSTOM_MODE - L"EFI/VeraCrypt/DcsBml.dcs", -#endif - L"EFI/VeraCrypt/DcsBoot.efi", - L"EFI/VeraCrypt/DcsCfg.dcs", - L"EFI/VeraCrypt/DcsInt.dcs", - L"EFI/VeraCrypt/LegacySpeaker.dcs", - L"EFI/VeraCrypt/svh_bak", - L"EFI/Boot/original_bootia32.vc_backup" - }; zip_error_t zerr; zip_source_t* zsrc = zip_source_buffer_create (RescueZipData, RescueZipSize, 0, &zerr); if (!zsrc) throw ParameterIncorrect (SRC_POS); @@ -4085,12 +4056,12 @@ namespace VeraCrypt WCHAR szNameBuffer[TC_MAX_PATH]; if (GetVolumeInformationW (rootPath, NULL, 0, NULL, NULL, NULL, szNameBuffer, ARRAYSIZE(szNameBuffer)) && !wcsncmp (szNameBuffer, L"FAT", 3)) { int i; - const wchar_t** efiFiles = Is64BitOs()? efi64Files: efi32Files; - int efiFilesSize = Is64BitOs()? ARRAYSIZE(efi64Files): ARRAYSIZE(efi32Files); + const wchar_t** efiFiles = efi64Files; + int efiFilesSize = ARRAYSIZE(efi64Files); for (i = 0; i < efiFilesSize; i++) { bool bMatch = false; zip_int64_t index = zip_name_locate (z, WideToUtf8String (efiFiles[i]).c_str(), ZIP_FL_NOCASE); if (index >= 0) @@ -4239,29 +4210,16 @@ namespace VeraCrypt L"EFI/VeraCrypt/DcsInt.dcs", L"EFI/VeraCrypt/LegacySpeaker.dcs", L"EFI/VeraCrypt/svh_bak", L"EFI/Boot/original_bootx64.vc_backup" }; - - const wchar_t* efi32Files[] = { - L"EFI/Boot/bootia32.efi", -#ifdef VC_EFI_CUSTOM_MODE - L"EFI/VeraCrypt/DcsBml.dcs", -#endif - L"EFI/VeraCrypt/DcsBoot.efi", - L"EFI/VeraCrypt/DcsCfg.dcs", - L"EFI/VeraCrypt/DcsInt.dcs", - L"EFI/VeraCrypt/LegacySpeaker.dcs", - L"EFI/VeraCrypt/svh_bak", - L"EFI/Boot/original_bootia32.vc_backup" - }; int i; zip_stat_t statMem, statFile; zip_int64_t indexMem, indexFile; - const wchar_t** efiFiles = Is64BitOs()? efi64Files: efi32Files; - int efiFilesSize = Is64BitOs()? ARRAYSIZE(efi64Files): ARRAYSIZE(efi32Files); + const wchar_t** efiFiles = efi64Files; + int efiFilesSize = ARRAYSIZE(efi64Files); for (i = 0; i < efiFilesSize; i++) { bool bMatch = false; indexMem = zip_name_locate (zMem, WideToUtf8String (efiFiles[i]).c_str(), ZIP_FL_NOCASE); if (indexMem >= 0) @@ -4350,26 +4308,26 @@ namespace VeraCrypt PCRYPTO_INFO cryptoInfo = NULL; if (!IsRandomNumberGeneratorStarted()) throw ParameterIncorrect (SRC_POS); - throw_sys_if (CreateVolumeHeaderInMemory (ParentWindow, TRUE, (char *) VolumeHeader, ea, mode, password, pkcs5, pim, NULL, &cryptoInfo, + throw_sys_if (CreateVolumeHeaderInMemory (ParentWindow, TRUE, VolumeHeader, ea, mode, password, pkcs5, pim, NULL, &cryptoInfo, volumeSize, 0, encryptedAreaStart, 0, TC_SYSENC_KEYSCOPE_MIN_REQ_PROG_VERSION, TC_HEADER_FLAG_ENCRYPTED_SYSTEM, TC_SECTOR_SIZE_BIOS, FALSE) != 0); finally_do_arg (PCRYPTO_INFO*, &cryptoInfo, { crypto_close (*finally_arg); }); // Initial rescue disk assumes encryption of the drive has been completed (EncryptedAreaLength == volumeSize) memcpy (RescueVolumeHeader, VolumeHeader, sizeof (RescueVolumeHeader)); - if (0 != ReadVolumeHeader (TRUE, (char *) RescueVolumeHeader, password, pkcs5, pim, NULL, cryptoInfo)) + if (0 != ReadVolumeHeader (TRUE, RescueVolumeHeader, password, pkcs5, pim, NULL, cryptoInfo)) throw ParameterIncorrect (SRC_POS); DecryptBuffer (RescueVolumeHeader + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, cryptoInfo); if (GetHeaderField32 (RescueVolumeHeader, TC_HEADER_OFFSET_MAGIC) != 0x56455241) throw ParameterIncorrect (SRC_POS); - byte *fieldPos = RescueVolumeHeader + TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH; + uint8 *fieldPos = RescueVolumeHeader + TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH; mputInt64 (fieldPos, volumeSize); // CRC of the header fields uint32 crc = GetCrc32 (RescueVolumeHeader + TC_HEADER_OFFSET_MAGIC, TC_HEADER_OFFSET_HEADER_CRC - TC_HEADER_OFFSET_MAGIC); fieldPos = RescueVolumeHeader + TC_HEADER_OFFSET_HEADER_CRC; @@ -4389,11 +4347,11 @@ namespace VeraCrypt Device device (GetSystemDriveConfiguration().DevicePath); device.CheckOpened (SRC_POS); device.SeekAt (TC_BOOT_VOLUME_HEADER_SECTOR_OFFSET); - device.Write ((byte *) VolumeHeader, sizeof (VolumeHeader)); + device.Write ((uint8 *) VolumeHeader, sizeof (VolumeHeader)); } // For synchronous operations use AbortSetupWait() void BootEncryption::AbortSetup () @@ -4430,11 +4388,11 @@ namespace VeraCrypt { Warning ("ADMIN_PRIVILEGES_WARN_DEVICES", ParentWindow); } } unsigned __int64 loaderSize = 0; - std::vector<byte> bootLoaderBuf; + std::vector<uint8> bootLoaderBuf; const wchar_t * szStdMsBootloader = L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi"; const wchar_t * szBackupMsBootloader = L"\\EFI\\Microsoft\\Boot\\bootmgfw_ms.vc"; const char* g_szMsBootString = "bootmgfw.pdb"; bool bModifiedMsBoot = true; @@ -4490,11 +4448,11 @@ namespace VeraCrypt } else { Device device (GetSystemDriveConfiguration().DevicePath, true); device.CheckOpened (SRC_POS); - byte bootLoaderBuf[TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS]; + uint8 bootLoaderBuf[TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (bootLoaderBuf, sizeof (bootLoaderBuf)); // Prevent TrueCrypt loader from being backed up @@ -4532,14 +4490,11 @@ namespace VeraCrypt EfiBootInst.PrepareBootPartition(); EfiBootInst.DeleteStartExec(); EfiBootInst.DeleteStartExec(0xDC5B, L"Driver"); // remove DcsBml boot driver it was installed - if (Is64BitOs()) - EfiBootInst.RenameFile(L"\\EFI\\Boot\\original_bootx64.vc_backup", L"\\EFI\\Boot\\bootx64.efi", TRUE); - else - EfiBootInst.RenameFile(L"\\EFI\\Boot\\original_bootia32.vc_backup", L"\\EFI\\Boot\\bootia32.efi", TRUE); + EfiBootInst.RenameFile(L"\\EFI\\Boot\\original_bootx64.vc_backup", L"\\EFI\\Boot\\bootx64.efi", TRUE); if (!EfiBootInst.RenameFile(L"\\EFI\\Microsoft\\Boot\\bootmgfw_ms.vc", L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi", TRUE)) { EfiBootConf conf; if (EfiBootInst.ReadConfig (L"\\EFI\\VeraCrypt\\DcsProp", conf) && strlen (conf.actionSuccessValue.c_str())) @@ -4553,11 +4508,11 @@ namespace VeraCrypt ) { const char* g_szMsBootString = "bootmgfw.pdb"; unsigned __int64 loaderSize = 0; EfiBootInst.GetFileSize(loaderPath.c_str(), loaderSize); - std::vector<byte> bootLoaderBuf ((size_t) loaderSize); + std::vector<uint8> bootLoaderBuf ((size_t) loaderSize); EfiBootInst.ReadFile(loaderPath.c_str(), &bootLoaderBuf[0], (DWORD) loaderSize); // look for bootmgfw.efi identifiant string if (BufferHasPattern (bootLoaderBuf.data (), (size_t) loaderSize, g_szMsBootString, strlen (g_szMsBootString))) @@ -4587,22 +4542,22 @@ namespace VeraCrypt EfiBootInst.DelFile(L"\\EFI\\VeraCrypt\\DcsProp"); EfiBootInst.DelDir (L"\\EFI\\VeraCrypt"); } else { - byte bootLoaderBuf[TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS]; + uint8 bootLoaderBuf[TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS]; File backupFile (GetSystemLoaderBackupPath(), true); backupFile.CheckOpened(SRC_POS); if (backupFile.Read (bootLoaderBuf, sizeof (bootLoaderBuf)) != sizeof (bootLoaderBuf)) throw ParameterIncorrect (SRC_POS); Device device (GetSystemDriveConfiguration().DevicePath); device.CheckOpened (SRC_POS); // Preserve current partition table - byte mbr[TC_SECTOR_SIZE_BIOS]; + uint8 mbr[TC_SECTOR_SIZE_BIOS]; device.SeekAt (0); device.Read (mbr, sizeof (mbr)); memcpy (bootLoaderBuf + TC_MAX_MBR_BOOT_CODE_SIZE, mbr + TC_MAX_MBR_BOOT_CODE_SIZE, sizeof (mbr) - TC_MAX_MBR_BOOT_CODE_SIZE); device.SeekAt (0); @@ -4738,11 +4693,11 @@ namespace VeraCrypt if (filterType != DumpFilter) { // Register class filter below all other filters in the stack size_t strSize = filter.size() + 1; - byte regKeyBuf[65536]; + uint8 regKeyBuf[65536]; DWORD size = (DWORD) (sizeof (regKeyBuf) - strSize); // SetupInstallFromInfSection() does not support prepending of values so we have to modify the registry directly StringCchCopyA ((char *) regKeyBuf, ARRAYSIZE(regKeyBuf), filter.c_str()); @@ -4756,12 +4711,12 @@ namespace VeraCrypt { // workaround rare SetupInstallFromInfSection which overwrite value instead of appending new value // read initial value DWORD strSize = (DWORD) filter.size() + 1, expectedSize; Buffer expectedRegKeyBuf(65536), outputRegKeyBuf(65536); - byte* pbExpectedRegKeyBuf = expectedRegKeyBuf.Ptr (); - byte* pbOutputRegKeyBuf = outputRegKeyBuf.Ptr (); + uint8* pbExpectedRegKeyBuf = expectedRegKeyBuf.Ptr (); + uint8* pbOutputRegKeyBuf = outputRegKeyBuf.Ptr (); DWORD initialSize = (DWORD) (expectedRegKeyBuf.Size() - strSize - 2); if (RegQueryValueExA (regKey, filterReg.c_str(), NULL, NULL, pbExpectedRegKeyBuf, &initialSize) != ERROR_SUCCESS) { StringCchCopyA ((char *) pbExpectedRegKeyBuf, expectedRegKeyBuf.Size(), filter.c_str()); @@ -4809,11 +4764,11 @@ namespace VeraCrypt { RegisterDriverInf (registerFilter, filter, filterReg, ParentWindow, regKey); // remove value in case it was not done properly Buffer regKeyBuf(65536); - byte* pbRegKeyBuf = regKeyBuf.Ptr (); + uint8* pbRegKeyBuf = regKeyBuf.Ptr (); DWORD initialSize = (DWORD) regKeyBuf.Size() - 2; if ( (RegQueryValueExA (regKey, filterReg.c_str(), NULL, NULL, pbRegKeyBuf, &initialSize) == ERROR_SUCCESS) && (initialSize >= ((DWORD) filter.size())) @@ -5297,16 +5252,16 @@ namespace VeraCrypt if (encStatus.VolumeHeaderPresent) { // Verify CRC of header salt Device device(config.DevicePath, true); device.CheckOpened(SRC_POS); - byte header[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; + uint8 header[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; device.SeekAt(TC_BOOT_VOLUME_HEADER_SECTOR_OFFSET); device.Read(header, sizeof(header)); - if (encStatus.VolumeHeaderSaltCrc32 != GetCrc32((byte *)header, PKCS5_SALT_SIZE)) + if (encStatus.VolumeHeaderSaltCrc32 != GetCrc32((uint8 *)header, PKCS5_SALT_SIZE)) throw ParameterIncorrect(SRC_POS); } } try @@ -5359,11 +5314,11 @@ namespace VeraCrypt if (encStatus.SetupInProgress || (wipePassCount <= 0)) throw ParameterIncorrect (SRC_POS); SystemDriveConfiguration config = GetSystemDriveConfiguration (); - char header[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; + unsigned char header[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; Device device (config.DevicePath); device.CheckOpened (SRC_POS); // Only one algorithm is currently supported if (pkcs5 != 0) @@ -5389,17 +5344,21 @@ namespace VeraCrypt if (backupHeaderOffset == -1) throw ParameterIncorrect (SRC_POS); } device.SeekAt (headerOffset); - device.Read ((byte *) header, sizeof (header)); + device.Read (header, sizeof (header)); PCRYPTO_INFO cryptoInfo = NULL; int status = ReadVolumeHeader (!encStatus.HiddenSystem, header, oldPassword, old_pkcs5, old_pim, &cryptoInfo, NULL); finally_do_arg (PCRYPTO_INFO, cryptoInfo, { if (finally_arg) crypto_close (finally_arg); }); + // if the XTS master key is vulnerable, return error and do not allow the user to change the password since the master key will not be changed + if ((status == 0) && cryptoInfo->bVulnerableMasterKey) + status = ERR_SYSENC_XTS_MASTERKEY_VULNERABLE; + if (status != 0) { handleError (hwndDlg, status, SRC_POS); return status; } @@ -5477,11 +5436,11 @@ namespace VeraCrypt handleError (hwndDlg, status, SRC_POS); return status; } device.SeekAt (headerOffset); - device.Write ((byte *) header, sizeof (header)); + device.Write ((uint8 *) header, sizeof (header)); headerUpdated = true; } if (!encStatus.HiddenSystem || backupHeader) break; @@ -5508,11 +5467,11 @@ namespace VeraCrypt if (old_pim != pim) { try { // check if PIM is stored in MBR - byte userConfig = 0; + uint8 userConfig = 0; if ( ReadBootSectorConfig (nullptr, 0, &userConfig) && (userConfig & TC_BOOT_USER_CFG_FLAG_DISABLE_PIM) ) { storedPimUpdateNeeded = true; @@ -5785,11 +5744,11 @@ namespace VeraCrypt configMap = 0; return configMap; } - void BootEncryption::WriteBootDriveSector (uint64 offset, byte *data) + void BootEncryption::WriteBootDriveSector (uint64 offset, uint8 *data) { WriteBootDriveSectorRequest request; request.Offset.QuadPart = offset; memcpy (request.Data, data, sizeof (request.Data)); diff --git a/src/Common/BootEncryption.h b/src/Common/BootEncryption.h index ddf6f3e5..432d10a9 100644 --- a/src/Common/BootEncryption.h +++ b/src/Common/BootEncryption.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -35,12 +35,12 @@ namespace VeraCrypt virtual ~File () { Close(); } bool IsOpened () const { return FileOpen;} void CheckOpened (const char* srcPos) { if (!FileOpen) { SetLastError (LastError); throw SystemException (srcPos);} } void Close (); - DWORD Read (byte *buffer, DWORD size); - void Write (byte *buffer, DWORD size); + DWORD Read (uint8 *buffer, DWORD size); + void Write (uint8 *buffer, DWORD size); void SeekAt (int64 position); void GetFileSize (unsigned __int64& size); void GetFileSize (DWORD& dwSize); bool IoCtl(DWORD code, void* inBuf, DWORD inBufSize, void* outBuf, DWORD outBufSize); @@ -68,34 +68,34 @@ namespace VeraCrypt class Buffer { public: Buffer (size_t size) : DataSize (size) { - DataPtr = new byte[size]; + DataPtr = new uint8[size]; if (!DataPtr) throw bad_alloc(); } ~Buffer () { delete[] DataPtr; } - byte *Ptr () const { return DataPtr; } + uint8 *Ptr () const { return DataPtr; } size_t Size () const { return DataSize; } void Resize (size_t newSize) { if (newSize > DataSize) { - byte *tmp = new byte[newSize]; + uint8 *tmp = new uint8[newSize]; if (!tmp) throw bad_alloc(); memcpy (tmp, DataPtr, DataSize); delete [] DataPtr; DataPtr = tmp; } DataSize = newSize; } protected: - byte *DataPtr; + uint8 *DataPtr; size_t DataSize; }; struct Partition @@ -113,29 +113,29 @@ namespace VeraCrypt #pragma pack (push) #pragma pack(1) struct PartitionEntryMBR { - byte BootIndicator; + uint8 BootIndicator; - byte StartHead; - byte StartCylSector; - byte StartCylinder; + uint8 StartHead; + uint8 StartCylSector; + uint8 StartCylinder; - byte Type; + uint8 Type; - byte EndHead; - byte EndSector; - byte EndCylinder; + uint8 EndHead; + uint8 EndSector; + uint8 EndCylinder; uint32 StartLBA; uint32 SectorCountLBA; }; struct MBR { - byte Code[446]; + uint8 Code[446]; PartitionEntryMBR Partitions[4]; uint16 Signature; }; #pragma pack (pop) @@ -198,17 +198,17 @@ namespace VeraCrypt void PrepareBootPartition(bool bDisableException = false); bool IsEfiBoot(); void DeleteStartExec(uint16 statrtOrderNum = 0xDC5B, wchar_t* type = NULL); void SetStartExec(wstring description, wstring execPath, bool setBootEntry = true, bool forceFirstBootEntry = true, bool setBootNext = true, uint16 statrtOrderNum = 0xDC5B, wchar_t* type = NULL, uint32 attr = 1); - void SaveFile(const wchar_t* name, byte* data, DWORD size); + void SaveFile(const wchar_t* name, uint8* data, DWORD size); void GetFileSize(const wchar_t* name, unsigned __int64& size); - void ReadFile(const wchar_t* name, byte* data, DWORD size); + void ReadFile(const wchar_t* name, uint8* data, DWORD size); void CopyFile(const wchar_t* name, const wchar_t* targetName); bool FileExists(const wchar_t* name); static bool CompareFiles (const wchar_t* fileName1, const wchar_t* fileName2); - static bool CompareFileData (const wchar_t* fileName, const byte* data, DWORD size); + static bool CompareFileData (const wchar_t* fileName, const uint8* data, DWORD size); BOOL RenameFile(const wchar_t* name, const wchar_t* nameNew, BOOL bForce); BOOL DelFile(const wchar_t* name); BOOL MkDir(const wchar_t* name, bool& bAlreadyExists); BOOL ReadConfig (const wchar_t* name, EfiBootConf& conf); @@ -256,11 +256,11 @@ namespace VeraCrypt void DeleteFileAdmin (const wstring &file); DecoySystemWipeStatus GetDecoyOSWipeStatus (); DWORD GetDriverServiceStartType (); unsigned int GetHiddenOSCreationPhase (); uint16 GetInstalledBootLoaderVersion (); - void GetInstalledBootLoaderFingerprint (byte fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]); + void GetInstalledBootLoaderFingerprint (uint8 fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]); Partition GetPartitionForHiddenOS (); bool IsBootLoaderOnDrive (wchar_t *devicePath); BootEncryptionStatus GetStatus (); void GetVolumeProperties (VOLUME_PROPERTIES_STRUCT *properties); SystemDriveConfiguration GetSystemDriveConfiguration (); @@ -273,11 +273,11 @@ namespace VeraCrypt bool IsHiddenSystemRunning (); bool IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly); void PrepareHiddenOSCreation (int ea, int mode, int pkcs5); void PrepareInstallation (bool systemPartitionOnly, Password &password, int ea, int mode, int pkcs5, int pim, const wstring &rescueIsoImagePath); void ProbeRealSystemDriveSize (); - bool ReadBootSectorConfig (byte *config, size_t bufLength, byte *userConfig = nullptr, string *customUserMessage = nullptr, uint16 *bootLoaderVersion = nullptr); + bool ReadBootSectorConfig (uint8 *config, size_t bufLength, uint8 *userConfig = nullptr, string *customUserMessage = nullptr, uint16 *bootLoaderVersion = nullptr); uint32 ReadDriverConfigurationFlags (); uint32 ReadServiceConfigurationFlags (); void RegisterBootDriver (bool hiddenSystem); void RegisterFilterDriver (bool registerDriver, FilterType filterType); void RegisterSystemFavoritesService (BOOL registerService); @@ -293,22 +293,22 @@ namespace VeraCrypt void SetDriverServiceStartType (DWORD startType); void SetHiddenOSCreationPhase (unsigned int newPhase); void StartDecryption (BOOL discardUnreadableEncryptedSectors); void StartDecoyOSWipe (WipeAlgorithmId wipeAlgorithm); void StartEncryption (WipeAlgorithmId wipeAlgorithm, bool zeroUnreadableSectors); - bool SystemDriveContainsPartitionType (byte type); + bool SystemDriveContainsPartitionType (uint8 type); bool SystemDriveContainsExtendedPartition (); bool SystemDriveContainsNonStandardPartitions (); bool SystemPartitionCoversWholeDrive (); bool SystemDriveIsDynamic (); bool VerifyRescueDisk (); bool VerifyRescueDiskImage (const wchar_t* imageFile); void WipeHiddenOSCreationConfig (); - void WriteBootDriveSector (uint64 offset, byte *data); - void WriteBootSectorConfig (const byte newConfig[]); - void WriteBootSectorUserConfig (byte userConfig, const string &customUserMessage, int pim, int hashAlg); - void WriteEfiBootSectorUserConfig (byte userConfig, const string &customUserMessage, int pim, int hashAlg); + void WriteBootDriveSector (uint64 offset, uint8 *data); + void WriteBootSectorConfig (const uint8 newConfig[]); + void WriteBootSectorUserConfig (uint8 userConfig, const string &customUserMessage, int pim, int hashAlg); + void WriteEfiBootSectorUserConfig (uint8 userConfig, const string &customUserMessage, int pim, int hashAlg); void WriteLocalMachineRegistryDwordValue (wchar_t *keyPath, wchar_t *valueName, DWORD value); void GetEfiBootDeviceNumber (PSTORAGE_DEVICE_NUMBER pSdn); void BackupSystemLoader (); void RestoreSystemLoader (); static void UpdateSetupConfigFile (bool bForInstall); @@ -316,14 +316,14 @@ namespace VeraCrypt bool IsUsingUnsupportedAlgorithm(LONG driverVersion); void NotifyService (DWORD dwNotifyCmd); protected: static const uint32 RescueIsoImageSize = 1835008; // Size of ISO9660 image with bootable emulated 1.44MB floppy disk image - void CreateBootLoaderInMemory (byte *buffer, size_t bufferSize, bool rescueDisk, bool hiddenOSCreation = false); + void CreateBootLoaderInMemory (uint8 *buffer, size_t bufferSize, bool rescueDisk, bool hiddenOSCreation = false); void CreateVolumeHeader (uint64 volumeSize, uint64 encryptedAreaStart, Password *password, int ea, int mode, int pkcs5, int pim); wstring GetSystemLoaderBackupPath (); - uint32 GetChecksum (byte *data, size_t size); + uint32 GetChecksum (uint8 *data, size_t size); DISK_GEOMETRY_EX GetDriveGeometry (int driveNumber); PartitionList GetDrivePartitions (int driveNumber); wstring GetRemarksOnHiddenOS (); wstring GetWindowsDirectory (); void RegisterFilter (bool registerFilter, FilterType filterType, const GUID *deviceClassGuid = nullptr); @@ -332,15 +332,15 @@ namespace VeraCrypt HWND ParentWindow; SystemDriveConfiguration DriveConfig; int SelectedEncryptionAlgorithmId; int SelectedPrfAlgorithmId; Partition HiddenOSCandidatePartition; - byte *RescueIsoImage; - byte *RescueZipData; + uint8 *RescueIsoImage; + uint8 *RescueZipData; unsigned long RescueZipSize; - byte RescueVolumeHeader[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; - byte VolumeHeader[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; + uint8 RescueVolumeHeader[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; + uint8 VolumeHeader[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; bool DriveConfigValid; bool RealSystemDriveSizeValid; bool RescueVolumeHeaderValid; bool VolumeHeaderValid; bool PostOOBEMode; diff --git a/src/Common/Cache.c b/src/Common/Cache.c index 46249b9c..4826673e 100644 --- a/src/Common/Cache.c +++ b/src/Common/Cache.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -22,12 +22,10 @@ Password CachedPasswords[CACHE_SIZE]; int CachedPim[CACHE_SIZE]; int cacheEmpty = 1; static int nPasswordIdx = 0; -#ifdef _WIN64 - uint64 VcGetPasswordEncryptionID (Password* pPassword) { return ((uint64) pPassword->Text) + ((uint64) pPassword); } @@ -39,13 +37,11 @@ void VcProtectPassword (Password* pPassword, uint64 encID) void VcUnprotectPassword (Password* pPassword, uint64 encID) { VcProtectPassword (pPassword, encID); } -#endif - -int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim, char *header, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo) +int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim, unsigned char *header, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo) { int nReturnCode = ERR_PASSWORD_WRONG; int i, effectivePim; /* Attempt to recognize volume using mount password */ @@ -54,41 +50,33 @@ int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim, char *heade nReturnCode = ReadVolumeHeader (bBoot, header, password, pkcs5_prf, pim, retInfo, NULL); /* Save mount passwords back into cache if asked to do so */ if (bCache && (nReturnCode == 0 || nReturnCode == ERR_CIPHER_INIT_WEAK_KEY)) { -#ifdef _WIN64 Password tmpPass; -#endif for (i = 0; i < CACHE_SIZE; i++) { Password* pCurrentPassword = &CachedPasswords[i]; -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { memcpy (&tmpPass, pCurrentPassword, sizeof (Password)); VcUnprotectPassword (&tmpPass, VcGetPasswordEncryptionID (pCurrentPassword)); pCurrentPassword = &tmpPass; } -#endif if (memcmp (pCurrentPassword, password, sizeof (Password)) == 0) break; } -#ifdef _WIN64 if (IsRamEncryptionEnabled()) burn (&tmpPass, sizeof (Password)); -#endif if (i == CACHE_SIZE) { /* Store the password */ CachedPasswords[nPasswordIdx] = *password; -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectPassword (&CachedPasswords[nPasswordIdx], VcGetPasswordEncryptionID (&CachedPasswords[nPasswordIdx])); -#endif /* Store also PIM if requested, otherwise set to default */ if (bCachePim && (pim > 0)) CachedPim[nPasswordIdx] = pim; else @@ -105,25 +93,22 @@ int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim, char *heade } } } else if (!cacheEmpty) { -#ifdef _WIN64 Password tmpPass; -#endif /* Attempt to recognize volume using cached passwords */ for (i = 0; i < CACHE_SIZE; i++) { Password* pCurrentPassword = &CachedPasswords[i]; -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { memcpy (&tmpPass, pCurrentPassword, sizeof (Password)); VcUnprotectPassword (&tmpPass, VcGetPasswordEncryptionID (pCurrentPassword)); pCurrentPassword = &tmpPass; } -#endif + if ((pCurrentPassword->Length > 0) && (pCurrentPassword->Length <= (unsigned int) ((bBoot? MAX_LEGACY_PASSWORD: MAX_PASSWORD)))) { if (pim == -1) effectivePim = CachedPim[i]; else @@ -132,48 +117,44 @@ int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim, char *heade if (nReturnCode != ERR_PASSWORD_WRONG) break; } } -#ifdef _WIN64 + if (IsRamEncryptionEnabled()) burn (&tmpPass, sizeof (Password)); -#endif + } return nReturnCode; } void AddPasswordToCache (Password *password, int pim, BOOL bCachePim) { -#ifdef _WIN64 Password tmpPass; -#endif int i; for (i = 0; i < CACHE_SIZE; i++) { Password* pCurrentPassword = &CachedPasswords[i]; -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { memcpy (&tmpPass, pCurrentPassword, sizeof (Password)); VcUnprotectPassword (&tmpPass, VcGetPasswordEncryptionID (pCurrentPassword)); pCurrentPassword = &tmpPass; } -#endif + if (memcmp (pCurrentPassword, password, sizeof (Password)) == 0) break; } if (i == CACHE_SIZE) { CachedPasswords[nPasswordIdx] = *password; -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectPassword (&CachedPasswords[nPasswordIdx], VcGetPasswordEncryptionID (&CachedPasswords[nPasswordIdx])); -#endif + /* Store also PIM if requested, otherwise set to default */ if (bCachePim && (pim > 0)) CachedPim[nPasswordIdx] = pim; else CachedPim[nPasswordIdx] = 0; @@ -182,17 +163,16 @@ void AddPasswordToCache (Password *password, int pim, BOOL bCachePim) } else if (bCachePim) { CachedPim[i] = pim > 0? pim : 0; } -#ifdef _WIN64 + if (IsRamEncryptionEnabled()) burn (&tmpPass, sizeof (Password)); -#endif } -void AddLegacyPasswordToCache (PasswordLegacy *password, int pim) +void AddLegacyPasswordToCache (__unaligned PasswordLegacy *password, int pim) { Password inputPass = {0}; inputPass.Length = password->Length; memcpy (inputPass.Text, password->Text, password->Length); diff --git a/src/Common/Cache.h b/src/Common/Cache.h index 0988bf29..f629d8b8 100644 --- a/src/Common/Cache.h +++ b/src/Common/Cache.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Common.h" @@ -19,8 +19,8 @@ #endif extern int cacheEmpty; void AddPasswordToCache (Password *password, int pim, BOOL bCachePim); -void AddLegacyPasswordToCache (PasswordLegacy *password, int pim); -int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim,char *header, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo); +void AddLegacyPasswordToCache (__unaligned PasswordLegacy *password, int pim); +int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim, unsigned char *header, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo); void WipeCache (void); diff --git a/src/Common/Cmdline.c b/src/Common/Cmdline.c index f0dcf7cf..ff19b76a 100644 --- a/src/Common/Cmdline.c +++ b/src/Common/Cmdline.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -49,16 +49,11 @@ BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM as = (argumentspec*) lParam; *tmp = 0; - StringCchCopyW (tmp, 8192, L"VeraCrypt " _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX)); -#ifdef _WIN64 - StringCchCatW (tmp, 8192, L" (64-bit)"); -#else - StringCchCatW (tmp, 8192, L" (32-bit)"); -#endif + StringCchCopyW (tmp, 8192, L"VeraCrypt " _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX) L" (64-bit)"); #if (defined(_DEBUG) || defined(DEBUG)) StringCchCatW (tmp, 8192, L" (debug)"); #endif StringCchCatW (tmp, 8192, L"\n\nCommand line options:\n\n"); @@ -69,11 +64,11 @@ BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM StringCchPrintfW(tmp2, MAX_PATH * 2, L"%s\t%s\n", as->args[i].short_name, as->args[i].long_name); StringCchCatW(tmp, 8192, tmp2); } } #if defined(TCMOUNT) && !defined(VCEXPANDER) - StringCchCatW (tmp, 8192, L"\nExamples:\n\nMount a volume as X:\tveracrypt.exe /q /v volume.hc /l X\nDismount a volume X:\tveracrypt.exe /q /d X"); + StringCchCatW (tmp, 8192, L"\nExamples:\n\nMount a volume as X:\tveracrypt.exe /q /v volume.hc /l X\nUnmount a volume X:\tveracrypt.exe /q /u X"); #endif SetWindowTextW (GetDlgItem (hwndDlg, IDC_COMMANDHELP_TEXT), tmp); TCfree(tmp); return 1; diff --git a/src/Common/Cmdline.h b/src/Common/Cmdline.h index 5e0f3509..f1e1fd59 100644 --- a/src/Common/Cmdline.h +++ b/src/Common/Cmdline.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus diff --git a/src/Common/Combo.c b/src/Common/Combo.c index 880f0b7a..fec4c0df 100644 --- a/src/Common/Combo.c +++ b/src/Common/Combo.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" diff --git a/src/Common/Combo.h b/src/Common/Combo.h index 604395b5..73072b96 100644 --- a/src/Common/Combo.h +++ b/src/Common/Combo.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus diff --git a/src/Common/CommandAPDU.cpp b/src/Common/CommandAPDU.cpp index b202cb13..46aab465 100644 --- a/src/Common/CommandAPDU.cpp +++ b/src/Common/CommandAPDU.cpp @@ -114,11 +114,11 @@ namespace VeraCrypt failure: clear(); } - void CommandAPDU::init(byte cla, byte ins, byte p1, byte p2, const byte* data, uint32 dataOffset, uint32 dataLength, uint32 ne) + void CommandAPDU::init(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const uint8* data, uint32 dataOffset, uint32 dataLength, uint32 ne) { m_nc = 0; m_ne = 0; m_dataOffset = 0; m_isExtendedAPDU = false; @@ -154,29 +154,29 @@ namespace VeraCrypt // case 2s or 2e if (ne <= 256) { // case 2s // 256 is encoded as 0x00 - byte len = (m_ne != 256) ? (byte)m_ne : 0; + uint8 len = (m_ne != 256) ? (uint8)m_ne : 0; m_apdu.resize(5, 0); setHeader(cla, ins, p1, p2); m_apdu[4] = len; } else { // case 2e - byte l1, l2; + uint8 l1, l2; // 65536 is encoded as 0x00 0x00 if (m_ne == 65536) { l1 = 0; l2 = 0; } else { - l1 = (byte)(m_ne >> 8); - l2 = (byte)m_ne; + l1 = (uint8)(m_ne >> 8); + l2 = (uint8)m_ne; } m_apdu.resize(7, 0); setHeader(cla, ins, p1, p2); m_apdu[5] = l1; m_apdu[6] = l2; @@ -192,22 +192,22 @@ namespace VeraCrypt if (dataLength <= 255) { // case 3s m_apdu.resize(4 + 1 + dataLength, 0); setHeader(cla, ins, p1, p2); - m_apdu[4] = (byte)dataLength; + m_apdu[4] = (uint8)dataLength; m_dataOffset = 5; memcpy(m_apdu.data() + 5, data + dataOffset, dataLength); } else { // case 3e m_apdu.resize(4 + 3 + dataLength, 0); setHeader(cla, ins, p1, p2); m_apdu[4] = 0; - m_apdu[5] = (byte)(dataLength >> 8); - m_apdu[6] = (byte)dataLength; + m_apdu[5] = (uint8)(dataLength >> 8); + m_apdu[6] = (uint8)dataLength; m_dataOffset = 7; memcpy(m_apdu.data() + 7, data + dataOffset, dataLength); m_isExtendedAPDU = true; } } @@ -217,119 +217,119 @@ namespace VeraCrypt if ((dataLength <= 255) && (m_ne <= 256)) { // case 4s m_apdu.resize(4 + 2 + dataLength, 0); setHeader(cla, ins, p1, p2); - m_apdu[4] = (byte)dataLength; + m_apdu[4] = (uint8)dataLength; m_dataOffset = 5; memcpy(m_apdu.data() + 5, data + dataOffset, dataLength); - m_apdu[m_apdu.size() - 1] = (m_ne != 256) ? (byte)m_ne : 0; + m_apdu[m_apdu.size() - 1] = (m_ne != 256) ? (uint8)m_ne : 0; } else { // case 4e m_apdu.resize(4 + 5 + dataLength, 0); setHeader(cla, ins, p1, p2); m_apdu[4] = 0; - m_apdu[5] = (byte)(dataLength >> 8); - m_apdu[6] = (byte)dataLength; + m_apdu[5] = (uint8)(dataLength >> 8); + m_apdu[6] = (uint8)dataLength; m_dataOffset = 7; memcpy(m_apdu.data() + 7, data + dataOffset, dataLength); if (ne != 65536) { size_t leOfs = m_apdu.size() - 2; - m_apdu[leOfs] = (byte)(m_ne >> 8); - m_apdu[leOfs + 1] = (byte)m_ne; + m_apdu[leOfs] = (uint8)(m_ne >> 8); + m_apdu[leOfs + 1] = (uint8)m_ne; } // else le == 65536: no need to fill in, encoded as 0 m_isExtendedAPDU = true; } } } m_parsedSuccessfully = true; } - void CommandAPDU::setHeader(byte cla, byte ins, byte p1, byte p2) + void CommandAPDU::setHeader(uint8 cla, uint8 ins, uint8 p1, uint8 p2) { - m_apdu[0] = (byte)cla; - m_apdu[1] = (byte)ins; - m_apdu[2] = (byte)p1; - m_apdu[3] = (byte)p2; + m_apdu[0] = (uint8)cla; + m_apdu[1] = (uint8)ins; + m_apdu[2] = (uint8)p1; + m_apdu[3] = (uint8)p2; } void CommandAPDU::clear() { m_apdu.clear(); m_nc = 0; m_ne = 0; m_dataOffset = 0; } - CommandAPDU::CommandAPDU(byte cla, byte ins, byte p1, byte p2, const byte* data, uint32 dataOffset, uint32 dataLength, uint32 ne) + CommandAPDU::CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const uint8* data, uint32 dataOffset, uint32 dataLength, uint32 ne) { init(cla, ins, p1, p2, data, dataOffset, dataLength, ne); } - CommandAPDU::CommandAPDU(byte cla, byte ins, byte p1, byte p2) + CommandAPDU::CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2) { init(cla, ins, p1, p2, NULL, 0, 0, 0); } - CommandAPDU::CommandAPDU(byte cla, byte ins, byte p1, byte p2, uint32 ne) + CommandAPDU::CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, uint32 ne) { init(cla, ins, p1, p2, NULL, 0, 0, ne); } - CommandAPDU::CommandAPDU(byte cla, byte ins, byte p1, byte p2, const vector<byte>& data) + CommandAPDU::CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const vector<uint8>& data) { init(cla, ins, p1, p2, data.data(), 0, (uint32)data.size(), 0); } - CommandAPDU::CommandAPDU(byte cla, byte ins, byte p1, byte p2, const byte* data, uint32 dataOffset, uint32 dataLength) + CommandAPDU::CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const uint8* data, uint32 dataOffset, uint32 dataLength) { init(cla, ins, p1, p2, data, dataOffset, dataLength, 0); } - CommandAPDU::CommandAPDU(byte cla, byte ins, byte p1, byte p2, const vector<byte>& data, uint32 ne) + CommandAPDU::CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const vector<uint8>& data, uint32 ne) { init(cla, ins, p1, p2, data.data(), 0, (uint32)data.size(), ne); } - CommandAPDU::CommandAPDU(const vector<byte>& apdu) : m_nc(0), m_ne(0), m_dataOffset(0), m_isExtendedAPDU(false) + CommandAPDU::CommandAPDU(const vector<uint8>& apdu) : m_nc(0), m_ne(0), m_dataOffset(0), m_isExtendedAPDU(false) { m_apdu = apdu; parse(); } - byte CommandAPDU::getCLA() + uint8 CommandAPDU::getCLA() { return m_apdu[0] & 0xff; } - byte CommandAPDU::getINS() + uint8 CommandAPDU::getINS() { return m_apdu[1] & 0xff; } - byte CommandAPDU::getP1() + uint8 CommandAPDU::getP1() { return m_apdu[2] & 0xff; } - byte CommandAPDU::getP2() + uint8 CommandAPDU::getP2() { return m_apdu[3] & 0xff; } uint32 CommandAPDU::getNc() { return m_nc; } - const vector<byte> CommandAPDU::getData() + const vector<uint8> CommandAPDU::getData() { - vector<byte> data; + vector<uint8> data; if (m_nc > 0) { data.resize(m_nc, 0); memcpy(data.data(), m_apdu.data() + m_dataOffset, data.size()); @@ -341,11 +341,11 @@ namespace VeraCrypt uint32 CommandAPDU::getNe() { return m_ne; } - const vector<byte> CommandAPDU::getAPDU() + const vector<uint8> CommandAPDU::getAPDU() { return m_apdu; } bool CommandAPDU::isExtended() diff --git a/src/Common/CommandAPDU.h b/src/Common/CommandAPDU.h index 98825faa..f1adf176 100644 --- a/src/Common/CommandAPDU.h +++ b/src/Common/CommandAPDU.h @@ -32,57 +32,57 @@ namespace VeraCrypt class CommandAPDU { protected: - vector<byte> m_apdu; + vector<uint8> m_apdu; uint32 m_nc; uint32 m_ne; uint32 m_dataOffset; bool m_isExtendedAPDU; std::string m_parsingErrorStr; bool m_parsedSuccessfully; void parse(); - void init(byte cla, byte ins, byte p1, byte p2, const byte* data, uint32 dataOffset, uint32 dataLength, uint32 ne); - void setHeader(byte cla, byte ins, byte p1, byte p2); + void init(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const uint8* data, uint32 dataOffset, uint32 dataLength, uint32 ne); + void setHeader(uint8 cla, uint8 ins, uint8 p1, uint8 p2); public: void clear(); CommandAPDU(); - CommandAPDU(byte cla, byte ins, byte p1, byte p2, const byte* data, uint32 dataOffset, uint32 dataLength, uint32 ne); + CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const uint8* data, uint32 dataOffset, uint32 dataLength, uint32 ne); - CommandAPDU(byte cla, byte ins, byte p1, byte p2); + CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2); - CommandAPDU(byte cla, byte ins, byte p1, byte p2, uint32 ne); + CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, uint32 ne); - CommandAPDU(byte cla, byte ins, byte p1, byte p2, const vector<byte>& data); + CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const vector<uint8>& data); - CommandAPDU(byte cla, byte ins, byte p1, byte p2, const byte* data, uint32 dataOffset, uint32 dataLength); + CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const uint8* data, uint32 dataOffset, uint32 dataLength); - CommandAPDU(byte cla, byte ins, byte p1, byte p2, const vector<byte>& data, uint32 ne); + CommandAPDU(uint8 cla, uint8 ins, uint8 p1, uint8 p2, const vector<uint8>& data, uint32 ne); - CommandAPDU(const vector<byte>& apdu); + CommandAPDU(const vector<uint8>& apdu); - byte getCLA(); + uint8 getCLA(); - byte getINS(); + uint8 getINS(); - byte getP1(); + uint8 getP1(); - byte getP2(); + uint8 getP2(); uint32 getNc(); - const vector<byte> getData(); + const vector<uint8> getData(); uint32 getNe(); - const vector<byte> getAPDU(); + const vector<uint8> getAPDU(); bool isValid(); std::string getErrorStr(); diff --git a/src/Common/Common.h b/src/Common/Common.h index 62ee3d65..88e034e2 100644 --- a/src/Common/Common.h +++ b/src/Common/Common.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Common.rc b/src/Common/Common.rc index cbd401d8..12570e94 100644 --- a/src/Common/Common.rc +++ b/src/Common/Common.rc @@ -342,13 +342,13 @@ END IDD_TEXT_EDIT_DLG DIALOGEX 0, 0, 372, 220 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - PUSHBUTTON "OK",IDOK,306,201,58,14 + PUSHBUTTON "OK",IDOK,244,201,58,14 CONTROL "",IDC_INFO_BOX_TEXT,"RichEdit20W",ES_MULTILINE | ES_WANTRETURN | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,5,6,361,188 - DEFPUSHBUTTON "Cancel",IDCANCEL,240,201,58,14 + DEFPUSHBUTTON "Cancel",IDCANCEL,308,201,58,14 END ///////////////////////////////////////////////////////////////////////////// // @@ -563,21 +563,10 @@ IDR_EFI_LEGACYSPEAKER BIN "..\\Boot\\EFI\\LegacySpeaker.ef #ifdef VC_EFI_CUSTOM_MODE IDR_EFI_DCSBML BIN "..\\Boot\\EFI\\DcsBml.efi" #endif IDR_EFI_DCSRE BIN "..\\Boot\\EFI\\DcsRe.efi" IDR_EFI_DCSINFO BIN "..\\Boot\\EFI\\DcsInfo.efi" -#ifndef WIN64 -IDR_EFI_DCSBOOT32 BIN "..\\Boot\\EFI\\DcsBoot32.efi" -IDR_EFI_DCSINT32 BIN "..\\Boot\\EFI\\DcsInt32.efi" -IDR_EFI_DCSCFG32 BIN "..\\Boot\\EFI\\DcsCfg32.efi" -IDR_EFI_LEGACYSPEAKER32 BIN "..\\Boot\\EFI\\LegacySpeaker32.efi" -#ifdef VC_EFI_CUSTOM_MODE -IDR_EFI_DCSBML32 BIN "..\\Boot\\EFI\\DcsBml32.efi" -#endif -IDR_EFI_DCSRE32 BIN "..\\Boot\\EFI\\DcsRe32.efi" -IDR_EFI_DCSINFO32 BIN "..\\Boot\\EFI\\DcsInfo32.efi" -#endif #endif ///////////////////////////////////////////////////////////////////////////// // // XML // diff --git a/src/Common/Crc.c b/src/Common/Crc.c index 7e18cb4f..2cda3794 100644 --- a/src/Common/Crc.c +++ b/src/Common/Crc.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" diff --git a/src/Common/Crc.h b/src/Common/Crc.h index 53960a79..c59fc823 100644 --- a/src/Common/Crc.h +++ b/src/Common/Crc.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_CRC diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c index 38af7fe5..2f4e447f 100644 --- a/src/Common/Crypto.c +++ b/src/Common/Crypto.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -24,10 +24,11 @@ #define StringCchCatW RtlStringCchCatW #define StringCchCopyW RtlStringCchCopyW #else #include <strsafe.h> #endif +#include "Crypto/t1ha.h" #include "EncryptionThreadPool.h" #endif #endif #include "Volumes.h" #include "cpu.h" @@ -55,19 +56,23 @@ static Cipher Ciphers[] = { // Block Size Key Size Key Schedule Size // ID Name (Bytes) (Bytes) (Bytes) #ifdef TC_WINDOWS_BOOT { AES, "AES", 16, 32, AES_KS }, - { SERPENT, "Serpent", 16, 32, 140*4 }, +#ifndef WOLFCRYPT_BACKEND + { SERPENT, "Serpent", 16, 32, 140*4 }, { TWOFISH, "Twofish", 16, 32, TWOFISH_KS }, +#endif #else { AES, L"AES", 16, 32, AES_KS }, +#ifndef WOLFCRYPT_BACKEND { SERPENT, L"Serpent", 16, 32, 140*4 }, { TWOFISH, L"Twofish", 16, 32, TWOFISH_KS }, { CAMELLIA, L"Camellia", 16, 32, CAMELLIA_KS }, { KUZNYECHIK, L"Kuznyechik",16, 32, KUZNYECHIK_KS }, #endif +#endif { 0, 0, 0, 0, 0 } }; // Encryption algorithm configuration @@ -77,10 +82,11 @@ static EncryptionAlgorithm EncryptionAlgorithms[] = #ifndef TC_WINDOWS_BOOT { { 0, 0 }, { 0, 0}, 0, 0 }, // Must be all-zero { { AES, 0 }, { XTS, 0 }, 1, 1 }, +#ifndef WOLFCRYPT_BACKEND { { SERPENT, 0 }, { XTS, 0 }, 1, 1 }, { { TWOFISH, 0 }, { XTS, 0 }, 1, 1 }, { { CAMELLIA, 0 }, { XTS, 0 }, 1, 1 }, { { KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, { { TWOFISH, AES, 0 }, { XTS, 0 }, 1, 1 }, @@ -91,24 +97,27 @@ static EncryptionAlgorithm EncryptionAlgorithms[] = { { KUZNYECHIK, CAMELLIA, 0 }, { XTS, 0 }, 0, 1 }, { { TWOFISH, KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, { { SERPENT, CAMELLIA, 0 }, { XTS, 0 }, 0, 1 }, { { AES, KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, { { CAMELLIA, SERPENT, KUZNYECHIK, 0 }, { XTS, 0 }, 0, 1 }, +#endif { { 0, 0 }, { 0, 0}, 0, 0 } // Must be all-zero #else // TC_WINDOWS_BOOT // Encryption algorithms available for boot drive encryption { { 0, 0 }, { 0, 0 }, 0 }, // Must be all-zero { { AES, 0 }, { XTS, 0 }, 1 }, +#ifndef WOLFCRYPT_BACKEND { { SERPENT, 0 }, { XTS, 0 }, 1 }, { { TWOFISH, 0 }, { XTS, 0 }, 1 }, { { TWOFISH, AES, 0 }, { XTS, 0 }, 1 }, { { SERPENT, TWOFISH, AES, 0 }, { XTS, 0 }, 1 }, { { AES, SERPENT, 0 }, { XTS, 0 }, 1 }, { { AES, TWOFISH, SERPENT, 0 }, { XTS, 0 }, 1 }, { { SERPENT, TWOFISH, 0 }, { XTS, 0 }, 1 }, +#endif { { 0, 0 }, { 0, 0 }, 0 }, // Must be all-zero #endif }; @@ -117,15 +126,17 @@ static EncryptionAlgorithm EncryptionAlgorithms[] = #ifndef TC_WINDOWS_BOOT // Hash algorithms static Hash Hashes[] = { // ID Name Deprecated System Encryption { SHA512, L"SHA-512", FALSE, FALSE }, - { WHIRLPOOL, L"Whirlpool", FALSE, FALSE }, - { BLAKE2S, L"BLAKE2s-256", FALSE, TRUE }, { SHA256, L"SHA-256", FALSE, TRUE }, + #ifndef WOLFCRYPT_BACKEND + { BLAKE2S, L"BLAKE2s-256", FALSE, TRUE }, + { WHIRLPOOL, L"Whirlpool", FALSE, FALSE }, { STREEBOG, L"Streebog", FALSE, FALSE }, - { 0, 0, 0 } + #endif + { 0, 0, 0 } }; #endif /* Return values: 0 = success, ERR_CIPHER_INIT_FAILURE (fatal), ERR_CIPHER_INIT_WEAK_KEY (non-fatal) */ int CipherInit (int cipher, unsigned char *key, unsigned __int8 *ks) @@ -145,10 +156,11 @@ int CipherInit (int cipher, unsigned char *key, unsigned __int8 *ks) if (aes_set_key (key, (length_type) CipherGetKeySize(AES), (aes_context *) ks) != 0) return ERR_CIPHER_INIT_FAILURE; #endif break; +#ifndef WOLFCRYPT_BACKEND case SERPENT: serpent_set_key (key, ks); break; case TWOFISH: @@ -165,10 +177,11 @@ int CipherInit (int cipher, unsigned char *key, unsigned __int8 *ks) case KUZNYECHIK: kuznyechik_set_key(key, (kuznyechik_kds*)ks); break; #endif // !defined(TC_WINDOWS_BOOT) +#endif default: // Unknown/wrong cipher ID return ERR_CIPHER_INIT_FAILURE; } @@ -178,73 +191,60 @@ int CipherInit (int cipher, unsigned char *key, unsigned __int8 *ks) void EncipherBlock(int cipher, void *data, void *ks) { switch (cipher) { case AES: - // In 32-bit kernel mode, due to KeSaveFloatingPointState() overhead, AES instructions can be used only when processing the whole data unit. -#if (defined (_WIN64) || !defined (TC_WINDOWS_DRIVER)) && !defined (TC_WINDOWS_BOOT) +#if !defined (TC_WINDOWS_BOOT) if (IsAesHwCpuSupported()) aes_hw_cpu_encrypt (ks, data); else #endif aes_encrypt (data, data, ks); break; +#ifndef WOLFCRYPT_BACKEND case TWOFISH: twofish_encrypt (ks, data, data); break; case SERPENT: serpent_encrypt (data, data, ks); break; #if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_CAMELLIA) case CAMELLIA: camellia_encrypt (data, data, ks); break; #endif #if !defined(TC_WINDOWS_BOOT) case KUZNYECHIK: kuznyechik_encrypt_block(data, data, ks); break; #endif // !defined(TC_WINDOWS_BOOT) +#endif default: TC_THROW_FATAL_EXCEPTION; // Unknown/wrong ID } } #ifndef TC_WINDOWS_BOOT void EncipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount) { - byte *data = dataPtr; -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; -#endif + uint8 *data = dataPtr; if (cipher == AES && (blockCount & (32 - 1)) == 0 && IsAesHwCpuSupported() -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - && NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)) -#endif ) { while (blockCount > 0) { aes_hw_cpu_encrypt_32_blocks (ks, data); data += 32 * 16; blockCount -= 32; } -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); -#endif } +#ifndef WOLFCRYPT_BACKEND #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI) else if (cipher == SERPENT && (blockCount >= 4) && HasSSE2() -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - && NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)) -#endif ) { serpent_encrypt_blocks (data, data, blockCount, ks); -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); -#endif } #endif #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) else if (cipher == TWOFISH) { twofish_encrypt_blocks(ks, data, data, (uint32) blockCount); @@ -254,21 +254,16 @@ void EncipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount) } #endif #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI) else if (cipher == KUZNYECHIK && HasSSE2() -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - && (blockCount >= 4) && NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)) -#endif ) { kuznyechik_encrypt_blocks (data, data, blockCount, ks); -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); -#endif } #endif +#endif else { size_t blockSize = CipherGetBlockSize (cipher); while (blockCount-- > 0) { @@ -282,28 +277,28 @@ void EncipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount) void DecipherBlock(int cipher, void *data, void *ks) { switch (cipher) { +#ifndef WOLFCRYPT_BACKEND case SERPENT: serpent_decrypt (data, data, ks); break; case TWOFISH: twofish_decrypt (ks, data, data); break; #if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_CAMELLIA) case CAMELLIA: camellia_decrypt (data, data, ks); break; #endif #if !defined(TC_WINDOWS_BOOT) case KUZNYECHIK: kuznyechik_decrypt_block(data, data, ks); break; #endif // !defined(TC_WINDOWS_BOOT) +#endif #ifndef TC_WINDOWS_BOOT case AES: -#if defined (_WIN64) || !defined (TC_WINDOWS_DRIVER) if (IsAesHwCpuSupported()) - aes_hw_cpu_decrypt ((byte *) ks + sizeof (aes_encrypt_ctx), data); + aes_hw_cpu_decrypt ((uint8 *) ks + sizeof (aes_encrypt_ctx), data); else -#endif aes_decrypt (data, data, (void *) ((char *) ks + sizeof(aes_encrypt_ctx))); break; #else case AES: aes_decrypt (data, data, ks); break; @@ -314,48 +309,34 @@ void DecipherBlock(int cipher, void *data, void *ks) #ifndef TC_WINDOWS_BOOT void DecipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount) { - byte *data = dataPtr; -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; -#endif + uint8 *data = dataPtr; if (cipher == AES && (blockCount & (32 - 1)) == 0 && IsAesHwCpuSupported() -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - && NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)) -#endif ) { while (blockCount > 0) { - aes_hw_cpu_decrypt_32_blocks ((byte *) ks + sizeof (aes_encrypt_ctx), data); + aes_hw_cpu_decrypt_32_blocks ((uint8 *) ks + sizeof (aes_encrypt_ctx), data); data += 32 * 16; blockCount -= 32; } -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); -#endif } +#ifndef WOLFCRYPT_BACKEND #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI) else if (cipher == SERPENT && (blockCount >= 4) && HasSSE2() -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - && NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)) -#endif ) { serpent_decrypt_blocks (data, data, blockCount, ks); -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); -#endif } #endif #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) else if (cipher == TWOFISH) { twofish_decrypt_blocks(ks, data, data, (uint32) blockCount); @@ -365,21 +346,16 @@ void DecipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount) } #endif #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI) else if (cipher == KUZNYECHIK && HasSSE2() -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - && (blockCount >= 4) && NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)) -#endif ) { kuznyechik_decrypt_blocks (data, data, blockCount, ks); -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); -#endif } #endif +#endif else { size_t blockSize = CipherGetBlockSize (cipher); while (blockCount-- > 0) { @@ -521,12 +497,20 @@ BOOL EAInitMode (PCRYPTO_INFO ci, unsigned char* key2) { case XTS: // Secondary key schedule if (EAInit (ci->ea, key2, ci->ks2) != ERR_SUCCESS) return FALSE; + + #ifdef WOLFCRYPT_BACKEND + if (xts_encrypt_key256 (key2, (aes_encrypt_ctx *) ci->ks) != EXIT_SUCCESS) + return ERR_CIPHER_INIT_FAILURE; - /* Note: XTS mode could potentially be initialized with a weak key causing all blocks in one data unit + if (xts_decrypt_key256 (key2, (aes_decrypt_ctx *) (ci->ks + sizeof(aes_encrypt_ctx))) != EXIT_SUCCESS) + return ERR_CIPHER_INIT_FAILURE; + #endif + + /* Note: XTS mode could potentially be initialized with a weak key causing all blocks in one data unit on the volume to be tweaked with zero tweaks (i.e. 512 bytes of the volume would be encrypted in ECB mode). However, to create a TrueCrypt volume with such a weak key, each human being on Earth would have to create approximately 11,378,125,361,078,862 (about eleven quadrillion) TrueCrypt volumes (provided that the size of each of the volumes is 1024 terabytes). */ break; @@ -629,21 +613,21 @@ int EAGetNextMode (int ea, int previousModeId) } return 0; } -// Returns the name of the mode of operation of the whole EA -wchar_t *EAGetModeName (int ea, int mode, BOOL capitalLetters) +// Returns the name of the mode of operation +const wchar_t *EAGetModeName (int mode) { switch (mode) { case XTS: return L"XTS"; } - return L"[unknown]"; + return L"[UNKNOWN]"; } #endif // TC_WINDOWS_BOOT @@ -825,11 +809,11 @@ int GetMaxPkcs5OutSize (void) #endif // TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE #ifdef TC_WINDOWS_BOOT -static byte CryptoInfoBufferInUse = 0; +static uint8 CryptoInfoBufferInUse = 0; CRYPTO_INFO CryptoInfoBuffer; #endif PCRYPTO_INFO crypto_open () @@ -861,11 +845,11 @@ PCRYPTO_INFO crypto_open () #endif // TC_WINDOWS_BOOT } #ifndef TC_WINDOWS_BOOT -void crypto_loadkey (PKEY_INFO keyInfo, char *lpszUserKey, int nUserKeyLen) +void crypto_loadkey (PKEY_INFO keyInfo, unsigned char *lpszUserKey, int nUserKeyLen) { keyInfo->keyLength = nUserKeyLen; burn (keyInfo->userKey, sizeof (keyInfo->userKey)); memcpy (keyInfo->userKey, lpszUserKey, nUserKeyLen); } @@ -1088,34 +1072,34 @@ void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *s void EncipherBlock(int cipher, void *data, void *ks) { #ifdef TC_WINDOWS_BOOT_AES if (IsAesHwCpuSupported()) - aes_hw_cpu_encrypt ((byte *) ks, data); + aes_hw_cpu_encrypt ((uint8 *) ks, data); else aes_encrypt (data, data, ks); -#elif defined (TC_WINDOWS_BOOT_SERPENT) +#elif defined (TC_WINDOWS_BOOT_SERPENT) && !defined (WOLFCRYPT_BACKEND) serpent_encrypt (data, data, ks); -#elif defined (TC_WINDOWS_BOOT_TWOFISH) +#elif defined (TC_WINDOWS_BOOT_TWOFISH) && !defined (WOLFCRYPT_BACKEND) twofish_encrypt (ks, data, data); -#elif defined (TC_WINDOWS_BOOT_CAMELLIA) +#elif defined (TC_WINDOWS_BOOT_CAMELLIA) && !defined (WOLFCRYPT_BACKEND) camellia_encrypt (data, data, ks); #endif } void DecipherBlock(int cipher, void *data, void *ks) { #ifdef TC_WINDOWS_BOOT_AES if (IsAesHwCpuSupported()) - aes_hw_cpu_decrypt ((byte *) ks + sizeof (aes_encrypt_ctx) + 14 * 16, data); + aes_hw_cpu_decrypt ((uint8 *) ks + sizeof (aes_encrypt_ctx) + 14 * 16, data); else - aes_decrypt (data, data, (aes_decrypt_ctx *) ((byte *) ks + sizeof(aes_encrypt_ctx))); -#elif defined (TC_WINDOWS_BOOT_SERPENT) + aes_decrypt (data, data, (aes_decrypt_ctx *) ((uint8 *) ks + sizeof(aes_encrypt_ctx))); +#elif defined (TC_WINDOWS_BOOT_SERPENT) && !defined (WOLFCRYPT_BACKEND) serpent_decrypt (data, data, ks); -#elif defined (TC_WINDOWS_BOOT_TWOFISH) +#elif defined (TC_WINDOWS_BOOT_TWOFISH) && !defined (WOLFCRYPT_BACKEND) twofish_decrypt (ks, data, data); -#elif defined (TC_WINDOWS_BOOT_CAMELLIA) +#elif defined (TC_WINDOWS_BOOT_CAMELLIA) && !defined (WOLFCRYPT_BACKEND) camellia_decrypt (data, data, ks); #endif } @@ -1178,12 +1162,10 @@ BOOL IsAesHwCpuSupported () state = is_aes_hw_cpu_supported() ? TRUE : FALSE; stateValid = TRUE; } return state && !HwEncryptionDisabled; -#elif defined (_M_ARM64) || defined(__arm__) || defined (__arm64__) || defined (__aarch64__) - return 0; #else return (HasAESNI() && !HwEncryptionDisabled)? TRUE : FALSE; #endif } @@ -1209,13 +1191,15 @@ BOOL IsHwEncryptionEnabled () static BOOL CpuRngDisabled = TRUE; static BOOL RamEncryptionEnabled = FALSE; BOOL IsCpuRngSupported () { +#ifndef _M_ARM64 if (HasRDSEED() || HasRDRAND()) return TRUE; else +#endif return FALSE; } void EnableCpuRng (BOOL enable) { @@ -1227,18 +1211,14 @@ BOOL IsCpuRngEnabled () return !CpuRngDisabled; } BOOL IsRamEncryptionSupported () { -#ifdef _WIN64 if (t1ha_selfcheck__t1ha2() == 0) return TRUE; else return FALSE; -#else - return FALSE; -#endif } void EnableRamEncryption (BOOL enable) { RamEncryptionEnabled = enable; @@ -1248,11 +1228,11 @@ BOOL IsRamEncryptionEnabled () { return RamEncryptionEnabled; } /* masking for random index to remove bias */ -byte GetRngMask (byte count) +uint8 GetRngMask (uint8 count) { if (count >= 128) return 0xFF; if (count >= 64) return 0x7F; @@ -1267,14 +1247,14 @@ byte GetRngMask (byte count) if (count >= 2) return 0x03; return 1; } -byte GetRandomIndex (ChaCha20RngCtx* pCtx, byte elementsCount) +uint8 GetRandomIndex (ChaCha20RngCtx* pCtx, uint8 elementsCount) { - byte index = 0; - byte mask = GetRngMask (elementsCount); + uint8 index = 0; + uint8 mask = GetRngMask (elementsCount); while (TRUE) { ChaCha20RngGetBytes (pCtx, &index, 1); index &= mask; @@ -1283,13 +1263,13 @@ byte GetRandomIndex (ChaCha20RngCtx* pCtx, byte elementsCount) } return index; } -#if defined(_WIN64) && !defined (_UEFI) +#if !defined (_UEFI) /* declaration of variables and functions used for RAM encryption on 64-bit build */ -static byte* pbKeyDerivationArea = NULL; +static uint8* pbKeyDerivationArea = NULL; static ULONG cbKeyDerivationArea = 0; static uint64 HashSeedMask = 0; static uint64 CipherIVMask = 0; #ifdef TC_WINDOWS_DRIVER @@ -1301,13 +1281,13 @@ ULONG AllocTag = 'MMCV'; #endif BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback) { ChaCha20RngCtx ctx; - byte pbSeed[CHACHA20RNG_KEYSZ + CHACHA20RNG_IVSZ]; + uint8 pbSeed[CHACHA20RNG_KEYSZ + CHACHA20RNG_IVSZ]; #ifdef TC_WINDOWS_DRIVER - byte i; + uint8 i; char randomStr[4]; Dump ("InitializeSecurityParameters BEGIN\n"); #endif rngCallback (pbSeed, sizeof (pbSeed)); @@ -1360,11 +1340,11 @@ BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback) #endif cbKeyDerivationArea = 1024 * 1024; do { - pbKeyDerivationArea = (byte*) TCalloc(cbKeyDerivationArea); + pbKeyDerivationArea = (uint8*) TCalloc(cbKeyDerivationArea); if (!pbKeyDerivationArea) cbKeyDerivationArea >>= 1; } while (!pbKeyDerivationArea && (cbKeyDerivationArea >= (2*PAGE_SIZE))); if (!pbKeyDerivationArea) @@ -1499,31 +1479,5 @@ void VcUnprotectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID) } #endif #endif -#if defined(_M_ARM64) || defined(__arm__) || defined (__arm64__) || defined (__aarch64__) -/* dummy implementation that should never be called */ -void aes_hw_cpu_decrypt(const byte* ks, byte* data) -{ - ks = ks; - data = data; -} - -void aes_hw_cpu_decrypt_32_blocks(const byte* ks, byte* data) -{ - ks = ks; - data = data; -} - -void aes_hw_cpu_encrypt(const byte* ks, byte* data) -{ - ks = ks; - data = data; -} - -void aes_hw_cpu_encrypt_32_blocks(const byte* ks, byte* data) -{ - ks = ks; - data = data; -} -#endif diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h index 178e08e1..81ec791e 100644 --- a/src/Common/Crypto.h +++ b/src/Common/Crypto.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ /* Update the following when adding a new cipher or EA: @@ -206,13 +206,11 @@ typedef struct # include "Streebog.h" # include "kuznyechik.h" # include "Camellia.h" #if !defined (_UEFI) # include "chachaRng.h" -# ifdef _WIN64 # include "t1ha.h" -# endif #endif #else # include "CamelliaSmall.h" #endif @@ -226,13 +224,13 @@ typedef struct typedef struct keyInfo_t { int noIterations; /* Number of times to iterate (PKCS-5) */ int keyLength; /* Length of the key */ uint64 dummy; /* Dummy field to ensure 16-byte alignment of this structure */ - __int8 salt[PKCS5_SALT_SIZE]; /* PKCS-5 salt */ - CRYPTOPP_ALIGN_DATA(16) __int8 master_keydata[MASTER_KEYDATA_SIZE]; /* Concatenated master primary and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */ - CRYPTOPP_ALIGN_DATA(16) __int8 userKey[MAX_PASSWORD]; /* Password (to which keyfiles may have been applied). WITHOUT +1 for the null terminator. */ + unsigned __int8 salt[PKCS5_SALT_SIZE]; /* PKCS-5 salt */ + CRYPTOPP_ALIGN_DATA(16) unsigned __int8 master_keydata[MASTER_KEYDATA_SIZE]; /* Concatenated master primary and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */ + CRYPTOPP_ALIGN_DATA(16) unsigned __int8 userKey[MAX_PASSWORD]; /* Password (to which keyfiles may have been applied). WITHOUT +1 for the null terminator. */ } KEY_INFO, *PKEY_INFO; #endif typedef struct CRYPTO_INFO_t @@ -275,10 +273,12 @@ typedef struct CRYPTO_INFO_t uint16 RequiredProgramVersion; BOOL LegacyVolume; uint32 SectorSize; + BOOL bVulnerableMasterKey; // TRUE if XTS primary key is identical to secondary key (i.e. the volume is vulnerable to attack on XTS mode) + #endif // !TC_WINDOWS_BOOT UINT64_STRUCT VolumeSize; UINT64_STRUCT EncryptedAreaStart; @@ -305,11 +305,11 @@ typedef struct BOOT_CRYPTO_HEADER_t #endif PCRYPTO_INFO crypto_open (void); #ifndef TC_WINDOWS_BOOT -void crypto_loadkey (PKEY_INFO keyInfo, char *lpszUserKey, int nUserKeyLen); +void crypto_loadkey (PKEY_INFO keyInfo, unsigned char *lpszUserKey, int nUserKeyLen); void crypto_eraseKeys (PCRYPTO_INFO cryptoInfo); #endif void crypto_close (PCRYPTO_INFO cryptoInfo); int CipherGetBlockSize (int cipher); @@ -344,11 +344,11 @@ int EAGetByName (wchar_t *name); #endif int EAGetKeySize (int ea); int EAGetFirstMode (int ea); int EAGetNextMode (int ea, int previousModeId); #ifndef TC_WINDOWS_BOOT -wchar_t * EAGetModeName (int ea, int mode, BOOL capitalLetters); +const wchar_t * EAGetModeName (int mode); #endif int EAGetKeyScheduleSize (int ea); int EAGetLargestKey (); int EAGetLargestKeyForMode (int mode); @@ -382,11 +382,11 @@ void EncryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *s void DecryptDataUnits (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, uint32 nbrUnits, PCRYPTO_INFO ci); void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci); void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo); void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo); -#if defined(_WIN64) && !defined (_UEFI) +#if !defined (TC_WINDOWS_BOOT) && !defined (_UEFI) BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback); void ClearSecurityParameters(); #ifdef TC_WINDOWS_DRIVER void VcProtectMemory (uint64 encID, unsigned char* pbData, size_t cbData, unsigned char* pbData2, size_t cbData2); #else diff --git a/src/Common/Dictionary.c b/src/Common/Dictionary.c index 47dcb0a4..5915760c 100644 --- a/src/Common/Dictionary.c +++ b/src/Common/Dictionary.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Dictionary.h b/src/Common/Dictionary.h index f0be2183..972ec832 100644 --- a/src/Common/Dictionary.h +++ b/src/Common/Dictionary.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 7ad0fdb0..6c98b4d7 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -4,18 +4,19 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" #include <windowsx.h> +#include <versionhelpers.h> #include <dbghelp.h> #include <dbt.h> #include <Setupapi.h> #include <aclapi.h> #include <Netlistmgr.h> @@ -308,16 +309,16 @@ static unsigned char gpbSha512CodeSignCertFingerprint[64] = { 0xA4, 0x37, 0xD6, 0xDB, 0x26, 0xBA, 0xDC, 0x8F, 0x86, 0x96, 0x55, 0x96, 0xDB, 0x6F, 0xC0, 0x62 }; static unsigned char gpbSha512MSCodeSignCertFingerprint[64] = { - 0xEB, 0x76, 0x2E, 0xD3, 0x5B, 0x4A, 0xB1, 0x0E, 0xF5, 0x3B, 0x99, 0x4E, - 0xC1, 0xF7, 0x48, 0x88, 0xF6, 0xA0, 0xE9, 0xAC, 0x32, 0x69, 0xCF, 0x20, - 0xE1, 0x60, 0xC4, 0x0C, 0xEF, 0x01, 0x1F, 0xCB, 0x41, 0x95, 0x72, 0xB9, - 0xED, 0x63, 0x0C, 0x6B, 0xB9, 0xE9, 0xA2, 0x72, 0xA6, 0x78, 0x96, 0x4C, - 0x69, 0x9F, 0x90, 0x3F, 0xB1, 0x3C, 0x64, 0xF2, 0xAB, 0xCF, 0x14, 0x1D, - 0xEC, 0x7C, 0xB0, 0xC7 + 0x17, 0x8C, 0x1B, 0x37, 0x70, 0xBF, 0x8B, 0xDF, 0x84, 0x55, 0xC5, 0x18, + 0x13, 0x64, 0xE9, 0x65, 0x6D, 0x67, 0xCA, 0x0C, 0xD6, 0x3B, 0x9E, 0x7B, + 0x9B, 0x6A, 0x63, 0xD6, 0x19, 0xAE, 0xD7, 0xBA, 0xBE, 0x5C, 0xCB, 0xD1, + 0x07, 0x89, 0x07, 0xFB, 0x12, 0xC0, 0x2C, 0x94, 0x86, 0xEB, 0x67, 0x0B, + 0x9C, 0x97, 0xEB, 0x20, 0x38, 0x13, 0x9C, 0x0F, 0x56, 0x93, 0x1B, 0x19, + 0x6F, 0x8F, 0x6A, 0x39 }; /* Windows dialog class */ #define WINDOWS_DIALOG_CLASS L"#32770" @@ -588,22 +589,31 @@ BOOL SaveBufferToFile (const char *inputBuffer, const wchar_t *destinationFile, { HANDLE dst; DWORD bytesWritten; BOOL res = TRUE; DWORD dwLastError = 0; +#if defined(SETUP) && !defined (PORTABLE) + BOOL securityModified = FALSE; + SECURITY_INFO_BACKUP secBackup = { 0 }; + const wchar_t* existingFile = destinationFile; +#endif dst = CreateFile (destinationFile, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, bAppend ? OPEN_EXISTING : CREATE_ALWAYS, 0, NULL); dwLastError = GetLastError(); - if (!bAppend && bRenameIfFailed && (dst == INVALID_HANDLE_VALUE) && (GetLastError () == ERROR_SHARING_VIOLATION)) + if (!bAppend && bRenameIfFailed && (dst == INVALID_HANDLE_VALUE) && (GetLastError () == ERROR_SHARING_VIOLATION || GetLastError() == ERROR_ACCESS_DENIED)) { wchar_t renamedPath[TC_MAX_PATH + 1]; StringCbCopyW (renamedPath, sizeof(renamedPath), destinationFile); StringCbCatW (renamedPath, sizeof(renamedPath), VC_FILENAME_RENAMED_SUFFIX); +#if defined(SETUP) && !defined (PORTABLE) + // Take ownership of the file + securityModified = ModifyFileSecurityPermissions(destinationFile, &secBackup); +#endif /* rename the locked file in order to be able to create a new one */ if (MoveFileEx (destinationFile, renamedPath, MOVEFILE_REPLACE_EXISTING)) { dst = CreateFile (destinationFile, GENERIC_WRITE, @@ -614,14 +624,24 @@ BOOL SaveBufferToFile (const char *inputBuffer, const wchar_t *destinationFile, /* restore the original file name */ MoveFileEx (renamedPath, destinationFile, MOVEFILE_REPLACE_EXISTING); } else { +#if defined(SETUP) && !defined (PORTABLE) + existingFile = renamedPath; +#endif /* delete the renamed file when the machine reboots */ MoveFileEx (renamedPath, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); } } +#if defined(SETUP) && !defined (PORTABLE) + if (securityModified) + { + RestoreSecurityInfo(existingFile, &secBackup); + FreeSecurityBackup(&secBackup); + } +#endif } if (dst == INVALID_HANDLE_VALUE) { SetLastError (dwLastError); @@ -846,10 +866,79 @@ BOOL TCCopyFile (wchar_t *sourceFileName, wchar_t *destinationFile) } return TCCopyFileBase (src, dst); } +#if !defined(_WIN64) && defined(NDEBUG) && !defined (VC_SKIP_OS_DRIVER_REQ_CHECK) +// in 32-bit build, Crypto project is not compiled so we need to provide this function here + +#pragma comment(lib, "bcrypt.lib") + +void sha512(unsigned char* result, const unsigned char* source, uint64_t sourceLen) +{ + BCRYPT_ALG_HANDLE hAlg = NULL; + BCRYPT_HASH_HANDLE hHash = NULL; + NTSTATUS status = 0; + + // Open an algorithm provider for SHA512. + status = BCryptOpenAlgorithmProvider( + &hAlg, + BCRYPT_SHA512_ALGORITHM, + NULL, + 0); + if (!BCRYPT_SUCCESS(status)) + { + goto cleanup; + } + + // Create a hash handle. + status = BCryptCreateHash( + hAlg, + &hHash, + NULL, + 0, + NULL, // Optional secret, not needed for SHA512 + 0, + 0); + if (!BCRYPT_SUCCESS(status)) + { + goto cleanup; + } + + // Hash the data. Note: BCryptHashData takes an ULONG for the length. + status = BCryptHashData( + hHash, + (PUCHAR)source, + (ULONG)sourceLen, + 0); + if (!BCRYPT_SUCCESS(status)) + { + goto cleanup; + } + + // Finalize the hash computation and write the result. + status = BCryptFinishHash( + hHash, + result, + SHA512_DIGESTSIZE, + 0); + if (!BCRYPT_SUCCESS(status)) + { + goto cleanup; + } + +cleanup: + if (hHash) + { + BCryptDestroyHash(hHash); + } + if (hAlg) + { + BCryptCloseAlgorithmProvider(hAlg, 0); + } +} +#endif BOOL VerifyModuleSignature (const wchar_t* path) { #if defined(NDEBUG) && !defined (VC_SKIP_OS_DRIVER_REQ_CHECK) BOOL bResult = FALSE; @@ -857,15 +946,10 @@ BOOL VerifyModuleSignature (const wchar_t* path) GUID gActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2; WINTRUST_FILE_INFO fileInfo = {0}; WINTRUST_DATA WVTData = {0}; wchar_t filePath [TC_MAX_PATH + 1024]; - // we check our own authenticode signature only starting from Windows 10 since this is - // the minimal supported OS apart from XP where we can't verify SHA256 signatures - if (!IsOSAtLeast (WIN_10)) - return TRUE; - // Strip quotation marks (if any) if (path [0] == L'"') { StringCbCopyW (filePath, sizeof(filePath), path + 1); } @@ -1029,10 +1113,24 @@ BOOL IsOSVersionAtLeast (OSVersionEnum reqMinOS, int reqMinServicePack) return ((CurrentOSMajor << 16 | CurrentOSMinor << 8 | CurrentOSServicePack) >= (major << 16 | minor << 8 | reqMinServicePack)); } +BOOL IsWin10BuildAtLeast(int minBuild) +{ + // Must first be recognized as Windows 10 or higher + if (nCurrentOS < WIN_10) + return FALSE; + + // If we’re on Windows 10, check build number + if (nCurrentOS == WIN_10 && CurrentOSBuildNumber < minBuild) + return FALSE; + + // If we are on a higher version of Windows, we are good to go + return TRUE; +} + #ifdef SETUP_DLL static BOOL GetWindowVersionFromFile(DWORD* pdwMajor, DWORD* pdwMinor, DWORD* pdwBuildNumber) { wchar_t dllPath[MAX_PATH]; BOOL bRet = FALSE; @@ -1086,13 +1184,10 @@ static BOOL GetWindowsVersion(LPOSVERSIONINFOW lpVersionInformation) { if (ERROR_SUCCESS == RtlGetVersionFn (lpVersionInformation)) bRet = TRUE; } - if (!bRet) - bRet = GetVersionExW (lpVersionInformation); - #ifdef SETUP_DLL // we get real version from Kernel32.dll version since MSI always sets current version to 6.0 // https://stackoverflow.com/questions/49335885/windows-10-not-detecting-on-installshield/49343826#49343826 if (GetWindowVersionFromFile(&dwMajor, &dwMinor, &dwBuildNumber)) { @@ -2131,16 +2226,12 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam SetWindowPos (GetDlgItem (hwndDlg, IDC_ABOUT_BKG), HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } // Version SendMessage (GetDlgItem (hwndDlg, IDT_ABOUT_VERSION), WM_SETFONT, (WPARAM) hUserBoldFont, 0); - StringCbPrintfW (szTmp, sizeof(szTmp), L"VeraCrypt %s", _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX)); -#ifdef _WIN64 - StringCbCatW (szTmp, sizeof(szTmp), L" (64-bit)"); -#else - StringCbCatW (szTmp, sizeof(szTmp), L" (32-bit)"); -#endif + StringCbPrintfW (szTmp, sizeof(szTmp), L"VeraCrypt %s", _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX) L" (64-bit)"); + #if (defined(_DEBUG) || defined(DEBUG)) StringCbCatW (szTmp, sizeof(szTmp), L" (debug)"); #endif SetDlgItemText (hwndDlg, IDT_ABOUT_VERSION, szTmp); SetDlgItemText (hwndDlg, IDT_ABOUT_RELEASE, TC_STR_RELEASED_BY); @@ -2154,11 +2245,11 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam case WM_APP: SetWindowText (GetDlgItem (hwndDlg, IDC_ABOUT_CREDITS), L"Based on TrueCrypt 7.1a, freely available at http://www.truecrypt.org/ .\r\n\r\n" L"Portions of this software:\r\n" - L"Copyright \xA9 2013-2023 IDRIX. All rights reserved.\r\n" + L"Copyright \xA9 2013-2025 IDRIX. All rights reserved.\r\n" L"Copyright \xA9 2003-2012 TrueCrypt Developers Association. All Rights Reserved.\r\n" L"Copyright \xA9 1998-2000 Paul Le Roux. All Rights Reserved.\r\n" L"Copyright \xA9 1998-2008 Brian Gladman. All Rights Reserved.\r\n" L"Copyright \xA9 1995-2023 Jean-loup Gailly and Mark Adler.\r\n" L"Copyright \xA9 2016 Disk Cryptography Services for EFI (DCS), Alex Kolotnikov.\r\n" @@ -2167,11 +2258,11 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam L"Copyright \xA9 1999-2016 Jack Lloyd. All rights reserved.\r\n" L"Copyright \xA9 2013-2019 Stephan Mueller <smueller@chronox.de>\r\n" L"Copyright \xA9 1999-2023 Igor Pavlov\r\n\r\n" L"This software as a whole:\r\n" - L"Copyright \xA9 2013-2023 IDRIX. All rights reserved.\r\n\r\n" + L"Copyright \xA9 2013-2025 IDRIX. All rights reserved.\r\n\r\n" L"An IDRIX Release"); return 1; @@ -2882,11 +2973,11 @@ LRESULT CALLBACK CustomDlgProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar /* static BOOL IsReturnAddress (DWORD64 address) { static size_t codeEnd = 0; - byte *sp = (byte *) address; + uint8 *sp = (uint8 *) address; if (codeEnd == 0) { MEMORY_BASIC_INFORMATION mi; if (VirtualQuery ((LPCVOID) 0x401000, &mi, sizeof (mi)) >= sizeof (mi)) @@ -3016,11 +3107,11 @@ void ExceptionHandlerThread (void *threadArg) retAddrs.push_back (0); MEMORY_BASIC_INFORMATION mi; VirtualQuery (sp, &mi, sizeof (mi)); - PDWORD stackTop = (PDWORD)((byte *) mi.BaseAddress + mi.RegionSize); + PDWORD stackTop = (PDWORD)((uint8 *) mi.BaseAddress + mi.RegionSize); int i = 0; while (retAddrs.size() < 16 && &sp[i] < stackTop) { if (IsReturnAddress (sp[i])) @@ -3169,11 +3260,11 @@ BOOL LaunchElevatedProcess (HWND hwndDlg, const wchar_t* szModPath, const wchar_ ShowWindow (hWnd, SW_SHOWNORMAL); StringCbCopyW (newCmdLine, sizeof(newCmdLine), L"/q UAC "); StringCbCatW (newCmdLine, sizeof (newCmdLine), args); - if ((int)ShellExecuteW (hWnd, L"runas", szModPath, newCmdLine, NULL, SW_SHOWNORMAL) <= 32) + if ((INT_PTR)ShellExecuteW (hWnd, L"runas", szModPath, newCmdLine, NULL, SW_SHOWNORMAL) <= 32) { if (hwndDlg) handleWin32Error (hwndDlg, SRC_POS); return FALSE; } @@ -3601,14 +3692,20 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine) #endif INITCOMMONCONTROLSEX InitCtrls; InitOSVersionInfo(); - if (!IsOSAtLeast (WIN_7)) + if (!IsWin10BuildAtLeast(WIN_10_1809_BUILD)) + { + // abort using a message that says that VeraCrypt can run only on Windows 10 version 1809 or later + AbortProcessDirect(L"VeraCrypt requires at least Windows 10 version 1809 (October 2018 Update) to run."); + } + + if (!Is64BitOs()) { - // abort using a message that says that VeraCrypt can run only on Windows 7 and later and that it is officially supported only on Windows 10 and later - AbortProcessDirect(L"VeraCrypt requires at least Windows 7 to run."); + // abort using a message that says that VeraCrypt can run only on 64-bit Windows + AbortProcessDirect(L"VeraCrypt requires a 64-bit version of Windows to run."); } SetDefaultDllDirectoriesFn = (SetDefaultDllDirectoriesPtr) GetProcAddress (GetModuleHandle(L"kernel32.dll"), "SetDefaultDllDirectories"); if (!SetDefaultDllDirectoriesFn) { @@ -3792,18 +3889,18 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine) (DLGPROC) AuxiliaryDlgProc, (LPARAM) 1); InitHelpFileName (); #ifndef SETUP -#ifdef _WIN64 + EnableRamEncryption ((ReadDriverConfigurationFlags() & VC_DRIVER_CONFIG_ENABLE_RAM_ENCRYPTION) ? TRUE : FALSE); if (IsRamEncryptionEnabled()) { if (!InitializeSecurityParameters(GetAppRandomSeed)) AbortProcess("OUTOFMEMORY"); } -#endif + if (!EncryptionThreadPoolStart (ReadEncryptionThreadPoolFreeCpuCountLimit())) { handleWin32Error (NULL, SRC_POS); exit (1); } @@ -3914,11 +4011,11 @@ void NotifyDriverOfPortableMode (void) BOOL GetDriveLabel (int driveNo, wchar_t *label, int labelSize) { DWORD fileSystemFlags; - wchar_t root[] = { L'A' + (wchar_t) driveNo, L':', L'\\', 0 }; + wchar_t root[] = { (wchar_t) (L'A' + driveNo), L':', L'\\', 0 }; return GetVolumeInformationW (root, label, labelSize / 2, NULL, NULL, &fileSystemFlags, NULL, 0); } #ifndef SETUP @@ -3944,15 +4041,16 @@ BOOL GetSysDevicePaths (HWND hwndDlg) if (device.ContainsSystem) StringCchCopyW (device.IsPartition ? SysPartitionDevicePath : SysDriveDevicePath, TC_MAX_PATH, device.Path.c_str()); } // Find extra boot partition - foreach (const HostDevice &drive, GetAvailableHostDevices (false, false)) + std::vector <HostDevice> devices = GetAvailableHostDevices(false, false); + for (const HostDevice& drive : devices) { if (drive.ContainsSystem) { - foreach (const HostDevice &sysDrivePartition, drive.Partitions) + for (const HostDevice &sysDrivePartition : drive.Partitions) { if (sysDrivePartition.Bootable) { if (sysDrivePartition.Size <= TC_MAX_EXTRA_BOOT_PARTITION_SIZE) ExtraBootPartitionDevicePath = sysDrivePartition.Path; @@ -4163,23 +4261,58 @@ BOOL CALLBACK TextEditDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa switch (msg) { case WM_INITDIALOG: { prm = (TEXT_INFO_DIALOG_PARAM_PTR)lParam; + LocalizeDialog (hwndDlg, NULL); // increase size limit of rich edit control SendMessage(GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), EM_EXLIMITTEXT, 0, -1); SetWindowTextW (hwndDlg, prm->Title); // Left margin for rich edit text field SendMessage (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), EM_SETMARGINS, (WPARAM) EC_LEFTMARGIN, (LPARAM) CompensateXDPI (4)); if (prm->ReadOnly) { // switch rich edit control to ReadOnly - SendMessage(GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), ES_READONLY, TRUE, 0); + SendMessage(GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), EM_SETREADONLY , TRUE, 0); // hide cancel button - ShowWindow(GetDlgItem(hwndDlg, IDCANCEL), SW_HIDE); + HWND hwndCancel = GetDlgItem(hwndDlg, IDCANCEL); + ShowWindow(hwndCancel, SW_HIDE); + + // Reposition OK button to Cancel button's position + HWND hwndOK = GetDlgItem(hwndDlg, IDOK); + if (hwndOK && hwndCancel) + { + // Get Cancel button's position in screen coordinates + RECT rectCancel; + if (GetWindowRect(hwndCancel, &rectCancel)) + { + // Convert Cancel button's position to dialog's client coordinates + POINT ptCancel = { rectCancel.left, rectCancel.top }; + ScreenToClient(hwndDlg, &ptCancel); + + // Get OK button's current size + RECT rectOK; + if (GetWindowRect(hwndOK, &rectOK)) + { + int width = rectOK.right - rectOK.left; + int height = rectOK.bottom - rectOK.top; + + // Move OK button to Cancel button's position + SetWindowPos( + hwndOK, + NULL, + ptCancel.x, + ptCancel.y, + width, + height, + SWP_NOZORDER | SWP_NOACTIVATE + ); + } + } + } } SendMessage (hwndDlg, TC_APPMSG_LOAD_TEXT_BOX_CONTENT, 0, 0); } return 0; @@ -4187,12 +4320,16 @@ BOOL CALLBACK TextEditDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa case WM_COMMAND: if (lw == IDOK ) { if (!prm->ReadOnly) { - prm->Text.resize(GetWindowTextLengthA (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT)) + 1); - GetWindowTextA (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), &(prm->Text)[0], (int) prm->Text.size()); + // read content of the text box as UTF16 and then convert it to UTF8 + HWND hEdit = GetDlgItem(hwndDlg, IDC_INFO_BOX_TEXT); + int size = GetWindowTextLengthW(hEdit); + std::vector<WCHAR> buffer(size + 1); + GetWindowTextW(hEdit, buffer.data(), size + 1); + prm->Text = WideToUtf8String(buffer.data()); } NormalCursor (); EndDialog (hwndDlg, IDOK); return 1; } @@ -4205,11 +4342,12 @@ BOOL CALLBACK TextEditDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa } return 0; case TC_APPMSG_LOAD_TEXT_BOX_CONTENT: { - SetWindowTextA (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), prm->Text.c_str()); + // convert prm->Text to UTF16 using Utf8StringToWide + SetWindowTextW(GetDlgItem(hwndDlg, IDC_INFO_BOX_TEXT), Utf8StringToWide(prm->Text).c_str()); } return 0; case WM_CLOSE: NormalCursor (); @@ -4828,11 +4966,11 @@ static int DriverLoad () driverPath[1] = 0; } else *tmp = 0; - StringCbCatW (driverPath, sizeof(driverPath), !Is64BitOs () ? L"\\veracrypt.sys" : IsARM()? L"\\veracrypt-arm64.sys" : L"\\veracrypt-x64.sys"); + StringCbCatW (driverPath, sizeof(driverPath), IsARM()? L"\\veracrypt-arm64.sys" : L"\\veracrypt-x64.sys"); file = FindFirstFile (driverPath, &find); if (file == INVALID_HANDLE_VALUE) { @@ -5352,11 +5490,11 @@ BOOL SelectMultipleFiles(HWND hwndDlg, const char *stringId, BOOL keepHistory, s CoUninitialize(); return status; } -BOOL BrowseDirectories(HWND hwndDlg, char *lpszTitle, wchar_t *dirName, const wchar_t *initialDir) +BOOL BrowseDirectories(HWND hwndDlg, char *lpszDlgTitle, wchar_t *dirName, const wchar_t *initialDir) { IFileDialog *pfd = NULL; HRESULT hr; BOOL bOK = FALSE; @@ -5377,13 +5515,13 @@ BOOL BrowseDirectories(HWND hwndDlg, char *lpszTitle, wchar_t *dirName, const wc dwFlags |= FOS_PICKFOLDERS | FOS_FORCEFILESYSTEM | FOS_NOCHANGEDIR; // Important to enable folder-picking mode hr = pfd->SetOptions(dwFlags); } // Set the title. - if (lpszTitle) + if (lpszDlgTitle) { - pfd->SetTitle(GetString(lpszTitle)); + pfd->SetTitle(GetString(lpszDlgTitle)); } IShellItem *psi; if (initialDir) { @@ -5575,10 +5713,18 @@ void handleError (HWND hwndDlg, int code, const char* srcPos) StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("CAPI_RAND"), SRC_POS, CryptoAPILastError); MessageBoxW (hwndDlg, AppendSrcPos (szTmp, srcPos).c_str(), lpszTitle, MB_ICONERROR); break; #endif + case ERR_XTS_MASTERKEY_VULNERABLE: + MessageBoxW (hwndDlg, AppendSrcPos (GetString ("ERR_XTS_MASTERKEY_VULNERABLE"), srcPos).c_str(), lpszTitle, ICON_HAND); + break; + + case ERR_SYSENC_XTS_MASTERKEY_VULNERABLE: + MessageBoxW (hwndDlg, AppendSrcPos (GetString ("ERR_SYSENC_XTS_MASTERKEY_VULNERABLE"), srcPos).c_str(), lpszTitle, ICON_HAND); + break; + default: StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("ERR_UNKNOWN"), code); MessageBoxW (hwndDlg, AppendSrcPos (szTmp, srcPos).c_str(), lpszTitle, ICON_HAND); } } @@ -5709,11 +5855,11 @@ BOOL CloseVolumeExplorerWindows (HWND hwnd, int driveNo) } BOOL UpdateDriveCustomLabel (int driveNo, wchar_t* effectiveLabel, BOOL bSetValue) { wchar_t wszRegPath[MAX_PATH]; - wchar_t driveStr[] = {L'A' + (wchar_t) driveNo, 0}; + wchar_t driveStr[] = { (wchar_t) (L'A' + driveNo), 0}; HKEY hKey; LSTATUS lStatus; DWORD cbLabelLen = (DWORD) ((wcslen (effectiveLabel) + 1) * sizeof (wchar_t)); BOOL bToBeDeleted = FALSE; @@ -5794,28 +5940,28 @@ wstring ArrayToHexWideString (const unsigned char* pbData, int cbData) } return result; } -bool HexToByte (wchar_t c, byte& b) +bool HexToByte (wchar_t c, uint8& b) { bool bRet = true; if (c >= L'0' && c <= L'9') - b = (byte) (c - L'0'); + b = (uint8) (c - L'0'); else if (c >= L'a' && c <= L'z') - b = (byte) (c - L'a' + 10); + b = (uint8) (c - L'a' + 10); else if (c >= L'A' && c <= L'Z') - b = (byte) (c - L'A' + 10); + b = (uint8) (c - L'A' + 10); else bRet = false; return bRet; } -bool HexWideStringToArray (const wchar_t* hexStr, std::vector<byte>& arr) +bool HexWideStringToArray (const wchar_t* hexStr, std::vector<uint8>& arr) { - byte b1, b2; + uint8 b1, b2; size_t i, len = wcslen (hexStr); arr.clear(); if (len %2) return false; @@ -6141,15 +6287,17 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) /* Measures the speed at which each of the hash algorithms processes the message to produce a single digest. */ { BYTE digest [MAX_DIGESTSIZE]; - WHIRLPOOL_CTX wctx; - blake2s_state bctx; + #ifndef WOLFCRYPT_BACKEND + WHIRLPOOL_CTX wctx; + STREEBOG_CTX stctx; + blake2s_state bctx; + #endif sha512_ctx s2ctx; sha256_ctx s256ctx; - STREEBOG_CTX stctx; int hid, i; for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++) { @@ -6170,11 +6318,11 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) case SHA256: sha256_begin (&s256ctx); sha256_hash (lpTestBuffer, benchmarkBufferSize, &s256ctx); sha256_end ((unsigned char *) digest, &s256ctx); break; - + #ifndef WOLFCRYPT_BACKEND case BLAKE2S: blake2s_init(&bctx); blake2s_update(&bctx, lpTestBuffer, benchmarkBufferSize); blake2s_final(&bctx, (unsigned char *) digest); break; @@ -6190,11 +6338,12 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) STREEBOG_add(&stctx, lpTestBuffer, benchmarkBufferSize); STREEBOG_finalize(&stctx, (unsigned char *)digest); break; } - } + #endif + } if (QueryPerformanceCounter (&performanceCountEnd) == 0) goto counter_error; benchmarkTable[benchmarkTotalItems].encSpeed = performanceCountEnd.QuadPart - performanceCountStart.QuadPart; @@ -6213,11 +6362,11 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) /* Measures the time that it takes for the PKCS-5 routine to derive a header key using each of the implemented PRF algorithms. */ { int thid, i; - char dk[MASTER_KEYDATA_SIZE]; + unsigned char dk[MASTER_KEYDATA_SIZE]; char *tmp_salt = {"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF"}; for (thid = FIRST_PRF_ID; thid <= LAST_PRF_ID; thid++) { if (benchmarkPreBoot && !benchmarkGPT && !HashForSystemEncryption (thid)) @@ -6231,34 +6380,35 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) switch (thid) { case SHA512: /* PKCS-5 test with HMAC-SHA-512 used as the PRF */ - derive_key_sha512 ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); + derive_key_sha512 ((unsigned char*) "passphrase-1234567890", 21, (unsigned char*) tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); break; case SHA256: /* PKCS-5 test with HMAC-SHA-256 used as the PRF */ - derive_key_sha256 ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); + derive_key_sha256 ((unsigned char*)"passphrase-1234567890", 21, (unsigned char*) tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); break; - + #ifndef WOLFCRYPT_BACKEND case BLAKE2S: /* PKCS-5 test with HMAC-BLAKE2s used as the PRF */ - derive_key_blake2s ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); + derive_key_blake2s ((unsigned char*)"passphrase-1234567890", 21, (unsigned char*) tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); break; case WHIRLPOOL: /* PKCS-5 test with HMAC-Whirlpool used as the PRF */ - derive_key_whirlpool ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); + derive_key_whirlpool ((unsigned char*)"passphrase-1234567890", 21, (unsigned char*) tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); break; case STREEBOG: /* PKCS-5 test with HMAC-STREEBOG used as the PRF */ - derive_key_streebog("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); + derive_key_streebog((unsigned char*)"passphrase-1234567890", 21, (unsigned char*) tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE); break; } - } + #endif + } if (QueryPerformanceCounter (&performanceCountEnd) == 0) goto counter_error; benchmarkTable[benchmarkTotalItems].encSpeed = performanceCountEnd.QuadPart - performanceCountStart.QuadPart; @@ -6274,23 +6424,15 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) } else { if (thid == SHA256) { -#ifdef _WIN64 benchmarkTable[benchmarkTotalItems].meanBytesPerSec = (benchmarkTable[benchmarkTotalItems].meanBytesPerSec * 26); -#else - benchmarkTable[benchmarkTotalItems].meanBytesPerSec = (benchmarkTable[benchmarkTotalItems].meanBytesPerSec * 24); -#endif } else { -#ifdef _WIN64 benchmarkTable[benchmarkTotalItems].meanBytesPerSec = (benchmarkTable[benchmarkTotalItems].meanBytesPerSec * 21) / 5; -#else - benchmarkTable[benchmarkTotalItems].meanBytesPerSec = (benchmarkTable[benchmarkTotalItems].meanBytesPerSec * 18) / 5; -#endif } } } StringCbPrintfW (benchmarkTable[benchmarkTotalItems].name, sizeof(benchmarkTable[benchmarkTotalItems].name),L"%s", get_pkcs5_prf_name (thid)); @@ -6309,14 +6451,12 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) { ci->mode = FIRST_MODE_OF_OPERATION_ID; if (EAInitMode (ci, ci->k2)) { int i; -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (ci, VcGetEncryptionID (ci)); -#endif for (i = 0; i < 10; i++) { EncryptDataUnits (lpTestBuffer, &startDataUnitNo, (TC_LARGEST_COMPILER_UINT) benchmarkBufferSize / ENCRYPTION_DATA_UNIT_SIZE, ci); DecryptDataUnits (lpTestBuffer, &startDataUnitNo, (TC_LARGEST_COMPILER_UINT) benchmarkBufferSize / ENCRYPTION_DATA_UNIT_SIZE, ci); @@ -6334,14 +6474,12 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg) ci->mode = FIRST_MODE_OF_OPERATION_ID; if (!EAInitMode (ci, ci->k2)) goto counter_error; -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (ci, VcGetEncryptionID (ci)); -#endif if (QueryPerformanceCounter (&performanceCountStart) == 0) goto counter_error; EncryptDataUnits (lpTestBuffer, &startDataUnitNo, (TC_LARGEST_COMPILER_UINT) benchmarkBufferSize / ENCRYPTION_DATA_UNIT_SIZE, ci); @@ -7585,11 +7723,11 @@ CipherTestDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) crypto_close (ci); } else { - CipherInit2(idTestCipher, key, ks_tmp, ks); + CipherInit2(idTestCipher, key, ks_tmp); if (bEncrypt) { EncipherBlock(idTestCipher, tmp, ks_tmp); } @@ -8149,11 +8287,11 @@ int DriverUnmountVolume (HWND hwndDlg, int nDosDriveNo, BOOL forced) } unmount.nDosDriveNo = nDosDriveNo; unmount.ignoreOpenFiles = forced; - bResult = DeviceIoControl (hDriver, TC_IOCTL_DISMOUNT_VOLUME, &unmount, + bResult = DeviceIoControl (hDriver, TC_IOCTL_UNMOUNT_VOLUME, &unmount, sizeof (unmount), &unmount, sizeof (unmount), &dwResult, NULL); if (bResult == FALSE) { handleWin32Error (hwndDlg, SRC_POS); @@ -8207,11 +8345,11 @@ void BroadcastDeviceChange (WPARAM message, int nDosDriveNo, DWORD driveMap) { for (i = 0; i < 26; i++) { if (driveMap & (1 << i)) { - wchar_t root[] = { (wchar_t) i + L'A', L':', L'\\', 0 }; + wchar_t root[] = { (wchar_t) (i + L'A'), L':', L'\\', 0 }; SHChangeNotify (eventId, SHCNF_PATH, root, NULL); } } @@ -8710,11 +8848,11 @@ retry: StringCchCopyW (volumePath, TC_MAX_PATH, resolvedPath.c_str()); } if ((path.length () >= 3) && (_wcsnicmp (path.c_str(), L"ID:", 3) == 0)) { - std::vector<byte> arr; + std::vector<uint8> arr; if ( (path.length() == (3 + 2*VOLUME_ID_SIZE)) && HexWideStringToArray (path.c_str() + 3, arr) && (arr.size() == VOLUME_ID_SIZE) ) { @@ -8764,16 +8902,16 @@ retry: ) { wstring drivePath = L"\\\\.\\X:"; HANDLE dev = INVALID_HANDLE_VALUE; VOLUME_DISK_EXTENTS extents = {0}; - DWORD dwResult = 0; + DWORD cbReturnedBytes = 0; drivePath[4] = root[0]; if ((dev = CreateFile (drivePath.c_str(),0, 0, NULL, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE) { - if (DeviceIoControl (dev, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, NULL, 0, &extents, sizeof(extents), &dwResult, NULL)) + if (DeviceIoControl (dev, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, NULL, 0, &extents, sizeof(extents), &cbReturnedBytes, NULL)) { if (extents.NumberOfDiskExtents > 0) { STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR accessDesc; STORAGE_ADAPTER_DESCRIPTOR adapterDesc; @@ -8906,22 +9044,22 @@ retry: goto retry; } if (bDevice && mount.bProtectHiddenVolume) { - int driveNo; + int diskNo; - if (swscanf (volumePath, L"\\Device\\Harddisk%d\\Partition", &driveNo) == 1) + if (swscanf (volumePath, L"\\Device\\Harddisk%d\\Partition", &diskNo) == 1) { OPEN_TEST_STRUCT openTestStruct; memset (&openTestStruct, 0, sizeof (openTestStruct)); openTestStruct.bDetectTCBootLoader = TRUE; - StringCchPrintfW ((wchar_t *) openTestStruct.wszFileName, array_capacity (openTestStruct.wszFileName), L"\\Device\\Harddisk%d\\Partition0", driveNo); + StringCchPrintfW ((wchar_t *) openTestStruct.wszFileName, array_capacity (openTestStruct.wszFileName), L"\\Device\\Harddisk%d\\Partition0", diskNo); - DWORD dwResult; - if (DeviceIoControl (hDriver, TC_IOCTL_OPEN_TEST, &openTestStruct, sizeof (OPEN_TEST_STRUCT), &openTestStruct, sizeof (OPEN_TEST_STRUCT), &dwResult, NULL) && openTestStruct.TCBootLoaderDetected) + DWORD cbBytesReturned; + if (DeviceIoControl (hDriver, TC_IOCTL_OPEN_TEST, &openTestStruct, sizeof (OPEN_TEST_STRUCT), &openTestStruct, sizeof (OPEN_TEST_STRUCT), &cbBytesReturned, NULL) && openTestStruct.TCBootLoaderDetected) WarningDirect ((GetWrongPasswordErrorMessage (hwndDlg) + L"\n\n" + GetString ("HIDDEN_VOL_PROT_PASSWORD_US_KEYB_LAYOUT")).c_str(), hwndDlg); else handleError (hwndDlg, mount.nReturnCode, SRC_POS); } } @@ -8947,14 +9085,20 @@ retry: Warning ("HEADER_DAMAGED_AUTO_USED_HEADER_BAK", hwndDlg); } LastMountedVolumeDirty = mount.FilesystemDirty; + if (mount.VolumeMasterKeyVulnerable + && !Silent) + { + Warning ("ERR_XTS_MASTERKEY_VULNERABLE", hwndDlg); + } + if (mount.FilesystemDirty) { wchar_t msg[1024]; - wchar_t mountPoint[] = { L'A' + (wchar_t) driveNo, L':', 0 }; + wchar_t mountPoint[] = { (wchar_t) (L'A' + driveNo), L':', 0 }; StringCbPrintfW (msg, sizeof(msg), GetString ("MOUNTED_VOLUME_DIRTY"), mountPoint); if (AskWarnYesNoStringTopmost (msg, hwndDlg) == IDYES) CheckFilesystem (hwndDlg, driveNo, TRUE); } @@ -8964,33 +9108,33 @@ retry: && !bDevice && !FileHasReadOnlyAttribute (volumePath) && !IsFileOnReadOnlyFilesystem (volumePath)) { wchar_t msg[1024]; - wchar_t mountPoint[] = { L'A' + (wchar_t) driveNo, L':', 0 }; + wchar_t mountPoint[] = { (wchar_t) (L'A' + driveNo), L':', 0 }; StringCbPrintfW (msg, sizeof(msg), GetString ("MOUNTED_CONTAINER_FORCED_READ_ONLY"), mountPoint); WarningDirect (msg, hwndDlg); } if (mount.VolumeMountedReadOnlyAfterAccessDenied && !Silent && bDevice) { wchar_t msg[1024]; - wchar_t mountPoint[] = { L'A' + (wchar_t) driveNo, L':', 0 }; + wchar_t mountPoint[] = { (wchar_t)(L'A' + driveNo), L':', 0 }; StringCbPrintfW (msg, sizeof(msg), GetString ("MOUNTED_DEVICE_FORCED_READ_ONLY"), mountPoint); WarningDirect (msg, hwndDlg); } if (mount.VolumeMountedReadOnlyAfterDeviceWriteProtected && !Silent && wcsstr (volumePath, L"\\Device\\Harddisk") == volumePath) { wchar_t msg[1024]; - wchar_t mountPoint[] = { L'A' + (wchar_t) driveNo, L':', 0 }; + wchar_t mountPoint[] = { (wchar_t) (L'A' + driveNo), L':', 0 }; StringCbPrintfW (msg, sizeof(msg), GetString ("MOUNTED_DEVICE_FORCED_READ_ONLY_WRITE_PROTECTION"), mountPoint); WarningDirect (msg, hwndDlg); if (CurrentOSMajor >= 6 @@ -9004,11 +9148,11 @@ retry: if (mount.VolumeMountedReadOnlyAfterPartialSysEnc && !Silent && bDevice) { wchar_t msg[1024]; - wchar_t mountPoint[] = { L'A' + (wchar_t) driveNo, L':', 0 }; + wchar_t mountPoint[] = { (wchar_t) (L'A' + driveNo), L':', 0 }; StringCbPrintfW (msg, sizeof(msg), GetString ("PARTIAL_SYSENC_MOUNT_READONLY"), mountPoint); WarningDirect (msg, hwndDlg); } @@ -9097,11 +9241,11 @@ retry: forced = TRUE; goto retry; } // Undo SHCNE_DRIVEREMOVED - wchar_t root[] = { (wchar_t) nDosDriveNo + L'A', L':', L'\\', 0 }; + wchar_t root[] = { (wchar_t) (nDosDriveNo + L'A'), L':', L'\\', 0 }; SHChangeNotify (SHCNE_DRIVEADD, SHCNF_PATH, root, NULL); return FALSE; } @@ -9162,11 +9306,11 @@ BOOL IsMountedVolumeID (BYTE volumeID[VOLUME_ID_SIZE]) BOOL IsMountedVolume (const wchar_t *volname) { if ((wcslen (volname) == (3 + 2*VOLUME_ID_SIZE)) && _wcsnicmp (volname, L"ID:", 3) == 0) { /* Volume ID specified. Use it for matching mounted volumes. */ - std::vector<byte> arr; + std::vector<uint8> arr; if (HexWideStringToArray (&volname[3], arr) && (arr.size() == VOLUME_ID_SIZE)) { return IsMountedVolumeID (&arr[0]); } } @@ -9451,11 +9595,11 @@ int GetDiskDeviceDriveLetter (PWSTR deviceName) if (!ResolveSymbolicLink (deviceName, device, sizeof(device))) StringCchCopyW (device, MAX_PATH, deviceName); for (i = 0; i < 26; i++) { - WCHAR drive[] = { (WCHAR) i + L'A', L':', 0 }; + WCHAR drive[] = { (WCHAR) (i + L'A'), L':', 0 }; StringCchCopyW (link, MAX_PATH, L"\\DosDevices\\"); StringCchCatW (link, MAX_PATH, drive); if ( ResolveSymbolicLink (link, target, sizeof(target)) @@ -10144,11 +10288,11 @@ wchar_t *GetProgramConfigPath (wchar_t *fileName) std::wstring GetServiceConfigPath (const wchar_t *fileName, bool useLegacy) { wchar_t sysPath[TC_MAX_PATH]; - if (Is64BitOs() && useLegacy) + if (useLegacy) { typedef UINT (WINAPI *GetSystemWow64Directory_t) (LPWSTR lpBuffer, UINT uSize); GetSystemWow64Directory_t getSystemWow64Directory = (GetSystemWow64Directory_t) GetProcAddress (GetModuleHandle (L"kernel32"), "GetSystemWow64DirectoryW"); getSystemWow64Directory (sysPath, ARRAYSIZE (sysPath)); @@ -10649,16 +10793,16 @@ void OpenPageHelp (HWND hwndDlg, int nPage) else Applink ("help"); } else { - int r = (int)ShellExecuteW (NULL, L"open", szHelpFile, NULL, NULL, SW_SHOWNORMAL); + INT_PTR r = (INT_PTR)ShellExecuteW (NULL, L"open", szHelpFile, NULL, NULL, SW_SHOWNORMAL); if (r == ERROR_FILE_NOT_FOUND) { // Try the secondary help file - r = (int)ShellExecuteW (NULL, L"open", szHelpFile2, NULL, NULL, SW_SHOWNORMAL); + r = (INT_PTR)ShellExecuteW (NULL, L"open", szHelpFile2, NULL, NULL, SW_SHOWNORMAL); if (r == ERROR_FILE_NOT_FOUND) { // Open local HTML help. It will fallback to online help if not found. Applink ("help"); @@ -10881,18 +11025,15 @@ BOOL IsARM() #endif } BOOL IsServerOS () { - OSVERSIONINFOEXW osVer; - osVer.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEXW); - GetVersionExW ((LPOSVERSIONINFOW) &osVer); - - return (osVer.wProductType == VER_NT_SERVER || osVer.wProductType == VER_NT_DOMAIN_CONTROLLER); + return IsWindowsServer()? TRUE : FALSE; } + // Returns TRUE, if the currently running operating system is installed in a hidden volume. If it's not, or if // there's an error, returns FALSE. BOOL IsHiddenOSRunning (void) { static BOOL statusCached = FALSE; @@ -10963,104 +11104,109 @@ BOOL RestartComputer (BOOL bShutdown) std::wstring GetWindowsEdition () { wstring osname = L"win"; - OSVERSIONINFOEXW osVer; + OSVERSIONINFOEXW osVer = { 0 }; osVer.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEXW); - GetVersionExW ((LPOSVERSIONINFOW) &osVer); + if (GetWindowsVersion((LPOSVERSIONINFOW)&osVer)) + { - BOOL home = (osVer.wSuiteMask & VER_SUITE_PERSONAL); - BOOL server = (osVer.wProductType == VER_NT_SERVER || osVer.wProductType == VER_NT_DOMAIN_CONTROLLER); + BOOL home = (osVer.wSuiteMask & VER_SUITE_PERSONAL); + BOOL server = (osVer.wProductType == VER_NT_SERVER || osVer.wProductType == VER_NT_DOMAIN_CONTROLLER); - HKEY hkey; - wchar_t productName[300] = {0}; - DWORD productNameSize = sizeof (productName); - if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS) - { - if (RegQueryValueEx (hkey, L"ProductName", 0, 0, (LPBYTE) &productName, &productNameSize) != ERROR_SUCCESS || productNameSize < 1) - productName[0] = 0; + HKEY hkey; + wchar_t productName[300] = { 0 }; + DWORD productNameSize = sizeof(productName); + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS) + { + if (RegQueryValueEx(hkey, L"ProductName", 0, 0, (LPBYTE)&productName, &productNameSize) != ERROR_SUCCESS || productNameSize < 1) + productName[0] = 0; - RegCloseKey (hkey); - } + RegCloseKey(hkey); + } - switch (nCurrentOS) - { - case WIN_2000: - osname += L"2000"; - break; + switch (nCurrentOS) + { + case WIN_2000: + osname += L"2000"; + break; - case WIN_XP: - case WIN_XP64: - osname += L"xp"; - osname += home ? L"-home" : L"-pro"; - break; + case WIN_XP: + case WIN_XP64: + osname += L"xp"; + osname += home ? L"-home" : L"-pro"; + break; - case WIN_SERVER_2003: - osname += L"2003"; - break; + case WIN_SERVER_2003: + osname += L"2003"; + break; - case WIN_VISTA: - osname += L"vista"; - break; + case WIN_VISTA: + osname += L"vista"; + break; - case WIN_SERVER_2008: - osname += L"2008"; - break; + case WIN_SERVER_2008: + osname += L"2008"; + break; - case WIN_7: - osname += L"7"; - break; + case WIN_7: + osname += L"7"; + break; - case WIN_SERVER_2008_R2: - osname += L"2008r2"; - break; + case WIN_SERVER_2008_R2: + osname += L"2008r2"; + break; - default: - wstringstream s; - s << CurrentOSMajor << L"." << CurrentOSMinor; - osname += s.str(); - break; - } + default: + wstringstream s; + s << CurrentOSMajor << L"." << CurrentOSMinor; + osname += s.str(); + break; + } - if (server) - osname += L"-server"; + if (server) + osname += L"-server"; - if (IsOSAtLeast (WIN_VISTA)) - { - if (home) - osname += L"-home"; - else if (wcsstr (productName, L"Standard") != 0) - osname += L"-standard"; - else if (wcsstr (productName, L"Professional") != 0) - osname += L"-pro"; - else if (wcsstr (productName, L"Business") != 0) - osname += L"-business"; - else if (wcsstr (productName, L"Enterprise") != 0) - osname += L"-enterprise"; - else if (wcsstr (productName, L"Datacenter") != 0) - osname += L"-datacenter"; - else if (wcsstr (productName, L"Ultimate") != 0) - osname += L"-ultimate"; - } + if (IsOSAtLeast(WIN_VISTA)) + { + if (home) + osname += L"-home"; + else if (wcsstr(productName, L"Standard") != 0) + osname += L"-standard"; + else if (wcsstr(productName, L"Professional") != 0) + osname += L"-pro"; + else if (wcsstr(productName, L"Business") != 0) + osname += L"-business"; + else if (wcsstr(productName, L"Enterprise") != 0) + osname += L"-enterprise"; + else if (wcsstr(productName, L"Datacenter") != 0) + osname += L"-datacenter"; + else if (wcsstr(productName, L"Ultimate") != 0) + osname += L"-ultimate"; + } - if (GetSystemMetrics (SM_STARTER)) - osname += L"-starter"; - else if (wcsstr (productName, L"Basic") != 0) - osname += L"-basic"; + if (GetSystemMetrics(SM_STARTER)) + osname += L"-starter"; + else if (wcsstr(productName, L"Basic") != 0) + osname += L"-basic"; - if (Is64BitOs()) - osname += IsARM()? L"-arm64" : L"-x64"; + osname += IsARM() ? L"-arm64" : L"-x64"; - if (CurrentOSServicePack > 0) + if (CurrentOSServicePack > 0) + { + wstringstream s; + s << L"-sp" << CurrentOSServicePack; + osname += s.str(); + } + + return osname; + } + else { - wstringstream s; - s << L"-sp" << CurrentOSServicePack; - osname += s.str(); + return L""; } - - return osname; } #ifdef SETUP extern wchar_t InstallationPath[TC_MAX_PATH]; #endif @@ -11069,11 +11215,11 @@ void Applink (const char *dest) { wchar_t url [MAX_URL_LENGTH] = {0}; wchar_t page[TC_MAX_PATH] = {0}; wchar_t installDir[TC_MAX_PATH] = {0}; BOOL buildUrl = TRUE; - int r; + INT_PTR r; ArrowWaitCursor (); #ifdef SETUP StringCbCopyW (installDir, sizeof (installDir), InstallationPath); @@ -11273,11 +11419,11 @@ void Applink (const char *dest) SafeOpenURL (url); } } else { - r = (int) ShellExecuteW (NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL); + r = (INT_PTR) ShellExecuteW (NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL); if (((r == ERROR_FILE_NOT_FOUND) || (r == ERROR_PATH_NOT_FOUND)) && buildUrl) { // fallback to online resources StringCbPrintfW (url, sizeof (url), L"https://www.veracrypt.fr/en/%s", page); @@ -11420,11 +11566,11 @@ int OpenVolume (OpenVolumeContext *context, const wchar_t *volumePath, Password { int status = ERR_PARAMETER_INCORRECT; int volumeType; wchar_t szDiskFile[TC_MAX_PATH], szCFDevice[TC_MAX_PATH]; wchar_t szDosDevice[TC_MAX_PATH]; - char buffer[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; + unsigned char buffer[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; LARGE_INTEGER headerOffset; DWORD dwResult; DISK_GEOMETRY_EX deviceGeometry; context->VolumeIsOpen = FALSE; @@ -11571,11 +11717,11 @@ int OpenVolume (OpenVolumeContext *context, const wchar_t *volumePath, Password goto error; } // Read volume header DWORD bytesRead; - if (!ReadEffectiveVolumeHeader (context->IsDevice, context->HostFileHandle, (byte *) buffer, &bytesRead)) + if (!ReadEffectiveVolumeHeader (context->IsDevice, context->HostFileHandle, (uint8 *) buffer, &bytesRead)) { status = ERR_OS_ERROR; goto error; } @@ -11634,11 +11780,11 @@ void CloseVolume (OpenVolumeContext *context) context->VolumeIsOpen = FALSE; } -int ReEncryptVolumeHeader (HWND hwndDlg, char *buffer, BOOL bBoot, CRYPTO_INFO *cryptoInfo, Password *password, int pim, BOOL wipeMode) +int ReEncryptVolumeHeader (HWND hwndDlg, unsigned char *buffer, BOOL bBoot, CRYPTO_INFO *cryptoInfo, Password *password, int pim, BOOL wipeMode) { CRYPTO_INFO *newCryptoInfo = NULL; RandSetHashFunction (cryptoInfo->pkcs5); @@ -12156,11 +12302,11 @@ BOOL CALLBACK SecurityTokenKeyfileDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam wchar_t keyfilePath[TC_MAX_PATH]; if (BrowseFiles (hwndDlg, "SELECT_KEYFILE", keyfilePath, bHistory, FALSE)) { DWORD keyfileSize; - byte *keyfileData = (byte *) LoadFile (keyfilePath, &keyfileSize); + uint8 *keyfileData = (uint8 *) LoadFile (keyfilePath, &keyfileSize); if (!keyfileData) { handleWin32Error (hwndDlg, SRC_POS); return 1; } @@ -12174,11 +12320,11 @@ BOOL CALLBACK SecurityTokenKeyfileDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam if (lastBackSlash != string::npos) newParams.Name = newParams.Name.substr (lastBackSlash + 1); if (DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_NEW_TOKEN_KEYFILE), hwndDlg, (DLGPROC) NewSecurityTokenKeyfileDlgProc, (LPARAM) &newParams) == IDOK) { - vector <byte> keyfileDataVector (keyfileSize); + vector <uint8> keyfileDataVector (keyfileSize); memcpy (&keyfileDataVector.front(), keyfileData, keyfileSize); try { WaitCursor(); @@ -12223,22 +12369,22 @@ BOOL CALLBACK SecurityTokenKeyfileDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam { WaitCursor(); finally_do ({ NormalCursor(); }); - vector <byte> keyfileData; + vector <uint8> keyfileData; keyfile->GetKeyfileData (keyfileData); if (keyfileData.empty()) { SetLastError (ERROR_HANDLE_EOF); handleWin32Error (hwndDlg, SRC_POS); return 1; } - finally_do_arg (vector <byte> *, &keyfileData, { burn (&finally_arg->front(), finally_arg->size()); }); + finally_do_arg (vector <uint8> *, &keyfileData, { burn (&finally_arg->front(), finally_arg->size()); }); if (!SaveBufferToFile ((char *) &keyfileData.front(), keyfilePath, (DWORD) keyfileData.size(), FALSE, FALSE)) throw SystemException (SRC_POS); } @@ -12999,11 +13145,11 @@ BOOL IsFileOnReadOnlyFilesystem (const wchar_t *path) void CheckFilesystem (HWND hwndDlg, int driveNo, BOOL fixErrors) { wchar_t msg[1024], param[1024], cmdPath[MAX_PATH]; - wchar_t driveRoot[] = { L'A' + (wchar_t) driveNo, L':', 0 }; + wchar_t driveRoot[] = { (wchar_t) (L'A' + driveNo), L':', 0 }; if (fixErrors && AskWarnYesNo ("FILESYS_REPAIR_CONFIRM_BACKUP", hwndDlg) == IDNO) return; StringCbPrintfW (msg, sizeof(msg), GetString (fixErrors ? "REPAIRING_FS" : "CHECKING_FS"), driveRoot); @@ -13017,11 +13163,11 @@ void CheckFilesystem (HWND hwndDlg, int driveNo, BOOL fixErrors) StringCbCopyW(cmdPath, sizeof(cmdPath), L"C:\\Windows\\System32\\cmd.exe"); ShellExecuteW (NULL, (!IsAdmin() && IsUacSupported()) ? L"runas" : L"open", cmdPath, param, NULL, SW_SHOW); } -BOOL BufferContainsPattern (const byte *buffer, size_t bufferSize, const byte *pattern, size_t patternSize) +BOOL BufferContainsPattern (const uint8 *buffer, size_t bufferSize, const uint8 *pattern, size_t patternSize) { if (bufferSize < patternSize) return FALSE; bufferSize -= patternSize; @@ -13034,18 +13180,18 @@ BOOL BufferContainsPattern (const byte *buffer, size_t bufferSize, const byte *p return FALSE; } -BOOL BufferContainsString (const byte *buffer, size_t bufferSize, const char *str) +BOOL BufferContainsString (const uint8 *buffer, size_t bufferSize, const char *str) { - return BufferContainsPattern (buffer, bufferSize, (const byte*) str, strlen (str)); + return BufferContainsPattern (buffer, bufferSize, (const uint8*) str, strlen (str)); } -BOOL BufferContainsWideString (const byte *buffer, size_t bufferSize, const wchar_t *str) +BOOL BufferContainsWideString (const uint8 *buffer, size_t bufferSize, const wchar_t *str) { - return BufferContainsPattern (buffer, bufferSize, (const byte*) str, 2 * wcslen (str)); + return BufferContainsPattern (buffer, bufferSize, (const uint8*) str, 2 * wcslen (str)); } #ifndef SETUP @@ -13245,22 +13391,22 @@ BOOL IsWindowsIsoBurnerAvailable () BOOL LaunchWindowsIsoBurner (HWND hwnd, const wchar_t *isoPath) { wchar_t path[MAX_PATH*2] = { 0 }; - int r; + INT_PTR r; if (SUCCEEDED(SHGetFolderPath (NULL, CSIDL_SYSTEM, NULL, 0, path))) StringCbCatW (path, MAX_PATH*2, L"\\" ISO_BURNER_TOOL); else StringCbCopyW (path, MAX_PATH*2, L"C:\\Windows\\System32\\" ISO_BURNER_TOOL); - r = (int) ShellExecute (hwnd, L"open", path, (wstring (L"\"") + isoPath + L"\"").c_str(), NULL, SW_SHOWNORMAL); + r = (INT_PTR) ShellExecute (hwnd, L"open", path, (wstring (L"\"") + isoPath + L"\"").c_str(), NULL, SW_SHOWNORMAL); if (r <= 32) { - SetLastError (r); + SetLastError ((DWORD) r); handleWin32Error (hwnd, SRC_POS); return FALSE; } @@ -13501,11 +13647,11 @@ void RegisterDriverInf (bool registerFilter, const string& filter, const string& string infTxt = "[veracrypt]\r\n" + string (registerFilter ? "Add" : "Del") + "Reg=veracrypt_reg\r\n\r\n" "[veracrypt_reg]\r\n" "HKR,,\"" + filterReg + "\",0x0001" + string (registerFilter ? "0008" : "8002") + ",\"" + filter + "\"\r\n"; - infFile.Write ((byte *) infTxt.c_str(), (DWORD) infTxt.size()); + infFile.Write ((uint8 *) infTxt.c_str(), (DWORD) infTxt.size()); infFile.Close(); HINF hInf = SetupOpenInfFileW (infFileName.c_str(), NULL, INF_STYLE_OLDNT | INF_STYLE_WIN4, NULL); throw_sys_if (hInf == INVALID_HANDLE_VALUE); finally_do_arg (HINF, hInf, { SetupCloseInfFile (finally_arg); }); @@ -13576,11 +13722,11 @@ void AllowMessageInUIPI (UINT msg) { /* ChangeWindowMessageFilter is used to enable some messages bypasss UIPI (User Interface Privilege Isolation) */ ChangeWindowMessageFilter (msg, MSGFLT_ADD); } -BOOL IsRepeatedByteArray (byte value, const byte* buffer, size_t bufferSize) +BOOL IsRepeatedByteArray (uint8 value, const uint8* buffer, size_t bufferSize) { if (buffer && bufferSize) { size_t i; for (i = 0; i < bufferSize; i++) @@ -13600,11 +13746,11 @@ BOOL TranslateVolumeID (HWND hwndDlg, wchar_t* pathValue, size_t cchPathValue) { BOOL bRet = TRUE; size_t pathLen = pathValue? wcslen (pathValue) : 0; if ((pathLen >= 3) && (_wcsnicmp (pathValue, L"ID:", 3) == 0)) { - std::vector<byte> arr; + std::vector<uint8> arr; if ( (pathLen == (3 + 2*VOLUME_ID_SIZE)) && HexWideStringToArray (pathValue + 3, arr) && (arr.size() == VOLUME_ID_SIZE) ) { @@ -13686,15 +13832,15 @@ BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable) { if (LookupPrivilegeValue(NULL, szPrivilegeName, &tkp.Privileges[0].Luid)) { tkp.PrivilegeCount = 1; - tkp.Privileges[0].Attributes = bEnable? SE_PRIVILEGE_ENABLED : SE_PRIVILEGE_REMOVED; + tkp.Privileges[0].Attributes = bEnable? SE_PRIVILEGE_ENABLED : 0; bRet = AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, NULL); dwLastError = GetLastError (); - if ( ERROR_SUCCESS != dwLastError) + if (bRet && (ERROR_NOT_ALL_ASSIGNED == dwLastError)) { bRet = FALSE; } } else @@ -13901,24 +14047,37 @@ static unsigned int __stdcall SecureDesktopThread( LPVOID lpThreadParameter ) } StringCbCopy(SecureDesktopName, sizeof (SecureDesktopName), pParam->szDesktopName); pParam->hDesk = hSecureDesk; - // wait for SwitchDesktop to succeed before using it for current thread - while (true) + bNewDesktopSet = SetThreadDesktop (hSecureDesk); + + if (bNewDesktopSet) { - if (SwitchDesktop (hSecureDesk)) + // call ImmDisableIME from imm32.dll to disable IME since it can create issue with secure desktop + // cf: https://keepass.info/help/kb/sec_desk.html#ime + HMODULE hImmDll = LoadLibraryEx (L"imm32.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); + if (hImmDll) { - break; + typedef BOOL (WINAPI *ImmDisableIME_t)(DWORD); + ImmDisableIME_t ImmDisableIME = (ImmDisableIME_t) GetProcAddress (hImmDll, "ImmDisableIME"); + if (ImmDisableIME) + { + ImmDisableIME (0); + } } - Sleep (SECUREDESKTOP_MONOTIR_PERIOD); - } - bNewDesktopSet = SetThreadDesktop (hSecureDesk); + // wait for SwitchDesktop to succeed before using it for current thread + while (true) + { + if (SwitchDesktop (hSecureDesk)) + { + break; + } + Sleep (SECUREDESKTOP_MONOTIR_PERIOD); + } - if (bNewDesktopSet) - { // create the thread that will ensure that VeraCrypt secure desktop has always user input // this is done only if the stop event is created successfully HANDLE hStopEvent = CreateEvent(NULL, TRUE, FALSE, NULL); if (hStopEvent) { @@ -13944,10 +14103,16 @@ static unsigned int __stdcall SecureDesktopThread( LPVOID lpThreadParameter ) { CloseHandle (hStopEvent); } pParam->bDlgDisplayed = TRUE; + + // free imm32.dll handle + if (hImmDll) + { + FreeLibrary (hImmDll); + } } else { pParam->bDlgDisplayed = FALSE; } @@ -14064,23 +14229,24 @@ INT_PTR SecureDesktopDialogBoxParam( if (param.bDlgDisplayed) { // dialog box was indeed displayed in Secure Desktop retValue = param.retValue; bSuccess = TRUE; + + // switch back to the original desktop + while (!SwitchDesktop (hOriginalDesk)) + { + Sleep (SECUREDESKTOP_MONOTIR_PERIOD); + } + + SetThreadDesktop (hOriginalDesk); } - } - if (param.hDesk) - { - while (!SwitchDesktop (hOriginalDesk)) + if (param.hDesk) { - Sleep (SECUREDESKTOP_MONOTIR_PERIOD); + CloseDesktop (param.hDesk); } - - SetThreadDesktop (hOriginalDesk); - - CloseDesktop (param.hDesk); } // get the new list of ctfmon.exe processes in order to find the ID of the // ctfmon.exe instance that corresponds to the desktop we create so that // we can kill it, otherwise it would remain running @@ -14160,21 +14326,18 @@ void GetInstallationPath (HWND hwndDlg, wchar_t* szInstallPath, DWORD cchSize, B // Default "Program Files" path. SHGetSpecialFolderLocation (hwndDlg, CSIDL_PROGRAM_FILES, &itemList); SHGetPathFromIDList (itemList, path); - if (Is64BitOs()) + // Use a unified default installation path (registry redirection of %ProgramFiles% does not work if the installation path is user-selectable) + wstring s = path; + size_t p = s.find (L" (x86)"); + if (p != wstring::npos) { - // Use a unified default installation path (registry redirection of %ProgramFiles% does not work if the installation path is user-selectable) - wstring s = path; - size_t p = s.find (L" (x86)"); - if (p != wstring::npos) - { - s = s.substr (0, p); - if (_waccess (s.c_str(), 0) != -1) - StringCbCopyW (path, sizeof (path), s.c_str()); - } + s = s.substr (0, p); + if (_waccess (s.c_str(), 0) != -1) + StringCbCopyW (path, sizeof (path), s.c_str()); } StringCbCatW (path, sizeof(path), L"\\VeraCrypt\\"); StringCbCopyW (szInstallPath, cchSize, path); } @@ -14234,22 +14397,26 @@ BOOL BufferHasPattern (const unsigned char* buffer, size_t bufferLen, const void } return bRet; } -/* Implementation borrowed from KeePassXC source code (https://github.com/keepassxreboot/keepassxc/blob/release/2.4.0/src/core/Bootstrap.cpp#L150) +/* Implementation borrowed from KeePassXC source code (https://github.com/keepassxreboot/keepassxc/blob/2.7.8/src/core/Bootstrap.cpp#L121) * * Reduce current user acess rights for this process to the minimum in order to forbid non-admin users from reading the process memory. + * Restrict access to changing DACL's after the process is started. This prevents the creator of veracrypt process from simply adding + * the permission to read memory back to the DACL list. */ BOOL ActivateMemoryProtection() { BOOL bSuccess = FALSE; // Process token and user HANDLE hToken = NULL; PTOKEN_USER pTokenUser = NULL; DWORD cbBufferSize = 0; + PSID pOwnerRightsSid = NULL; + DWORD pOwnerRightsSidSize = SECURITY_MAX_SID_SIZE; // Access control list PACL pACL = NULL; DWORD cbACL = 0; @@ -14286,12 +14453,23 @@ BOOL ActivateMemoryProtection() if (!IsValidSid(pTokenUser->User.Sid)) { goto Cleanup; } + // Retrieve CreaterOwnerRights SID + pOwnerRightsSid = (PSID) HeapAlloc(GetProcessHeap(), 0, pOwnerRightsSidSize); + if (pOwnerRightsSid == NULL) { + goto Cleanup; + } + + if (!CreateWellKnownSid(WinCreatorOwnerRightsSid, NULL, pOwnerRightsSid, &pOwnerRightsSidSize)) { + goto Cleanup; + } + // Calculate the amount of memory that must be allocated for the DACL - cbACL = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(pTokenUser->User.Sid); + cbACL = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(pTokenUser->User.Sid) + + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(pOwnerRightsSid); // Create and initialize an ACL pACL = (PACL) HeapAlloc(GetProcessHeap(), 0, cbACL); if (pACL == NULL) { goto Cleanup; @@ -14309,10 +14487,21 @@ BOOL ActivateMemoryProtection() pTokenUser->User.Sid // pointer to the trustee's SID )) { goto Cleanup; } + // Explicitly set "Process Owner" rights to Read Only. The default is Full Control. + if (!AddAccessAllowedAce( + pACL, + ACL_REVISION, + READ_CONTROL, + pOwnerRightsSid + )) { + goto Cleanup; + } + + // Set discretionary access control list bSuccess = (ERROR_SUCCESS == SetSecurityInfo(GetCurrentProcess(), // object handle SE_KERNEL_OBJECT, // type of object DACL_SECURITY_INFORMATION, // change only the objects DACL NULL, @@ -14327,10 +14516,13 @@ BOOL ActivateMemoryProtection() Cleanup: if (pACL != NULL) { HeapFree(GetProcessHeap(), 0, pACL); } + if (pOwnerRightsSid != NULL) { + HeapFree(GetProcessHeap(), 0, pOwnerRightsSid); + } if (pTokenUser != NULL) { HeapFree(GetProcessHeap(), 0, pTokenUser); } if (hToken != NULL) { CloseHandle(hToken); @@ -14714,20 +14906,20 @@ void SafeOpenURL (LPCWSTR szUrl) { ShellExecuteW (NULL, L"open", szUrl, NULL, NULL, SW_SHOWNORMAL); } } -#if !defined(SETUP) && defined(_WIN64) +#if !defined(SETUP) #define RtlGenRandom SystemFunction036 extern "C" BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength); void GetAppRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) { LARGE_INTEGER iSeed; SYSTEMTIME sysTime; - byte digest[WHIRLPOOL_DIGESTSIZE]; + uint8 digest[WHIRLPOOL_DIGESTSIZE]; WHIRLPOOL_CTX tctx; size_t count; while (cbRandSeed) { @@ -14758,18 +14950,20 @@ void GetAppRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) WHIRLPOOL_add (digest, (unsigned int) rndLen, &tctx); jent_entropy_collector_free (ec); } } +#ifndef _M_ARM64 // use RDSEED or RDRAND from CPU as source of entropy if enabled if ( IsCpuRngEnabled() && ( (HasRDSEED() && RDSEED_getBytes (digest, sizeof (digest))) || (HasRDRAND() && RDRAND_getBytes (digest, sizeof (digest))) )) { WHIRLPOOL_add (digest, sizeof(digest), &tctx); } +#endif WHIRLPOOL_finalize (&tctx, digest); count = VC_MIN (cbRandSeed, sizeof (digest)); // copy digest value to seed buffer @@ -15155,11 +15349,11 @@ void PasswordEditDropTarget::GotLeave(void) // GotEnter // ************************************************************ DWORD PasswordEditDropTarget::GotEnter(void) { TCHAR szClassName[64]; - DWORD dwStyles; + DWORD_PTR dwStyles; int maxLen; HWND hChild = WindowFromPoint (m_DropPoint); // check that we are on password edit control (we use maximum length to correctly identify password fields since they don't always have ES_PASSWORD style (if the the user checked show password) if (hChild && GetClassName (hChild, szClassName, ARRAYSIZE (szClassName)) && (0 == _tcsicmp (szClassName, _T("EDIT"))) && (dwStyles = GetWindowLongPtr (hChild, GWL_STYLE)) && !(dwStyles & ES_NUMBER) @@ -15181,11 +15375,11 @@ void PasswordEditDropTarget::GotDrop(CLIPFORMAT format) { // value contains the material itself if(m_Data) { TCHAR szClassName[64]; - DWORD dwStyles; + DWORD_PTR dwStyles; int maxLen; HWND hChild = WindowFromPoint (m_DropPoint); if (hChild && GetClassName (hChild, szClassName, ARRAYSIZE (szClassName)) && (0 == _tcsicmp (szClassName, _T("EDIT"))) && (dwStyles = GetWindowLongPtr (hChild, GWL_STYLE)) && !(dwStyles & ES_NUMBER) && (maxLen = (int) SendMessage (hChild, EM_GETLIMITTEXT, 0, 0)) && (maxLen == MAX_PASSWORD || maxLen == MAX_LEGACY_PASSWORD) @@ -15669,6 +15863,194 @@ DWORD FastResizeFile (const wchar_t* filePath, __int64 fileSize) } } return dwRet; } -#endif // VC_COMREG
\ No newline at end of file +#endif // VC_COMREG + +#if defined(SETUP) && !defined (PORTABLE) + +// Helper function to save the current state of the required privileges +BOOL SaveCurrentPrivilegeState(PPRIVILEGE_STATE state) { + if (!state) return FALSE; + + state->takeOwnership = IsPrivilegeEnabled(SE_TAKE_OWNERSHIP_NAME); + state->backup = IsPrivilegeEnabled(SE_BACKUP_NAME); + state->restore = IsPrivilegeEnabled(SE_RESTORE_NAME); + + return TRUE; +} + +// Helper function to restore the saved state of the required privileges +BOOL RestorePrivilegeState(const PPRIVILEGE_STATE state) { + if (!state) return FALSE; + + BOOL result = TRUE; + result &= SetPrivilege(SE_TAKE_OWNERSHIP_NAME, state->takeOwnership); + result &= SetPrivilege(SE_BACKUP_NAME, state->backup); + result &= SetPrivilege(SE_RESTORE_NAME, state->restore); + + return result; +} + +// Helper function to enable required privileges for file operations +BOOL EnableRequiredSetupPrivileges(PPRIVILEGE_STATE currentState) +{ + BOOL result = TRUE; + + // save the current state of the required privileges + ZeroMemory(currentState, sizeof(PRIVILEGE_STATE)); + SaveCurrentPrivilegeState(currentState); + + // Enable required privileges using the existing SetPrivilege function + result &= SetPrivilege(SE_TAKE_OWNERSHIP_NAME, TRUE); + result &= SetPrivilege(SE_BACKUP_NAME, TRUE); + result &= SetPrivilege(SE_RESTORE_NAME, TRUE); + + return result; +} + +// Helper function to backup security information +BOOL BackupSecurityInfo(const wchar_t* filePath, PSECURITY_INFO_BACKUP pBackup) +{ + BOOL result = FALSE; + DWORD dwRes; + + ZeroMemory(pBackup, sizeof(SECURITY_INFO_BACKUP)); + + // Get the security descriptor + dwRes = GetNamedSecurityInfoW( + (LPWSTR)filePath, + SE_FILE_OBJECT, + OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | + DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION, + &pBackup->pOrigOwner, + &pBackup->pOrigGroup, + &pBackup->pOrigDacl, + &pBackup->pOrigSacl, + &pBackup->pOrigSD); + + if (dwRes == ERROR_SUCCESS) + { + // The individual pointers (pOrigOwner, etc.) are now valid + // and point to the copied data + result = TRUE; + } + + return result; +} + +// Helper function to restore security information +BOOL RestoreSecurityInfo(const wchar_t* filePath, PSECURITY_INFO_BACKUP pBackup) +{ + DWORD dwRes; + SECURITY_INFORMATION secInfo = 0; + + if (pBackup->pOrigOwner) + secInfo |= OWNER_SECURITY_INFORMATION; + if (pBackup->pOrigGroup) + secInfo |= GROUP_SECURITY_INFORMATION; + if (pBackup->pOrigDacl) + secInfo |= DACL_SECURITY_INFORMATION; + if (pBackup->pOrigSacl) + secInfo |= SACL_SECURITY_INFORMATION; + + if (secInfo == 0) + return TRUE; // Nothing to restore + + dwRes = SetNamedSecurityInfoW( + (LPWSTR)filePath, + SE_FILE_OBJECT, + secInfo, + pBackup->pOrigOwner, + pBackup->pOrigGroup, + pBackup->pOrigDacl, + pBackup->pOrigSacl); + + return (dwRes == ERROR_SUCCESS); +} + +// Helper function to free security backup +void FreeSecurityBackup(PSECURITY_INFO_BACKUP pBackup) +{ + if (pBackup->pOrigSD) + LocalFree(pBackup->pOrigSD); + ZeroMemory(pBackup, sizeof(SECURITY_INFO_BACKUP)); +} + +// Helper function to take ownership and modify file permissions +BOOL ModifyFileSecurityPermissions(const wchar_t* filePath, PSECURITY_INFO_BACKUP pBackup) +{ + BOOL result = FALSE; + PSID pAdminSID = NULL; + PACL pNewDACL = NULL; + BOOL bBackupDone = FALSE; + + // Get Administrator SID + SID_IDENTIFIER_AUTHORITY SIDAuthNT = SECURITY_NT_AUTHORITY; + if (!AllocateAndInitializeSid(&SIDAuthNT, 2, + SECURITY_BUILTIN_DOMAIN_RID, + DOMAIN_ALIAS_RID_ADMINS, + 0, 0, 0, 0, 0, 0, + &pAdminSID)) + { + goto cleanup; + } + + // Backup original security info + if (!BackupSecurityInfo(filePath, pBackup)) + goto cleanup; + + bBackupDone = TRUE; + + // Take ownership + DWORD dwRes = SetNamedSecurityInfoW( + (LPWSTR)filePath, + SE_FILE_OBJECT, + OWNER_SECURITY_INFORMATION, + pAdminSID, + NULL, + NULL, + NULL); + + if (dwRes != ERROR_SUCCESS) + goto cleanup; + + // Modify DACL + EXPLICIT_ACCESS ea; + ZeroMemory(&ea, sizeof(EXPLICIT_ACCESS)); + ea.grfAccessPermissions = GENERIC_ALL; + ea.grfAccessMode = SET_ACCESS; + ea.grfInheritance = NO_INHERITANCE; + ea.Trustee.TrusteeForm = TRUSTEE_IS_SID; + ea.Trustee.TrusteeType = TRUSTEE_IS_GROUP; + ea.Trustee.ptstrName = (LPTSTR)pAdminSID; + + dwRes = SetEntriesInAcl(1, &ea, NULL, &pNewDACL); + if (dwRes != ERROR_SUCCESS) + goto cleanup; + + // Apply new DACL + dwRes = SetNamedSecurityInfoW( + (LPWSTR)filePath, + SE_FILE_OBJECT, + DACL_SECURITY_INFORMATION, + NULL, + NULL, + pNewDACL, + NULL); + + result = (dwRes == ERROR_SUCCESS); + +cleanup: + if (!result && bBackupDone) + { + FreeSecurityBackup(pBackup); + } + if (pNewDACL) + LocalFree(pNewDACL); + if (pAdminSID) + FreeSid(pAdminSID); + + return result; +} +#endif diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index 750b4dc7..aaaad97e 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_DLGCODE @@ -284,10 +284,13 @@ typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)( #define YES_NO MB_YESNO #define ISO_BURNER_TOOL L"isoburn.exe" #define PRINT_TOOL L"notepad.exe" +#define WIN_10_1607_BUILD 14393 // Windows 10 version 1607 corresponds to build 14393 +#define WIN_10_1809_BUILD 17763 // Windows 10 version 1809 corresponds to build 17763 + void InitGlobalLocks (); void FinalizeGlobalLocks (); void cleanup ( void ); void LowerCaseCopy ( wchar_t *lpszDest , const wchar_t *lpszSource ); void UpperCaseCopy ( wchar_t *lpszDest , size_t cbDest, const wchar_t *lpszSource ); @@ -498,10 +501,11 @@ void RestoreDefaultKeyFilesParam (void); BOOL LoadDefaultKeyFilesParam (void); void Debug (char *format, ...); void DebugMsgBox (char *format, ...); BOOL IsOSAtLeast (OSVersionEnum reqMinOS); BOOL IsOSVersionAtLeast (OSVersionEnum reqMinOS, int reqMinServicePack); +BOOL IsWin10BuildAtLeast(int minBuild); BOOL IsSupportedOS (); BOOL Is64BitOs (); BOOL IsARM(); BOOL IsServerOS (); BOOL IsHiddenOSRunning (void); @@ -538,23 +542,23 @@ void MakeControlsContiguous(HWND hwndDlg, UINT ctrl1ID, UINT ctrl2ID); BOOL GetDriveLabel (int driveNo, wchar_t *label, int labelSize); BOOL GetSysDevicePaths (HWND hwndDlg); BOOL DoDriverInstall (HWND hwndDlg); int OpenVolume (OpenVolumeContext *context, const wchar_t *volumePath, Password *password, int pkcs5_prf, int pim, BOOL write, BOOL preserveTimestamps, BOOL useBackupHeader); void CloseVolume (OpenVolumeContext *context); -int ReEncryptVolumeHeader (HWND hwndDlg, char *buffer, BOOL bBoot, CRYPTO_INFO *cryptoInfo, Password *password, int pim, BOOL wipeMode); +int ReEncryptVolumeHeader (HWND hwndDlg, unsigned char *buffer, BOOL bBoot, CRYPTO_INFO *cryptoInfo, Password *password, int pim, BOOL wipeMode); BOOL IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly); BOOL IsPagingFileWildcardActive (); BOOL DisablePagingFile (); BOOL CALLBACK SecurityTokenPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK SecurityTokenKeyfileDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); BOOL InitSecurityTokenLibrary (HWND hwndDlg); BOOL FileHasReadOnlyAttribute (const wchar_t *path); BOOL IsFileOnReadOnlyFilesystem (const wchar_t *path); void CheckFilesystem (HWND hwndDlg, int driveNo, BOOL fixErrors); -BOOL BufferContainsPattern (const byte *buffer, size_t bufferSize, const byte *pattern, size_t patternSize); -BOOL BufferContainsString (const byte *buffer, size_t bufferSize, const char *str); -BOOL BufferContainsWideString (const byte *buffer, size_t bufferSize, const wchar_t *str); +BOOL BufferContainsPattern (const uint8 *buffer, size_t bufferSize, const uint8 *pattern, size_t patternSize); +BOOL BufferContainsString (const uint8 *buffer, size_t bufferSize, const char *str); +BOOL BufferContainsWideString (const uint8 *buffer, size_t bufferSize, const wchar_t *str); int AskNonSysInPlaceEncryptionResume (HWND hwndDlg, BOOL* pbDecrypt); BOOL RemoveDeviceWriteProtection (HWND hwndDlg, wchar_t *devicePath); void EnableElevatedCursorChange (HWND parent); BOOL DisableFileCompression (HANDLE file); BOOL VolumePathExists (const wchar_t *volumePath); @@ -571,11 +575,11 @@ LSTATUS DeleteRegistryKey (HKEY, LPCTSTR); HIMAGELIST CreateImageList(int cx, int cy, UINT flags, int cInitial, int cGrow); int AddBitmapToImageList(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask); HRESULT VCStrDupW(LPCWSTR psz, LPWSTR *ppwsz); void ProcessEntropyEstimate (HWND hProgress, DWORD* pdwInitialValue, DWORD dwCounter, DWORD dwMaxLevel, DWORD* pdwEntropy); void AllowMessageInUIPI (UINT msg); -BOOL IsRepeatedByteArray (byte value, const byte* buffer, size_t bufferSize); +BOOL IsRepeatedByteArray (uint8 value, const uint8* buffer, size_t bufferSize); BOOL TranslateVolumeID (HWND hwndDlg, wchar_t* pathValue, size_t cchPathValue); BOOL CopyTextToClipboard (const wchar_t* txtValue); BOOL LaunchElevatedProcess (HWND hwndDlg, const wchar_t* szModPath, const wchar_t* args); BOOL GetFreeDriveLetter(WCHAR* pCh); BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable); @@ -592,14 +596,36 @@ BOOL ActivateMemoryProtection(); void SafeOpenURL (LPCWSTR szUrl); BitLockerEncryptionStatus GetBitLockerEncryptionStatus(WCHAR driveLetter); BOOL IsTestSigningModeEnabled (); DWORD SendServiceNotification (DWORD dwNotificationCmd); DWORD FastResizeFile (const wchar_t* filePath, __int64 fileSize); -#ifdef _WIN64 +#if !defined(SETUP) void GetAppRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed); #endif BOOL IsInternetConnected(); +#if defined(SETUP) && !defined (PORTABLE) +typedef struct _SECURITY_INFO_BACKUP { + PSID pOrigOwner; + PSID pOrigGroup; + PACL pOrigDacl; + PACL pOrigSacl; + PSECURITY_DESCRIPTOR pOrigSD; +} SECURITY_INFO_BACKUP, * PSECURITY_INFO_BACKUP; + +typedef struct _PRIVILEGE_STATE { + BOOL takeOwnership; + BOOL backup; + BOOL restore; +} PRIVILEGE_STATE, * PPRIVILEGE_STATE; + +BOOL RestoreSecurityInfo(const wchar_t* filePath, PSECURITY_INFO_BACKUP pBackup); +void FreeSecurityBackup(PSECURITY_INFO_BACKUP pBackup); +BOOL SaveCurrentPrivilegeState(PPRIVILEGE_STATE state); +BOOL RestorePrivilegeState(const PPRIVILEGE_STATE state); +BOOL EnableRequiredSetupPrivileges(PPRIVILEGE_STATE currentState); +BOOL ModifyFileSecurityPermissions(const wchar_t* filePath, PSECURITY_INFO_BACKUP pBackup); +#endif #ifdef __cplusplus } #include <vector> #include <string> @@ -712,11 +738,11 @@ std::wstring VolumeGuidPathToDevicePath (std::wstring volumeGuidPath); std::wstring HarddiskVolumePathToPartitionPath (const std::wstring &harddiskVolumePath); std::wstring FindLatestFileOrDirectory (const std::wstring &directory, const wchar_t *namePattern, bool findDirectory, bool findFile); std::wstring GetUserFriendlyVersionString (int version); std::wstring IntToWideString (int val); std::wstring ArrayToHexWideString (const unsigned char* pbData, int cbData); -bool HexWideStringToArray (const wchar_t* hexStr, std::vector<byte>& arr); +bool HexWideStringToArray (const wchar_t* hexStr, std::vector<uint8>& arr); std::wstring FindDeviceByVolumeID (const BYTE volumeID [VOLUME_ID_SIZE], BOOL bFromService); void RegisterDriverInf (bool registerFilter, const std::string& filter, const std::string& filterReg, HWND ParentWindow, HKEY regKey); std::wstring GetTempPathString (); void CorrectFileName (std::wstring& fileName); inline std::wstring AppendSrcPos (const wchar_t* msg, const char* srcPos) diff --git a/src/Common/EMVCard.cpp b/src/Common/EMVCard.cpp index e96422b1..59dc3cf0 100644 --- a/src/Common/EMVCard.cpp +++ b/src/Common/EMVCard.cpp @@ -38,23 +38,23 @@ namespace VeraCrypt return result; } #endif - map<EMVCardType, vector<byte>> InitializeSupportedAIDs() + map<EMVCardType, vector<uint8>> InitializeSupportedAIDs() { - map<EMVCardType, vector<byte>> supportedAIDs; - supportedAIDs.insert(std::make_pair(EMVCardType::AMEX, vector<byte>(EMVCard::AMEX_AID, EMVCard::AMEX_AID + sizeof(EMVCard::AMEX_AID)))); - supportedAIDs.insert(std::make_pair(EMVCardType::MASTERCARD, vector<byte>(EMVCard::MASTERCARD_AID, EMVCard::MASTERCARD_AID + sizeof(EMVCard::MASTERCARD_AID)))); - supportedAIDs.insert(std::make_pair(EMVCardType::VISA, vector<byte>(EMVCard::VISA_AID, EMVCard::VISA_AID + sizeof(EMVCard::VISA_AID)))); + map<EMVCardType, vector<uint8>> supportedAIDs; + supportedAIDs.insert(std::make_pair(EMVCardType::AMEX, vector<uint8>(EMVCard::AMEX_AID, EMVCard::AMEX_AID + sizeof(EMVCard::AMEX_AID)))); + supportedAIDs.insert(std::make_pair(EMVCardType::MASTERCARD, vector<uint8>(EMVCard::MASTERCARD_AID, EMVCard::MASTERCARD_AID + sizeof(EMVCard::MASTERCARD_AID)))); + supportedAIDs.insert(std::make_pair(EMVCardType::VISA, vector<uint8>(EMVCard::VISA_AID, EMVCard::VISA_AID + sizeof(EMVCard::VISA_AID)))); return supportedAIDs; } - const byte EMVCard::AMEX_AID[7] = {0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x10}; - const byte EMVCard::MASTERCARD_AID[7] = {0xA0, 0x00, 0x00, 0x00, 0x04, 0x10, 0x10}; - const byte EMVCard::VISA_AID[7] = {0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10}; - const map<EMVCardType, vector<byte>> EMVCard::SUPPORTED_AIDS = InitializeSupportedAIDs(); + const uint8 EMVCard::AMEX_AID[7] = {0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x10}; + const uint8 EMVCard::MASTERCARD_AID[7] = {0xA0, 0x00, 0x00, 0x00, 0x04, 0x10, 0x10}; + const uint8 EMVCard::VISA_AID[7] = {0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10}; + const map<EMVCardType, vector<uint8>> EMVCard::SUPPORTED_AIDS = InitializeSupportedAIDs(); EMVCard::EMVCard() : SCard(), m_lastPANDigits(L"") { } @@ -128,30 +128,30 @@ namespace VeraCrypt m_issuerCert.clear(); m_cplcData.clear(); m_lastPANDigits.clear(); } - vector<byte> EMVCard::GetCardAID(bool forceContactless) + vector<uint8> EMVCard::GetCardAID(bool forceContactless) { - vector<vector<byte>> supportedAIDs; - vector<byte> supportedAIDsPriorities; - vector<pair<byte, vector<byte>>> supportedAIDsSorted; + vector<vector<uint8>> supportedAIDs; + vector<uint8> supportedAIDsPriorities; + vector<pair<uint8, vector<uint8>>> supportedAIDsSorted; bool hasBeenReset = false; CommandAPDU command; ResponseAPDU response; - vector<byte> responseData; + vector<uint8> responseData; shared_ptr<TLVNode> rootNode; shared_ptr<TLVNode> fciNode; shared_ptr<TLVNode> dfNameNode; shared_ptr<TLVNode> sfiNode; shared_ptr<TLVNode> fciIssuerNode; shared_ptr<TLVNode> fciIssuerDiscretionaryDataNode; shared_ptr<TLVNode> templateNode; vector<shared_ptr<TLVNode>> pseDirectoryNodes; unsigned char sfi; bool usingContactless = false; - vector<byte> tokenAID; + vector<uint8> tokenAID; if (m_aid.size()) return m_aid; if (m_reader) @@ -239,11 +239,11 @@ namespace VeraCrypt sfiNode = TLVParser::TLV_Find(fciIssuerNode, EMV_SFI_TAG); if (sfiNode && sfiNode->Value->size() == 1) { sfi = sfiNode->Value->at(0); - byte rec = 1; + uint8 rec = 1; do { command = CommandAPDU(CLA_ISO7816, INS_READ_RECORD, rec++, (sfi << 3) | 4, SCardReader::shortAPDUMaxTransSize); m_reader->ApduProcessData(command, response); if (response.getSW() == SW_NO_ERROR && response.getData().size() > 0) @@ -314,24 +314,24 @@ namespace VeraCrypt } return tokenAID; } - void EMVCard::GetCardContent(vector<byte>& iccCert, vector<byte>& issuerCert, vector<byte>& cplcData) + void EMVCard::GetCardContent(vector<uint8>& iccCert, vector<uint8>& issuerCert, vector<uint8>& cplcData) { bool hasBeenReset = false; bool aidSelected = false; bool iccFound = false; bool issuerFound = false; bool cplcFound = false; - vector<byte> emvCardAid; + vector<uint8> emvCardAid; shared_ptr<TLVNode> rootNode; shared_ptr<TLVNode> iccPublicKeyCertNode; shared_ptr<TLVNode> issuerPublicKeyCertNode; CommandAPDU command; ResponseAPDU response; - vector<byte> responseData; + vector<uint8> responseData; iccCert.clear(); issuerCert.clear(); cplcData.clear(); @@ -372,13 +372,13 @@ namespace VeraCrypt { aidSelected = true; // TODO: Send GET PROCESSING OPTIONS to get the AIL and AFL, // which will then be used to get the actual start and end of sfi and rec. - for (byte sfi = 1; sfi < 32 && (!iccFound || !issuerFound); sfi++) + for (uint8 sfi = 1; sfi < 32 && (!iccFound || !issuerFound); sfi++) { - for (byte rec = 1; rec < 17 && (!iccFound || !issuerFound); rec++) + for (uint8 rec = 1; rec < 17 && (!iccFound || !issuerFound); rec++) { command = CommandAPDU(CLA_ISO7816, INS_READ_RECORD, rec, (sfi << 3) | 4, SCardReader::shortAPDUMaxTransSize); m_reader->ApduProcessData(command, response); if (response.getSW() == SW_NO_ERROR && response.getData().size() > 0) { @@ -434,17 +434,17 @@ namespace VeraCrypt void EMVCard::GetCardPAN(wstring& lastPANDigits) { bool hasBeenReset = false; bool panFound = false; bool aidSelected = false; - vector<byte> EMVCardAid; - vector<byte> panData; + vector<uint8> EMVCardAid; + vector<uint8> panData; shared_ptr<TLVNode> rootNode; shared_ptr<TLVNode> panNode; CommandAPDU command; ResponseAPDU response; - vector<byte> responseData; + vector<uint8> responseData; lastPANDigits = L""; if (m_lastPANDigits != L"") { @@ -472,13 +472,13 @@ namespace VeraCrypt { aidSelected = true; // TODO: Send GET PROCESSING OPTIONS to get the AIL and AFL, // which will then be used to get the actual start and end of sfi and rec. - for (byte sfi = 1; sfi < 32 && !panFound; sfi++) + for (uint8 sfi = 1; sfi < 32 && !panFound; sfi++) { - for (byte rec = 1; rec < 17 && !panFound; rec++) + for (uint8 rec = 1; rec < 17 && !panFound; rec++) { command = CommandAPDU(CLA_ISO7816, INS_READ_RECORD, rec, (sfi << 3) | 4, SCardReader::shortAPDUMaxTransSize); m_reader->ApduProcessData(command, response); if (response.getSW() == SW_NO_ERROR && response.getData().size() > 0) { @@ -496,11 +496,11 @@ namespace VeraCrypt panNode = TLVParser::TLV_Find(rootNode, EMV_PAN_TAG); if (panNode && panNode->Value->size() >= 8) { panFound = true; panData = *panNode->Value.get(); - panData = vector<byte>(panData.rbegin(), panData.rbegin() + 2); // only interested in last digits + panData = vector<uint8>(panData.rbegin(), panData.rbegin() + 2); // only interested in last digits std::swap(panData[0], panData[1]); lastPANDigits = ArrayToHexWideString(panData.data(), (int) panData.size()); } } } diff --git a/src/Common/EMVCard.h b/src/Common/EMVCard.h index 116de705..70ef035f 100644 --- a/src/Common/EMVCard.h +++ b/src/Common/EMVCard.h @@ -27,26 +27,26 @@ namespace VeraCrypt // The following fields will only be empty if the card has not been read yet. // After the card has been read, and if some or all fields cannot be read, the EMVCard // object will be considered invalid and will not be included in the list of available cards // of EMVToken. - vector<byte> m_aid; - vector<vector<byte>> m_supportedAids; - vector<byte> m_iccCert; - vector<byte> m_issuerCert; - vector<byte> m_cplcData; + vector<uint8> m_aid; + vector<vector<uint8>> m_supportedAids; + vector<uint8> m_iccCert; + vector<uint8> m_issuerCert; + vector<uint8> m_cplcData; wstring m_lastPANDigits; public: // Add other AIDS // https://gist.github.com/pvieito/6224eed92c99b069f6401996c548d0e4 // https://ambimat.com/developer-resources/list-of-application-identifiers-aid/ - const static byte AMEX_AID[7]; - const static byte MASTERCARD_AID[7]; - const static byte VISA_AID[7]; - const static map<EMVCardType, vector<byte>> SUPPORTED_AIDS; + const static uint8 AMEX_AID[7]; + const static uint8 MASTERCARD_AID[7]; + const static uint8 VISA_AID[7]; + const static map<EMVCardType, vector<uint8>> SUPPORTED_AIDS; EMVCard(); EMVCard(size_t slotId); EMVCard(const EMVCard& other); EMVCard(EMVCard&& other); @@ -57,13 +57,13 @@ namespace VeraCrypt void Clear(void); // Retrieves the card's AID. // It first checks the card against a list of supported AIDs. // If that fails, it tries getting the AID from the card using PSE - vector<byte> GetCardAID(bool forceContactless = false); + vector<uint8> GetCardAID(bool forceContactless = false); - void GetCardContent(vector<byte>& iccCert, vector<byte>& issuerCert, vector<byte>& cplcData); + void GetCardContent(vector<uint8>& iccCert, vector<uint8>& issuerCert, vector<uint8>& cplcData); void GetCardPAN(wstring& lastPANDigits); }; } #endif // TC_HEADER_Common_EMVCard diff --git a/src/Common/EMVToken.cpp b/src/Common/EMVToken.cpp index 0fe3dc1f..8f89cb7e 100644 --- a/src/Common/EMVToken.cpp +++ b/src/Common/EMVToken.cpp @@ -20,11 +20,11 @@ using namespace std; namespace VeraCrypt { - void AppendData(vector<byte>& buffer, const unsigned char* pbData, size_t cbData, size_t from, size_t length, bool bEncodeLength = false) + void AppendData(vector<uint8>& buffer, const unsigned char* pbData, size_t cbData, size_t from, size_t length, bool bEncodeLength = false) { if (cbData > 0 && from <= cbData - 2 && length > 0 && length <= cbData - from) { size_t offset = (bEncodeLength ? 4 : 0); size_t orgSize = buffer.size(); @@ -72,17 +72,17 @@ namespace VeraCrypt wstringstream path; path << TC_EMV_TOKEN_KEYFILE_URL_PREFIX TC_EMV_TOKEN_KEYFILE_URL_SLOT L"/" << Token->SlotId; return path.str(); } - void EMVTokenKeyfile::GetKeyfileData(vector <byte>& keyfileData) const + void EMVTokenKeyfile::GetKeyfileData(vector <uint8>& keyfileData) const { map <unsigned long int, shared_ptr<EMVCard>>::iterator emvCardsIt; shared_ptr<EMVCard> card; - vector<byte> iccCert; - vector<byte> issuerCert; - vector<byte> cplcData; + vector<uint8> iccCert; + vector<uint8> issuerCert; + vector<uint8> cplcData; bool addNewCard = true; keyfileData.clear(); emvCardsIt = EMVToken::EMVCards.find(Token->SlotId); diff --git a/src/Common/EMVToken.h b/src/Common/EMVToken.h index a1c0a2e1..d82ea542 100644 --- a/src/Common/EMVToken.h +++ b/src/Common/EMVToken.h @@ -21,21 +21,21 @@ namespace VeraCrypt EMVTokenKeyfile(); EMVTokenKeyfile(const TokenKeyfilePath& path); virtual ~EMVTokenKeyfile() {}; virtual operator TokenKeyfilePath () const; - virtual void GetKeyfileData(vector <byte>& keyfileData) const; + virtual void GetKeyfileData(vector <uint8>& keyfileData) const; }; class EMVToken { public: static bool IsKeyfilePathValid(const wstring& emvTokenKeyfilePath); static vector<EMVTokenKeyfile> GetAvailableKeyfiles(unsigned long int* slotIdFilter = nullptr, const wstring& keyfileIdFilter = wstring()); static EMVTokenInfo GetTokenInfo(unsigned long int slotId); - friend void EMVTokenKeyfile::GetKeyfileData(vector <byte>& keyfileData) const; + friend void EMVTokenKeyfile::GetKeyfileData(vector <uint8>& keyfileData) const; static map <unsigned long int, shared_ptr<EMVCard>> EMVCards; }; } diff --git a/src/Common/EncryptionThreadPool.c b/src/Common/EncryptionThreadPool.c index 62b2cae8..5a31bb5b 100644 --- a/src/Common/EncryptionThreadPool.c +++ b/src/Common/EncryptionThreadPool.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -86,28 +86,28 @@ typedef struct EncryptionThreadPoolWorkItemStruct union { struct { PCRYPTO_INFO CryptoInfo; - byte *Data; + uint8 *Data; UINT64_STRUCT StartUnitNo; uint32 UnitCount; } Encryption; struct { TC_EVENT *CompletionEvent; LONG *CompletionFlag; - char *DerivedKey; + unsigned char *DerivedKey; int IterationCount; TC_EVENT *NoOutstandingWorkItemEvent; LONG *OutstandingWorkItemCount; - char *Password; + unsigned char *Password; int PasswordLength; int Pkcs5Prf; - char *Salt; + unsigned char *Salt; } KeyDerivation; struct { @@ -141,11 +141,10 @@ static TC_MUTEX EnqueueMutex; static TC_MUTEX DequeueMutex; static TC_EVENT WorkItemReadyEvent; static TC_EVENT WorkItemCompletedEvent; -#if defined(_WIN64) void EncryptDataUnitsCurrentThreadEx (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci) { if (IsRamEncryptionEnabled()) { CRYPTO_INFO tmpCI; @@ -174,15 +173,10 @@ void DecryptDataUnitsCurrentThreadEx (unsigned __int8 *buf, const UINT64_STRUCT } else DecryptDataUnitsCurrentThread (buf, structUnitNo, nbrUnits, ci); } -#else -#define EncryptDataUnitsCurrentThreadEx EncryptDataUnitsCurrentThread -#define DecryptDataUnitsCurrentThreadEx DecryptDataUnitsCurrentThread -#endif - static WorkItemState GetWorkItemState (EncryptionThreadPoolWorkItem *workItem) { return InterlockedExchangeAdd ((LONG *) &workItem->State, 0); } @@ -531,11 +525,11 @@ void EncryptionThreadPoolStop () ThreadPoolRunning = FALSE; } -void EncryptionThreadPoolBeginKeyDerivation (TC_EVENT *completionEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG *completionFlag, LONG *outstandingWorkItemCount, int pkcs5Prf, char *password, int passwordLength, char *salt, int iterationCount, char *derivedKey) +void EncryptionThreadPoolBeginKeyDerivation (TC_EVENT *completionEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG *completionFlag, LONG *outstandingWorkItemCount, int pkcs5Prf, unsigned char *password, int passwordLength, unsigned char *salt, int iterationCount, unsigned char *derivedKey) { EncryptionThreadPoolWorkItem *workItem; if (!ThreadPoolRunning) TC_THROW_FATAL_EXCEPTION; @@ -604,17 +598,17 @@ void EncryptionThreadPoolBeginReadVolumeHeaderFinalization (TC_EVENT *keyDerivat TC_SET_EVENT (WorkItemReadyEvent); TC_RELEASE_MUTEX (&EnqueueMutex); } -void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data, const UINT64_STRUCT *startUnitNo, uint32 unitCount, PCRYPTO_INFO cryptoInfo) +void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, uint8 *data, const UINT64_STRUCT *startUnitNo, uint32 unitCount, PCRYPTO_INFO cryptoInfo) { uint32 fragmentCount; uint32 unitsPerFragment; uint32 remainder; - byte *fragmentData; + uint8 *fragmentData; uint64 fragmentStartUnitNo; EncryptionThreadPoolWorkItem *workItem; EncryptionThreadPoolWorkItem *firstFragmentWorkItem; diff --git a/src/Common/EncryptionThreadPool.h b/src/Common/EncryptionThreadPool.h index 053d4107..95583165 100644 --- a/src/Common/EncryptionThreadPool.h +++ b/src/Common/EncryptionThreadPool.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -30,13 +30,13 @@ typedef enum #ifndef DEVICE_DRIVER size_t GetCpuCount (WORD* pGroupCount); #endif -void EncryptionThreadPoolBeginKeyDerivation (TC_EVENT *completionEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG *completionFlag, LONG *outstandingWorkItemCount, int pkcs5Prf, char *password, int passwordLength, char *salt, int iterationCount, char *derivedKey); +void EncryptionThreadPoolBeginKeyDerivation (TC_EVENT *completionEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG *completionFlag, LONG *outstandingWorkItemCount, int pkcs5Prf, unsigned char *password, int passwordLength, unsigned char *salt, int iterationCount, unsigned char *derivedKey); void EncryptionThreadPoolBeginReadVolumeHeaderFinalization (TC_EVENT *keyDerivationCompletedEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG* outstandingWorkItemCount, void* keyInfoBuffer, int keyInfoBufferSize, void* keyDerivationWorkItems, int keyDerivationWorkItemsSize); -void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data, const UINT64_STRUCT *startUnitNo, uint32 unitCount, PCRYPTO_INFO cryptoInfo); +void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, uint8 *data, const UINT64_STRUCT *startUnitNo, uint32 unitCount, PCRYPTO_INFO cryptoInfo); BOOL EncryptionThreadPoolStart (size_t encryptionFreeCpuCount); void EncryptionThreadPoolStop (); size_t GetEncryptionThreadCount (); size_t GetMaxEncryptionThreadCount (); BOOL IsEncryptionThreadPoolRunning (); diff --git a/src/Common/Endian.c b/src/Common/Endian.c index cea24d09..7cdda679 100644 --- a/src/Common/Endian.c +++ b/src/Common/Endian.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" diff --git a/src/Common/Endian.h b/src/Common/Endian.h index 000395f4..a0cf03b2 100644 --- a/src/Common/Endian.h +++ b/src/Common/Endian.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_ENDIAN_H diff --git a/src/Common/Exception.h b/src/Common/Exception.h index cb4fefc5..f52484c7 100644 --- a/src/Common/Exception.h +++ b/src/Common/Exception.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Fat.c b/src/Common/Fat.c index 19720b17..c40084a0 100644 --- a/src/Common/Fat.c +++ b/src/Common/Fat.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include <stdlib.h> @@ -443,14 +443,12 @@ FormatFat (void* hwndDlgPtr, unsigned __int64 startSector, fatparams * ft, void burn (&tmpCI, sizeof (tmpCI)); VirtualUnlock (&tmpCI, sizeof (tmpCI)); return ERR_MODE_INIT_FAILED; } -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); -#endif x = ft->num_sectors - ft->reserved - ft->size_root_dir / ft->sector_size - ft->fat_length * 2; while (x--) { if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo, startSector, diff --git a/src/Common/Fat.h b/src/Common/Fat.h index b2457be2..d6757aaa 100644 --- a/src/Common/Fat.h +++ b/src/Common/Fat.h @@ -4,19 +4,19 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ typedef struct fatparams_t { char volume_name[11]; - byte volume_id[4]; + uint8 volume_id[4]; unsigned int num_sectors; /* total number of sectors */ int cluster_count; /* number of clusters */ int size_root_dir; /* size of the root directory in bytes */ int size_fat; /* size of FAT */ int fats; diff --git a/src/Common/Format.c b/src/Common/Format.c index 4d8dfed9..ee766d33 100644 --- a/src/Common/Format.c +++ b/src/Common/Format.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include <stdlib.h> @@ -82,11 +82,11 @@ int TCFormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams) { int nStatus; PCRYPTO_INFO cryptoInfo = NULL; HANDLE dev = INVALID_HANDLE_VALUE; DWORD dwError; - char header[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; + unsigned char header[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; unsigned __int64 num_sectors, startSector; fatparams ft; FILETIME ftCreationTime; FILETIME ftLastWriteTime; FILETIME ftLastAccessTime; @@ -98,14 +98,12 @@ int TCFormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams) WCHAR deviceName[MAX_PATH]; uint64 dataOffset, dataAreaSize; LARGE_INTEGER offset; BOOL bFailedRequiredDASD = FALSE; HWND hwndDlg = volParams->hwndDlg; -#ifdef _WIN64 CRYPTO_INFO tmpCI; PCRYPTO_INFO cryptoInfoBackup = NULL; -#endif FormatSectorSize = volParams->sectorSize; if (FormatSectorSize < TC_MIN_VOLUME_SECTOR_SIZE || FormatSectorSize > TC_MAX_VOLUME_SECTOR_SIZE @@ -173,16 +171,14 @@ int TCFormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams) burn (header, sizeof (header)); VirtualUnlock (header, sizeof (header)); return nStatus? nStatus : ERR_OUTOFMEMORY; } -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); } -#endif begin_format: if (volParams->bDevice) { @@ -196,11 +192,11 @@ begin_format: if (IsDeviceMounted (devName)) { if ((dev = DismountDrive (devName, volParams->volumePath)) == INVALID_HANDLE_VALUE) { - Error ("FORMAT_CANT_DISMOUNT_FILESYS", hwndDlg); + Error ("FORMAT_CANT_UNMOUNT_FILESYS", hwndDlg); nStatus = ERR_DONT_REPORT; goto error; } /* Gain "raw" access to the partition (it contains a live filesystem and the filesystem driver @@ -334,11 +330,11 @@ begin_format: } } if (DeviceIoControl (dev, FSCTL_IS_VOLUME_MOUNTED, NULL, 0, NULL, 0, &dwResult, NULL)) { - Error ("FORMAT_CANT_DISMOUNT_FILESYS", hwndDlg); + Error ("FORMAT_CANT_UNMOUNT_FILESYS", hwndDlg); nStatus = ERR_DONT_REPORT; goto error; } } else @@ -509,13 +505,13 @@ begin_format: else if (bInstantRetryOtherFilesys) { // The previous file system format failed and the user wants to try again with a different file system. // The volume header had been written successfully so we need to seek to the byte after the header. - LARGE_INTEGER offset; - offset.QuadPart = TC_VOLUME_DATA_OFFSET; - if (!SetFilePointerEx ((HANDLE) dev, offset, NULL, FILE_BEGIN)) + LARGE_INTEGER volDataOffset; + volDataOffset.QuadPart = TC_VOLUME_DATA_OFFSET; + if (!SetFilePointerEx ((HANDLE) dev, volDataOffset, NULL, FILE_BEGIN)) { nStatus = ERR_OS_ERROR; goto error; } } @@ -530,11 +526,11 @@ begin_format: } // To prevent fragmentation, write zeroes to reserved header sectors which are going to be filled with random data if (!volParams->bDevice && !volParams->hiddenVol) { - byte buf[TC_VOLUME_HEADER_GROUP_SIZE - TC_VOLUME_HEADER_EFFECTIVE_SIZE]; + uint8 buf[TC_VOLUME_HEADER_GROUP_SIZE - TC_VOLUME_HEADER_EFFECTIVE_SIZE]; DWORD bytesWritten; ZeroMemory (buf, sizeof (buf)); if (!WriteFile (dev, buf, sizeof (buf), &bytesWritten, NULL)) { @@ -638,20 +634,18 @@ begin_format: { nStatus = ERR_OS_ERROR; goto error; } -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { VirtualLock (&tmpCI, sizeof (tmpCI)); memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo)); cryptoInfoBackup = cryptoInfo; cryptoInfo = &tmpCI; } -#endif nStatus = CreateVolumeHeaderInMemory (hwndDlg, FALSE, header, volParams->ea, FIRST_MODE_OF_OPERATION_ID, @@ -667,18 +661,16 @@ begin_format: 0, volParams->headerFlags, FormatSectorSize, FALSE); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { cryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (tmpCI)); } -#endif if (!WriteEffectiveVolumeHeader (volParams->bDevice, dev, header)) { nStatus = ERR_OS_ERROR; goto error; @@ -687,31 +679,27 @@ begin_format: // Fill reserved header sectors (including the backup header area) with random data if (!volParams->hiddenVol) { BOOL bUpdateBackup = FALSE; -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { VirtualLock (&tmpCI, sizeof (tmpCI)); memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo)); cryptoInfoBackup = cryptoInfo; cryptoInfo = &tmpCI; } -#endif nStatus = WriteRandomDataToReservedHeaderAreas (hwndDlg, dev, cryptoInfo, dataAreaSize, FALSE, FALSE); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { cryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (tmpCI)); } -#endif if (nStatus != ERR_SUCCESS) goto error; // write fake hidden volume header to protect against attacks that use statistical entropy @@ -860,11 +848,11 @@ error: } if (retCode != 0) { if (!UnmountVolumeAfterFormatExCall (volParams->hwndDlg, driveNo) && !Silent) - MessageBoxW (volParams->hwndDlg, GetString ("CANT_DISMOUNT_VOLUME"), lpszTitle, ICON_HAND); + MessageBoxW (volParams->hwndDlg, GetString ("CANT_UNMOUNT_VOLUME"), lpszTitle, ICON_HAND); if (dataAreaSize <= TC_MAX_FAT_SECTOR_COUNT * FormatSectorSize) { if (AskErrYesNo ("FORMAT_NTFS_FAILED_ASK_FAT", hwndDlg) == IDYES) { @@ -882,11 +870,11 @@ error: nStatus = ERR_DONT_REPORT; goto fv_end; } if (!UnmountVolumeAfterFormatExCall (volParams->hwndDlg, driveNo) && !Silent) - MessageBoxW (volParams->hwndDlg, GetString ("CANT_DISMOUNT_VOLUME"), lpszTitle, ICON_HAND); + MessageBoxW (volParams->hwndDlg, GetString ("CANT_UNMOUNT_VOLUME"), lpszTitle, ICON_HAND); } fv_end: dwError = GetLastError(); @@ -913,13 +901,11 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, unsigned __int64 num CRYPTOPP_ALIGN_DATA(16) char originalK2[MASTER_KEYDATA_SIZE]; LARGE_INTEGER startOffset; LARGE_INTEGER newOffset; -#ifdef _WIN64 CRYPTO_INFO tmpCI; -#endif // Seek to start sector startOffset.QuadPart = startSector * FormatSectorSize; if (!SetFilePointerEx ((HANDLE) dev, startOffset, &newOffset, FILE_BEGIN) || newOffset.QuadPart != startOffset.QuadPart) @@ -934,19 +920,17 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, unsigned __int64 num VirtualLock (temporaryKey, sizeof (temporaryKey)); VirtualLock (originalK2, sizeof (originalK2)); memset (sector, 0, sizeof (sector)); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { VirtualLock (&tmpCI, sizeof (tmpCI)); memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo)); cryptoInfo = &tmpCI; } -#endif // Remember the original secondary key (XTS mode) before generating a temporary one memcpy (originalK2, cryptoInfo->k2, sizeof (cryptoInfo->k2)); /* Fill the rest of the data area with random data */ @@ -973,14 +957,12 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, unsigned __int64 num { retVal = ERR_MODE_INIT_FAILED; goto fail; } -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); -#endif while (num_sectors--) { if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo, startSector, cryptoInfo) == FALSE) @@ -1049,17 +1031,15 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, unsigned __int64 num burn (temporaryKey, sizeof(temporaryKey)); burn (originalK2, sizeof(originalK2)); VirtualUnlock (temporaryKey, sizeof (temporaryKey)); VirtualUnlock (originalK2, sizeof (originalK2)); TCfree (write_buf); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (tmpCI)); } -#endif return 0; fail: err = GetLastError(); @@ -1067,17 +1047,15 @@ fail: burn (temporaryKey, sizeof(temporaryKey)); burn (originalK2, sizeof(originalK2)); VirtualUnlock (temporaryKey, sizeof (temporaryKey)); VirtualUnlock (originalK2, sizeof (originalK2)); TCfree (write_buf); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (tmpCI)); } -#endif SetLastError (err); return (retVal ? retVal : ERR_OS_ERROR); } @@ -1390,11 +1368,11 @@ BOOL WriteSector (void *dev, char *sector, static volatile BOOL WriteThreadRunning; static volatile BOOL WriteThreadExitRequested; static HANDLE WriteThreadHandle; -static byte *WriteThreadBuffer; +static uint8 *WriteThreadBuffer; static HANDLE WriteBufferEmptyEvent; static HANDLE WriteBufferFullEvent; static volatile HANDLE WriteRequestHandle; static volatile int WriteRequestSize; diff --git a/src/Common/Format.h b/src/Common/Format.h index 0a42e5c8..8f1166ba 100644 --- a/src/Common/Format.h +++ b/src/Common/Format.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_Format diff --git a/src/Common/GfMul.c b/src/Common/GfMul.c index 970e6318..db51f499 100644 --- a/src/Common/GfMul.c +++ b/src/Common/GfMul.c @@ -285,11 +285,11 @@ static mode(32t) gf_poly64[2] = { 0, 0xd8000000 }; /* are held in byte[n], with lower indexed bits placed in the */ /* more numerically significant bit positions in bytes. */ /* This function multiples a field element x, in the polynomial */ /* field representation. It uses 32-bit word operations to gain */ -/* speed but compensates for machine endianess and hence works */ +/* speed but compensates for machine endianness and hence works */ /* correctly on both styles of machine */ in_line void mul_x(mode(32t) x[4]) { mode(32t) t; @@ -331,11 +331,11 @@ in_line void mul_x64(mode(32t) x[2]) x[0] = (x[0] >> 1) ^ t; /* the field polynomial */ bsw_32(x, 2); } /* Multiply of a GF128 field element by x^8 using 32-bit words */ -/* for speed - machine endianess matters here */ +/* for speed - machine endianness matters here */ #if (PLATFORM_BYTE_ORDER == BRG_LITTLE_ENDIAN) #define xp_fun(x,y) ((mode(32t))(x)) | (((mode(32t))(y)) << 8) static const unsigned __int16 gft_le[256] = gf_dat(xp); @@ -378,11 +378,11 @@ in_line void mul_bex8_64(mode(32t) x[2]) /* mutiply with long words */ x[0] = (x[0] >> 8) ^ (((mode(32t))gft_be64[t]) << 16); } #endif -/* hence choose the correct version for the machine endianess */ +/* hence choose the correct version for the machine endianness */ #if PLATFORM_BYTE_ORDER == BRG_BIG_ENDIAN #define mul_x8 mul_bex8 #define mul_x8_64 mul_bex8_64 #else diff --git a/src/Common/Keyfiles.c b/src/Common/Keyfiles.c index d10daa06..b31e335b 100644 --- a/src/Common/Keyfiles.c +++ b/src/Common/Keyfiles.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -251,11 +251,11 @@ BOOL KeyFilesApply (HWND hwndDlg, Password *password, KeyFile *firstKeyFile, con try { if (Token::IsKeyfilePathValid (kf->FileName, EMVSupportEnabled? true : false)) { // Apply security token keyfile - vector <byte> keyfileData; + vector <uint8> keyfileData; TokenKeyfilePath secPath (kf->FileName); Token::getTokenKeyfile (secPath)->GetKeyfileData (keyfileData); if (keyfileData.empty()) { @@ -268,11 +268,11 @@ BOOL KeyFilesApply (HWND hwndDlg, Password *password, KeyFile *firstKeyFile, con unsigned __int32 crc = 0xffffffff; unsigned __int32 writePos = 0; size_t totalRead = 0; - for (size_t i = 0; i < keyfileData.size(); i++) + for (i = 0; i < keyfileData.size(); i++) { crc = UPDC32 (keyfileData[i], crc); keyPool[writePos++] += (unsigned __int8) (crc >> 24); keyPool[writePos++] += (unsigned __int8) (crc >> 16); @@ -494,11 +494,11 @@ BOOL CALLBACK KeyFilesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa { // we're about to draw the static // set the text colour in (HDC)wParam SetBkMode((HDC)wParam,TRANSPARENT); SetTextColor((HDC)wParam, RGB(255,0,0)); - return (BOOL)GetSysColorBrush(COLOR_MENU); + return (BOOL)(INT_PTR)GetSysColorBrush(COLOR_MENU); } } return 0; case WM_COMMAND: diff --git a/src/Common/Keyfiles.h b/src/Common/Keyfiles.h index a13666fb..e01f6bc9 100644 --- a/src/Common/Keyfiles.h +++ b/src/Common/Keyfiles.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Language.c b/src/Common/Language.c index 278b7dd1..3537d747 100644 --- a/src/Common/Language.c +++ b/src/Common/Language.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -81,18 +81,44 @@ static char *MapFirstLanguageFile () } return LanguageFileBuffer; } +static int IsValidLanguageFileName(const wchar_t* filename) { + size_t len = wcslen(filename); + + // Check the base format and length directly + if (_wcsnicmp(filename, L"Language.", 9) != 0 || (len != 15 && len != 18)) + return 0; // Does not start with "Language." or has incorrect length + + // Check for the ".xml" suffix + if (_wcsicmp(filename + len - 4, L".xml") != 0) + return 0; // Does not end with ".xml" + + // Detailed checks based on the specific length + if (len == 15) { + // Format should be Language.xx.xml + if (iswalpha(filename[9]) && iswalpha(filename[10])) + return 1; // Valid format for short code + } else if (len == 18) { + // Format should be Language.xx-yy.xml + if (iswalpha(filename[9]) && iswalpha(filename[10]) && filename[11] == L'-' && + iswalpha(filename[12]) && iswalpha(filename[13])) + return 1; // Valid format for long code + } + + return 0; // If none of the conditions are met, the filename is invalid +} static char *MapNextLanguageFile (int resourceid) { wchar_t f[TC_MAX_PATH*2], *t; WIN32_FIND_DATAW find; HANDLE file; DWORD read; BOOL bStatus; + BOOL validFileFound = FALSE; /* free memory here to avoid leaks */ if (LanguageFileBuffer != NULL) { free (LanguageFileBuffer); @@ -120,10 +146,28 @@ static char *MapNextLanguageFile (int resourceid) } if (LanguageFileFindHandle == INVALID_HANDLE_VALUE) return NULL; if (find.nFileSizeHigh != 0) return NULL; + // Validate the file name format + while (!validFileFound) + { + if (!IsValidLanguageFileName(find.cFileName)) + { + if (!FindNextFileW(LanguageFileFindHandle, &find)) + { + FindClose(LanguageFileFindHandle); + LanguageFileFindHandle = INVALID_HANDLE_VALUE; + return NULL; + } + } + else + { + validFileFound = TRUE; + } + } + LanguageFileBuffer = malloc(find.nFileSizeLow + 1); if (LanguageFileBuffer == NULL) return NULL; GetModuleFileNameW (NULL, f, sizeof (f) / sizeof(f[0])); t = wcsrchr (f, L'\\'); @@ -296,21 +340,21 @@ static BOOL LoadLanguageData (int resourceid, BOOL bForceSetPreferredLanguage, B for (i = 0; xmlElements[i] != 0; i++) { xml = (char *) res; while (xml = XmlFindElement (xml, xmlElements[i])) { - void *key; + void *pkey; void *text; XmlGetAttributeText (xml, "lang", attr, sizeof (attr)); if (!defaultLangParsed || strcmp (attr, langId) == 0) { if (XmlGetAttributeText (xml, "key", attr, sizeof (attr))) { - key = AddPoolData (attr, strlen (attr) + 1); - if (key == NULL) return FALSE; + pkey = AddPoolData (attr, strlen (attr) + 1); + if (pkey == NULL) return FALSE; XmlGetNodeText (xml, attr, sizeof (attr)); // Parse \ escape sequences { @@ -325,11 +369,11 @@ static BOOL LoadLanguageData (int resourceid, BOOL bForceSetPreferredLanguage, B case '\\': *out++ = '\\'; break; case 't': *out++ = '\t'; break; case 'n': *out++ = 13; *out++ = 10; break; default: if (!bForceSilent) - MessageBoxA (0, key, "VeraCrypt: Unknown '\\' escape sequence in string", MB_ICONERROR); + MessageBoxA (0, pkey, "VeraCrypt: Unknown '\\' escape sequence in string", MB_ICONERROR); return FALSE; } } else *out++ = *in++; @@ -340,19 +384,19 @@ static BOOL LoadLanguageData (int resourceid, BOOL bForceSetPreferredLanguage, B // UTF8 => wide char len = MultiByteToWideChar (CP_UTF8, 0, attr, -1, wattr, sizeof (wattr) / sizeof(wattr[0])); if (len == 0) { if (!bForceSilent) - MessageBoxA (0, key, "VeraCrypt: Error while decoding UTF-8 string", MB_ICONERROR); + MessageBoxA (0, pkey, "VeraCrypt: Error while decoding UTF-8 string", MB_ICONERROR); return FALSE; } // Add to dictionary text = AddPoolData ((void *) wattr, len * 2); if (text == NULL) return FALSE; - AddDictionaryEntry ((char *) key, 0, text); + AddDictionaryEntry ((char *)pkey, 0, text); } } xml++; } diff --git a/src/Common/Language.h b/src/Common/Language.h index 4a87ceda..f4c57dae 100644 --- a/src/Common/Language.h +++ b/src/Common/Language.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Language.xml b/src/Common/Language.xml index 32930193..eac69303 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -133,12 +133,12 @@ <entry lang="en" key="IDC_FAVORITE_MOVE_UP">Move &Up</entry> <entry lang="en" key="IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT">Open &Explorer window for selected volume when successfully mounted</entry> <entry lang="en" key="IDC_FAVORITE_REMOVE">&Remove</entry> <entry lang="en" key="IDC_FAVORITE_USE_LABEL_IN_EXPLORER">Use favorite label as Explorer drive label</entry> <entry lang="en" key="IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX">Global Settings</entry> - <entry lang="en" key="IDC_HK_DISMOUNT_BALLOON_TOOLTIP">Display balloon tooltip after successful hot-key dismount</entry> - <entry lang="en" key="IDC_HK_DISMOUNT_PLAY_SOUND">Play system notification sound after successful hot-key dismount</entry> + <entry lang="en" key="IDC_HK_UNMOUNT_BALLOON_TOOLTIP">Display balloon tooltip after successful hot-key unmount</entry> + <entry lang="en" key="IDC_HK_UNMOUNT_PLAY_SOUND">Play system notification sound after successful hot-key unmount</entry> <entry lang="en" key="IDC_HK_MOD_ALT">Alt</entry> <entry lang="en" key="IDC_HK_MOD_CTRL">Ctrl</entry> <entry lang="en" key="IDC_HK_MOD_SHIFT">Shift</entry> <entry lang="en" key="IDC_HK_MOD_WIN">Win</entry> <entry lang="en" key="IDC_HOTKEY_ASSIGN">Assign</entry> @@ -154,24 +154,24 @@ <entry lang="en" key="IDC_NEW_KEYFILES">Keyfiles...</entry> <entry lang="en" key="IDC_OLD_PIM_HELP">(Empty or 0 for default iterations)</entry> <entry lang="en" key="IDC_PIM_HELP">(Empty or 0 for default iterations)</entry> <entry lang="en" key="IDC_PREF_BKG_TASK_ENABLE">Enabled</entry> <entry lang="en" key="IDC_PREF_CACHE_PASSWORDS">Cache passwords in driver memory</entry> - <entry lang="en" key="IDC_PREF_DISMOUNT_INACTIVE">Auto-dismount volume after no data has been read/written to it for</entry> - <entry lang="en" key="IDC_PREF_DISMOUNT_LOGOFF">User logs off</entry> - <entry lang="en" key="IDC_PREF_DISMOUNT_SESSION_LOCKED">User session locked</entry> - <entry lang="en" key="IDC_PREF_DISMOUNT_POWERSAVING">Entering power saving mode</entry> - <entry lang="en" key="IDC_PREF_DISMOUNT_SCREENSAVER">Screen saver is launched</entry> - <entry lang="en" key="IDC_PREF_FORCE_AUTO_DISMOUNT">Force auto-dismount even if volume contains open files or directories</entry> + <entry lang="en" key="IDC_PREF_UNMOUNT_INACTIVE">Auto-unmount volume after no data has been read/written to it for</entry> + <entry lang="en" key="IDC_PREF_UNMOUNT_LOGOFF">User logs off</entry> + <entry lang="en" key="IDC_PREF_UNMOUNT_SESSION_LOCKED">User session locked</entry> + <entry lang="en" key="IDC_PREF_UNMOUNT_POWERSAVING">Entering power saving mode</entry> + <entry lang="en" key="IDC_PREF_UNMOUNT_SCREENSAVER">Screen saver is launched</entry> + <entry lang="en" key="IDC_PREF_FORCE_AUTO_UNMOUNT">Force auto-unmount even if volume contains open files or directories</entry> <entry lang="en" key="IDC_PREF_LOGON_MOUNT_DEVICES">Mount all device-hosted VeraCrypt volumes</entry> <entry lang="en" key="IDC_PREF_LOGON_START">Start VeraCrypt Background Task</entry> <entry lang="en" key="IDC_PREF_MOUNT_READONLY">Mount volumes as read-only</entry> <entry lang="en" key="IDC_PREF_MOUNT_REMOVABLE">Mount volumes as removable media</entry> <entry lang="en" key="IDC_PREF_OPEN_EXPLORER">Open Explorer window for successfully mounted volume</entry> <entry lang="en" key="IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT">Temporarily cache password during "Mount Favorite Volumes" operations</entry> <entry lang="en" key="IDC_PREF_USE_DIFF_TRAY_ICON_IF_VOL_MOUNTED">Use a different taskbar icon when there are mounted volumes</entry> - <entry lang="en" key="IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT">Wipe cached passwords on auto-dismount</entry> + <entry lang="en" key="IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT">Wipe cached passwords on auto-unmount</entry> <entry lang="en" key="IDC_PREF_WIPE_CACHE_ON_EXIT">Wipe cached passwords on exit</entry> <entry lang="en" key="IDC_PRESERVE_TIMESTAMPS">Preserve modification timestamp of file containers</entry> <entry lang="en" key="IDC_RESET_HOTKEYS">Reset</entry> <entry lang="en" key="IDC_SELECT_DEVICE">Select D&evice...</entry> <entry lang="en" key="IDC_SELECT_FILE">Select &File...</entry> @@ -179,11 +179,11 @@ <entry lang="en" key="IDC_SHOW_PASSWORD_CHPWD_NEW">Display password</entry> <entry lang="en" key="IDC_SHOW_PASSWORD_CHPWD_ORI">Display password</entry> <entry lang="en" key="IDC_TRAVEL_OPEN_EXPLORER">Open &Explorer window for mounted volume</entry> <entry lang="en" key="IDC_TRAV_CACHE_PASSWORDS">&Cache password in driver memory</entry> <entry lang="en" key="IDC_TRUECRYPT_MODE">&TrueCrypt Mode</entry> - <entry lang="en" key="IDC_UNMOUNTALL">Di&smount All</entry> + <entry lang="en" key="IDC_UNMOUNTALL">&Unmount All</entry> <entry lang="en" key="IDC_VOLUME_PROPERTIES">&Volume Properties...</entry> <entry lang="en" key="IDC_VOLUME_TOOLS">Volume &Tools...</entry> <entry lang="en" key="IDC_WIPE_CACHE">&Wipe Cache</entry> <entry lang="en" key="IDD_DEFAULT_MOUNT_PARAMETERS">VeraCrypt - Mount Parameters</entry> <entry lang="en" key="IDD_FAVORITE_VOLUMES">VeraCrypt - Favorite Volumes</entry> @@ -253,12 +253,12 @@ <entry lang="en" key="IDM_SYS_FAVORITES_SETTINGS">System Favorite Volumes...</entry> <entry lang="en" key="IDM_TC_DOWNLOADS">Downloads</entry> <entry lang="en" key="IDM_TEST_VECTORS">Test Vectors...</entry> <entry lang="en" key="IDM_TOKEN_PREFERENCES">Security Tokens...</entry> <entry lang="en" key="IDM_TRAVELER">Traveler Disk Setup...</entry> - <entry lang="en" key="IDM_UNMOUNTALL">Dismount All Mounted Volumes</entry> - <entry lang="en" key="IDM_UNMOUNT_VOLUME">Dismount Volume</entry> + <entry lang="en" key="IDM_UNMOUNTALL">Unmount All Mounted Volumes</entry> + <entry lang="en" key="IDM_UNMOUNT_VOLUME">Unmount Volume</entry> <entry lang="en" key="IDM_VERIFY_RESCUE_DISK">Verify Rescue Disk</entry> <entry lang="en" key="IDM_VERIFY_RESCUE_DISK_ISO">Verify Rescue Disk Image</entry> <entry lang="en" key="IDM_VERSION_HISTORY">Version History</entry> <entry lang="en" key="IDM_VOLUME_EXPANDER">Volume Expander</entry> <entry lang="en" key="IDM_VOLUME_PROPERTIES">Volume Properties</entry> @@ -267,18 +267,18 @@ <entry lang="en" key="IDM_WIPE_CACHE">Wipe Cached Passwords</entry> <entry lang="en" key="IDOK">OK</entry> <entry lang="en" key="IDT_ACCELERATION_OPTIONS">Hardware Acceleration</entry> <entry lang="en" key="IDT_ASSIGN_HOTKEY">Shortcut</entry> <entry lang="en" key="IDT_AUTORUN">AutoRun Configuration (autorun.inf)</entry> - <entry lang="en" key="IDT_AUTO_DISMOUNT">Auto-Dismount</entry> - <entry lang="en" key="IDT_AUTO_DISMOUNT_ON">Dismount all when:</entry> + <entry lang="en" key="IDT_AUTO_UNMOUNT">Auto-Unmount</entry> + <entry lang="en" key="IDT_AUTO_UNMOUNT_ON">Unmount all when:</entry> <entry lang="en" key="IDT_BOOT_LOADER_SCREEN_OPTIONS">Boot Loader Screen Options</entry> <entry lang="en" key="IDT_CONFIRM_PASSWORD">Confirm Password:</entry> <entry lang="en" key="IDT_CURRENT">Current</entry> <entry lang="en" key="IDT_CUSTOM_BOOT_LOADER_MESSAGE">Display this custom message in the pre-boot authentication screen (24 characters maximum):</entry> <entry lang="en" key="IDT_DEFAULT_MOUNT_OPTIONS">Default Mount Options</entry> - <entry lang="en" key="IDT_DISMOUNT_ACTION">Hot Key Options</entry> + <entry lang="en" key="IDT_UNMOUNT_ACTION">Hot Key Options</entry> <entry lang="en" key="IDT_DRIVER_OPTIONS">Driver Configuration</entry> <entry lang="en" key="IDC_ENABLE_EXTENDED_IOCTL_SUPPORT">Enable extended disk control codes support</entry> <entry lang="en" key="IDT_FAVORITE_LABEL">Label of selected favorite volume:</entry> <entry lang="en" key="IDT_FILE_SETTINGS">File Settings</entry> <entry lang="en" key="IDT_HOTKEY_KEY">Key to assign:</entry> @@ -421,12 +421,12 @@ <entry lang="en" key="DEVICE_FREE_GB">Size of %s is %.2f GiB</entry> <entry lang="en" key="DEVICE_FREE_TB">Size of %s is %.2f TiB</entry> <entry lang="en" key="DEVICE_FREE_PB">Size of %s is %.2f PiB</entry> <entry lang="en" key="DEVICE_IN_USE_FORMAT">WARNING: The device/partition is in use by the operating system or applications. Formatting the device/partition might cause data corruption and system instability.\n\nContinue?</entry> <entry lang="en" key="DEVICE_IN_USE_INPLACE_ENC">Warning: The partition is in use by the operating system or applications. You should close any applications that might be using the partition (including antivirus software).\n\nContinue?</entry> - <entry lang="en" key="FORMAT_CANT_DISMOUNT_FILESYS">Error: The device/partition contains a file system that could not be dismounted. The file system may be in use by the operating system. Formatting the device/partition would very likely cause data corruption and system instability.\n\nTo solve this issue, we recommend that you first delete the partition and then recreate it without formatting. To do so, follow these steps:\n1) Right-click the 'Computer' (or 'My Computer') icon in the 'Start Menu' and select 'Manage'. The 'Computer Management' window should appear.\n2) In the 'Computer Management' window, select 'Storage' > 'Disk Management'.\n3) Right-click the partition you want to encrypt and select either 'Delete Partition', or 'Delete Volume', or 'Delete Logical Drive'.\n4) Click 'Yes'. If Windows asks you to restart the computer, do so. Then repeat the steps 1 and 2 and continue from the step 5.\n5) Right-click the unallocated/free space area and select either 'New Partition', or 'New Simple Volume', or 'New Logical Drive'.\n6) The 'New Partition Wizard' or 'New Simple Volume Wizard' window should appear now; follow its instructions. On the wizard page entitled 'Format Partition', select either 'Do not format this partition' or 'Do not format this volume'. In the same wizard, click 'Next' and then 'Finish'.\n7) Note that the device path you have selected in VeraCrypt may be wrong now. Therefore, exit the VeraCrypt Volume Creation Wizard (if it is still running) and then start it again.\n8) Try encrypting the device/partition again.\n\nIf VeraCrypt repeatedly fails to encrypt the device/partition, you may want to consider creating a file container instead.</entry> - <entry lang="en" key="INPLACE_ENC_CANT_LOCK_OR_DISMOUNT_FILESYS">Error: The filesystem could not be locked and/or dismounted. It may be in use by the operating system or applications (for example, antivirus software). Encrypting the partition might cause data corruption and system instability.\n\nPlease close any applications that might be using the filesystem (including antivirus software) and try again. If it does not help, please follow the below steps.</entry> + <entry lang="en" key="FORMAT_CANT_UNMOUNT_FILESYS">Error: The device/partition contains a file system that could not be unmounted. The file system may be in use by the operating system. Formatting the device/partition would very likely cause data corruption and system instability.\n\nTo solve this issue, we recommend that you first delete the partition and then recreate it without formatting. To do so, follow these steps:\n1) Right-click the 'Computer' (or 'My Computer') icon in the 'Start Menu' and select 'Manage'. The 'Computer Management' window should appear.\n2) In the 'Computer Management' window, select 'Storage' > 'Disk Management'.\n3) Right-click the partition you want to encrypt and select either 'Delete Partition', or 'Delete Volume', or 'Delete Logical Drive'.\n4) Click 'Yes'. If Windows asks you to restart the computer, do so. Then repeat the steps 1 and 2 and continue from the step 5.\n5) Right-click the unallocated/free space area and select either 'New Partition', or 'New Simple Volume', or 'New Logical Drive'.\n6) The 'New Partition Wizard' or 'New Simple Volume Wizard' window should appear now; follow its instructions. On the wizard page entitled 'Format Partition', select either 'Do not format this partition' or 'Do not format this volume'. In the same wizard, click 'Next' and then 'Finish'.\n7) Note that the device path you have selected in VeraCrypt may be wrong now. Therefore, exit the VeraCrypt Volume Creation Wizard (if it is still running) and then start it again.\n8) Try encrypting the device/partition again.\n\nIf VeraCrypt repeatedly fails to encrypt the device/partition, you may want to consider creating a file container instead.</entry> + <entry lang="en" key="INPLACE_ENC_CANT_LOCK_OR_UNMOUNT_FILESYS">Error: The filesystem could not be locked and/or unmounted. It may be in use by the operating system or applications (for example, antivirus software). Encrypting the partition might cause data corruption and system instability.\n\nPlease close any applications that might be using the filesystem (including antivirus software) and try again. If it does not help, please follow the below steps.</entry> <entry lang="en" key="DEVICE_IN_USE_INFO">WARNING: Some of the mounted devices/partitions were already in use!\n\nIgnoring this can cause undesired results including system instability.\n\nWe strongly recommend that you close any application that might be using the devices/partitions.</entry> <entry lang="en" key="DEVICE_PARTITIONS_ERR">The selected device contains partitions.\n\nFormatting the device might cause system instability and/or data corruption. Please either select a partition on the device, or remove all partitions on the device to enable VeraCrypt to format it safely.</entry> <entry lang="en" key="DEVICE_PARTITIONS_ERR_W_INPLACE_ENC_NOTE">The selected non-system device contains partitions.\n\nEncrypted device-hosted VeraCrypt volumes can be created within devices that do not contain any partitions (including hard disks and solid-state drives). A device that contains partitions can be entirely encrypted in place (using a single master key) only if it is the drive where Windows is installed and from which it boots.\n\nIf you want to encrypt the selected non-system device using a single master key, you will need to remove all partitions on the device first to enable VeraCrypt to format it safely (formatting a device that contains partitions might cause system instability and/or data corruption). Alternatively, you can encrypt each partition on the drive individually (each partition will be encrypted using a different master key).\n\nNote: If you want to remove all partitions from a GPT disk, you may need to convert it to a MBR disk (using e.g. the Computer Management tool) in order to remove hidden partitions.</entry> <entry lang="en" key="WHOLE_NONSYS_DEVICE_ENC_CONFIRM">Warning: If you encrypt the entire device (as opposed to encrypting only a partition on it), operating systems will consider the device as new, empty, and unformatted (as it will contain no partition table) and may spontaneously initialize the device (or ask you if you want to do so), which may damage the volume. Furthermore, it will not be possible to consistently mount the volume as favorite (e.g. when the drive number changes) or to assign a favorite-volume label to it.\n\nTo avoid that you may want to consider creating a partition on the device and encrypting the partition instead.\n\nAre you sure want to encrypt the entire device?</entry> <entry lang="en" key="AFTER_FORMAT_DRIVE_LETTER_WARN">IMPORTANT: Please keep in mind that this volume can NOT be mounted/accessed using the drive letter %c:, which is currently assigned to it!\n\nTo mount this volume, click 'Auto-Mount Devices' in the main VeraCrypt window (alternatively, in the main VeraCrypt window, click 'Select Device', then select this partition/device, and click 'Mount'). The volume will be mounted to a different drive letter, which you select from the list in the main VeraCrypt window.\n\nThe original drive letter %c: should be used only in case you need to remove encryption from the partition/device (e.g., if you no longer need encryption). In such a case, right-click the drive letter %c: in the 'Computer' (or 'My Computer') list and select 'Format'. Otherwise, the drive letter %c: should never be used (unless you remove it, as described e.g. in the VeraCrypt FAQ, and assign it to another partition/device).</entry> @@ -523,23 +523,23 @@ <entry lang="en" key="HIDDEN_VOL_WIZARD_MODE_DIRECT_HELP">If you select this option, you will create a hidden volume within an existing VeraCrypt volume. It will be assumed that you have already created a VeraCrypt volume that is suitable to host the hidden volume.</entry> <entry lang="en" key="HIDDEN_VOL_WIZARD_MODE_TITLE">Volume Creation Mode</entry> <entry lang="en" key="HIDVOL_FORMAT_FINISHED_TITLE">Hidden Volume Created</entry> <entry lang="en" key="HIDVOL_FORMAT_FINISHED_HELP">The hidden VeraCrypt volume has been successfully created and is ready for use. If all the instructions have been followed and if the precautions and requirements listed in the section "Security Requirements and Precautions Pertaining to Hidden Volumes" in the VeraCrypt User's Guide are followed, it should be impossible to prove that the hidden volume exists, even when the outer volume is mounted.\n\nWARNING: IF YOU DO NOT PROTECT THE HIDDEN VOLUME (FOR INFORMATION ON HOW TO DO SO, REFER TO THE SECTION "PROTECTION OF HIDDEN VOLUMES AGAINST DAMAGE" IN THE VERACRYPT USER'S GUIDE), DO NOT WRITE TO THE OUTER VOLUME. OTHERWISE, YOU MAY OVERWRITE AND DAMAGE THE HIDDEN VOLUME!</entry> <entry lang="en" key="FIRST_HIDDEN_OS_BOOT_INFO">You have started the hidden operating system. As you may have noticed, the hidden operating system appears to be installed on the same partition as the original operating system. However, in reality, it is installed within the partition behind it (in the hidden volume). All read and write operations are being transparently redirected from the original system partition to the hidden volume.\n\nNeither the operating system nor applications will know that data written to and read from the system partition are actually written to and read from the partition behind it (from/to a hidden volume). Any such data is encrypted and decrypted on the fly as usual (with an encryption key different from the one that will be used for the decoy operating system).\n\n\nPlease click Next to continue.</entry> - <entry lang="en" key="HIDVOL_HOST_FILLING_HELP_SYSENC">The outer volume has been created and mounted as drive %hc:. To this outer volume you should now copy some sensitive-looking files that you actually do NOT want to hide. They will be there for anyone forcing you to disclose the password for the first partition behind the system partition, where both the outer volume and the hidden volume (containing the hidden operating system) will reside. You will be able to reveal the password for this outer volume, and the existence of the hidden volume (and of the hidden operating system) will remain secret.\n\nIMPORTANT: The files you copy to the outer volume should not occupy more than %s. Otherwise, there may not be enough free space on the outer volume for the hidden volume (and you will not be able to continue). After you finish copying, click Next (do not dismount the volume).</entry> - <entry lang="en" key="HIDVOL_HOST_FILLING_HELP">Outer volume has been successfully created and mounted as drive %hc:. To this volume you should now copy some sensitive-looking files that you actually do NOT want to hide. The files will be there for anyone forcing you to disclose your password. You will reveal only the password for this outer volume, not for the hidden one. The files that you really care about will be stored in the hidden volume, which will be created later on. When you finish copying, click Next. Do not dismount the volume.\n\nNote: After you click Next, cluster bitmap of the outer volume will be scanned to determine the size of uninterrupted area of free space whose end is aligned with the end of the volume. This area will accommodate the hidden volume, so it will limit its maximum possible size. Cluster bitmap scanning ensures that no data on the outer volume are overwritten by the hidden volume.</entry> + <entry lang="en" key="HIDVOL_HOST_FILLING_HELP_SYSENC">The outer volume has been created and mounted as drive %hc:. To this outer volume you should now copy some sensitive-looking files that you actually do NOT want to hide. They will be there for anyone forcing you to disclose the password for the first partition behind the system partition, where both the outer volume and the hidden volume (containing the hidden operating system) will reside. You will be able to reveal the password for this outer volume, and the existence of the hidden volume (and of the hidden operating system) will remain secret.\n\nIMPORTANT: The files you copy to the outer volume should not occupy more than %s. Otherwise, there may not be enough free space on the outer volume for the hidden volume (and you will not be able to continue). After you finish copying, click Next (do not unmount the volume).</entry> + <entry lang="en" key="HIDVOL_HOST_FILLING_HELP">Outer volume has been successfully created and mounted as drive %hc:. To this volume you should now copy some sensitive-looking files that you actually do NOT want to hide. The files will be there for anyone forcing you to disclose your password. You will reveal only the password for this outer volume, not for the hidden one. The files that you really care about will be stored in the hidden volume, which will be created later on. When you finish copying, click Next. Do not unmount the volume.\n\nNote: After you click Next, cluster bitmap of the outer volume will be scanned to determine the size of uninterrupted area of free space whose end is aligned with the end of the volume. This area will accommodate the hidden volume, so it will limit its maximum possible size. Cluster bitmap scanning ensures that no data on the outer volume are overwritten by the hidden volume.</entry> <entry lang="en" key="HIDVOL_HOST_FILLING_TITLE">Outer Volume Contents</entry> <entry lang="en" key="HIDVOL_HOST_PRE_CIPHER_HELP">\n\nIn the next steps, you will set the options for the outer volume (within which the hidden volume will be created later on).</entry> <entry lang="en" key="HIDVOL_HOST_PRE_CIPHER_HELP_SYSENC">\n\nIn the next steps, you will create a so-called outer VeraCrypt volume within the first partition behind the system partition (as was explained in one of the previous steps).</entry> <entry lang="en" key="HIDVOL_HOST_PRE_CIPHER_TITLE">Outer Volume</entry> <entry lang="en" key="HIDDEN_OS_PRE_CIPHER_HELP">In the following steps, you will set the options and password for the hidden volume, which will contain the hidden operating system.\n\nRemark: The cluster bitmap of the outer volume has been scanned in order to determine the size of uninterrupted area of free space whose end is aligned with the end of the outer volume. This area will accommodate the hidden volume, so it limits its maximum possible size. The maximum possible size of the hidden volume has been determined and confirmed to be greater than the size of the system partition (which is required, because the entire content of the system partition will need to be copied to the hidden volume). This ensures that no data currently stored on the outer volume will be overwritten by data written to the area of the hidden volume.</entry> <entry lang="en" key="HIDDEN_OS_PRE_CIPHER_WARNING">IMPORTANT: Please remember the algorithms that you select in this step. You will have to select the same algorithms for the decoy system. Otherwise, the hidden system will be inaccessible! (The decoy system must be encrypted with the same encryption algorithm as the hidden system.)\n\nNote: The reason is that the decoy system and the hidden system will share a single boot loader, which supports only a single algorithm, selected by the user (for each algorithm, there is a special version of the VeraCrypt Boot Loader).</entry> <entry lang="en" key="HIDVOL_PRE_CIPHER_HELP">\n\nThe volume cluster bitmap has been scanned and the maximum possible size of the hidden volume has been determined. In the next steps you will set the options, the size, and the password for the hidden volume.</entry> <entry lang="en" key="HIDVOL_PRE_CIPHER_TITLE">Hidden Volume</entry> - <entry lang="en" key="HIDVOL_PROT_WARN_AFTER_MOUNT">The hidden volume is now protected against damage until the outer volume is dismounted.\n\nWARNING: If any data is attempted to be saved to the hidden volume area, VeraCrypt will start write-protecting the entire volume (both the outer and the hidden part) until it is dismounted. This may cause filesystem corruption on the outer volume, which (if repeated) might adversely affect plausible deniability of the hidden volume. Therefore, you should make every effort to avoid writing to the hidden volume area. Any data being saved to the hidden volume area will not be saved and will be lost. Windows may report this as a write error ("Delayed Write Failed" or "The parameter is incorrect").</entry> - <entry lang="en" key="HIDVOL_PROT_WARN_AFTER_MOUNT_PLURAL">Each of the hidden volumes within the newly mounted volumes is now protected against damage until dismounted.\n\nWARNING: If any data is attempted to be saved to protected hidden volume area of any of these volumes, VeraCrypt will start write-protecting the entire volume (both the outer and the hidden part) until it is dismounted. This may cause filesystem corruption on the outer volume, which (if repeated) might adversely affect plausible deniability of the hidden volume. Therefore, you should make every effort to avoid writing to the hidden volume area. Any data being saved to protected hidden volume areas will not be saved and will be lost. Windows may report this as a write error ("Delayed Write Failed" or "The parameter is incorrect").</entry> - <entry lang="en" key="DAMAGE_TO_HIDDEN_VOLUME_PREVENTED">WARNING: Data were attempted to be saved to the hidden volume area of the volume mounted as %c:! VeraCrypt prevented these data from being saved in order to protect the hidden volume. This may have caused filesystem corruption on the outer volume and Windows may have reported a write error ("Delayed Write Failed" or "The parameter is incorrect"). The entire volume (both the outer and the hidden part) will be write-protected until it is dismounted. If this is not the first time VeraCrypt has prevented data from being saved to the hidden volume area of this volume, plausible deniability of this hidden volume might be adversely affected (due to possible unusual correlated inconsistencies within the outer volume file system). Therefore, you should consider creating a new VeraCrypt volume (with Quick Format disabled) and moving files from this volume to the new volume; this volume should be securely erased (both the outer and the hidden part). We strongly recommend that you restart the operating system now.</entry> + <entry lang="en" key="HIDVOL_PROT_WARN_AFTER_MOUNT">The hidden volume is now protected against damage until the outer volume is unmounted.\n\nWARNING: If any data is attempted to be saved to the hidden volume area, VeraCrypt will start write-protecting the entire volume (both the outer and the hidden part) until it is unmounted. This may cause filesystem corruption on the outer volume, which (if repeated) might adversely affect plausible deniability of the hidden volume. Therefore, you should make every effort to avoid writing to the hidden volume area. Any data being saved to the hidden volume area will not be saved and will be lost. Windows may report this as a write error ("Delayed Write Failed" or "The parameter is incorrect").</entry> + <entry lang="en" key="HIDVOL_PROT_WARN_AFTER_MOUNT_PLURAL">Each of the hidden volumes within the newly mounted volumes is now protected against damage until unmounted.\n\nWARNING: If any data is attempted to be saved to protected hidden volume area of any of these volumes, VeraCrypt will start write-protecting the entire volume (both the outer and the hidden part) until it is unmounted. This may cause filesystem corruption on the outer volume, which (if repeated) might adversely affect plausible deniability of the hidden volume. Therefore, you should make every effort to avoid writing to the hidden volume area. Any data being saved to protected hidden volume areas will not be saved and will be lost. Windows may report this as a write error ("Delayed Write Failed" or "The parameter is incorrect").</entry> + <entry lang="en" key="DAMAGE_TO_HIDDEN_VOLUME_PREVENTED">WARNING: Data were attempted to be saved to the hidden volume area of the volume mounted as %c:! VeraCrypt prevented these data from being saved in order to protect the hidden volume. This may have caused filesystem corruption on the outer volume and Windows may have reported a write error ("Delayed Write Failed" or "The parameter is incorrect"). The entire volume (both the outer and the hidden part) will be write-protected until it is unmounted. If this is not the first time VeraCrypt has prevented data from being saved to the hidden volume area of this volume, plausible deniability of this hidden volume might be adversely affected (due to possible unusual correlated inconsistencies within the outer volume file system). Therefore, you should consider creating a new VeraCrypt volume (with Quick Format disabled) and moving files from this volume to the new volume; this volume should be securely erased (both the outer and the hidden part). We strongly recommend that you restart the operating system now.</entry> <entry lang="en" key="CANNOT_SATISFY_OVER_4G_FILE_SIZE_REQ">You have indicated intent to store files larger than 4 GiB on the volume. This requires the volume to be formatted as NTFS/exFAT/ReFS, which, however, will not be possible.</entry> <entry lang="en" key="CANNOT_CREATE_NON_HIDDEN_NTFS_VOLUMES_UNDER_HIDDEN_OS">Please note that when a hidden operating system is running, non-hidden VeraCrypt volumes cannot be formatted as NTFS/exFAT/ReFS. The reason is that the volume would need to be temporarily mounted without write protection in order to allow the operating system to format it as NTFS (whereas formatting as FAT is performed by VeraCrypt, not by the operating system, and without mounting the volume). For further technical details, see below. You can create a non-hidden NTFS/exFAT/ReFS volume from within the decoy operating system.</entry> <entry lang="en" key="HIDDEN_VOL_CREATION_UNDER_HIDDEN_OS_HOWTO">For security reasons, when a hidden operating system is running, hidden volumes can be created only in the 'direct' mode (because outer volumes must always be mounted as read-only). To create a hidden volume securely, follow these steps:\n\n1) Boot the decoy system.\n\n2) Create a normal VeraCrypt volume and, to this volume, copy some sensitive-looking files that you actually do NOT want to hide (the volume will become the outer volume).\n\n3) Boot the hidden system and start the VeraCrypt Volume Creation Wizard. If the volume is file-hosted, move it to the system partition or to another hidden volume (otherwise, the newly created hidden volume would be mounted as read-only and could not be formatted). Follow the instructions in the wizard so as to select the 'direct' hidden volume creation mode.\n\n4) In the wizard, select the volume you created in step 2 and then follow the instructions to create a hidden volume within it.</entry> <entry lang="en" key="HIDDEN_OS_WRITE_PROTECTION_BRIEF_INFO">For security reasons, when a hidden operating system is running, local unencrypted filesystems and non-hidden VeraCrypt volumes are mounted as read-only (no data can be written to such filesystems or VeraCrypt volumes).\n\nData is allowed to be written to any filesystem that resides within a hidden VeraCrypt volume (provided that the hidden volume is not located in a container stored on an unencrypted filesystem or on any other read-only filesystem).</entry> <entry lang="en" key="HIDDEN_OS_WRITE_PROTECTION_EXPLANATION">There are three main reasons why such countermeasures have been implemented:\n\n- It enables the creation of a secure platform for mounting of hidden VeraCrypt volumes. Note that we officially recommend that hidden volumes are mounted only when a hidden operating system is running. (For more information, see the subsection 'Security Requirements and Precautions Pertaining to Hidden Volumes' in the documentation.)\n\n- In some cases, it is possible to determine that, at a certain time, a particular filesystem was not mounted under (or that a particular file on the filesystem was not saved or accessed from within) a particular instance of an operating system (e.g. by analyzing and comparing filesystem journals, file timestamps, application logs, error logs, etc). This might indicate that a hidden operating system is installed on the computer. The countermeasures prevent these issues.\n\n- It prevents data corruption and allows safe hibernation. When Windows resumes from hibernation, it assumes that all mounted filesystems are in the same state as when the system entered hibernation. VeraCrypt ensures this by write-protecting any filesystem accessible both from within the decoy and hidden systems. Without such protection, the filesystem could become corrupted when mounted by one system while the other system is hibernated.</entry> @@ -564,12 +564,12 @@ <entry lang="en" key="MAX_HIDVOL_SIZE_BYTES">Maximum possible hidden volume size for this volume is %.2f bytes.</entry> <entry lang="en" key="MAX_HIDVOL_SIZE_KB">Maximum possible hidden volume size for this volume is %.2f KiB.</entry> <entry lang="en" key="MAX_HIDVOL_SIZE_MB">Maximum possible hidden volume size for this volume is %.2f MiB.</entry> <entry lang="en" key="MAX_HIDVOL_SIZE_GB">Maximum possible hidden volume size for this volume is %.2f GiB.</entry> <entry lang="en" key="MAX_HIDVOL_SIZE_TB">Maximum possible hidden volume size for this volume is %.2f TiB.</entry> - <entry lang="en" key="MOUNTED_NOPWCHANGE">Volume password/keyfiles cannot be changed while the volume is mounted. Please dismount the volume first.</entry> - <entry lang="en" key="MOUNTED_NO_PKCS5_PRF_CHANGE">The header key derivation algorithm cannot be changed while the volume is mounted. Please dismount the volume first.</entry> + <entry lang="en" key="MOUNTED_NOPWCHANGE">Volume password/keyfiles cannot be changed while the volume is mounted. Please unmount the volume first.</entry> + <entry lang="en" key="MOUNTED_NO_PKCS5_PRF_CHANGE">The header key derivation algorithm cannot be changed while the volume is mounted. Please unmount the volume first.</entry> <entry lang="en" key="MOUNT_BUTTON">&Mount</entry> <entry lang="en" key="NEW_VERSION_REQUIRED">A newer version of VeraCrypt is required to mount this volume.</entry> <entry lang="en" key="VOL_CREATION_WIZARD_NOT_FOUND">Error: Volume Creation Wizard not found.\n\nPlease make sure that the file 'VeraCrypt Format.exe' is in the folder from which 'VeraCrypt.exe' was launched. If it is not, please reinstall VeraCrypt, or locate 'VeraCrypt Format.exe' on your disk and run it.</entry> <entry lang="en" key="VOL_EXPANDER_NOT_FOUND">Error: Volume Expander not found.\n\nPlease make sure that the file 'VeraCryptExpander.exe' is in the folder from which 'VeraCrypt.exe' was launched. If it is not, please reinstall VeraCrypt, or locate 'VeraCryptExpander.exe' on your disk and run it.</entry> <entry lang="en" key="NEXT">&Next ></entry> @@ -586,13 +586,13 @@ <entry lang="en" key="NO_FREE_DRIVE_FOR_OUTER_VOL">No free drive letter for the outer volume! Volume creation cannot continue.</entry> <entry lang="en" key="NO_OS_VER">Could not determine your operating system version or you are using an unsupported operating system.</entry> <entry lang="en" key="NO_PATH_SELECTED">No path selected!</entry> <entry lang="en" key="NO_SPACE_FOR_HIDDEN_VOL">Not enough free space for the hidden volume! Volume creation cannot continue.</entry> <entry lang="en" key="HIDDEN_VOLUME_TOO_SMALL_FOR_OS_CLONE">Error: The files you copied to the outer volume occupy too much space. Therefore, there is not enough free space on the outer volume for the hidden volume.\n\nNote that the hidden volume must be as large as the system partition (the partition where the currently running operating system is installed). The reason is that the hidden operating system needs to be created by copying the content of the system partition to the hidden volume.\n\n\nThe process of creation of the hidden operating system cannot continue.</entry> - <entry lang="en" key="OPENFILES_DRIVER">The driver is unable to dismount the volume. Some files located on the volume are probably still open.</entry> - <entry lang="en" key="OPENFILES_LOCK">Unable to lock the volume. There are still open files on the volume. Therefore, it cannot be dismounted.</entry> - <entry lang="en" key="VOL_LOCK_FAILED_OFFER_FORCED_DISMOUNT">VeraCrypt cannot lock the volume because it is in use by the system or applications (there may be open files on the volume).\n\nDo you want to force dismount on the volume?</entry> + <entry lang="en" key="OPENFILES_DRIVER">The driver is unable to unmount the volume. Some files located on the volume are probably still open.</entry> + <entry lang="en" key="OPENFILES_LOCK">Unable to lock the volume. There are still open files on the volume. Therefore, it cannot be unmounted.</entry> + <entry lang="en" key="VOL_LOCK_FAILED_OFFER_FORCED_UNMOUNT">VeraCrypt cannot lock the volume because it is in use by the system or applications (there may be open files on the volume).\n\nDo you want to force unmount on the volume?</entry> <entry lang="en" key="OPEN_VOL_TITLE">Select a VeraCrypt Volume</entry> <entry lang="en" key="OPEN_TITLE">Specify Path and File Name</entry> <entry lang="en" key="SELECT_PKCS11_MODULE">Select PKCS #11 Library</entry> <entry lang="en" key="OUTOFMEMORY">Out of Memory</entry> <entry lang="en" key="FORMAT_DEVICE_FOR_ADVANCED_ONLY">IMPORTANT: We strongly recommend that inexperienced users create a VeraCrypt file container on the selected device/partition, instead of attempting to encrypt the entire device/partition.\n\nWhen you create a VeraCrypt file container (as opposed to encrypting a device or partition) there is, for example, no risk of destroying a large number of files. Note that a VeraCrypt file container (even though it contains a virtual encrypted disk) is actually just like any normal file. For more information, see the chapter Beginner's Tutorial in the VeraCrypt User Guide.\n\nAre you sure you want to encrypt the entire device/partition?</entry> @@ -630,16 +630,16 @@ <entry lang="en" key="PASSWORD_HIDVOL_HOST_TITLE">Outer Volume Password</entry> <entry lang="en" key="PASSWORD_HIDVOL_TITLE">Hidden Volume Password</entry> <entry lang="en" key="PASSWORD_HIDDEN_OS_TITLE">Password for Hidden Operating System</entry> <entry lang="en" key="PASSWORD_LENGTH_WARNING">WARNING: Short passwords are easy to crack using brute force techniques!\n\nWe recommend choosing a password consisting of 20 or more characters. Are you sure you want to use a short password?</entry> <entry lang="en" key="PASSWORD_TITLE">Volume Password</entry> - <entry lang="en" key="PASSWORD_WRONG">Operation failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</entry> - <entry lang="en" key="PASSWORD_OR_KEYFILE_WRONG">Operation failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</entry> - <entry lang="en" key="PASSWORD_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</entry> - <entry lang="en" key="PASSWORD_OR_KEYFILE_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</entry> - <entry lang="en" key="PASSWORD_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.</entry> - <entry lang="en" key="PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.</entry> + <entry lang="en" key="PASSWORD_WRONG">Operation failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.\n - Volume uses an old algorithm that has been removed.\n - TrueCrypt format volumes are no longer supported.</entry> + <entry lang="en" key="PASSWORD_OR_KEYFILE_WRONG">Operation failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.\n - Volume uses an old algorithm that has been removed.\n - TrueCrypt format volumes are no longer supported.</entry> + <entry lang="en" key="PASSWORD_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.\n - Volume uses an old algorithm that has been removed.\n - TrueCrypt format volumes are no longer supported.</entry> + <entry lang="en" key="PASSWORD_OR_KEYFILE_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.\n - Volume uses an old algorithm that has been removed.\n - TrueCrypt format volumes are no longer supported.</entry> + <entry lang="en" key="PASSWORD_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.\n - Volume uses an old algorithm that has been removed.\n - TrueCrypt format volumes are no longer supported.</entry> + <entry lang="en" key="PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.\n - Volume uses an old algorithm that has been removed.\n - TrueCrypt format volumes are no longer supported.</entry> <entry lang="en" key="PASSWORD_WRONG_CAPSLOCK_ON">\n\nWarning: Caps Lock is on. This may cause you to enter your password incorrectly.</entry> <entry lang="en" key="PIM_CHANGE_WARNING">Remember Number to Mount Volume</entry> <entry lang="en" key="PIM_HIDVOL_HOST_TITLE">Outer Volume PIM</entry> <entry lang="en" key="PIM_HIDVOL_TITLE">Hidden Volume PIM</entry> <entry lang="en" key="PIM_HIDDEN_OS_TITLE">PIM for Hidden Operating System</entry> @@ -692,14 +692,14 @@ <entry lang="en" key="TC_TRAVELER_DISK">VeraCrypt Traveler Disk</entry> <entry lang="en" key="TWOFISH_HELP">Designed by Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson. Published in 1998. 256-bit key, 128-bit block. Mode of operation is XTS. Twofish was one of the AES finalists.</entry> <entry lang="en" key="MORE_INFO_ABOUT">More information on %s</entry> <entry lang="en" key="UNKNOWN">Unknown</entry> <entry lang="en" key="ERR_UNKNOWN">An unspecified or unknown error occurred (%d).</entry> - <entry lang="en" key="UNMOUNTALL_LOCK_FAILED">Some volumes contain files or folders being used by applications or system.\n\nForce dismount?</entry> - <entry lang="en" key="UNMOUNT_BUTTON">&Dismount</entry> - <entry lang="en" key="UNMOUNT_FAILED">Dismount failed!</entry> - <entry lang="en" key="UNMOUNT_LOCK_FAILED">Volume contains files or folders being used by applications or system.\n\nForce dismount?</entry> + <entry lang="en" key="UNMOUNTALL_LOCK_FAILED">Some volumes contain files or folders being used by applications or system.\n\nForce unmount?</entry> + <entry lang="en" key="UNMOUNT_BUTTON">&Unmount</entry> + <entry lang="en" key="UNMOUNT_FAILED">Unmount failed!</entry> + <entry lang="en" key="UNMOUNT_LOCK_FAILED">Volume contains files or folders being used by applications or system.\n\nForce unmount?</entry> <entry lang="en" key="NO_VOLUME_MOUNTED_TO_DRIVE">No volume is mounted to the specified drive letter.</entry> <entry lang="en" key="VOL_ALREADY_MOUNTED">The volume you are trying to mount is already mounted. </entry> <entry lang="en" key="VOL_MOUNT_FAILED">An error occurred when attempting to mount volume.</entry> <entry lang="en" key="VOL_SEEKING">Error seeking location within volume.</entry> <entry lang="en" key="VOL_SIZE_WRONG">Error: Incorrect volume size.</entry> @@ -727,11 +727,11 @@ <entry lang="en" key="ALL_FILES">All Files</entry> <entry lang="en" key="TC_VOLUMES">VeraCrypt Volumes</entry> <entry lang="en" key="DLL_FILES">Library Modules</entry> <entry lang="en" key="FORMAT_NTFS_STOP">NTFS/exFAT/ReFS formatting cannot continue.</entry> <entry lang="en" key="CANT_MOUNT_VOLUME">Cannot mount volume.</entry> - <entry lang="en" key="CANT_DISMOUNT_VOLUME">Cannot dismount volume.</entry> + <entry lang="en" key="CANT_UNMOUNT_VOLUME">Cannot unmount volume.</entry> <entry lang="en" key="FORMAT_NTFS_FAILED">Windows failed to format the volume as NTFS/exFAT/ReFS.\n\nPlease select a different type of file system (if possible) and try again. Alternatively, you could leave the volume unformatted (select 'None' as the filesystem), exit this wizard, mount the volume, and then use either a system or a third-party tool to format the mounted volume (the volume will remain encrypted).</entry> <entry lang="en" key="FORMAT_NTFS_FAILED_ASK_FAT">Windows failed to format the volume as NTFS/exFAT/ReFS.\n\nDo you want to format the volume as FAT instead?</entry> <entry lang="en" key="DEFAULT">Default</entry> <entry lang="en" key="PARTITION_LOWER_CASE">partition</entry> <entry lang="en" key="PARTITION_UPPER_CASE">PARTITION</entry> @@ -769,11 +769,11 @@ <entry lang="en" key="INPLACE_ENC_CANT_ACCESS_OR_GET_INFO_ON_VOL">Error: Cannot access the volume and/or obtain information about the volume.\n\nMake sure that the selected volume exists, that it is not being used by the system or applications, that you have read/write permission for the volume, and that it is not write-protected.</entry> <entry lang="en" key="INPLACE_ENC_CANT_ACCESS_OR_GET_INFO_ON_VOL_ALT">Error: Cannot access the volume and/or obtain information about the volume. Make sure that the selected volume exists, that it is not being used by the system or applications, that you have read/write permission for the volume, and that it is not write-protected.\n\nIf the problem persists, it might help to follow the below steps.</entry> <entry lang="en" key="INPLACE_ENC_GENERIC_ERR_ALT_STEPS">An error prevented VeraCrypt from encrypting the partition. Please try fixing any previously reported problems and then try again. If the problems persist, it might help to follow the below steps.</entry> <entry lang="en" key="INPLACE_ENC_GENERIC_ERR_RESUME">An error prevented VeraCrypt from resuming the process of encryption/decryption of the partition/volume.\n\nPlease try fixing any previously reported problems and then try resuming the process again if possible. Note that the volume cannot be mounted until it has been fully encrypted or fully decrypted.</entry> <entry lang="en" key="INPLACE_DEC_GENERIC_ERR">An error prevented VeraCrypt from decrypting the volume. Please try fixing any previously reported problems and then try again if possible.</entry> - <entry lang="en" key="CANT_DISMOUNT_OUTER_VOL">Error: Cannot dismount the outer volume!\n\nVolume cannot be dismounted if it contains files or folders being used by a program or the system.\n\nPlease close any program that might be using files or directories on the volume and click Retry.</entry> + <entry lang="en" key="CANT_UNMOUNT_OUTER_VOL">Error: Cannot unmount the outer volume!\n\nVolume cannot be unmounted if it contains files or folders being used by a program or the system.\n\nPlease close any program that might be using files or directories on the volume and click Retry.</entry> <entry lang="en" key="CANT_GET_OUTER_VOL_INFO">Error: Cannot obtain information about the outer volume!\nVolume creation cannot continue.</entry> <entry lang="en" key="CANT_ACCESS_OUTER_VOL">Error: Cannot access the outer volume! Volume creation cannot continue.</entry> <entry lang="en" key="CANT_MOUNT_OUTER_VOL">Error: Cannot mount the outer volume! Volume creation cannot continue.</entry> <entry lang="en" key="CANT_GET_CLUSTER_BITMAP">Error: Cannot get volume cluster bitmap! Volume creation cannot continue.</entry> <entry lang="en" key="ALPHABETICAL_CATEGORIZED">Alphabetical/Categorized</entry> @@ -880,11 +880,11 @@ <entry lang="en" key="INSTALL_OF_FAILED">Failed to install '%s'. %s\nDo you want to continue installing?</entry> <entry lang="en" key="UNINSTALL_OF_FAILED">Failed to uninstall '%s'. %s\nDo you want to continue uninstalling?</entry> <entry lang="en" key="INSTALL_COMPLETED">Installation completed.</entry> <entry lang="en" key="CANT_CREATE_FOLDER">The folder '%s' could not be created</entry> <entry lang="en" key="CLOSE_TC_FIRST">The VeraCrypt device driver cannot be unloaded.\n\nPlease close all open VeraCrypt windows first. If it does not help, please restart Windows and then try again.</entry> - <entry lang="en" key="DISMOUNT_ALL_FIRST">All VeraCrypt volumes must be dismounted before installing or uninstalling VeraCrypt.</entry> + <entry lang="en" key="UNMOUNT_ALL_FIRST">All VeraCrypt volumes must be unmounted before installing or uninstalling VeraCrypt.</entry> <entry lang="en" key="UNINSTALL_OLD_VERSION_FIRST">An obsolete version of VeraCrypt is currently installed on this system. It needs to be uninstalled before you can install this new version of VeraCrypt.\n\nAs soon as you close this message box, the uninstaller of the old version will be launched. Note that no volume will be decrypted when you uninstall VeraCrypt. After you uninstall the old version of VeraCrypt, run the installer of the new version of VeraCrypt again.</entry> <entry lang="en" key="REG_INSTALL_FAILED">The installation of the registry entries has failed</entry> <entry lang="en" key="DRIVER_INSTALL_FAILED">The installation of the device driver has failed. Please restart Windows and then try installing VeraCrypt again.</entry> <entry lang="en" key="STARTING_DRIVER">Starting VeraCrypt device driver</entry> <entry lang="en" key="DRIVER_UINSTALL_FAILED">Uninstallation of the device driver has failed. Please note that, due to a Windows issue, it may be necessary to log off or restart the system before the device driver can be uninstalled (or reinstalled).</entry> @@ -901,11 +901,11 @@ <entry lang="en" key="DAYS">days</entry> <entry lang="en" key="HOURS">hours</entry> <entry lang="en" key="MINUTES">minutes</entry> <entry lang="en" key="SECONDS">s</entry> <entry lang="en" key="OPEN">Open</entry> - <entry lang="en" key="DISMOUNT">Dismount</entry> + <entry lang="en" key="UNMOUNT">Unmount</entry> <entry lang="en" key="SHOW_TC">Show VeraCrypt</entry> <entry lang="en" key="HIDE_TC">Hide VeraCrypt</entry> <entry lang="en" key="TOTAL_DATA_READ">Data Read since Mount</entry> <entry lang="en" key="TOTAL_DATA_WRITTEN">Data Written since Mount</entry> <entry lang="en" key="ENCRYPTED_PORTION">Encrypted Portion</entry> @@ -973,11 +973,11 @@ <entry lang="en" key="RESCUE_DISK_CHECK_FAILED">Cannot verify that the Rescue Disk has been correctly burned.\n\nIf you have burned the Rescue Disk, please eject and reinsert the CD/DVD; then click Next to try again. If this does not help, please try another medium%s.\n\nIf you have not burned the Rescue Disk yet, please do so, and then click Next.\n\nIf you attempted to verify a VeraCrypt Rescue Disk created before you started this wizard, please note that such Rescue Disk cannot be used, because it was created for a different master key. You need to burn the newly generated Rescue Disk.</entry> <entry lang="en" key="RESCUE_DISK_CHECK_FAILED_SENTENCE_APPENDIX"> and/or other CD/DVD recording software</entry> <entry lang="en" key="SYSTEM_FAVORITES_DLG_TITLE">VeraCrypt - System Favorite Volumes</entry> <entry lang="en" key="SYS_FAVORITES_HELP_LINK">What are system favorite volumes?</entry> <entry lang="en" key="SYS_FAVORITES_REQUIRE_PBA">The system partition/drive does not appear to be encrypted.\n\nSystem favorite volumes can be mounted using only a pre-boot authentication password. Therefore, to enable use of system favorite volumes, you need to encrypt the system partition/drive first.</entry> - <entry lang="en" key="DISMOUNT_FIRST">Please dismount the volume before proceeding.</entry> + <entry lang="en" key="UNMOUNT_FIRST">Please unmount the volume before proceeding.</entry> <entry lang="en" key="CANNOT_SET_TIMER">Error: Cannot set timer.</entry> <entry lang="en" key="IDPM_CHECK_FILESYS">Check Filesystem</entry> <entry lang="en" key="IDPM_REPAIR_FILESYS">Repair Filesystem</entry> <entry lang="en" key="IDPM_ADD_TO_FAVORITES">Add to Favorites...</entry> <entry lang="en" key="IDPM_ADD_TO_SYSTEM_FAVORITES">Add to System Favorites...</entry> @@ -995,27 +995,27 @@ <entry lang="en" key="PATH_ITEM">Path: </entry> <entry lang="en" key="DRIVE_LETTER_ITEM">Drive Letter: </entry> <entry lang="en" key="UNSUPPORTED_CHARS_IN_PWD">Error: Password must contain only ASCII characters.\n\nNon-ASCII characters in password might cause the volume to be impossible to mount when your system configuration changes.\n\nThe following characters are allowed:\n\n ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~</entry> <entry lang="en" key="UNSUPPORTED_CHARS_IN_PWD_RECOM">Warning: Password contains non-ASCII characters. This may cause the volume to be impossible to mount when your system configuration changes.\n\nYou should replace all non-ASCII characters in the password with ASCII characters. To do so, click 'Volumes' -> 'Change Volume Password'.\n\nThe following are ASCII characters:\n\n ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~</entry> <entry lang="en" key="EXE_FILE_EXTENSION_CONFIRM">WARNING: We strongly recommend that you avoid file extensions that are used for executable files (such as .exe, .sys, or .dll) and other similarly problematic file extensions. Using such file extensions causes Windows and antivirus software to interfere with the container, which adversely affects the performance of the volume and may also cause other serious problems.\n\nWe strongly recommend that you remove the file extension or change it (e.g., to '.hc').\n\nAre you sure you want to use the problematic file extension?</entry> - <entry lang="en" key="EXE_FILE_EXTENSION_MOUNT_WARNING">WARNING: This container has a file extension that is used for executable files (such as .exe, .sys, or .dll) or some other file extension that is similarly problematic. It will very likely cause Windows and antivirus software to interfere with the container, which will adversely affect the performance of the volume and may also cause other serious problems.\n\nWe strongly recommend that you remove the file extension of the container or change it (e.g., to '.hc') after you dismount the volume.</entry> + <entry lang="en" key="EXE_FILE_EXTENSION_MOUNT_WARNING">WARNING: This container has a file extension that is used for executable files (such as .exe, .sys, or .dll) or some other file extension that is similarly problematic. It will very likely cause Windows and antivirus software to interfere with the container, which will adversely affect the performance of the volume and may also cause other serious problems.\n\nWe strongly recommend that you remove the file extension of the container or change it (e.g., to '.hc') after you unmount the volume.</entry> <entry lang="en" key="HOMEPAGE">Homepage</entry> <entry lang="en" key="LARGE_IDE_WARNING_XP">WARNING: It appears that you have not applied any Service Pack to your Windows installation. You should not write to IDE disks larger than 128 GiB under Windows XP to which you did not apply Service Pack 1 or later! If you do, data on the disk (no matter if it is a VeraCrypt volume or not) may get corrupted. Note that this is a limitation of Windows, not a bug in VeraCrypt.</entry> <entry lang="en" key="LARGE_IDE_WARNING_2K">WARNING: It appears that you have not applied Service Pack 3 or later to your Windows installation. You should not write to IDE disks larger than 128 GiB under Windows 2000 to which you did not apply Service Pack 3 or later! If you do, data on the disk (no matter if it is a VeraCrypt volume or not) may get corrupted. Note that this is a limitation of Windows, not a bug in VeraCrypt.\n\nNote: You may also need to enable the 48-bit LBA support in the registry; for more information, see http://support.microsoft.com/kb/305098/EN-US</entry> <entry lang="en" key="LARGE_IDE_WARNING_2K_REGISTRY">WARNING: 48-bit LBA ATAPI support is disabled on your system. Therefore, you should not write to IDE disks larger than 128 GiB! If you do, data on the disk (no matter if it is a VeraCrypt volume or not) may get corrupted. Note that this is a limitation of Windows, not a limitation of VeraCrypt.\n\nTo enable the 48-bit LBA support, add the 'EnableBigLba' registry value in the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\atapi\\Parameters and set it to 1.\n\nFor more information, see http://support.microsoft.com/kb/305098</entry> <entry lang="en" key="VOLUME_TOO_LARGE_FOR_FAT32">Error: Files larger than 4 GiB cannot be stored on a FAT32 file system. Therefore, file-hosted VeraCrypt volumes (containers) stored on a FAT32 file system cannot be larger than 4 GiB.\n\nIf you need a larger volume, create it on an NTFS file system (or, if you use Windows Vista SP1 or later, on an exFAT file system) or, instead of creating a file-hosted volume, encrypt an entire partition or device.</entry> <entry lang="en" key="VOLUME_TOO_LARGE_FOR_WINXP">Warning: Windows XP does not support files larger than 2048 GiB (it will report that "Not enough storage is available"). Therefore, you cannot create a file-hosted VeraCrypt volume (container) larger than 2048 GiB under Windows XP.\n\nNote that it is still possible to encrypt the entire drive or create a partition-hosted VeraCrypt volume larger than 2048 GiB under Windows XP.</entry> <entry lang="en" key="FREE_SPACE_FOR_WRITING_TO_OUTER_VOLUME">WARNING: If you want to be able to add more data/files to the outer volume in future, you should consider choosing a smaller size for the hidden volume.\n\nAre you sure you want to continue with the size you specified?</entry> <entry lang="en" key="NO_VOLUME_SELECTED">No volume selected.\n\nClick 'Select Device' or 'Select File' to select a VeraCrypt volume.</entry> - <entry lang="en" key="NO_SYSENC_PARTITION_SELECTED">No partition selected.\n\nClick 'Select Device' to select a dismounted partition that normally requires pre-boot authentication (for example, a partition located on the encrypted system drive of another operating system, which is not running, or the encrypted system partition of another operating system).\n\nNote: The selected partition will be mounted as a regular VeraCrypt volume without pre-boot authentication. This is useful e.g. for backup or repair operations.</entry> + <entry lang="en" key="NO_SYSENC_PARTITION_SELECTED">No partition selected.\n\nClick 'Select Device' to select a unmounted partition that normally requires pre-boot authentication (for example, a partition located on the encrypted system drive of another operating system, which is not running, or the encrypted system partition of another operating system).\n\nNote: The selected partition will be mounted as a regular VeraCrypt volume without pre-boot authentication. This is useful e.g. for backup or repair operations.</entry> <entry lang="en" key="CONFIRM_SAVE_DEFAULT_KEYFILES">WARNING: If default keyfiles are set and enabled, volumes that are not using these keyfiles will be impossible to mount. Therefore, after you enable default keyfiles, keep in mind to uncheck the 'Use keyfiles' checkbox (below a password input field) whenever mounting such volumes.\n\nAre you sure you want to save the selected keyfiles/paths as default?</entry> <entry lang="en" key="HK_AUTOMOUNT_DEVICES">Auto-Mount Devices</entry> - <entry lang="en" key="HK_DISMOUNT_ALL">Dismount All</entry> + <entry lang="en" key="HK_UNMOUNT_ALL">Unmount All</entry> <entry lang="en" key="HK_WIPE_CACHE">Wipe Cache</entry> - <entry lang="en" key="HK_DISMOUNT_ALL_AND_WIPE">Dismount All & Wipe Cache</entry> - <entry lang="en" key="HK_FORCE_DISMOUNT_ALL_AND_WIPE">Force Dismount All & Wipe Cache</entry> - <entry lang="en" key="HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT">Force Dismount All, Wipe Cache & Exit</entry> + <entry lang="en" key="HK_UNMOUNT_ALL_AND_WIPE">Unmount All & Wipe Cache</entry> + <entry lang="en" key="HK_FORCE_UNMOUNT_ALL_AND_WIPE">Force Unmount All & Wipe Cache</entry> + <entry lang="en" key="HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT">Force Unmount All, Wipe Cache & Exit</entry> <entry lang="en" key="HK_MOUNT_FAVORITE_VOLUMES">Mount Favorite Volumes</entry> <entry lang="en" key="HK_SHOW_HIDE_MAIN_WINDOW">Show/Hide Main VeraCrypt Window</entry> <entry lang="en" key="PRESS_A_KEY_TO_ASSIGN">(Click here and press a key)</entry> <entry lang="en" key="ACTION">Action</entry> <entry lang="en" key="SHORTCUT">Shortcut</entry> @@ -1023,26 +1023,26 @@ <entry lang="en" key="SHORTCUT_ALREADY_IN_USE">Error: Shortcut already in use.</entry> <entry lang="en" key="HOTKEY_REGISTRATION_ERROR">WARNING: One or more VeraCrypt system-wide hot keys will not work!\n\nPlease make sure that other applications and the operating system do not use the same shortcut(s) as VeraCrypt.</entry> <entry lang="en" key="PAGING_FILE_CREATION_PREVENTED">Paging file creation has been prevented.\n\nPlease note that, due to Windows issues, paging files cannot be located on non-system VeraCrypt volumes (including system favorite volumes). VeraCrypt supports creation of paging files only on an encrypted system partition/drive.</entry> <entry lang="en" key="SYS_ENC_HIBERNATION_PREVENTED">An error or incompatibility prevents VeraCrypt from encrypting the hibernation file. Therefore, hibernation has been prevented.\n\nNote: When a computer hibernates (or enters a power-saving mode), the content of its system memory is written to a hibernation storage file residing on the system drive. VeraCrypt would not be able to prevent encryption keys and the contents of sensitive files opened in RAM from being saved unencrypted to the hibernation storage file.</entry> <entry lang="en" key="HIDDEN_OS_HIBERNATION_PREVENTED">Hibernation has been prevented.\n\nVeraCrypt does not support hibernation on hidden operating systems that use an extra boot partition. Please note that the boot partition is shared by both the decoy and the hidden system. Therefore, in order to prevent data leaks and problems while resuming from hibernation, VeraCrypt has to prevent the hidden system from writing to the shared boot partition and from hibernating.</entry> - <entry lang="en" key="VOLUME_MOUNTED_AS_DRIVE_LETTER_X_DISMOUNTED">VeraCrypt volume mounted as %c: has been dismounted.</entry> - <entry lang="en" key="MOUNTED_VOLUMES_DISMOUNTED">VeraCrypt volumes have been dismounted.</entry> - <entry lang="en" key="VOLUMES_DISMOUNTED_CACHE_WIPED">VeraCrypt volumes have been dismounted and password cache has been wiped.</entry> - <entry lang="en" key="SUCCESSFULLY_DISMOUNTED">Successfully dismounted</entry> - <entry lang="en" key="CONFIRM_BACKGROUND_TASK_DISABLED">WARNING: If the VeraCrypt Background Task is disabled, the following functions will be disabled:\n\n1) Hot keys\n2) Auto-dismount (e.g., upon logoff, inadvertent host device removal, time-out, etc.)\n3) Auto-mount of favorite volumes\n4) Notifications (e.g., when damage to hidden volume is prevented)\n5) Tray icon\n\nNote: You can shut down the Background Task anytime by right-clicking the VeraCrypt tray icon and selecting 'Exit'.\n\nAre you sure you want to permanently disable the VeraCrypt Background Task?</entry> - <entry lang="en" key="CONFIRM_NO_FORCED_AUTODISMOUNT">WARNING: If this option is disabled, volumes containing open files/directories will not be possible to auto-dismount.\n\nAre you sure you want to disable this option?</entry> - <entry lang="en" key="WARN_PREF_AUTO_DISMOUNT">WARNING: Volumes containing open files/directories will NOT be auto-dismounted.\n\nTo prevent this, enable the following option in this dialog window: 'Force auto-dismount even if volume contains open files or directories'</entry> - <entry lang="en" key="WARN_PREF_AUTO_DISMOUNT_ON_POWER">WARNING: When the notebook battery power is low, Windows may omit sending the appropriate messages to running applications when the computer is entering power saving mode. Therefore, VeraCrypt may fail to auto-dismount volumes in such cases.</entry> + <entry lang="en" key="VOLUME_MOUNTED_AS_DRIVE_LETTER_X_UNMOUNTED">VeraCrypt volume mounted as %c: has been unmounted.</entry> + <entry lang="en" key="MOUNTED_VOLUMES_UNMOUNTED">VeraCrypt volumes have been unmounted.</entry> + <entry lang="en" key="VOLUMES_UNMOUNTED_CACHE_WIPED">VeraCrypt volumes have been unmounted and password cache has been wiped.</entry> + <entry lang="en" key="SUCCESSFULLY_UNMOUNTED">Successfully unmounted</entry> + <entry lang="en" key="CONFIRM_BACKGROUND_TASK_DISABLED">WARNING: If the VeraCrypt Background Task is disabled, the following functions will be disabled:\n\n1) Hot keys\n2) Auto-unmount (e.g., upon logoff, inadvertent host device removal, time-out, etc.)\n3) Auto-mount of favorite volumes\n4) Notifications (e.g., when damage to hidden volume is prevented)\n5) Tray icon\n\nNote: You can shut down the Background Task anytime by right-clicking the VeraCrypt tray icon and selecting 'Exit'.\n\nAre you sure you want to permanently disable the VeraCrypt Background Task?</entry> + <entry lang="en" key="CONFIRM_NO_FORCED_AUTOUNMOUNT">WARNING: If this option is disabled, volumes containing open files/directories will not be possible to auto-unmount.\n\nAre you sure you want to disable this option?</entry> + <entry lang="en" key="WARN_PREF_AUTO_UNMOUNT">WARNING: Volumes containing open files/directories will NOT be auto-unmounted.\n\nTo prevent this, enable the following option in this dialog window: 'Force auto-unmount even if volume contains open files or directories'</entry> + <entry lang="en" key="WARN_PREF_AUTO_UNMOUNT_ON_POWER">WARNING: When the notebook battery power is low, Windows may omit sending the appropriate messages to running applications when the computer is entering power saving mode. Therefore, VeraCrypt may fail to auto-unmount volumes in such cases.</entry> <entry lang="en" key="NONSYS_INPLACE_ENC_RESUME_PROMPT">You have scheduled the process of encryption/decryption of a partition/volume. The process has not been completed yet.\n\nDo you want to resume the process now?</entry> <entry lang="en" key="SYSTEM_ENCRYPTION_RESUME_PROMPT">You have scheduled the process of encryption or decryption of the system partition/drive. The process has not been completed yet.\n\nDo you want to start (resume) the process now?</entry> <entry lang="en" key="ASK_NONSYS_INPLACE_ENC_NOTIFICATION_REMOVAL">Do you want to be prompted about whether you want to resume the currently scheduled processes of encryption/decryption of non-system partitions/volumes?</entry> <entry lang="en" key="KEEP_PROMPTING_ME">Yes, keep prompting me</entry> <entry lang="en" key="DO_NOT_PROMPT_ME">No, do not prompt me</entry> <entry lang="en" key="NONSYS_INPLACE_ENC_NOTIFICATION_REMOVAL_NOTE">IMPORTANT: Keep in mind that you can resume the process of encryption/decryption of any non-system partition/volume by selecting 'Volumes' > 'Resume Interrupted Process' from the menu bar of the main VeraCrypt window.</entry> <entry lang="en" key="SYSTEM_ENCRYPTION_SCHEDULED_BUT_PBA_FAILED">You have scheduled the process of encryption or decryption of the system partition/drive. However, pre-boot authentication failed (or was bypassed).\n\nNote: If you decrypted the system partition/drive in the pre-boot environment, you may need to finalize the process by selecting 'System' > 'Permanently Decrypt System Partition/Drive' from the menu bar of the main VeraCrypt window.</entry> - <entry lang="en" key="CONFIRM_EXIT">WARNING: If VeraCrypt exits now, the following functions will be disabled:\n\n1) Hot keys\n2) Auto-dismount (e.g., upon logoff, inadvertent host device removal, time-out, etc.)\n3) Auto-mount of favorite volumes\n4) Notifications (e.g., when damage to hidden volume is prevented)\n\nNote: If you do not wish VeraCrypt to run in the background, disable the VeraCrypt Background Task in the Preferences (and, if necessary, disable the automatic start of VeraCrypt in the Preferences).\n\nAre you sure you want VeraCrypt to exit?</entry> + <entry lang="en" key="CONFIRM_EXIT">WARNING: If VeraCrypt exits now, the following functions will be disabled:\n\n1) Hot keys\n2) Auto-unmount (e.g., upon logoff, inadvertent host device removal, time-out, etc.)\n3) Auto-mount of favorite volumes\n4) Notifications (e.g., when damage to hidden volume is prevented)\n\nNote: If you do not wish VeraCrypt to run in the background, disable the VeraCrypt Background Task in the Preferences (and, if necessary, disable the automatic start of VeraCrypt in the Preferences).\n\nAre you sure you want VeraCrypt to exit?</entry> <entry lang="en" key="CONFIRM_EXIT_UNIVERSAL">Exit?</entry> <entry lang="en" key="CHOOSE_ENCRYPT_OR_DECRYPT">VeraCrypt does not have sufficient information to determine whether to encrypt or decrypt.</entry> <entry lang="en" key="CHOOSE_ENCRYPT_OR_DECRYPT_FINALIZE_DECRYPT_NOTE">VeraCrypt does not have sufficient information to determine whether to encrypt or decrypt.\n\nNote: If you decrypted the system partition/drive in the pre-boot environment, you may need to finalize the process by clicking Decrypt.</entry> <entry lang="en" key="NONSYS_INPLACE_ENC_REVERSE_INFO">Note: When you are encrypting a non-system partition/volume in place and an error persistently prevents you from finishing the process, you will not be able to mount the volume (and access data stored on it) until you entirely DECRYPT the volume (i.e. reverse the process).\n\nIf you need to do so, follow these steps:\n1) Exit this wizard.\n2) In the main VeraCrypt window, select 'Volumes' > 'Resume Interrupted Process'.\n3) Select 'Decrypt'.</entry> <entry lang="en" key="NONSYS_INPLACE_ENC_DEFER_CONFIRM">Do you want to interrupt and postpone the process of encryption/decryption of the partition/volume?\n\nNote: Keep in mind that the volume cannot be mounted until it has been fully encrypted or decrypted. You will be able to resume the process of encryption/decryption and it will continue from the point where it was stopped. You can do so, for example, by selecting 'Volumes' > 'Resume Interrupted Process' from the menu bar of the main VeraCrypt window.</entry> @@ -1061,11 +1061,11 @@ <entry lang="en" key="REPAIRING_FS">Attempting to repair the file system on the VeraCrypt volume mounted as %s...</entry> <entry lang="en" key="WARN_64_BIT_BLOCK_CIPHER">Warning: This volume is encrypted with a legacy encryption algorithm.\n\nAll 64-bit-block encryption algorithms (e.g., Blowfish, CAST-128, or Triple DES) are deprecated. It will be possible to mount this volume using future versions of VeraCrypt. However, there will be no further enhancements to the implementations of these legacy encryption algorithms. We recommend that you create a new VeraCrypt volume encrypted with a 128-bit-block encryption algorithm (e.g., AES, Serpent, Twofish, etc.) and that you move all files from this volume to the new volume.</entry> <entry lang="en" key="SYS_AUTOMOUNT_DISABLED">Your system is not configured to auto-mount new volumes. It may be impossible to mount device-hosted VeraCrypt volumes. Auto-mounting can be enabled by executing the following command and restarting the system.\n\nmountvol.exe /E</entry> <entry lang="en" key="SYS_ASSIGN_DRIVE_LETTER">Please assign a drive letter to the partition/device before proceeding ('Control Panel' > 'System and Maintenance' > 'Administrative Tools' - 'Create and format hard disk partitions').\n\nNote that this is a requirement of the operating system.</entry> <entry lang="en" key="MOUNT_TC_VOLUME">Mount VeraCrypt volume</entry> - <entry lang="en" key="DISMOUNT_ALL_TC_VOLUMES">Dismount all VeraCrypt volumes</entry> + <entry lang="en" key="UNMOUNT_ALL_TC_VOLUMES">Unmount all VeraCrypt volumes</entry> <entry lang="en" key="UAC_INIT_ERROR">VeraCrypt failed to obtain Administrator privileges.</entry> <entry lang="en" key="ERR_ACCESS_DENIED">Access was denied by the operating system.\n\nPossible cause: The operating system requires that you have read/write permission (or administrator privileges) for certain folders, files, and devices, in order for you to be allowed to read and write data to/from them. Normally, a user without administrator privileges is allowed to create, read and modify files in his or her Documents folder.</entry> <entry lang="en" key="SECTOR_SIZE_UNSUPPORTED">Error: The drive uses an unsupported sector size.\n\nIt is currently not possible to create partition/device-hosted volumes on drives that use sectors larger than 4096 bytes. However, note that you can create file-hosted volumes (containers) on such drives.</entry> <entry lang="en" key="SYSENC_UNSUPPORTED_SECTOR_SIZE_BIOS">It is currently not possible to encrypt a system installed on a disk that uses a sector size other than 512 bytes.</entry> <entry lang="en" key="NO_SPACE_FOR_BOOT_LOADER">The VeraCrypt Boot Loader requires at least 32 KibiBytes of free space at the beginning of the system drive (the VeraCrypt Boot Loader needs to be stored in that area). Unfortunately, your drive does not meet this condition.\n\nPlease do NOT report this as a bug/problem in VeraCrypt. To solve this problem, you will need to repartition your disk and leave the first 32 KibiBytes of the disk free (in most cases, you will need to delete and recreate the first partition). We recommend that you use the Microsoft partition manager that is available e.g. when you are installing Windows.</entry> @@ -1283,33 +1283,33 @@ <entry lang="en" key="TOKEN_SLOT_ID">Slot</entry> <entry lang="en" key="TOKEN_NAME">Token name</entry> <entry lang="en" key="TOKEN_DATA_OBJECT_LABEL">File name</entry> <entry lang="en" key="BOOT_PASSWORD_CACHE_KEYBOARD_WARNING">IMPORTANT: Please note that pre-boot authentication passwords are always typed using the standard US keyboard layout. Therefore, a volume that uses a password typed using any other keyboard layout may be impossible to mount using a pre-boot authentication password (note that this is not a bug in VeraCrypt). To allow such a volume to be mounted using a pre-boot authentication password, follow these steps:\n\n1) Click 'Select File' or 'Select Device' and select the volume.\n2) Select 'Volumes' > 'Change Volume Password'.\n3) Enter the current password for the volume.\n4) Change the keyboard layout to English (US) by clicking the Language bar icon in the Windows taskbar and selecting 'EN English (United States)'.\n5) In VeraCrypt, in the field for the new password, type the pre-boot authentication password.\n6) Confirm the new password by retyping it in the confirmation field and click 'OK'.\nWARNING: Please keep in mind that if you follow these steps, the volume password will always have to be typed using the US keyboard layout (which is automatically ensured only in the pre-boot environment).</entry> <entry lang="en" key="SYS_FAVORITES_KEYBOARD_WARNING">System favorite volumes will be mounted using the pre-boot authentication password. If any system favorite volume uses a different password, it will not be mounted.</entry> - <entry lang="en" key="SYS_FAVORITES_ADMIN_ONLY_INFO">Please note that if you need to prevent normal VeraCrypt volume actions (such as 'Dismount All', auto-dismount, etc.) from affecting system favorite volumes, you should enable the option 'Allow only administrators to view and dismount system favorite volumes in VeraCrypt'. In addition, when VeraCrypt is run without administrator privileges (the default on Windows Vista and later), system favorite volumes will not be displayed in the drive letter list in the main VeraCrypt application window.</entry> - <entry lang="en" key="SYS_FAVORITES_ADMIN_ONLY_WARNING">IMPORTANT: Please keep in mind that if this option is enabled and VeraCrypt does not have administrator privileges, mounted system favorite volumes are NOT displayed in the VeraCrypt application window and they cannot be dismounted. Therefore, if you need e.g. to dismount a system favorite volume, please right-click the VeraCrypt icon (in the Start menu) and select 'Run as administrator' first. The same limitation applies to the 'Dismount All' function, 'Auto-Dismount' functions, 'Dismount All' hot keys, etc.</entry> + <entry lang="en" key="SYS_FAVORITES_ADMIN_ONLY_INFO">Please note that if you need to prevent normal VeraCrypt volume actions (such as 'Unmount All', auto-unmount, etc.) from affecting system favorite volumes, you should enable the option 'Allow only administrators to view and unmount system favorite volumes in VeraCrypt'. In addition, when VeraCrypt is run without administrator privileges (the default on Windows Vista and later), system favorite volumes will not be displayed in the drive letter list in the main VeraCrypt application window.</entry> + <entry lang="en" key="SYS_FAVORITES_ADMIN_ONLY_WARNING">IMPORTANT: Please keep in mind that if this option is enabled and VeraCrypt does not have administrator privileges, mounted system favorite volumes are NOT displayed in the VeraCrypt application window and they cannot be unmounted. Therefore, if you need e.g. to unmount a system favorite volume, please right-click the VeraCrypt icon (in the Start menu) and select 'Run as administrator' first. The same limitation applies to the 'Unmount All' function, 'Auto-Unmount' functions, 'Unmount All' hot keys, etc.</entry> <entry lang="en" key="SETTING_REQUIRES_REBOOT">Note that this setting takes effect only after the operating system is restarted.</entry> <entry lang="en" key="COMMAND_LINE_ERROR">Error while parsing command line.</entry> <entry lang="en" key="RESCUE_DISK">Rescue Disk</entry> <entry lang="en" key="SELECT_FILE_AND_MOUNT">Select &File and Mount...</entry> <entry lang="en" key="SELECT_DEVICE_AND_MOUNT">Select &Device and Mount...</entry> - <entry lang="en" key="DISABLE_NONADMIN_SYS_FAVORITES_ACCESS">Allow only administrators to view and dismount system favorite volumes in VeraCrypt</entry> + <entry lang="en" key="DISABLE_NONADMIN_SYS_FAVORITES_ACCESS">Allow only administrators to view and unmount system favorite volumes in VeraCrypt</entry> <entry lang="en" key="MOUNT_SYSTEM_FAVORITES_ON_BOOT">Mount system favorite volumes when Windows starts (in the initial phase of the startup procedure)</entry> - <entry lang="en" key="MOUNTED_VOLUME_DIRTY">Warning: The filesystem on the volume mounted as '%s' was not cleanly dismounted and thus may contain errors. Using a corrupted filesystem can cause data loss or data corruption.\n\nNote: Before you physically remove or switch off a device (such as a USB flash drive or an external hard drive) where a mounted VeraCrypt volume resides, you should always dismount the VeraCrypt volume in VeraCrypt first.\n\n\nDo you want Windows to attempt to detect and fix errors (if any) on the filesystem?</entry> - <entry lang="en" key="SYS_FAVORITE_VOLUME_DIRTY">Warning: One or more system favorite volumes were not cleanly dismounted and thus may contain filesystem errors. Please see the system event log for further details.\n\nUsing a corrupted filesystem can cause data loss or data corruption. You should check the affected system favorite volume(s) for errors (right-click each of them in VeraCrypt and select 'Repair Filesystem').</entry> + <entry lang="en" key="MOUNTED_VOLUME_DIRTY">Warning: The filesystem on the volume mounted as '%s' was not cleanly unmounted and thus may contain errors. Using a corrupted filesystem can cause data loss or data corruption.\n\nNote: Before you physically remove or switch off a device (such as a USB flash drive or an external hard drive) where a mounted VeraCrypt volume resides, you should always unmount the VeraCrypt volume in VeraCrypt first.\n\n\nDo you want Windows to attempt to detect and fix errors (if any) on the filesystem?</entry> + <entry lang="en" key="SYS_FAVORITE_VOLUME_DIRTY">Warning: One or more system favorite volumes were not cleanly unmounted and thus may contain filesystem errors. Please see the system event log for further details.\n\nUsing a corrupted filesystem can cause data loss or data corruption. You should check the affected system favorite volume(s) for errors (right-click each of them in VeraCrypt and select 'Repair Filesystem').</entry> <entry lang="en" key="FILESYS_REPAIR_CONFIRM_BACKUP">Warning: Repairing a damaged filesystem using the Microsoft 'chkdsk' tool might cause loss of files in damaged areas. Therefore, it is recommended that you first back up the files stored on the VeraCrypt volume to another, healthy, VeraCrypt volume.\n\nDo you want to repair the filesystem now?</entry> <entry lang="en" key="MOUNTED_CONTAINER_FORCED_READ_ONLY">Volume '%s' has been mounted as read-only because write access was denied.\n\nPlease make sure the security permissions of the file container allow you to write to it (right-click the container and select Properties > Security).\n\nNote that, due to a Windows issue, you may see this warning even after setting the appropriate security permissions. This is not caused by a bug in VeraCrypt. A possible solution is to move your container to, e.g., your 'Documents' folder.\n\nIf you intend to keep your volume read-only, set the read-only attribute of the container (right-click the container and select Properties > Read-only), which will suppress this warning.</entry> <entry lang="en" key="MOUNTED_DEVICE_FORCED_READ_ONLY">Volume '%s' had to be mounted as read-only because write access was denied.\n\nPlease make sure no other application (e.g. antivirus software) is accessing the partition/device on which the volume is hosted.</entry> <entry lang="en" key="MOUNTED_DEVICE_FORCED_READ_ONLY_WRITE_PROTECTION">Volume '%s' has been mounted as read-only because the operating system reported the host device to be write-protected.\n\nPlease note that some custom chipset drivers have been reported to cause writable media to falsely appear write-protected. This problem is not caused by VeraCrypt. It may be solved by updating or uninstalling any custom (non-Microsoft) chipset drivers that are currently installed on this system.</entry> <entry lang="en" key="LIMIT_ENC_THREAD_POOL_NOTE">Note that the Hyper-Threading technology provides multiple logical cores per a single physical core. When Hyper Threading is enabled, the number selected above represents the number of logical processors/cores.</entry> <entry lang="en" key="NUMBER_OF_THREADS">%d threads</entry> <entry lang="en" key="DISABLED_HW_AES_AFFECTS_PERFORMANCE">Note that hardware-accelerated AES is disabled, which will affect benchmark results (worse performance).\n\nTo enable hardware acceleration, select 'Settings' > 'Performance' and enable the corresponding option.</entry> <entry lang="en" key="LIMITED_THREAD_COUNT_AFFECTS_PERFORMANCE">Note that the number of threads is currently limited, which will affect benchmark results (worse performance).\n\nTo utilize the full potential of the processor(s), select 'Settings' > 'Performance' and disable the corresponding option.</entry> <entry lang="en" key="ASK_REMOVE_DEVICE_WRITE_PROTECTION">Do you want VeraCrypt to attempt to disable write protection of the partition/drive?</entry> <entry lang="en" key="CONFIRM_SETTING_DEGRADES_PERFORMANCE">WARNING: This setting may degrade performance.\n\nAre you sure you want to use this setting?</entry> - <entry lang="en" key="HOST_DEVICE_REMOVAL_DISMOUNT_WARN_TITLE">Warning: VeraCrypt volume auto-dismounted</entry> - <entry lang="en" key="HOST_DEVICE_REMOVAL_DISMOUNT_WARN">Before you physically remove or turn off a device containing a mounted volume, you should always dismount the volume in VeraCrypt first.\n\nUnexpected spontaneous dismount is usually caused by an intermittently failing cable, drive (enclosure), etc.</entry> + <entry lang="en" key="HOST_DEVICE_REMOVAL_UNMOUNT_WARN_TITLE">Warning: VeraCrypt volume auto-unmounted</entry> + <entry lang="en" key="HOST_DEVICE_REMOVAL_UNMOUNT_WARN">Before you physically remove or turn off a device containing a mounted volume, you should always unmount the volume in VeraCrypt first.\n\nUnexpected spontaneous unmount is usually caused by an intermittently failing cable, drive (enclosure), etc.</entry> <entry lang="en" key="UNSUPPORTED_TRUECRYPT_FORMAT">This volume was created with TrueCrypt %x.%x but VeraCrypt supports only TrueCrypt volumes created with TrueCrypt 6.x/7.x series</entry> <entry lang="en" key="TEST">Test</entry> <entry lang="en" key="KEYFILE">Keyfile</entry> <entry lang="en" key="VKEY_08">Backspace</entry> <entry lang="en" key="VKEY_09">Tab</entry> @@ -1451,11 +1451,11 @@ <entry lang="en" key="QUICK_FORMAT_HELP">In order to enable your operating system to mount your new volume, it has to be formatted with a filesystem. Please select a filesystem type.\n\nIf your volume is going to be hosted on a device or partition, you can use 'Quick format' to skip encryption of free space of the volume.</entry> <entry lang="en" key="IDC_ENABLE_HARDWARE_ENCRYPTION_NEG">Do not accelerate AES encryption/decryption by using the AES instructions of the processor</entry> <entry lang="en" key="IDM_ADD_ALL_VOLUME_TO_FAVORITES">Add All Mounted Volumes to Favorites...</entry> <entry lang="en" key="TASKICON_PREF_MENU_ITEMS">Task Icon Menu Items</entry> <entry lang="en" key="TASKICON_PREF_OPEN_VOL">Open Mounted Volumes</entry> - <entry lang="en" key="TASKICON_PREF_DISMOUNT_VOL">Dismount Mounted Volumes</entry> + <entry lang="en" key="TASKICON_PREF_UNMOUNT_VOL">Unmount Mounted Volumes</entry> <entry lang="en" key="DISK_FREE">Free space available: {0}</entry> <entry lang="en" key="VOLUME_SIZE_HELP">Please specify the size of the container to create. Note that the minimum possible size of a volume is 292 KiB.</entry> <entry lang="en" key="LINUX_CONFIRM_INNER_VOLUME_CALC">WARNING: You have selected a filesystem other than FAT for the outer volume.\nPlease Note that in this case VeraCrypt can't calculate the exact maximum allowed size for the hidden volume and it will use only an estimation that can be wrong.\nThus, it is your responsibility to use an adequate value for the size of the hidden volume so that it does not overlap the outer volume.\n\nDo you want to continue using the selected filesystem for the outer volume?</entry> <entry lang="en" key="LINUX_PREF_TAB_SECURITY">Security</entry> <entry lang="en" key="LINUX_PREF_TAB_MOUNT_OPTIONS">Mount Options</entry> @@ -1481,18 +1481,18 @@ <entry lang="en" key="LINUX_SYSTEM_ENC_PW_LENGTH_NOTE">System Encryption password is longer than {0} characters.</entry> <entry lang="en" key="LINUX_MOUNT_SYSTEM_ENC_PREBOOT">Mount partition &using system encryption (preboot authentication)</entry> <entry lang="en" key="LINUX_DO_NOT_MOUNT">Do &not mount</entry> <entry lang="en" key="LINUX_MOUNT_AT_DIR">Mount at directory:</entry> <entry lang="en" key="LINUX_SELECT">Se&lect...</entry> - <entry lang="en" key="LINUX_DISMOUNT_ALL_WHEN">Dismount All Volumes When</entry> + <entry lang="en" key="LINUX_UNMOUNT_ALL_WHEN">Unmount All Volumes When</entry> <entry lang="en" key="LINUX_ENTERING_POWERSAVING">System is entering power saving mode</entry> <entry lang="en" key="LINUX_LOGIN_ACTION">Actions to Perform when User Logs On</entry> - <entry lang="en" key="LINUX_CLOSE_EXPL_ON_DISMOUNT">Close all Explorer windows of volume being dismounted</entry> + <entry lang="en" key="LINUX_CLOSE_EXPL_ON_UNMOUNT">Close all Explorer windows of volume being unmounted</entry> <entry lang="en" key="LINUX_HOTKEYS">Hotkeys</entry> <entry lang="en" key="LINUX_SYSTEM_HOTKEYS">System-Wide Hotkeys</entry> - <entry lang="en" key="LINUX_SOUND_NOTIFICATION">Play system notification sound after mount/dismount</entry> - <entry lang="en" key="LINUX_CONFIRM_AFTER_DISMOUNT">Display confirmation message box after dismount</entry> + <entry lang="en" key="LINUX_SOUND_NOTIFICATION">Play system notification sound after mount/unmount</entry> + <entry lang="en" key="LINUX_CONFIRM_AFTER_UNMOUNT">Display confirmation message box after unmount</entry> <entry lang="en" key="LINUX_VC_QUITS">VeraCrypt quits</entry> <entry lang="en" key="LINUX_OPEN_FINDER">Open Finder window for successfully mounted volume</entry> <entry lang="en" key="LINUX_DISABLE_KERNEL_ONLY_SETTING">Please note that this setting takes effect only if use of the kernel cryptographic services is disabled.</entry> <entry lang="en" key="LINUX_DISABLE_KERNEL_CRYPT_CONFIRM">Disabling the use of kernel cryptographic services can degrade performance.\n\nAre you sure?</entry> <entry lang="en" key="LINUX_KERNEL_CRYPT_OPTION_CHANGE_MOUNTED_HINT">Please note that disabling this option may have no effect on volumes mounted using kernel cryptographic services.</entry> @@ -1508,23 +1508,23 @@ <entry lang="en" key="LINUX_ONLY_TEXTMODE">This feature is currently supported only in text mode.</entry> <entry lang="en" key="LINUX_FREE_SPACE_ON_DRIVE">Free space on drive {0}: is {1}.</entry> <entry lang="en" key="LINUX_DYNAMIC_NOTICE">Please note that if your operating system does not allocate files from the beginning of the free space, the maximum possible hidden volume size may be much smaller than the size of the free space on the outer volume. This is not a bug in VeraCrypt but a limitation of the operating system.</entry> <entry lang="en" key="LINUX_MAX_HIDDEN_SIZE">Maximum possible hidden volume size for this volume is {0}.</entry> <entry lang="en" key="LINUX_OPEN_OUTER_VOL">Open Outer Volume</entry> - <entry lang="en" key="LINUX_OUTER_VOL_IS_MOUNTED">Outer volume has been successfully created and mounted as '{0}'. To this volume you should now copy some sensitive-looking files that you actually do NOT want to hide. The files will be there for anyone forcing you to disclose your password. You will reveal only the password for this outer volume, not for the hidden one. The files that you really care about will be stored in the hidden volume, which will be created later on. When you finish copying, click Next. Do not dismount the volume.\n\nNote: After you click Next, the outer volume will be analyzed to determine the size of uninterrupted area of free space whose end is aligned with the end of the volume. This area will accommodate the hidden volume, so it will limit its maximum possible size. The procedure ensures no data on the outer volume are overwritten by the hidden volume.</entry> + <entry lang="en" key="LINUX_OUTER_VOL_IS_MOUNTED">Outer volume has been successfully created and mounted as '{0}'. To this volume you should now copy some sensitive-looking files that you actually do NOT want to hide. The files will be there for anyone forcing you to disclose your password. You will reveal only the password for this outer volume, not for the hidden one. The files that you really care about will be stored in the hidden volume, which will be created later on. When you finish copying, click Next. Do not unmount the volume.\n\nNote: After you click Next, the outer volume will be analyzed to determine the size of uninterrupted area of free space whose end is aligned with the end of the volume. This area will accommodate the hidden volume, so it will limit its maximum possible size. The procedure ensures no data on the outer volume are overwritten by the hidden volume.</entry> <entry lang="en" key="LINUX_ERROR_TRY_ENCRYPT_SYSTEM_DRIVE">Error: You are trying to encrypt a system drive.\n\nVeraCrypt can encrypt a system drive only under Windows.</entry> <entry lang="en" key="LINUX_ERROR_TRY_ENCRYPT_SYSTEM_PARTITION">Error: You are trying to encrypt a system partition.\n\nVeraCrypt can encrypt system partitions only under Windows.</entry> <entry lang="en" key="LINUX_WARNING_FORMAT_DESTROY_FS">WARNING: Formatting of the device will destroy all data on filesystem '{0}'.\n\nDo you want to continue?</entry> - <entry lang="en" key="LINUX_MOUNTET_HINT">The filesystem of the selected device is currently mounted. Please dismount '{0}' before proceeding.</entry> + <entry lang="en" key="LINUX_MOUNTET_HINT">The filesystem of the selected device is currently mounted. Please unmount '{0}' before proceeding.</entry> <entry lang="en" key="LINUX_HIDDEN_PASS_NO_DIFF">The Hidden volume can't have the same password, PIM and keyfiles as the Outer volume</entry> <entry lang="en" key="LINUX_NOT_FAT_HINT">Please note that the volume will not be formatted with a FAT filesystem and, therefore, you may be required to install additional filesystem drivers on platforms other than {0}, which will enable you to mount the volume.</entry> <entry lang="en" key="LINUX_ERROR_SIZE_HIDDEN_VOL">Error: The hidden volume to be created is larger than {0} TB ({1} GB).\n\nPossible solutions:\n- Create a container/partition smaller than {0} TB.\n</entry> <entry lang="en" key="LINUX_MAX_SIZE_HINT">- Use a drive with 4096-byte sectors to be able to create partition/device-hosted hidden volumes up to 16 TB in size</entry> <entry lang="en" key="LINUX_DOT_LF">.\n</entry> <entry lang="en" key="LINUX_NOT_SUPPORTED"> (not supported by components available on this platform).\n</entry> <entry lang="en" key="LINUX_KERNEL_OLD">Your system uses an old version of the Linux kernel.\n\nDue to a bug in the Linux kernel, your system may stop responding when writing data to a VeraCrypt volume. This problem can be solved by upgrading the kernel to version 2.6.24 or later.</entry> - <entry lang="en" key="LINUX_VOL_DISMOUNTED">Volume {0} has been dismounted.</entry> + <entry lang="en" key="LINUX_VOL_UNMOUNTED">Volume {0} has been unmounted.</entry> <entry lang="en" key="LINUX_VOL_MOUNTED">Volume {0} has been mounted.</entry> <entry lang="en" key="LINUX_OOM">Out of memory.</entry> <entry lang="en" key="LINUX_CANT_GET_ADMIN_PRIV">Failed to obtain administrator privileges</entry> <entry lang="en" key="LINUX_COMMAND_GET_ERROR">Command {0} returned error {1}.</entry> <entry lang="en" key="LINUX_CMD_HELP">VeraCrypt Command Line Help</entry> @@ -1615,14 +1615,14 @@ <entry lang="en" key="SCARD_MODULE_INIT_FAILED">Error when loading the WinSCard / PCSC library.</entry> <entry lang="en" key="EMV_UNKNOWN_CARD_TYPE">The card in the reader is not a supported EMV card.</entry> <entry lang="en" key="EMV_SELECT_AID_FAILED">The AID of the card in the reader could not be selected.</entry> <entry lang="en" key="EMV_ICC_CERT_NOTFOUND">ICC Public Key Certificate was not found in the card.</entry> <entry lang="en" key="EMV_ISSUER_CERT_NOTFOUND">Issuer Public Key Certificate was not found in the card.</entry> - <entry lang="en" key="EMV_CPLC_NOTFOUND">CLPC was not found in the EMV card.</entry> + <entry lang="en" key="EMV_CPLC_NOTFOUND">CPLC was not found in the EMV card.</entry> <entry lang="en" key="EMV_PAN_NOTFOUND">No Primary Account Number (PAN) found in the EMV card.</entry> <entry lang="en" key="INVALID_EMV_PATH">EMV path is invalid.</entry> - <entry lang="en" key="EMV_KEYFILE_DATA_NOTFOUND">Unable to build a keyfile from the EMV card's data.\n\nOne of the following is missing:\n- ICC Public Key Certificate.\n- Issuer Public Key Certificate.\n- CPCL data.</entry> + <entry lang="en" key="EMV_KEYFILE_DATA_NOTFOUND">Unable to build a keyfile from the EMV card's data.\n\nOne of the following is missing:\n- ICC Public Key Certificate.\n- Issuer Public Key Certificate.\n- CPLC data.</entry> <entry lang="en" key="SCARD_W_REMOVED_CARD">No card in the reader.\n\nPlease make sure the card is correctly slotted.</entry> <entry lang="en" key="FORMAT_EXTERNAL_FAILED">Windows format.com command failed to format the volume as NTFS/exFAT/ReFS: Error 0x%.8X.\n\nFalling back to using Windows FormatEx API.</entry> <entry lang="en" key="FORMATEX_API_FAILED">Windows FormatEx API failed to format the volume as NTFS/exFAT/ReFS.\n\nFailure status = %s.</entry> <entry lang="en" key="EXPANDER_WRITING_RANDOM_DATA">Writing random data to new space ...\n</entry> <entry lang="en" key="EXPANDER_WRITING_ENCRYPTED_BACKUP">Writing re-encrypted backup header ...\n</entry> @@ -1633,10 +1633,19 @@ <entry lang="en" key="EXPANDER_EXTENDING_FILESYSTEM">Extending file system ...\n</entry> <entry lang="en" key="PARTIAL_SYSENC_MOUNT_READONLY">Warning: The system partition you attempted to mount was not fully encrypted. As a safety measure to prevent potential corruption or unwanted modifications, volume '%s' was mounted as read-only.</entry> <entry lang="en" key="IDC_LINK_KEYFILES_EXTENSIONS_WARNING">Important information on using third-party file extensions</entry> <entry lang="en" key="IDC_DISABLE_MEMORY_PROTECTION">Disable memory protection for Accessibility tools compatibility</entry> <entry lang="en" key="DISABLE_MEMORY_PROTECTION_WARNING">WARNING: Disabling memory protection significantly reduces security. Enable this option ONLY if you rely on Accessibility tools, like Screen Readers, to interact with VeraCrypt's UI.</entry> + <entry lang="en" key="LINUX_LANGUAGE">Language</entry> + <entry lang="en" key="LINUX_SELECT_SYS_DEFAULT_LANG">Select system's default language</entry> + <entry lang="en" key="LINUX_RESTART_FOR_LANGUAGE_CHANGE">For the language change to come into effect, VeraCrypt needs to be restarted.</entry> + <entry lang="en" key="ERR_XTS_MASTERKEY_VULNERABLE">WARNING: The volume's master key is vulnerable to an attack that compromises data security.\n\nPlease create a new volume and transfer the data to it.</entry> + <entry lang="en" key="ERR_SYSENC_XTS_MASTERKEY_VULNERABLE">WARNING: The encrypted system's master key is vulnerable to an attack that compromises data security.\nPlease decrypt the system partition/drive and then re-encrypt it.</entry> + <entry lang="en" key="ERR_XTS_MASTERKEY_VULNERABLE_SHORT">WARNING: The volume's master key has a security vulnerability.</entry> + <entry lang="en" key="MOUNTPOINT_BLOCKED">ERROR: The volume mount point is blocked because it overrides a protected system directory.\n\nPlease choose a different mount point.</entry> + <entry lang="en" key="MOUNTPOINT_NOTALLOWED">ERROR: The volume mount point is not allowed because it overrides a directory that is part of the PATH environment variable.\n\nPlease choose a different mount point.</entry> + <entry lang="en" key="INSECURE_MODE">[INSECURE MODE]</entry> </localization> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="VeraCrypt"> <xs:complexType> <xs:sequence> diff --git a/src/Common/Lzma.vcxproj b/src/Common/Lzma.vcxproj index a34390aa..d09a39bd 100644 --- a/src/Common/Lzma.vcxproj +++ b/src/Common/Lzma.vcxproj @@ -1,16 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> @@ -50,67 +58,101 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{B896FE1F-6BF3-4F75-9148-F841829073D9}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>Lzma</RootNamespace> + <ProjectName>Lzma</ProjectName> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>false</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <WholeProgramOptimization>false</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>false</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>false</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <OutDir>$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Configuration)\lzma\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\lzma\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\lzma\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <OutDir>$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Configuration)\lzma\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\lzma\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\lzma\</IntDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader> </PrecompiledHeader> @@ -136,20 +178,35 @@ <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader> </PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -164,10 +221,30 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <ControlFlowGuard>Guard</ControlFlowGuard> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> diff --git a/src/Common/Lzma_vs2019.vcxproj b/src/Common/Lzma_vs2019.vcxproj deleted file mode 100644 index 81a57daa..00000000 --- a/src/Common/Lzma_vs2019.vcxproj +++ /dev/null @@ -1,247 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|ARM64"> - <Configuration>Debug</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|ARM64"> - <Configuration>Release</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <ItemGroup> - <None Include="lzma\lzma-history.txt" /> - <None Include="lzma\lzma-sdk.txt" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="lzma\Alloc.c" /> - <ClCompile Include="lzma\CpuArch.c" /> - <ClCompile Include="lzma\LzFind.c" /> - <ClCompile Include="lzma\LzFindMt.c" /> - <ClCompile Include="lzma\LzFindOpt.c" /> - <ClCompile Include="lzma\LzmaDec.c" /> - <ClCompile Include="lzma\LzmaEnc.c" /> - <ClCompile Include="lzma\LzmaLib.c" /> - <ClCompile Include="lzma\Threads.c" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="lzma\7zTypes.h" /> - <ClInclude Include="lzma\7zWindows.h" /> - <ClInclude Include="lzma\Alloc.h" /> - <ClInclude Include="lzma\Compiler.h" /> - <ClInclude Include="lzma\CpuArch.h" /> - <ClInclude Include="lzma\LzFind.h" /> - <ClInclude Include="lzma\LzFindMt.h" /> - <ClInclude Include="lzma\LzHash.h" /> - <ClInclude Include="lzma\LzmaDec.h" /> - <ClInclude Include="lzma\LzmaEnc.h" /> - <ClInclude Include="lzma\LzmaLib.h" /> - <ClInclude Include="lzma\Precomp.h" /> - <ClInclude Include="lzma\Threads.h" /> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{B896FE1F-6BF3-4F75-9148-F841829073D9}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>Lzma</RootNamespace> - <ProjectName>Lzma</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>false</WholeProgramOptimization> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>false</WholeProgramOptimization> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>false</WholeProgramOptimization> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>false</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>false</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>false</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <OutDir>$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <OutDir>$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/src/Common/Lzma_vs2019.vcxproj.filters b/src/Common/Lzma_vs2019.vcxproj.filters deleted file mode 100644 index 82fc24ec..00000000 --- a/src/Common/Lzma_vs2019.vcxproj.filters +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> - <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> - <None Include="lzma\lzma-history.txt" /> - <None Include="lzma\lzma-sdk.txt" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="lzma\Alloc.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\CpuArch.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\LzFind.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\LzFindMt.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\LzFindOpt.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\LzmaDec.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\LzmaEnc.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\LzmaLib.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="lzma\Threads.c"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="lzma\7zTypes.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\Alloc.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\Compiler.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\CpuArch.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\LzFind.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\LzFindMt.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\LzHash.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\LzmaDec.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\LzmaEnc.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\LzmaLib.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\Precomp.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\Threads.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="lzma\7zWindows.h"> - <Filter>Header Files</Filter> - </ClInclude> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/src/Common/Lzma_vs2019.vcxproj.user b/src/Common/Lzma_vs2019.vcxproj.user deleted file mode 100644 index ace9a86a..00000000 --- a/src/Common/Lzma_vs2019.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> -</Project>
\ No newline at end of file diff --git a/src/Common/Password.c b/src/Common/Password.c index ae6b8035..ed662a88 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -171,11 +171,11 @@ BOOL CheckPasswordLength (HWND hwndDlg, unsigned __int32 passwordLength, int pim int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5, int old_pim, Password *newPassword, int pkcs5, int pim, int wipePassCount, HWND hwndDlg) { int nDosLinkCreated = 1, nStatus = ERR_OS_ERROR; wchar_t szDiskFile[TC_MAX_PATH], szCFDevice[TC_MAX_PATH]; wchar_t szDosDevice[TC_MAX_PATH]; - char buffer[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; + unsigned char buffer[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; PCRYPTO_INFO cryptoInfo = NULL, ci = NULL; void *dev = INVALID_HANDLE_VALUE; DWORD dwError; DWORD bytesRead; BOOL bDevice; @@ -369,10 +369,14 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5, nStatus = ReadVolumeHeader (FALSE, buffer, oldPassword, old_pkcs5, old_pim, &cryptoInfo, NULL); if (nStatus == ERR_CIPHER_INIT_WEAK_KEY) nStatus = 0; // We can ignore this error here + // if the XTS master key is vulnerable, return error and do not allow the user to change the password since the master key will not be changed + if ((nStatus == 0) && cryptoInfo->bVulnerableMasterKey) + nStatus = ERR_XTS_MASTERKEY_VULNERABLE; + if (nStatus == ERR_PASSWORD_WRONG) { continue; // Try next volume type } else if (nStatus != 0) diff --git a/src/Common/Password.h b/src/Common/Password.h index dd3fbed6..9f2f0145 100644 --- a/src/Common/Password.h +++ b/src/Common/Password.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef PASSWORD_H diff --git a/src/Common/Pkcs5.c b/src/Common/Pkcs5.c index d81078e8..fbe22275 100644 --- a/src/Common/Pkcs5.c +++ b/src/Common/Pkcs5.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -41,75 +41,69 @@ typedef struct hmac_sha256_ctx_struct { sha256_ctx ctx; sha256_ctx inner_digest_ctx; /*pre-computed inner digest context */ sha256_ctx outer_digest_ctx; /*pre-computed outer digest context */ - char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the SHA256 hash */ - char u[SHA256_DIGESTSIZE]; + unsigned char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the SHA256 hash */ + unsigned char u[SHA256_DIGESTSIZE]; } hmac_sha256_ctx; void hmac_sha256_internal ( - char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ + unsigned char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ int ld, /* length of input data in bytes */ hmac_sha256_ctx* hmac /* HMAC-SHA256 context which holds temporary variables */ ) { sha256_ctx* ctx = &(hmac->ctx); /**** Restore Precomputed Inner Digest Context ****/ memcpy (ctx, &(hmac->inner_digest_ctx), sizeof (sha256_ctx)); - sha256_hash ((unsigned char *) d, ld, ctx); + sha256_hash (d, ld, ctx); - sha256_end ((unsigned char *) d, ctx); /* d = inner digest */ + sha256_end (d, ctx); /* d = inner digest */ /**** Restore Precomputed Outer Digest Context ****/ memcpy (ctx, &(hmac->outer_digest_ctx), sizeof (sha256_ctx)); - sha256_hash ((unsigned char *) d, SHA256_DIGESTSIZE, ctx); + sha256_hash (d, SHA256_DIGESTSIZE, ctx); - sha256_end ((unsigned char *) d, ctx); /* d = outer digest */ + sha256_end (d, ctx); /* d = outer digest */ } #ifndef TC_WINDOWS_BOOT void hmac_sha256 ( - char *k, /* secret key */ + unsigned char *k, /* secret key */ int lk, /* length of the key in bytes */ - char *d, /* data */ + unsigned char *d, /* data */ int ld /* length of data in bytes */ ) { hmac_sha256_ctx hmac; sha256_ctx* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b; - char key[SHA256_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) + unsigned char key[SHA256_DIGESTSIZE]; +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; -#ifdef _WIN64 XSTATE_SAVE SaveState; if (IsCpuIntel() && HasSAVX()) - saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState); -#else - KFLOATING_SAVE floatingPointState; - if (HasSSE2()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState); #endif /* If the key is longer than the hash algorithm block size, let key = sha256(key), as per HMAC specifications. */ if (lk > SHA256_BLOCKSIZE) { sha256_ctx tctx; sha256_begin (&tctx); - sha256_hash ((unsigned char *) k, lk, &tctx); - sha256_end ((unsigned char *) key, &tctx); + sha256_hash (k, lk, &tctx); + sha256_end (key, &tctx); k = key; lk = SHA256_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -120,47 +114,43 @@ void hmac_sha256 ctx = &(hmac.inner_digest_ctx); sha256_begin (ctx); /* Pad the key for inner digest */ for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x36); + buf[b] = (unsigned char) (k[b] ^ 0x36); memset (&buf[lk], 0x36, SHA256_BLOCKSIZE - lk); - sha256_hash ((unsigned char *) buf, SHA256_BLOCKSIZE, ctx); + sha256_hash (buf, SHA256_BLOCKSIZE, ctx); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); sha256_begin (ctx); for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x5C); + buf[b] = (unsigned char) (k[b] ^ 0x5C); memset (&buf[lk], 0x5C, SHA256_BLOCKSIZE - lk); - sha256_hash ((unsigned char *) buf, SHA256_BLOCKSIZE, ctx); + sha256_hash (buf, SHA256_BLOCKSIZE, ctx); hmac_sha256_internal(d, ld, &hmac); -#if defined (DEVICE_DRIVER) +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) if (NT_SUCCESS (saveStatus)) -#ifdef _WIN64 - KeRestoreExtendedProcessorStateVC(&SaveState); -#else - KeRestoreFloatingPointState (&floatingPointState); -#endif + KeRestoreExtendedProcessorState(&SaveState); #endif /* Prevent leaks */ burn(&hmac, sizeof(hmac)); burn(key, sizeof(key)); } #endif -static void derive_u_sha256 (char *salt, int salt_len, uint32 iterations, int b, hmac_sha256_ctx* hmac) +static void derive_u_sha256 (const unsigned char *salt, int salt_len, uint32 iterations, int b, hmac_sha256_ctx* hmac) { - char* k = hmac->k; - char* u = hmac->u; + unsigned char* k = hmac->k; + unsigned char* u = hmac->u; uint32 c; int i; #ifdef TC_WINDOWS_BOOT /* In bootloader mode, least significant bit of iterations is a boolean (TRUE for boot derivation mode, FALSE otherwise) @@ -182,11 +172,11 @@ static void derive_u_sha256 (char *salt, int salt_len, uint32 iterations, int b, /* big-endian block number */ #ifdef TC_WINDOWS_BOOT /* specific case of 16-bit bootloader: b is a 16-bit integer that is always < 256 */ memset (&k[salt_len], 0, 3); - k[salt_len + 3] = (char) b; + k[salt_len + 3] = (unsigned char) b; #else b = bswap_32 (b); memcpy (&k[salt_len], &b, 4); #endif @@ -204,39 +194,33 @@ static void derive_u_sha256 (char *salt, int salt_len, uint32 iterations, int b, c--; } } -void derive_key_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen) +void derive_key_sha256 (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen) { hmac_sha256_ctx hmac; sha256_ctx* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b, l, r; #ifndef TC_WINDOWS_BOOT - char key[SHA256_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) + unsigned char key[SHA256_DIGESTSIZE]; +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; -#ifdef _WIN64 XSTATE_SAVE SaveState; if (IsCpuIntel() && HasSAVX()) - saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState); -#else - KFLOATING_SAVE floatingPointState; - if (HasSSE2()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState); #endif /* If the password is longer than the hash algorithm block size, let pwd = sha256(pwd), as per HMAC specifications. */ if (pwd_len > SHA256_BLOCKSIZE) { sha256_ctx tctx; sha256_begin (&tctx); - sha256_hash ((unsigned char *) pwd, pwd_len, &tctx); - sha256_end ((unsigned char *) key, &tctx); + sha256_hash (pwd, pwd_len, &tctx); + sha256_end (key, &tctx); pwd = key; pwd_len = SHA256_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -259,25 +243,25 @@ void derive_key_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 ctx = &(hmac.inner_digest_ctx); sha256_begin (ctx); /* Pad the key for inner digest */ for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x36); + buf[b] = (unsigned char) (pwd[b] ^ 0x36); memset (&buf[pwd_len], 0x36, SHA256_BLOCKSIZE - pwd_len); - sha256_hash ((unsigned char *) buf, SHA256_BLOCKSIZE, ctx); + sha256_hash (buf, SHA256_BLOCKSIZE, ctx); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); sha256_begin (ctx); for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x5C); + buf[b] = (unsigned char) (pwd[b] ^ 0x5C); memset (&buf[pwd_len], 0x5C, SHA256_BLOCKSIZE - pwd_len); - sha256_hash ((unsigned char *) buf, SHA256_BLOCKSIZE, ctx); + sha256_hash (buf, SHA256_BLOCKSIZE, ctx); /* first l - 1 blocks */ for (b = 1; b < l; b++) { derive_u_sha256 (salt, salt_len, iterations, b, &hmac); @@ -287,17 +271,13 @@ void derive_key_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 /* last block */ derive_u_sha256 (salt, salt_len, iterations, b, &hmac); memcpy (dk, hmac.u, r); -#if defined (DEVICE_DRIVER) +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) if (NT_SUCCESS (saveStatus)) -#ifdef _WIN64 - KeRestoreExtendedProcessorStateVC(&SaveState); -#else - KeRestoreFloatingPointState (&floatingPointState); -#endif + KeRestoreExtendedProcessorState(&SaveState); #endif /* Prevent possible leaks. */ burn (&hmac, sizeof(hmac)); #ifndef TC_WINDOWS_BOOT @@ -312,75 +292,69 @@ void derive_key_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 typedef struct hmac_sha512_ctx_struct { sha512_ctx ctx; sha512_ctx inner_digest_ctx; /*pre-computed inner digest context */ sha512_ctx outer_digest_ctx; /*pre-computed outer digest context */ - char k[SHA512_BLOCKSIZE]; /* enough to hold (salt_len + 4) and also the SHA512 hash */ - char u[SHA512_DIGESTSIZE]; + unsigned char k[SHA512_BLOCKSIZE]; /* enough to hold (salt_len + 4) and also the SHA512 hash */ + unsigned char u[SHA512_DIGESTSIZE]; } hmac_sha512_ctx; void hmac_sha512_internal ( - char *d, /* data and also output buffer of at least 64 bytes */ + unsigned char *d, /* data and also output buffer of at least 64 bytes */ int ld, /* length of data in bytes */ hmac_sha512_ctx* hmac ) { sha512_ctx* ctx = &(hmac->ctx); /**** Restore Precomputed Inner Digest Context ****/ memcpy (ctx, &(hmac->inner_digest_ctx), sizeof (sha512_ctx)); - sha512_hash ((unsigned char *) d, ld, ctx); + sha512_hash (d, ld, ctx); - sha512_end ((unsigned char *) d, ctx); + sha512_end (d, ctx); /**** Restore Precomputed Outer Digest Context ****/ memcpy (ctx, &(hmac->outer_digest_ctx), sizeof (sha512_ctx)); - sha512_hash ((unsigned char *) d, SHA512_DIGESTSIZE, ctx); + sha512_hash (d, SHA512_DIGESTSIZE, ctx); - sha512_end ((unsigned char *) d, ctx); + sha512_end (d, ctx); } void hmac_sha512 ( - char *k, /* secret key */ + unsigned char *k, /* secret key */ int lk, /* length of the key in bytes */ - char *d, /* data and also output buffer of at least 64 bytes */ + unsigned char *d, /* data and also output buffer of at least 64 bytes */ int ld /* length of data in bytes */ ) { hmac_sha512_ctx hmac; sha512_ctx* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b; - char key[SHA512_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) + unsigned char key[SHA512_DIGESTSIZE]; +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; -#ifdef _WIN64 XSTATE_SAVE SaveState; if (IsCpuIntel() && HasSAVX()) - saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState); -#else - KFLOATING_SAVE floatingPointState; - if (HasSSSE3() && HasMMX()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState); #endif /* If the key is longer than the hash algorithm block size, let key = sha512(key), as per HMAC specifications. */ if (lk > SHA512_BLOCKSIZE) { sha512_ctx tctx; sha512_begin (&tctx); - sha512_hash ((unsigned char *) k, lk, &tctx); - sha512_end ((unsigned char *) key, &tctx); + sha512_hash (k, lk, &tctx); + sha512_end (key, &tctx); k = key; lk = SHA512_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -391,46 +365,42 @@ void hmac_sha512 ctx = &(hmac.inner_digest_ctx); sha512_begin (ctx); /* Pad the key for inner digest */ for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x36); + buf[b] = (unsigned char) (k[b] ^ 0x36); memset (&buf[lk], 0x36, SHA512_BLOCKSIZE - lk); - sha512_hash ((unsigned char *) buf, SHA512_BLOCKSIZE, ctx); + sha512_hash (buf, SHA512_BLOCKSIZE, ctx); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); sha512_begin (ctx); for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x5C); + buf[b] = (unsigned char) (k[b] ^ 0x5C); memset (&buf[lk], 0x5C, SHA512_BLOCKSIZE - lk); - sha512_hash ((unsigned char *) buf, SHA512_BLOCKSIZE, ctx); + sha512_hash (buf, SHA512_BLOCKSIZE, ctx); hmac_sha512_internal (d, ld, &hmac); -#if defined (DEVICE_DRIVER) +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) if (NT_SUCCESS (saveStatus)) -#ifdef _WIN64 - KeRestoreExtendedProcessorStateVC(&SaveState); -#else - KeRestoreFloatingPointState (&floatingPointState); -#endif + KeRestoreExtendedProcessorState(&SaveState); #endif /* Prevent leaks */ burn (&hmac, sizeof(hmac)); burn (key, sizeof(key)); } -static void derive_u_sha512 (char *salt, int salt_len, uint32 iterations, int b, hmac_sha512_ctx* hmac) +static void derive_u_sha512 (const unsigned char *salt, int salt_len, uint32 iterations, int b, hmac_sha512_ctx* hmac) { - char* k = hmac->k; - char* u = hmac->u; + unsigned char* k = hmac->k; + unsigned char* u = hmac->u; uint32 c, i; /* iteration 1 */ memcpy (k, salt, salt_len); /* salt */ /* big-endian block number */ @@ -450,39 +420,33 @@ static void derive_u_sha512 (char *salt, int salt_len, uint32 iterations, int b, } } } -void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen) +void derive_key_sha512 (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen) { hmac_sha512_ctx hmac; sha512_ctx* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b, l, r; - char key[SHA512_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) + unsigned char key[SHA512_DIGESTSIZE]; +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; -#ifdef _WIN64 XSTATE_SAVE SaveState; if (IsCpuIntel() && HasSAVX()) - saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState); -#else - KFLOATING_SAVE floatingPointState; - if (HasSSSE3() && HasMMX()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState); #endif /* If the password is longer than the hash algorithm block size, let pwd = sha512(pwd), as per HMAC specifications. */ if (pwd_len > SHA512_BLOCKSIZE) { sha512_ctx tctx; sha512_begin (&tctx); - sha512_hash ((unsigned char *) pwd, pwd_len, &tctx); - sha512_end ((unsigned char *) key, &tctx); + sha512_hash (pwd, pwd_len, &tctx); + sha512_end (key, &tctx); pwd = key; pwd_len = SHA512_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -504,25 +468,25 @@ void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 ctx = &(hmac.inner_digest_ctx); sha512_begin (ctx); /* Pad the key for inner digest */ for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x36); + buf[b] = (unsigned char) (pwd[b] ^ 0x36); memset (&buf[pwd_len], 0x36, SHA512_BLOCKSIZE - pwd_len); - sha512_hash ((unsigned char *) buf, SHA512_BLOCKSIZE, ctx); + sha512_hash (buf, SHA512_BLOCKSIZE, ctx); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); sha512_begin (ctx); for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x5C); + buf[b] = (unsigned char) (pwd[b] ^ 0x5C); memset (&buf[pwd_len], 0x5C, SHA512_BLOCKSIZE - pwd_len); - sha512_hash ((unsigned char *) buf, SHA512_BLOCKSIZE, ctx); + sha512_hash (buf, SHA512_BLOCKSIZE, ctx); /* first l - 1 blocks */ for (b = 1; b < l; b++) { derive_u_sha512 (salt, salt_len, iterations, b, &hmac); @@ -532,17 +496,13 @@ void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 /* last block */ derive_u_sha512 (salt, salt_len, iterations, b, &hmac); memcpy (dk, hmac.u, r); -#if defined (DEVICE_DRIVER) +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) if (NT_SUCCESS (saveStatus)) -#ifdef _WIN64 - KeRestoreExtendedProcessorStateVC(&SaveState); -#else - KeRestoreFloatingPointState (&floatingPointState); -#endif + KeRestoreExtendedProcessorState(&SaveState); #endif /* Prevent possible leaks. */ burn (&hmac, sizeof(hmac)); burn (key, sizeof(key)); @@ -555,17 +515,17 @@ void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 typedef struct hmac_blake2s_ctx_struct { blake2s_state ctx; blake2s_state inner_digest_ctx; /*pre-computed inner digest context */ blake2s_state outer_digest_ctx; /*pre-computed outer digest context */ - char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the Blake2s hash */ - char u[BLAKE2S_DIGESTSIZE]; + unsigned char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the Blake2s hash */ + unsigned char u[BLAKE2S_DIGESTSIZE]; } hmac_blake2s_ctx; void hmac_blake2s_internal ( - char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ + unsigned char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ int ld, /* length of input data in bytes */ hmac_blake2s_ctx* hmac /* HMAC-BLAKE2S context which holds temporary variables */ ) { blake2s_state* ctx = &(hmac->ctx); @@ -574,56 +534,50 @@ void hmac_blake2s_internal memcpy (ctx, &(hmac->inner_digest_ctx), sizeof (blake2s_state)); blake2s_update (ctx, d, ld); - blake2s_final (ctx, (unsigned char*) d); /* d = inner digest */ + blake2s_final (ctx, d); /* d = inner digest */ /**** Restore Precomputed Outer Digest Context ****/ memcpy (ctx, &(hmac->outer_digest_ctx), sizeof (blake2s_state)); blake2s_update (ctx, d, BLAKE2S_DIGESTSIZE); - blake2s_final (ctx, (unsigned char *) d); /* d = outer digest */ + blake2s_final (ctx, d); /* d = outer digest */ } #ifndef TC_WINDOWS_BOOT void hmac_blake2s ( - char *k, /* secret key */ + unsigned char *k, /* secret key */ int lk, /* length of the key in bytes */ - char *d, /* data */ + unsigned char *d, /* data */ int ld /* length of data in bytes */ ) { hmac_blake2s_ctx hmac; blake2s_state* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b; - char key[BLAKE2S_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) + unsigned char key[BLAKE2S_DIGESTSIZE]; +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; -#ifdef _WIN64 XSTATE_SAVE SaveState; if (IsCpuIntel() && HasSAVX()) - saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState); -#else - KFLOATING_SAVE floatingPointState; - if (HasSSE2()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState); #endif /* If the key is longer than the hash algorithm block size, let key = blake2s(key), as per HMAC specifications. */ if (lk > BLAKE2S_BLOCKSIZE) { blake2s_state tctx; blake2s_init (&tctx); blake2s_update (&tctx, k, lk); - blake2s_final (&tctx, (unsigned char *) key); + blake2s_final (&tctx, key); k = key; lk = BLAKE2S_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -634,47 +588,43 @@ void hmac_blake2s ctx = &(hmac.inner_digest_ctx); blake2s_init (ctx); /* Pad the key for inner digest */ for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x36); + buf[b] = (unsigned char) (k[b] ^ 0x36); memset (&buf[lk], 0x36, BLAKE2S_BLOCKSIZE - lk); - blake2s_update (ctx, (unsigned char *) buf, BLAKE2S_BLOCKSIZE); + blake2s_update (ctx, buf, BLAKE2S_BLOCKSIZE); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); blake2s_init (ctx); for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x5C); + buf[b] = (unsigned char) (k[b] ^ 0x5C); memset (&buf[lk], 0x5C, BLAKE2S_BLOCKSIZE - lk); - blake2s_update (ctx, (unsigned char *) buf, BLAKE2S_BLOCKSIZE); + blake2s_update (ctx, buf, BLAKE2S_BLOCKSIZE); hmac_blake2s_internal(d, ld, &hmac); -#if defined (DEVICE_DRIVER) +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) if (NT_SUCCESS (saveStatus)) -#ifdef _WIN64 - KeRestoreExtendedProcessorStateVC(&SaveState); -#else - KeRestoreFloatingPointState (&floatingPointState); -#endif + KeRestoreExtendedProcessorState(&SaveState); #endif /* Prevent leaks */ burn(&hmac, sizeof(hmac)); burn(key, sizeof(key)); } #endif -static void derive_u_blake2s (char *salt, int salt_len, uint32 iterations, int b, hmac_blake2s_ctx* hmac) +static void derive_u_blake2s (const unsigned char *salt, int salt_len, uint32 iterations, int b, hmac_blake2s_ctx* hmac) { - char* k = hmac->k; - char* u = hmac->u; + unsigned char* k = hmac->k; + unsigned char* u = hmac->u; uint32 c; int i; #ifdef TC_WINDOWS_BOOT /* In bootloader mode, least significant bit of iterations is a boolean (TRUE for boot derivation mode, FALSE otherwise) @@ -696,11 +646,11 @@ static void derive_u_blake2s (char *salt, int salt_len, uint32 iterations, int b /* big-endian block number */ #ifdef TC_WINDOWS_BOOT /* specific case of 16-bit bootloader: b is a 16-bit integer that is always < 256 */ memset (&k[salt_len], 0, 3); - k[salt_len + 3] = (char) b; + k[salt_len + 3] = (unsigned char) b; #else b = bswap_32 (b); memcpy (&k[salt_len], &b, 4); #endif @@ -718,39 +668,33 @@ static void derive_u_blake2s (char *salt, int salt_len, uint32 iterations, int b c--; } } -void derive_key_blake2s (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen) +void derive_key_blake2s (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen) { hmac_blake2s_ctx hmac; blake2s_state* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b, l, r; #ifndef TC_WINDOWS_BOOT - char key[BLAKE2S_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) + unsigned char key[BLAKE2S_DIGESTSIZE]; +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; -#ifdef _WIN64 XSTATE_SAVE SaveState; if (IsCpuIntel() && HasSAVX()) - saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState); -#else - KFLOATING_SAVE floatingPointState; - if (HasSSE2()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState); #endif /* If the password is longer than the hash algorithm block size, let pwd = blake2s(pwd), as per HMAC specifications. */ if (pwd_len > BLAKE2S_BLOCKSIZE) { blake2s_state tctx; blake2s_init (&tctx); blake2s_update (&tctx, pwd, pwd_len); - blake2s_final (&tctx, (unsigned char *) key); + blake2s_final (&tctx, key); pwd = key; pwd_len = BLAKE2S_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -773,22 +717,22 @@ void derive_key_blake2s (char *pwd, int pwd_len, char *salt, int salt_len, uint3 ctx = &(hmac.inner_digest_ctx); blake2s_init (ctx); /* Pad the key for inner digest */ for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x36); + buf[b] = (unsigned char) (pwd[b] ^ 0x36); memset (&buf[pwd_len], 0x36, BLAKE2S_BLOCKSIZE - pwd_len); blake2s_update (ctx, buf, BLAKE2S_BLOCKSIZE); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); blake2s_init (ctx); for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x5C); + buf[b] = (unsigned char) (pwd[b] ^ 0x5C); memset (&buf[pwd_len], 0x5C, BLAKE2S_BLOCKSIZE - pwd_len); blake2s_update (ctx, buf, BLAKE2S_BLOCKSIZE); /* first l - 1 blocks */ @@ -801,17 +745,13 @@ void derive_key_blake2s (char *pwd, int pwd_len, char *salt, int salt_len, uint3 /* last block */ derive_u_blake2s (salt, salt_len, iterations, b, &hmac); memcpy (dk, hmac.u, r); -#if defined (DEVICE_DRIVER) +#if defined (DEVICE_DRIVER) && !defined(_M_ARM64) if (NT_SUCCESS (saveStatus)) -#ifdef _WIN64 - KeRestoreExtendedProcessorStateVC(&SaveState); -#else - KeRestoreFloatingPointState (&floatingPointState); -#endif + KeRestoreExtendedProcessorState(&SaveState); #endif /* Prevent possible leaks. */ burn (&hmac, sizeof(hmac)); #ifndef TC_WINDOWS_BOOT @@ -826,68 +766,62 @@ void derive_key_blake2s (char *pwd, int pwd_len, char *salt, int salt_len, uint3 typedef struct hmac_whirlpool_ctx_struct { WHIRLPOOL_CTX ctx; WHIRLPOOL_CTX inner_digest_ctx; /*pre-computed inner digest context */ WHIRLPOOL_CTX outer_digest_ctx; /*pre-computed outer digest context */ - CRYPTOPP_ALIGN_DATA(16) char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the Whirlpool hash */ - char u[WHIRLPOOL_DIGESTSIZE]; + CRYPTOPP_ALIGN_DATA(16) unsigned char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the Whirlpool hash */ + unsigned char u[WHIRLPOOL_DIGESTSIZE]; } hmac_whirlpool_ctx; void hmac_whirlpool_internal ( - char *d, /* input/output data. d pointer is guaranteed to be at least 64-bytes long */ + unsigned char *d, /* input/output data. d pointer is guaranteed to be at least 64-bytes long */ int ld, /* length of input data in bytes */ hmac_whirlpool_ctx* hmac /* HMAC-Whirlpool context which holds temporary variables */ ) { WHIRLPOOL_CTX* ctx = &(hmac->ctx); /**** Restore Precomputed Inner Digest Context ****/ memcpy (ctx, &(hmac->inner_digest_ctx), sizeof (WHIRLPOOL_CTX)); - WHIRLPOOL_add ((unsigned char *) d, ld, ctx); + WHIRLPOOL_add (d, ld, ctx); - WHIRLPOOL_finalize (ctx, (unsigned char *) d); + WHIRLPOOL_finalize (ctx, d); /**** Restore Precomputed Outer Digest Context ****/ memcpy (ctx, &(hmac->outer_digest_ctx), sizeof (WHIRLPOOL_CTX)); - WHIRLPOOL_add ((unsigned char *) d, WHIRLPOOL_DIGESTSIZE, ctx); + WHIRLPOOL_add (d, WHIRLPOOL_DIGESTSIZE, ctx); - WHIRLPOOL_finalize (ctx, (unsigned char *) d); + WHIRLPOOL_finalize (ctx, d); } void hmac_whirlpool ( - char *k, /* secret key */ + unsigned char *k, /* secret key */ int lk, /* length of the key in bytes */ - char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ + unsigned char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ int ld /* length of data in bytes */ ) { hmac_whirlpool_ctx hmac; WHIRLPOOL_CTX* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b; - char key[WHIRLPOOL_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - if (HasISSE()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + unsigned char key[WHIRLPOOL_DIGESTSIZE]; /* If the key is longer than the hash algorithm block size, let key = whirlpool(key), as per HMAC specifications. */ if (lk > WHIRLPOOL_BLOCKSIZE) { WHIRLPOOL_CTX tctx; WHIRLPOOL_init (&tctx); - WHIRLPOOL_add ((unsigned char *) k, lk, &tctx); - WHIRLPOOL_finalize (&tctx, (unsigned char *) key); + WHIRLPOOL_add (k, lk, &tctx); + WHIRLPOOL_finalize (&tctx, key); k = key; lk = WHIRLPOOL_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -898,40 +832,36 @@ void hmac_whirlpool ctx = &(hmac.inner_digest_ctx); WHIRLPOOL_init (ctx); /* Pad the key for inner digest */ for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x36); + buf[b] = (unsigned char) (k[b] ^ 0x36); memset (&buf[lk], 0x36, WHIRLPOOL_BLOCKSIZE - lk); - WHIRLPOOL_add ((unsigned char *) buf, WHIRLPOOL_BLOCKSIZE, ctx); + WHIRLPOOL_add (buf, WHIRLPOOL_BLOCKSIZE, ctx); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); WHIRLPOOL_init (ctx); for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x5C); + buf[b] = (unsigned char) (k[b] ^ 0x5C); memset (&buf[lk], 0x5C, WHIRLPOOL_BLOCKSIZE - lk); - WHIRLPOOL_add ((unsigned char *) buf, WHIRLPOOL_BLOCKSIZE, ctx); + WHIRLPOOL_add (buf, WHIRLPOOL_BLOCKSIZE, ctx); hmac_whirlpool_internal(d, ld, &hmac); -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif /* Prevent leaks */ burn(&hmac, sizeof(hmac)); } -static void derive_u_whirlpool (char *salt, int salt_len, uint32 iterations, int b, hmac_whirlpool_ctx* hmac) +static void derive_u_whirlpool (const unsigned char *salt, int salt_len, uint32 iterations, int b, hmac_whirlpool_ctx* hmac) { - char* u = hmac->u; - char* k = hmac->k; + unsigned char* u = hmac->u; + unsigned char* k = hmac->k; uint32 c, i; /* iteration 1 */ memcpy (k, salt, salt_len); /* salt */ /* big-endian block number */ @@ -950,32 +880,26 @@ static void derive_u_whirlpool (char *salt, int salt_len, uint32 iterations, int u[i] ^= k[i]; } } } -void derive_key_whirlpool (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen) +void derive_key_whirlpool (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen) { hmac_whirlpool_ctx hmac; WHIRLPOOL_CTX* ctx; - char* buf = hmac.k; - char key[WHIRLPOOL_DIGESTSIZE]; + unsigned char* buf = hmac.k; + unsigned char key[WHIRLPOOL_DIGESTSIZE]; int b, l, r; -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - if (HasISSE()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif /* If the password is longer than the hash algorithm block size, let pwd = whirlpool(pwd), as per HMAC specifications. */ if (pwd_len > WHIRLPOOL_BLOCKSIZE) { WHIRLPOOL_CTX tctx; WHIRLPOOL_init (&tctx); - WHIRLPOOL_add ((unsigned char *) pwd, pwd_len, &tctx); - WHIRLPOOL_finalize (&tctx, (unsigned char *) key); + WHIRLPOOL_add (pwd, pwd_len, &tctx); + WHIRLPOOL_finalize (&tctx, key); pwd = key; pwd_len = WHIRLPOOL_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -997,25 +921,25 @@ void derive_key_whirlpool (char *pwd, int pwd_len, char *salt, int salt_len, uin ctx = &(hmac.inner_digest_ctx); WHIRLPOOL_init (ctx); /* Pad the key for inner digest */ for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x36); + buf[b] = (unsigned char) (pwd[b] ^ 0x36); memset (&buf[pwd_len], 0x36, WHIRLPOOL_BLOCKSIZE - pwd_len); - WHIRLPOOL_add ((unsigned char *) buf, WHIRLPOOL_BLOCKSIZE, ctx); + WHIRLPOOL_add (buf, WHIRLPOOL_BLOCKSIZE, ctx); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); WHIRLPOOL_init (ctx); for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x5C); + buf[b] = (unsigned char) (pwd[b] ^ 0x5C); memset (&buf[pwd_len], 0x5C, WHIRLPOOL_BLOCKSIZE - pwd_len); - WHIRLPOOL_add ((unsigned char *) buf, WHIRLPOOL_BLOCKSIZE, ctx); + WHIRLPOOL_add (buf, WHIRLPOOL_BLOCKSIZE, ctx); /* first l - 1 blocks */ for (b = 1; b < l; b++) { derive_u_whirlpool (salt, salt_len, iterations, b, &hmac); @@ -1025,15 +949,10 @@ void derive_key_whirlpool (char *pwd, int pwd_len, char *salt, int salt_len, uin /* last block */ derive_u_whirlpool (salt, salt_len, iterations, b, &hmac); memcpy (dk, hmac.u, r); -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif - /* Prevent possible leaks. */ burn (&hmac, sizeof(hmac)); burn (key, sizeof(key)); } @@ -1041,68 +960,62 @@ void derive_key_whirlpool (char *pwd, int pwd_len, char *salt, int salt_len, uin typedef struct hmac_streebog_ctx_struct { STREEBOG_CTX ctx; STREEBOG_CTX inner_digest_ctx; /*pre-computed inner digest context */ STREEBOG_CTX outer_digest_ctx; /*pre-computed outer digest context */ - CRYPTOPP_ALIGN_DATA(16) char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the Streebog hash */ - char u[STREEBOG_DIGESTSIZE]; + CRYPTOPP_ALIGN_DATA(16) unsigned char k[PKCS5_SALT_SIZE + 4]; /* enough to hold (salt_len + 4) and also the Streebog hash */ + unsigned char u[STREEBOG_DIGESTSIZE]; } hmac_streebog_ctx; void hmac_streebog_internal ( - char *d, /* input/output data. d pointer is guaranteed to be at least 64-bytes long */ + unsigned char *d, /* input/output data. d pointer is guaranteed to be at least 64-bytes long */ int ld, /* length of input data in bytes */ hmac_streebog_ctx* hmac /* HMAC-Whirlpool context which holds temporary variables */ ) { STREEBOG_CTX* ctx = &(hmac->ctx); /**** Restore Precomputed Inner Digest Context ****/ memcpy (ctx, &(hmac->inner_digest_ctx), sizeof (STREEBOG_CTX)); - STREEBOG_add (ctx, (unsigned char *) d, ld); + STREEBOG_add (ctx, d, ld); - STREEBOG_finalize (ctx, (unsigned char *) d); + STREEBOG_finalize (ctx, d); /**** Restore Precomputed Outer Digest Context ****/ memcpy (ctx, &(hmac->outer_digest_ctx), sizeof (STREEBOG_CTX)); - STREEBOG_add (ctx, (unsigned char *) d, STREEBOG_DIGESTSIZE); + STREEBOG_add (ctx, d, STREEBOG_DIGESTSIZE); - STREEBOG_finalize (ctx, (unsigned char *) d); + STREEBOG_finalize (ctx, d); } void hmac_streebog ( - char *k, /* secret key */ + unsigned char *k, /* secret key */ int lk, /* length of the key in bytes */ - char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ + unsigned char *d, /* input data. d pointer is guaranteed to be at least 32-bytes long */ int ld /* length of data in bytes */ ) { hmac_streebog_ctx hmac; STREEBOG_CTX* ctx; - char* buf = hmac.k; + unsigned char* buf = hmac.k; int b; - CRYPTOPP_ALIGN_DATA(16) char key[STREEBOG_DIGESTSIZE]; -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - if (HasSSE2() || HasSSE41()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif + CRYPTOPP_ALIGN_DATA(16) unsigned char key[STREEBOG_DIGESTSIZE]; /* If the key is longer than the hash algorithm block size, let key = streebog(key), as per HMAC specifications. */ if (lk > STREEBOG_BLOCKSIZE) { STREEBOG_CTX tctx; STREEBOG_init (&tctx); - STREEBOG_add (&tctx, (unsigned char *) k, lk); - STREEBOG_finalize (&tctx, (unsigned char *) key); + STREEBOG_add (&tctx, k, lk); + STREEBOG_finalize (&tctx, key); k = key; lk = STREEBOG_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -1113,40 +1026,36 @@ void hmac_streebog ctx = &(hmac.inner_digest_ctx); STREEBOG_init (ctx); /* Pad the key for inner digest */ for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x36); + buf[b] = (unsigned char) (k[b] ^ 0x36); memset (&buf[lk], 0x36, STREEBOG_BLOCKSIZE - lk); - STREEBOG_add (ctx, (unsigned char *) buf, STREEBOG_BLOCKSIZE); + STREEBOG_add (ctx, buf, STREEBOG_BLOCKSIZE); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); STREEBOG_init (ctx); for (b = 0; b < lk; ++b) - buf[b] = (char) (k[b] ^ 0x5C); + buf[b] = (unsigned char) (k[b] ^ 0x5C); memset (&buf[lk], 0x5C, STREEBOG_BLOCKSIZE - lk); - STREEBOG_add (ctx, (unsigned char *) buf, STREEBOG_BLOCKSIZE); + STREEBOG_add (ctx, buf, STREEBOG_BLOCKSIZE); hmac_streebog_internal(d, ld, &hmac); -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif /* Prevent leaks */ burn(&hmac, sizeof(hmac)); } -static void derive_u_streebog (char *salt, int salt_len, uint32 iterations, int b, hmac_streebog_ctx* hmac) +static void derive_u_streebog (const unsigned char *salt, int salt_len, uint32 iterations, int b, hmac_streebog_ctx* hmac) { - char* u = hmac->u; - char* k = hmac->k; + unsigned char* u = hmac->u; + unsigned char* k = hmac->k; uint32 c, i; /* iteration 1 */ memcpy (k, salt, salt_len); /* salt */ /* big-endian block number */ @@ -1165,32 +1074,26 @@ static void derive_u_streebog (char *salt, int salt_len, uint32 iterations, int u[i] ^= k[i]; } } } -void derive_key_streebog (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen) +void derive_key_streebog (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen) { hmac_streebog_ctx hmac; STREEBOG_CTX* ctx; - char* buf = hmac.k; - char key[STREEBOG_DIGESTSIZE]; + unsigned char* buf = hmac.k; + unsigned char key[STREEBOG_DIGESTSIZE]; int b, l, r; -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - if (HasSSE2() || HasSSE41()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif /* If the password is longer than the hash algorithm block size, let pwd = streebog(pwd), as per HMAC specifications. */ if (pwd_len > STREEBOG_BLOCKSIZE) { STREEBOG_CTX tctx; STREEBOG_init (&tctx); - STREEBOG_add (&tctx, (unsigned char *) pwd, pwd_len); - STREEBOG_finalize (&tctx, (unsigned char *) key); + STREEBOG_add (&tctx, pwd, pwd_len); + STREEBOG_finalize (&tctx, key); pwd = key; pwd_len = STREEBOG_DIGESTSIZE; burn (&tctx, sizeof(tctx)); // Prevent leaks @@ -1212,25 +1115,25 @@ void derive_key_streebog (char *pwd, int pwd_len, char *salt, int salt_len, uint ctx = &(hmac.inner_digest_ctx); STREEBOG_init (ctx); /* Pad the key for inner digest */ for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x36); + buf[b] = (unsigned char) (pwd[b] ^ 0x36); memset (&buf[pwd_len], 0x36, STREEBOG_BLOCKSIZE - pwd_len); - STREEBOG_add (ctx, (unsigned char *) buf, STREEBOG_BLOCKSIZE); + STREEBOG_add (ctx, buf, STREEBOG_BLOCKSIZE); /**** Precompute HMAC Outer Digest ****/ ctx = &(hmac.outer_digest_ctx); STREEBOG_init (ctx); for (b = 0; b < pwd_len; ++b) - buf[b] = (char) (pwd[b] ^ 0x5C); + buf[b] = (unsigned char) (pwd[b] ^ 0x5C); memset (&buf[pwd_len], 0x5C, STREEBOG_BLOCKSIZE - pwd_len); - STREEBOG_add (ctx, (unsigned char *) buf, STREEBOG_BLOCKSIZE); + STREEBOG_add (ctx, buf, STREEBOG_BLOCKSIZE); /* first l - 1 blocks */ for (b = 1; b < l; b++) { derive_u_streebog (salt, salt_len, iterations, b, &hmac); @@ -1240,15 +1143,10 @@ void derive_key_streebog (char *pwd, int pwd_len, char *salt, int salt_len, uint /* last block */ derive_u_streebog (salt, salt_len, iterations, b, &hmac); memcpy (dk, hmac.u, r); -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif - /* Prevent possible leaks. */ burn (&hmac, sizeof(hmac)); burn (key, sizeof(key)); } @@ -1276,57 +1174,53 @@ wchar_t *get_pkcs5_prf_name (int pkcs5_prf_id) } } -int get_pkcs5_iteration_count (int pkcs5_prf_id, int pim, BOOL bBoot) +int get_pkcs5_iteration_count(int pkcs5_prf_id, int pim, BOOL bBoot) { - if ( (pim < 0) - ) - { - return 0; - } + int iteration_count = 0; - switch (pkcs5_prf_id) + if (pim >= 0) { - - case BLAKE2S: - if (pim == 0) - return bBoot? 200000 : 500000; - else - { - return bBoot? pim * 2048 : 15000 + pim * 1000; - } - - case SHA512: - return ((pim == 0)? 500000 : 15000 + pim * 1000); - - case WHIRLPOOL: - return ((pim == 0)? 500000 : 15000 + pim * 1000); - - case SHA256: - if (pim == 0) - return bBoot? 200000 : 500000; - else - { - return bBoot? pim * 2048 : 15000 + pim * 1000; - } - - case STREEBOG: - if (pim == 0) - return bBoot? 200000 : 500000; - else + switch (pkcs5_prf_id) { - return bBoot? pim * 2048 : 15000 + pim * 1000; + case BLAKE2S: + if (pim == 0) + iteration_count = bBoot ? 200000 : 500000; + else + iteration_count = bBoot ? pim * 2048 : 15000 + pim * 1000; + break; + + case SHA512: + iteration_count = (pim == 0) ? 500000 : 15000 + pim * 1000; + break; + + case WHIRLPOOL: + iteration_count = (pim == 0) ? 500000 : 15000 + pim * 1000; + break; + + case SHA256: + if (pim == 0) + iteration_count = bBoot ? 200000 : 500000; + else + iteration_count = bBoot ? pim * 2048 : 15000 + pim * 1000; + break; + + case STREEBOG: + if (pim == 0) + iteration_count = bBoot ? 200000 : 500000; + else + iteration_count = bBoot ? pim * 2048 : 15000 + pim * 1000; + break; + + default: + TC_THROW_FATAL_EXCEPTION; // Unknown/wrong ID } - - default: - TC_THROW_FATAL_EXCEPTION; // Unknown/wrong ID } -#if _MSC_VER < 1900 - return 0; -#endif + + return iteration_count; } int is_pkcs5_prf_supported (int pkcs5_prf_id, PRF_BOOT_TYPE bootType) { if (pkcs5_prf_id == 0) // auto-detection always supported diff --git a/src/Common/Pkcs5.h b/src/Common/Pkcs5.h index a9abeec5..41679fe7 100644 --- a/src/Common/Pkcs5.h +++ b/src/Common/Pkcs5.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_PKCS5 @@ -19,28 +19,28 @@ #if defined(__cplusplus) extern "C" { #endif /* output written to input_digest which must be at lease 32 bytes long */ -void hmac_blake2s (char *key, int keylen, char *input_digest, int len); -void derive_key_blake2s (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen); +void hmac_blake2s (unsigned char *key, int keylen, unsigned char *input_digest, int len); +void derive_key_blake2s (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen); /* output written to d which must be at lease 32 bytes long */ -void hmac_sha256 (char *k, int lk, char *d, int ld); -void derive_key_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen); +void hmac_sha256 (unsigned char *k, int lk, unsigned char *d, int ld); +void derive_key_sha256 (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen); #ifndef TC_WINDOWS_BOOT /* output written to d which must be at lease 64 bytes long */ -void hmac_sha512 (char *k, int lk, char *d, int ld); -void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen); +void hmac_sha512 (unsigned char *k, int lk, unsigned char *d, int ld); +void derive_key_sha512 (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen); /* output written to d which must be at lease 64 bytes long */ -void hmac_whirlpool (char *k, int lk, char *d, int ld); -void derive_key_whirlpool (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen); +void hmac_whirlpool (unsigned char *k, int lk, unsigned char *d, int ld); +void derive_key_whirlpool (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen); -void hmac_streebog (char *k, int32 lk, char *d, int32 ld); -void derive_key_streebog (char *pwd, int pwd_len, char *salt, int salt_len, uint32 iterations, char *dk, int dklen); +void hmac_streebog (unsigned char *k, int lk, unsigned char *d, int ld); +void derive_key_streebog (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen); int get_pkcs5_iteration_count (int pkcs5_prf_id, int pim, BOOL bBoot); wchar_t *get_pkcs5_prf_name (int pkcs5_prf_id); /* check if given PRF supported.*/ diff --git a/src/Common/Progress.c b/src/Common/Progress.c index 2619b173..2abf782c 100644 --- a/src/Common/Progress.c +++ b/src/Common/Progress.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -34,13 +34,13 @@ static wchar_t *seconds, *minutes, *hours, *days; // If bIOThroughput is TRUE, the speed reflects the amount of data read AND written per second (rather than // the speed of the "transform cursor"). void InitProgressBar (__int64 totalBytes, __int64 bytesDone, BOOL bReverse, BOOL bIOThroughput, BOOL bDisplayStatus, BOOL bShowPercent) { - HWND hProgressBar = GetDlgItem (hCurPage, nPbar); - SendMessage (hProgressBar, PBM_SETRANGE32, 0, 10000); - SendMessage (hProgressBar, PBM_SETSTEP, 1, 0); + HWND hCurProgressBar = GetDlgItem (hCurPage, nPbar); + SendMessage (hCurProgressBar, PBM_SETRANGE32, 0, 10000); + SendMessage (hCurProgressBar, PBM_SETSTEP, 1, 0); bProgressBarReverse = bReverse; bRWThroughput = bIOThroughput; bShowStatus = bDisplayStatus; bPercentMode = bShowPercent; @@ -64,11 +64,11 @@ BOOL UpdateProgressBar (__int64 byteOffset) BOOL UpdateProgressBarProc (__int64 byteOffset) { wchar_t text[100]; wchar_t speed[100]; - HWND hProgressBar = GetDlgItem (hCurPage, nPbar); + HWND hCurProgressBar = GetDlgItem (hCurPage, nPbar); int time = GetTickCount (); int elapsed = (time - startTime) / 1000; uint64 bytesDone = (bProgressBarReverse ? (TotalSize - byteOffset) : byteOffset); uint64 bytesPerSec = (bProgressBarReverse ? (resumedPointBytesDone - byteOffset) : (bytesDone - resumedPointBytesDone)) / (elapsed + 1); @@ -124,11 +124,11 @@ BOOL UpdateProgressBarProc (__int64 byteOffset) SetWindowTextW (GetDlgItem (hCurPage, IDC_TIMEREMAIN), text); } prevTime = time; - SendMessage (hProgressBar, PBM_SETPOS, + SendMessage (hCurProgressBar, PBM_SETPOS, (int) (10000.0 * (bProgressBarReverse ? (TotalSize - byteOffset) : byteOffset) / (TotalSize == 0 ? 1 : TotalSize)), 0); return bVolTransformThreadCancel; } diff --git a/src/Common/Progress.h b/src/Common/Progress.h index d86e51ac..6642bb35 100644 --- a/src/Common/Progress.h +++ b/src/Common/Progress.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus diff --git a/src/Common/Random.c b/src/Common/Random.c index fd836c7f..4c6382b4 100644 --- a/src/Common/Random.c +++ b/src/Common/Random.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -17,10 +17,11 @@ #include "Dlgcode.h" #include "Crypto\cpu.h" #include "Crypto\jitterentropy.h" #include "Crypto\rdrand.h" #include <Strsafe.h> +#include <bcrypt.h> static unsigned __int8 buffer[RNG_POOL_SIZE]; static unsigned char *pRandPool = NULL; static BOOL bRandDidInit = FALSE; static int nRandIndex = 0, randPoolReadIndex = 0; @@ -40,15 +41,11 @@ static HANDLE PeriodicFastPollThreadHandle = NULL; } /* Macro to add four bytes to the pool */ #define RandaddInt32(x) RandAddInt((unsigned __int32)x); -#ifdef _WIN64 #define RandaddIntPtr(x) RandAddInt64((unsigned __int64)x); -#else -#define RandaddIntPtr(x) RandAddInt((unsigned __int32)x); -#endif void RandAddInt (unsigned __int32 x) { RandaddByte(x); RandaddByte((x >> 8)); @@ -87,20 +84,21 @@ BOOL volatile bThreadTerminate = FALSE; /* This variable is shared among thread' /* Network library handle for the SlowPoll function */ HANDLE hNetAPI32 = NULL; // CryptoAPI -BOOL CryptoAPIAvailable = FALSE; DWORD CryptoAPILastError = ERROR_SUCCESS; -HCRYPTPROV hCryptProv; +typedef DWORD (WINAPI *RtlNtStatusToDosError_t)(NTSTATUS); +RtlNtStatusToDosError_t pRtlNtStatusToDosError = NULL; /* Init the random number generator, setup the hooks, and start the thread */ int RandinitWithCheck ( int* pAlreadyInitialized) { BOOL bIgnoreHookError = FALSE; DWORD dwLastError = ERROR_SUCCESS; + HMODULE ntdll; if (GetMaxPkcs5OutSize() > RNG_POOL_SIZE) TC_THROW_FATAL_EXCEPTION; if(bRandDidInit) { @@ -141,18 +139,18 @@ int RandinitWithCheck ( int* pAlreadyInitialized) { handleWin32Error (0, SRC_POS); goto error; } - if (!CryptAcquireContext (&hCryptProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) - { - CryptoAPIAvailable = FALSE; - CryptoAPILastError = GetLastError (); + ntdll = GetModuleHandleW(L"ntdll.dll"); + if (!ntdll) { + // If ntdll.dll is not found, return a fallback error code + CryptoAPILastError = ERROR_MOD_NOT_FOUND; goto error; } else - CryptoAPIAvailable = TRUE; + pRtlNtStatusToDosError = (RtlNtStatusToDosError_t)GetProcAddress(ntdll, "RtlNtStatusToDosError"); if (!(PeriodicFastPollThreadHandle = (HANDLE) _beginthreadex (NULL, 0, PeriodicFastPollThreadProc, NULL, 0, NULL))) goto error; return 0; @@ -197,16 +195,10 @@ void RandStop (BOOL freePool) { FreeLibrary (hNetAPI32); hNetAPI32 = NULL; } - if (CryptoAPIAvailable) - { - CryptReleaseContext (hCryptProv, 0); - CryptoAPIAvailable = FALSE; - CryptoAPILastError = ERROR_SUCCESS; - } hMouse = NULL; hKeyboard = NULL; bThreadTerminate = FALSE; DeleteCriticalSection (&critRandProt); @@ -260,39 +252,42 @@ BOOL IsRandomPoolEnrichedByUser () BOOL Randmix () { if (bRandmixEnabled) { unsigned char hashOutputBuffer [MAX_DIGESTSIZE]; - WHIRLPOOL_CTX wctx; - blake2s_state bctx; + #ifndef WOLFCRYPT_BACKEND + WHIRLPOOL_CTX wctx; + blake2s_state bctx; + STREEBOG_CTX stctx; + #endif sha512_ctx sctx; sha256_ctx s256ctx; - STREEBOG_CTX stctx; int poolIndex, digestIndex, digestSize; switch (HashFunction) { - case BLAKE2S: - digestSize = BLAKE2S_DIGESTSIZE; - break; - case SHA512: digestSize = SHA512_DIGESTSIZE; break; case SHA256: digestSize = SHA256_DIGESTSIZE; break; + #ifndef WOLFCRYPT_BACKEND + case BLAKE2S: + digestSize = BLAKE2S_DIGESTSIZE; + break; + case WHIRLPOOL: digestSize = WHIRLPOOL_DIGESTSIZE; break; case STREEBOG: digestSize = STREEBOG_DIGESTSIZE; break; - + #endif default: TC_THROW_FATAL_EXCEPTION; } if (RNG_POOL_SIZE % digestSize) @@ -301,16 +296,10 @@ BOOL Randmix () for (poolIndex = 0; poolIndex < RNG_POOL_SIZE; poolIndex += digestSize) { /* Compute the message digest of the entire pool using the selected hash function. */ switch (HashFunction) { - case BLAKE2S: - blake2s_init(&bctx); - blake2s_update(&bctx, pRandPool, RNG_POOL_SIZE); - blake2s_final(&bctx, hashOutputBuffer); - break; - case SHA512: sha512_begin (&sctx); sha512_hash (pRandPool, RNG_POOL_SIZE, &sctx); sha512_end (hashOutputBuffer, &sctx); break; @@ -319,10 +308,17 @@ BOOL Randmix () sha256_begin (&s256ctx); sha256_hash (pRandPool, RNG_POOL_SIZE, &s256ctx); sha256_end (hashOutputBuffer, &s256ctx); break; + #ifndef WOLFCRYPT_BACKEND + case BLAKE2S: + blake2s_init(&bctx); + blake2s_update(&bctx, pRandPool, RNG_POOL_SIZE); + blake2s_final(&bctx, hashOutputBuffer); + break; + case WHIRLPOOL: WHIRLPOOL_init (&wctx); WHIRLPOOL_add (pRandPool, RNG_POOL_SIZE, &wctx); WHIRLPOOL_finalize (&wctx, hashOutputBuffer); break; @@ -330,11 +326,11 @@ BOOL Randmix () case STREEBOG: STREEBOG_init (&stctx); STREEBOG_add (&stctx, pRandPool, RNG_POOL_SIZE); STREEBOG_finalize (&stctx, hashOutputBuffer); break; - + #endif default: // Unknown/wrong ID TC_THROW_FATAL_EXCEPTION; } @@ -347,30 +343,31 @@ BOOL Randmix () /* Prevent leaks */ burn (hashOutputBuffer, MAX_DIGESTSIZE); switch (HashFunction) { - case BLAKE2S: - burn (&bctx, sizeof(bctx)); - break; - case SHA512: burn (&sctx, sizeof(sctx)); break; case SHA256: burn (&s256ctx, sizeof(s256ctx)); break; + #ifndef WOLFCRYPT_BACKEND + case BLAKE2S: + burn (&bctx, sizeof(bctx)); + break; + case WHIRLPOOL: burn (&wctx, sizeof(wctx)); break; case STREEBOG: burn (&stctx, sizeof(sctx)); break; - + #endif default: // Unknown/wrong ID TC_THROW_FATAL_EXCEPTION; } } @@ -668,10 +665,11 @@ BOOL SlowPoll (void) HANDLE hDevice; LPBYTE lpBuffer; DWORD dwSize, status; LPWSTR lpszLanW, lpszLanS; int nDrive; + NTSTATUS bStatus = 0; /* Find out whether this is an NT server or workstation if necessary */ if (isWorkstation == -1) { HKEY hKey; @@ -776,22 +774,20 @@ BOOL SlowPoll (void) RandaddBuf ((unsigned char *) &diskPerformance, dwSize); } CloseHandle (hDevice); } - // CryptoAPI: We always have a valid CryptoAPI context when we arrive here but - // we keep the check for clarity purpose - if ( !CryptoAPIAvailable ) - return FALSE; - if (CryptGenRandom (hCryptProv, sizeof (buffer), buffer)) + + bStatus = BCryptGenRandom(NULL, buffer, sizeof(buffer), BCRYPT_USE_SYSTEM_PREFERRED_RNG); + if (NT_SUCCESS(bStatus)) { RandaddBuf (buffer, sizeof (buffer)); } else { - /* return error in case CryptGenRandom fails */ - CryptoAPILastError = GetLastError (); + /* return error in case BCryptGenRandom fails */ + CryptoAPILastError = pRtlNtStatusToDosError (bStatus); return FALSE; } /* use JitterEntropy library to get good quality random bytes based on CPU timing jitter */ if (0 == jent_entropy_init ()) @@ -804,18 +800,20 @@ BOOL SlowPoll (void) RandaddBuf (buffer, (int) rndLen); jent_entropy_collector_free (ec); } } +#ifndef _M_ARM64 // use RDSEED or RDRAND from CPU as source of entropy if present if ( IsCpuRngEnabled() && ( (HasRDSEED() && RDSEED_getBytes (buffer, sizeof (buffer))) || (HasRDRAND() && RDRAND_getBytes (buffer, sizeof (buffer))) )) { RandaddBuf (buffer, sizeof (buffer)); } +#endif burn(buffer, sizeof (buffer)); Randmix(); return TRUE; @@ -831,10 +829,11 @@ BOOL FastPoll (void) SIZE_T minimumWorkingSetSize, maximumWorkingSetSize; LARGE_INTEGER performanceCount; MEMORYSTATUSEX memoryStatus; HANDLE handle; POINT point; + NTSTATUS bStatus = 0; /* Get various basic pieces of system information */ RandaddIntPtr (GetActiveWindow ()); /* Handle of active window */ RandaddIntPtr (GetCapture ()); /* Handle of window with mouse capture */ @@ -921,33 +920,33 @@ BOOL FastPoll (void) /* Millisecond accuracy at best... */ DWORD dwTicks = GetTickCount (); RandaddBuf ((unsigned char *) &dwTicks, sizeof (dwTicks)); } - // CryptoAPI: We always have a valid CryptoAPI context when we arrive here but - // we keep the check for clarity purpose - if ( !CryptoAPIAvailable ) - return FALSE; - if (CryptGenRandom (hCryptProv, sizeof (buffer), buffer)) + + bStatus = BCryptGenRandom(NULL, buffer, sizeof(buffer), BCRYPT_USE_SYSTEM_PREFERRED_RNG); + if (NT_SUCCESS(bStatus)) { RandaddBuf (buffer, sizeof (buffer)); } else { - /* return error in case CryptGenRandom fails */ - CryptoAPILastError = GetLastError (); + /* return error in case BCryptGenRandom fails */ + CryptoAPILastError = pRtlNtStatusToDosError (bStatus); return FALSE; } +#ifndef _M_ARM64 // use RDSEED or RDRAND from CPU as source of entropy if enabled if ( IsCpuRngEnabled() && ( (HasRDSEED() && RDSEED_getBytes (buffer, sizeof (buffer))) || (HasRDRAND() && RDRAND_getBytes (buffer, sizeof (buffer))) )) { RandaddBuf (buffer, sizeof (buffer)); } +#endif burn (buffer, sizeof(buffer)); /* Apply the pool mixing function */ Randmix(); diff --git a/src/Common/Random.h b/src/Common/Random.h index 68758782..9d7e345a 100644 --- a/src/Common/Random.h +++ b/src/Common/Random.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Registry.c b/src/Common/Registry.c index b04bbf60..f5aa4053 100644 --- a/src/Common/Registry.c +++ b/src/Common/Registry.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Registry.h b/src/Common/Registry.h index ea449d3e..0e869281 100644 --- a/src/Common/Registry.h +++ b/src/Common/Registry.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Resource.h b/src/Common/Resource.h index 0098542e..bc9fd94b 100644 --- a/src/Common/Resource.h +++ b/src/Common/Resource.h @@ -71,18 +71,11 @@ #define IDR_EFI_DCSINT 567 #define IDR_EFI_DCSCFG 568 #define IDR_EFI_LEGACYSPEAKER 569 #define IDR_EFI_DCSBML 570 #define IDR_EFI_DCSRE 571 -#define IDR_EFI_DCSBOOT32 572 -#define IDR_EFI_DCSINT32 573 -#define IDR_EFI_DCSCFG32 574 -#define IDR_EFI_LEGACYSPEAKER32 575 -#define IDR_EFI_DCSBML32 576 -#define IDR_EFI_DCSRE32 577 #define IDR_EFI_DCSINFO 578 -#define IDR_EFI_DCSINFO32 579 #define IDC_HW_AES_LABEL_LINK 5000 #define IDC_HW_AES 5001 #define IDC_PARALLELIZATION_LABEL_LINK 5002 #define IDC_PARALLELIZATION 5003 #define IDT_TOKEN_PASSWORD 5004 diff --git a/src/Common/ResponseAPDU.cpp b/src/Common/ResponseAPDU.cpp index 8a7f069c..3fe3b6de 100644 --- a/src/Common/ResponseAPDU.cpp +++ b/src/Common/ResponseAPDU.cpp @@ -3,11 +3,11 @@ using namespace std; namespace VeraCrypt { - uint16 BytesToUInt16(const vector<byte>& buff) + uint16 BytesToUInt16(const vector<uint8>& buff) { uint16 value = 0; for (uint16 i = 0; i < buff.size(); i++) { value <<= 8; @@ -15,11 +15,11 @@ namespace VeraCrypt } return value; } - void AppendData (vector<byte>& buffer, const byte* pbData, size_t cbData) + void AppendData (vector<uint8>& buffer, const uint8* pbData, size_t cbData) { size_t orgSize = buffer.size (); buffer.resize (orgSize + cbData); memcpy (buffer.data () + orgSize, pbData, cbData); } @@ -34,73 +34,73 @@ namespace VeraCrypt ResponseAPDU::ResponseAPDU() : m_SW(0) { } - ResponseAPDU::ResponseAPDU(const vector<byte>& data, uint16 SW) + ResponseAPDU::ResponseAPDU(const vector<uint8>& data, uint16 SW) { m_data = data; m_SW = SW; } uint32 ResponseAPDU::getNr() { return (uint32)m_data.size(); } - const vector<byte> ResponseAPDU::getData() + const vector<uint8> ResponseAPDU::getData() { return m_data; } - byte ResponseAPDU::getSW1() + uint8 ResponseAPDU::getSW1() { - return (byte)((0xFF00 & m_SW) >> 8); + return (uint8)((0xFF00 & m_SW) >> 8); } - byte ResponseAPDU::getSW2() + uint8 ResponseAPDU::getSW2() { - return (byte)(0x00FF & m_SW); + return (uint8)(0x00FF & m_SW); } uint16 ResponseAPDU::getSW() { return m_SW; } - const vector<byte> ResponseAPDU::getBytes() + const vector<uint8> ResponseAPDU::getBytes() { - vector<byte> apdu; + vector<uint8> apdu; AppendData(apdu, m_data.data(), m_data.size()); - apdu.push_back((byte)getSW1()); - apdu.push_back((byte)getSW2()); + apdu.push_back((uint8)getSW1()); + apdu.push_back((uint8)getSW2()); return apdu; } - void ResponseAPDU::appendData(const vector<byte>& data) + void ResponseAPDU::appendData(const vector<uint8>& data) { appendData(data.data(), data.size()); } - void ResponseAPDU::appendData(const byte* data, size_t dataLen) + void ResponseAPDU::appendData(const uint8* data, size_t dataLen) { AppendData(m_data, data, dataLen); } void ResponseAPDU::setSW(uint16 SW) { m_SW = SW; } - void ResponseAPDU::setBytes(const vector<byte>& bytes) + void ResponseAPDU::setBytes(const vector<uint8>& bytes) { clear(); if (bytes.size() >= 2) { - vector<byte> SWBytes; + vector<uint8> SWBytes; m_data.resize(bytes.size() - 2); SWBytes.resize(2); memcpy(m_data.data(), bytes.data(), bytes.size() - 2); memcpy(SWBytes.data(), bytes.data() + bytes.size() - 2, 2); diff --git a/src/Common/ResponseAPDU.h b/src/Common/ResponseAPDU.h index b9aa4adc..f279afca 100644 --- a/src/Common/ResponseAPDU.h +++ b/src/Common/ResponseAPDU.h @@ -7,38 +7,38 @@ namespace VeraCrypt { class ResponseAPDU { protected: - vector<byte> m_data; + vector<uint8> m_data; uint16 m_SW; public: void clear(); ResponseAPDU(); - ResponseAPDU(const vector<byte>& data, uint16 SW); + ResponseAPDU(const vector<uint8>& data, uint16 SW); uint32 getNr(); - const vector<byte> getData(); + const vector<uint8> getData(); - byte getSW1(); + uint8 getSW1(); - byte getSW2(); + uint8 getSW2(); uint16 getSW(); - const vector<byte> getBytes(); + const vector<uint8> getBytes(); void setSW(uint16 SW); - void setBytes(const vector<byte>& bytes); + void setBytes(const vector<uint8>& bytes); - void appendData(const vector<byte>& data); - void appendData(const byte* data, size_t dataLen); + void appendData(const vector<uint8>& data); + void appendData(const uint8* data, size_t dataLen); }; }; #endif // TC_HEADER_Common_ResponseAPDU
\ No newline at end of file diff --git a/src/Common/SCard.cpp b/src/Common/SCard.cpp index 9f8d1145..edd315f6 100644 --- a/src/Common/SCard.cpp +++ b/src/Common/SCard.cpp @@ -4,11 +4,11 @@ using namespace std; namespace VeraCrypt { SCardManager SCard::manager; - SCard::SCard() : m_reader(NULL) + SCard::SCard() { } SCard::SCard(size_t slotId) { diff --git a/src/Common/SCardLoader.cpp b/src/Common/SCardLoader.cpp index 16026e62..24486002 100644 --- a/src/Common/SCardLoader.cpp +++ b/src/Common/SCardLoader.cpp @@ -318,11 +318,11 @@ namespace VeraCrypt throw ScardLibraryInitializationFailed(); return scardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen); } - LONG SCardLoader::SCardGetStatusChange(SCARDCONTEXT hContext, DWORD dwTimeout, LPSCARD_READERSTATE rgReaderStates, DWORD cReaders) + LONG SCardLoader::SCardGetStatusChange(SCARDCONTEXT hContext, DWORD dwTimeout, SCARD_READERSTATE* rgReaderStates, DWORD cReaders) { Initialize(); if (!bInitialized) throw ScardLibraryInitializationFailed(); @@ -397,6 +397,6 @@ namespace VeraCrypt if (!bInitialized) throw ScardLibraryInitializationFailed(); return scardSetAttrib(hCard, dwAttrId, pbAttr, cbAttrLen); } -}
\ No newline at end of file +} diff --git a/src/Common/SCardLoader.h b/src/Common/SCardLoader.h index b1ab114b..af0758ed 100644 --- a/src/Common/SCardLoader.h +++ b/src/Common/SCardLoader.h @@ -11,20 +11,17 @@ #undef BOOL #include <PCSC/pcsclite.h> #include <PCSC/winscard.h> #include <PCSC/wintypes.h> #include "reader.h" -typedef LPSCARD_READERSTATE_A LPSCARD_READERSTATE; -using VeraCrypt::byte; #define BOOL int #else #undef BOOL #include "pcsclite.h" #include <winscard.h> #include <wintypes.h> #include <reader.h> -using VeraCrypt::byte; #define BOOL int #endif #endif #ifndef TC_WINDOWS @@ -46,11 +43,11 @@ namespace VeraCrypt typedef LONG (SCARD_CALL_SPEC *SCardReconnectPtr)(SCARDHANDLE hCard, DWORD dwShareMode, DWORD dwPreferredProtocols, DWORD dwInitialization, LPDWORD pdwActiveProtocol); typedef LONG (SCARD_CALL_SPEC *SCardDisconnectPtr)(SCARDHANDLE hCard, DWORD dwDisposition); typedef LONG (SCARD_CALL_SPEC *SCardBeginTransactionPtr)(SCARDHANDLE hCard); typedef LONG (SCARD_CALL_SPEC *SCardEndTransactionPtr)(SCARDHANDLE hCard, DWORD dwDisposition); typedef LONG (SCARD_CALL_SPEC *SCardStatusPtr)(SCARDHANDLE hCard, LPTSTR mszReaderNames, LPDWORD pcchReaderLen, LPDWORD pdwState, LPDWORD pdwProtocol, BYTE* pbAtr, LPDWORD pcbAtrLen); - typedef LONG (SCARD_CALL_SPEC *SCardGetStatusChangePtr)(SCARDCONTEXT hContext, DWORD dwTimeout, LPSCARD_READERSTATE rgReaderStates, DWORD cReaders); + typedef LONG (SCARD_CALL_SPEC *SCardGetStatusChangePtr)(SCARDCONTEXT hContext, DWORD dwTimeout, SCARD_READERSTATE* rgReaderStates, DWORD cReaders); typedef LONG (SCARD_CALL_SPEC *SCardControlPtr)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer, DWORD cbSendLength, LPVOID pbRecvBuffer, DWORD cbRecvLength, LPDWORD lpBytesReturned); typedef LONG (SCARD_CALL_SPEC *SCardTransmitPtr)(SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pioSendPci, const BYTE* pbSendBuffer, DWORD cbSendLength, LPSCARD_IO_REQUEST pioRecvPci, BYTE* pbRecvBuffer, LPDWORD pcbRecvLength); typedef LONG (SCARD_CALL_SPEC *SCardListReaderGroupsPtr)(SCARDCONTEXT hContext, LPTSTR mszGroups, LPDWORD pcchGroups); typedef LONG (SCARD_CALL_SPEC *SCardListReadersPtr)(SCARDCONTEXT hContext, LPCTSTR mszGroups, LPTSTR mszReaders, LPDWORD pcchReaders); typedef LONG (SCARD_CALL_SPEC *SCardCancelPtr)(SCARDCONTEXT hContext); @@ -109,17 +106,17 @@ namespace VeraCrypt static LONG SCardReconnect(SCARDHANDLE hCard, DWORD dwShareMode, DWORD dwPreferredProtocols, DWORD dwInitialization, LPDWORD pdwActiveProtocol); static LONG SCardDisconnect(SCARDHANDLE hCard, DWORD dwDisposition); static LONG SCardBeginTransaction(SCARDHANDLE hCard); static LONG SCardEndTransaction(SCARDHANDLE hCard, DWORD dwDisposition); static LONG SCardStatus(SCARDHANDLE hCard, LPTSTR mszReaderNames, LPDWORD pcchReaderLen, LPDWORD pdwState, LPDWORD pdwProtocol, BYTE* pbAtr, LPDWORD pcbAtrLen); - static LONG SCardGetStatusChange(SCARDCONTEXT hContext, DWORD dwTimeout, LPSCARD_READERSTATE rgReaderStates, DWORD cReaders); + static LONG SCardGetStatusChange(SCARDCONTEXT hContext, DWORD dwTimeout, SCARD_READERSTATE* rgReaderStates, DWORD cReaders); static LONG SCardControl(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer, DWORD cbSendLength, LPVOID pbRecvBuffer, DWORD cbRecvLength, LPDWORD lpBytesReturned); static LONG SCardTransmit(SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pioSendPci, const BYTE* pbSendBuffer, DWORD cbSendLength, LPSCARD_IO_REQUEST pioRecvPci, BYTE* pbRecvBuffer, LPDWORD pcbRecvLength); static LONG SCardListReaderGroups(SCARDCONTEXT hContext, LPTSTR mszGroups, LPDWORD pcchGroups); static LONG SCardListReaders(SCARDCONTEXT hContext, LPCTSTR mszGroups, LPTSTR mszReaders, LPDWORD pcchReaders); static LONG SCardCancel(SCARDCONTEXT hContext); static LONG SCardGetAttrib(SCARDHANDLE hCard, DWORD dwAttrId, BYTE* pbAttr, LPDWORD pcbAttrLen); static LONG SCardSetAttrib(SCARDHANDLE hCard, DWORD dwAttrId, const BYTE* pbAttr, DWORD cbAttrLen); }; }; -#endif // TC_HEADER_Common_SCardLoader
\ No newline at end of file +#endif // TC_HEADER_Common_SCardLoader diff --git a/src/Common/SCardReader.cpp b/src/Common/SCardReader.cpp index 3a762415..6c5f654a 100644 --- a/src/Common/SCardReader.cpp +++ b/src/Common/SCardReader.cpp @@ -15,11 +15,11 @@ namespace VeraCrypt m_scardLoader = scardLoader; m_hSCReaderContext = m_scardLoader->GetSCardContext(); } else { - m_scardLoader = NULL; + m_scardLoader.reset(); m_hSCReaderContext = 0; } m_hCard = hCard; m_dwProtocol = dwProtocol; m_pIO_Protocol = pIO_Protocol; @@ -82,11 +82,11 @@ namespace VeraCrypt } void SCardReader::Clear(void) { m_szSCReaderName = L""; - m_scardLoader = NULL; + m_scardLoader.reset(); m_hSCReaderContext = 0; m_hCard = 0; m_dwProtocol = 0; m_pIO_Protocol = NULL; } @@ -115,11 +115,11 @@ namespace VeraCrypt } } return name; } - bool SCardReader::IsCardPresent(vector<byte>& cardAtr) + bool SCardReader::IsCardPresent(vector<uint8>& cardAtr) { LONG lRet = SCARD_S_SUCCESS; SCARD_READERSTATE state; bool bIsCardPresent = false; #ifdef TC_WINDOWS @@ -163,11 +163,11 @@ namespace VeraCrypt return bIsCardPresent; } bool SCardReader::IsCardPresent() { - vector<byte> dummy; + vector<uint8> dummy; return IsCardPresent(dummy); } LONG SCardReader::CardHandleStatus() { @@ -396,12 +396,12 @@ namespace VeraCrypt bool useExtendedAPDU = false; size_t indexOfLe = 0; size_t indexOfLcData = 0; - vector<byte> pbSendBuffer; - vector<byte> pbRecvBuffer; + vector<uint8> pbSendBuffer; + vector<uint8> pbRecvBuffer; DWORD cbSendLength = 0; DWORD cbRecvLength = 0; responseAPDU.clear(); @@ -458,11 +458,11 @@ namespace VeraCrypt { // case 2s // 256 is encoded as 0x00 pbSendBuffer[4] = (BYTE)ne; indexOfLe = 4; - cbSendLength = 4 + 1; // header || Le (1 byte) + cbSendLength = 4 + 1; // header || Le (1 uint8) } else { // case 2e // 65536 is encoded as 0x00 0x00 0x00 @@ -492,11 +492,11 @@ namespace VeraCrypt if (nc <= 255) { // case 3s pbSendBuffer[4] = (BYTE)nc; indexOfLcData = 5; - cbSendLength = 4 + 1 + nc; // header || Lc (1 byte) || Data + cbSendLength = 4 + 1 + nc; // header || Lc (1 uint8) || Data memcpy(&pbSendBuffer[indexOfLcData], commandAPDU.getData().data(), nc); } else { // case 3e @@ -516,11 +516,11 @@ namespace VeraCrypt if ((nc <= 255) && (ne <= 256)) { // case 4s pbSendBuffer[4] = (BYTE)nc; indexOfLcData = 5; - cbSendLength = 4 + 1 + nc + 1; // header || Lc (1 byte) || Data || Le (1 byte) + cbSendLength = 4 + 1 + nc + 1; // header || Lc (1 uint8) || Data || Le (1 uint8) memcpy(&pbSendBuffer[indexOfLcData], commandAPDU.getData().data(), nc); pbSendBuffer[indexOfLcData + nc] = (ne != 256) ? (BYTE)ne : 0; indexOfLe = indexOfLcData + nc; } else @@ -644,13 +644,13 @@ namespace VeraCrypt if (lRet != SCARD_S_SUCCESS) throw PCSCException(lRet); } - void SCardReader::GetATRFromHandle(vector<byte>& atrValue) + void SCardReader::GetATRFromHandle(vector<uint8>& atrValue) { - vector<byte> pbATR; + vector<uint8> pbATR; DWORD cByte = 0; LONG lRet = 0; atrValue.clear(); diff --git a/src/Common/SCardReader.h b/src/Common/SCardReader.h index 95586963..8814bce0 100644 --- a/src/Common/SCardReader.h +++ b/src/Common/SCardReader.h @@ -49,76 +49,76 @@ namespace VeraCrypt const uint16 SW_NO_ERROR = (uint16)0x9000; /* ================================================================================================ */ /* CLA values */ /* ================================================================================================ */ - const byte CLA_ISO7816 = (byte)0x00; - const byte CLA_COMMAND_CHAINING = (byte)0x10; + const uint8 CLA_ISO7816 = (uint8)0x00; + const uint8 CLA_COMMAND_CHAINING = (uint8)0x10; /* ================================================================================================ */ /* INS values */ /* ================================================================================================ */ - const byte INS_ERASE_BINARY = 0x0E; - const byte INS_VERIFY = 0x20; - const byte INS_CHANGE_CHV = 0x24; - const byte INS_UNBLOCK_CHV = 0x2C; - const byte INS_DECREASE = 0x30; - const byte INS_INCREASE = 0x32; - const byte INS_DECREASE_STAMPED = 0x34; - const byte INS_REHABILITATE_CHV = 0x44; - const byte INS_MANAGE_CHANNEL = 0x70; - const byte INS_EXTERNAL_AUTHENTICATE = (byte)0x82; - const byte INS_MUTUAL_AUTHENTICATE = (byte)0x82; - const byte INS_GET_CHALLENGE = (byte)0x84; - const byte INS_ASK_RANDOM = (byte)0x84; - const byte INS_GIVE_RANDOM = (byte)0x86; - const byte INS_INTERNAL_AUTHENTICATE = (byte)0x88; - const byte INS_SEEK = (byte)0xA2; - const byte INS_SELECT = (byte)0xA4; - const byte INS_SELECT_FILE = (byte)0xA4; - const byte INS_CLOSE_APPLICATION = (byte)0xAC; - const byte INS_READ_BINARY = (byte)0xB0; - const byte INS_READ_BINARY2 = (byte)0xB1; - const byte INS_READ_RECORD = (byte)0xB2; - const byte INS_READ_RECORD2 = (byte)0xB3; - const byte INS_READ_RECORDS = (byte)0xB2; - const byte INS_READ_BINARY_STAMPED = (byte)0xB4; - const byte INS_READ_RECORD_STAMPED = (byte)0xB6; - const byte INS_GET_RESPONSE = (byte)0xC0; - const byte INS_ENVELOPE = (byte)0xC2; - const byte INS_GET_DATA = (byte)0xCA; - const byte INS_WRITE_BINARY = (byte)0xD0; - const byte INS_WRITE_RECORD = (byte)0xD2; - const byte INS_UPDATE_BINARY = (byte)0xD6; - const byte INS_LOAD_KEY_FILE = (byte)0xD8; - const byte INS_PUT_DATA = (byte)0xDA; - const byte INS_UPDATE_RECORD = (byte)0xDC; - const byte INS_CREATE_FILE = (byte)0xE0; - const byte INS_APPEND_RECORD = (byte)0xE2; - const byte INS_DELETE_FILE = (byte)0xE4; - const byte INS_PSO = (byte)0x2A; - const byte INS_MSE = (byte)0x22; + const uint8 INS_ERASE_BINARY = 0x0E; + const uint8 INS_VERIFY = 0x20; + const uint8 INS_CHANGE_CHV = 0x24; + const uint8 INS_UNBLOCK_CHV = 0x2C; + const uint8 INS_DECREASE = 0x30; + const uint8 INS_INCREASE = 0x32; + const uint8 INS_DECREASE_STAMPED = 0x34; + const uint8 INS_REHABILITATE_CHV = 0x44; + const uint8 INS_MANAGE_CHANNEL = 0x70; + const uint8 INS_EXTERNAL_AUTHENTICATE = (uint8)0x82; + const uint8 INS_MUTUAL_AUTHENTICATE = (uint8)0x82; + const uint8 INS_GET_CHALLENGE = (uint8)0x84; + const uint8 INS_ASK_RANDOM = (uint8)0x84; + const uint8 INS_GIVE_RANDOM = (uint8)0x86; + const uint8 INS_INTERNAL_AUTHENTICATE = (uint8)0x88; + const uint8 INS_SEEK = (uint8)0xA2; + const uint8 INS_SELECT = (uint8)0xA4; + const uint8 INS_SELECT_FILE = (uint8)0xA4; + const uint8 INS_CLOSE_APPLICATION = (uint8)0xAC; + const uint8 INS_READ_BINARY = (uint8)0xB0; + const uint8 INS_READ_BINARY2 = (uint8)0xB1; + const uint8 INS_READ_RECORD = (uint8)0xB2; + const uint8 INS_READ_RECORD2 = (uint8)0xB3; + const uint8 INS_READ_RECORDS = (uint8)0xB2; + const uint8 INS_READ_BINARY_STAMPED = (uint8)0xB4; + const uint8 INS_READ_RECORD_STAMPED = (uint8)0xB6; + const uint8 INS_GET_RESPONSE = (uint8)0xC0; + const uint8 INS_ENVELOPE = (uint8)0xC2; + const uint8 INS_GET_DATA = (uint8)0xCA; + const uint8 INS_WRITE_BINARY = (uint8)0xD0; + const uint8 INS_WRITE_RECORD = (uint8)0xD2; + const uint8 INS_UPDATE_BINARY = (uint8)0xD6; + const uint8 INS_LOAD_KEY_FILE = (uint8)0xD8; + const uint8 INS_PUT_DATA = (uint8)0xDA; + const uint8 INS_UPDATE_RECORD = (uint8)0xDC; + const uint8 INS_CREATE_FILE = (uint8)0xE0; + const uint8 INS_APPEND_RECORD = (uint8)0xE2; + const uint8 INS_DELETE_FILE = (uint8)0xE4; + const uint8 INS_PSO = (uint8)0x2A; + const uint8 INS_MSE = (uint8)0x22; /* ================================================================================================ */ /* EMV values */ /* ================================================================================================ */ const uint16 EMV_CPLC_TAG = (uint16)0x9F7F; const uint16 EMV_ICC_PK_CERT_TAG = (uint16)0x9F46; const uint16 EMV_FCI_ISSUER_DISCRETIONARY_DATA_TAG = (uint16)0xBF0C; - const byte EMV_ISS_PK_CERT_TAG = (byte)0x90; - const byte EMV_PAN_TAG = (byte)0x5A; - const byte EMV_FCI_TAG = (byte)0x6F; - const byte EMV_DFNAME_TAG = (byte)0x84; - const byte EMV_FCI_ISSUER_TAG = (byte)0xA5; - const byte EMV_DIRECTORY_ENTRY_TAG = (byte)0x61; - const byte EMV_SFI_TAG = (byte)0x88; - const byte EMV_TEMPLATE_TAG = (byte)0x70; - const byte EMV_AID_TAG = (byte)0x4F; - const byte EMV_LABEL_TAG = (byte)0x50; - const byte EMV_PRIORITY_TAG = (byte)0x87; - const byte EMV_PSE1[] = { 0x31, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31 }; // "1PAY.SYS.DDF01" (contact) - const byte EMV_PSE2[] = { 0x32, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31 }; // "2PAY.SYS.DDF01" (contactless) + const uint8 EMV_ISS_PK_CERT_TAG = (uint8)0x90; + const uint8 EMV_PAN_TAG = (uint8)0x5A; + const uint8 EMV_FCI_TAG = (uint8)0x6F; + const uint8 EMV_DFNAME_TAG = (uint8)0x84; + const uint8 EMV_FCI_ISSUER_TAG = (uint8)0xA5; + const uint8 EMV_DIRECTORY_ENTRY_TAG = (uint8)0x61; + const uint8 EMV_SFI_TAG = (uint8)0x88; + const uint8 EMV_TEMPLATE_TAG = (uint8)0x70; + const uint8 EMV_AID_TAG = (uint8)0x4F; + const uint8 EMV_LABEL_TAG = (uint8)0x50; + const uint8 EMV_PRIORITY_TAG = (uint8)0x87; + const uint8 EMV_PSE1[] = { 0x31, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31 }; // "1PAY.SYS.DDF01" (contact) + const uint8 EMV_PSE2[] = { 0x32, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31 }; // "2PAY.SYS.DDF01" (contactless) /* ================================================================================================ */ class SCardReader { @@ -171,11 +171,11 @@ namespace VeraCrypt // ------------------------------------------------------------------------------------------------------------------------------------- // // Card Connection management methods // ------------------------------------------------------------------------------------------------------------------------------------- // - bool IsCardPresent(vector<byte>& cardAtr); + bool IsCardPresent(vector<uint8>& cardAtr); bool IsCardPresent(); LONG CardHandleStatus(); void Connect(DWORD dwProtocolToUse, bool& bHasBeenReset, bool resetAfterConnect = false); @@ -191,10 +191,10 @@ namespace VeraCrypt void BeginTransaction(); void EndTransaction(); void ApduProcessData(CommandAPDU commandAPDU, ResponseAPDU& responseAPDU) const; - void GetATRFromHandle(vector<byte>& atrValue); + void GetATRFromHandle(vector<uint8>& atrValue); }; }; #endif // TC_HEADER_Common_SCardReader
\ No newline at end of file diff --git a/src/Common/SecurityToken.cpp b/src/Common/SecurityToken.cpp index ad8ed33e..85219395 100644 --- a/src/Common/SecurityToken.cpp +++ b/src/Common/SecurityToken.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -121,11 +121,11 @@ namespace VeraCrypt Pkcs11Functions->C_CloseSession(Sessions[slotId].Handle); Sessions.erase(Sessions.find(slotId)); } - void SecurityToken::CreateKeyfile(CK_SLOT_ID slotId, vector <byte>& keyfileData, const string& name) + void SecurityToken::CreateKeyfile(CK_SLOT_ID slotId, vector <uint8>& keyfileData, const string& name) { if (name.empty()) throw ParameterIncorrect(SRC_POS); LoginUserIfRequired(slotId); @@ -165,14 +165,14 @@ namespace VeraCrypt if (status != CKR_OK) throw Pkcs11Exception(status); // Some tokens report success even if the new object was truncated to fit in the available memory - vector <byte> objectData; + vector <uint8> objectData; GetObjectAttribute(slotId, keyfileHandle, CKA_VALUE, objectData); - finally_do_arg(vector <byte> *, &objectData, { if (!finally_arg->empty()) burn(&finally_arg->front(), finally_arg->size()); }); + finally_do_arg(vector <uint8> *, &objectData, { if (!finally_arg->empty()) burn(&finally_arg->front(), finally_arg->size()); }); if (objectData.size() != keyfileData.size()) { Pkcs11Functions->C_DestroyObject(Sessions[slotId].Handle, keyfileHandle); throw Pkcs11Exception(CKR_DEVICE_MEMORY); @@ -218,24 +218,24 @@ namespace VeraCrypt } throw; } - foreach(const CK_OBJECT_HANDLE & dataHandle, GetObjects(slotId, CKO_DATA)) + for(const CK_OBJECT_HANDLE & dataHandle: GetObjects(slotId, CKO_DATA)) { SecurityTokenKeyfile keyfile; keyfile.Handle = dataHandle; keyfile.Token->SlotId = slotId; keyfile.Token = shared_ptr<SecurityTokenInfo>(new SecurityTokenInfo(token)); - vector <byte> privateAttrib; + vector <uint8> privateAttrib; GetObjectAttribute(slotId, dataHandle, CKA_PRIVATE, privateAttrib); if (privateAttrib.size() == sizeof(CK_BBOOL) && *(CK_BBOOL*)&privateAttrib.front() != CK_TRUE) continue; - vector <byte> label; + vector <uint8> label; GetObjectAttribute(slotId, dataHandle, CKA_LABEL, label); label.push_back(0); keyfile.IdUtf8 = (char*)&label.front(); @@ -318,11 +318,11 @@ namespace VeraCrypt token.Label = StringConverter::ToWide(token.LabelUtf8); #endif return token; } - void SecurityTokenKeyfile::GetKeyfileData(vector <byte>& keyfileData) const + void SecurityTokenKeyfile::GetKeyfileData(vector <uint8>& keyfileData) const { SecurityToken::LoginUserIfRequired(Token->SlotId); SecurityToken::GetObjectAttribute(Token->SlotId, Handle, CKA_VALUE, keyfileData); } @@ -346,11 +346,11 @@ namespace VeraCrypt vector <CK_OBJECT_HANDLE> objects; while (true) { CK_OBJECT_HANDLE object; - CK_RV status = Pkcs11Functions->C_FindObjects(Sessions[slotId].Handle, &object, 1, &objectCount); + status = Pkcs11Functions->C_FindObjects(Sessions[slotId].Handle, &object, 1, &objectCount); if (status != CKR_OK) throw Pkcs11Exception(status); if (objectCount != 1) break; @@ -359,11 +359,11 @@ namespace VeraCrypt } return objects; } - void SecurityToken::GetObjectAttribute(CK_SLOT_ID slotId, CK_OBJECT_HANDLE tokenObject, CK_ATTRIBUTE_TYPE attributeType, vector <byte>& attributeValue) + void SecurityToken::GetObjectAttribute(CK_SLOT_ID slotId, CK_OBJECT_HANDLE tokenObject, CK_ATTRIBUTE_TYPE attributeType, vector <uint8>& attributeValue) { attributeValue.clear(); if (Sessions.find(slotId) == Sessions.end()) throw ParameterIncorrect(SRC_POS); @@ -377,11 +377,11 @@ namespace VeraCrypt throw Pkcs11Exception(status); if (attribute.ulValueLen == 0) return; - attributeValue = vector <byte>(attribute.ulValueLen); + attributeValue = vector <uint8>(attribute.ulValueLen); attribute.pValue = &attributeValue.front(); status = Pkcs11Functions->C_GetAttributeValue(Sessions[slotId].Handle, tokenObject, &attribute, 1); if (status != CKR_OK) throw Pkcs11Exception(status); diff --git a/src/Common/SecurityToken.h b/src/Common/SecurityToken.h index 4dff42fa..9f024b36 100644 --- a/src/Common/SecurityToken.h +++ b/src/Common/SecurityToken.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -74,11 +74,11 @@ namespace VeraCrypt virtual ~SecurityTokenKeyfile() {} operator TokenKeyfilePath () const; - void GetKeyfileData(vector<byte>& keyfileData) const; + void GetKeyfileData(vector<uint8>& keyfileData) const; string IdUtf8; CK_OBJECT_HANDLE Handle; }; @@ -179,11 +179,11 @@ namespace VeraCrypt class SecurityToken { public: static void CloseAllSessions() throw (); static void CloseLibrary(); - static void CreateKeyfile(CK_SLOT_ID slotId, vector <byte>& keyfileData, const string& name); + static void CreateKeyfile(CK_SLOT_ID slotId, vector <uint8>& keyfileData, const string& name); static void DeleteKeyfile(const SecurityTokenKeyfile& keyfile); static vector <SecurityTokenKeyfile> GetAvailableKeyfiles(CK_SLOT_ID* slotIdFilter = nullptr, const wstring keyfileIdFilter = wstring()); static list <SecurityTokenInfo> GetAvailableTokens(); static SecurityTokenInfo GetTokenInfo(CK_SLOT_ID slotId); #ifdef TC_WINDOWS @@ -197,11 +197,11 @@ namespace VeraCrypt static const size_t MaxPasswordLength = 128; protected: static void CloseSession(CK_SLOT_ID slotId); static vector <CK_OBJECT_HANDLE> GetObjects(CK_SLOT_ID slotId, CK_ATTRIBUTE_TYPE objectClass); - static void GetObjectAttribute(CK_SLOT_ID slotId, CK_OBJECT_HANDLE tokenObject, CK_ATTRIBUTE_TYPE attributeType, vector <byte>& attributeValue); + static void GetObjectAttribute(CK_SLOT_ID slotId, CK_OBJECT_HANDLE tokenObject, CK_ATTRIBUTE_TYPE attributeType, vector <uint8>& attributeValue); static list <CK_SLOT_ID> GetTokenSlots(); static void Login(CK_SLOT_ID slotId, const char* pin); static void LoginUserIfRequired(CK_SLOT_ID slotId); static void OpenSession(CK_SLOT_ID slotId); static void CheckLibraryStatus(); @@ -215,10 +215,10 @@ namespace VeraCrypt static void* Pkcs11LibraryHandle; #endif static map <CK_SLOT_ID, Pkcs11Session> Sessions; static unique_ptr <SendExceptionFunctor> WarningCallback; - friend void SecurityTokenKeyfile::GetKeyfileData(vector <byte>& keyfileData) const; + friend void SecurityTokenKeyfile::GetKeyfileData(vector <uint8>& keyfileData) const; }; } #endif // TC_HEADER_Common_SecurityToken diff --git a/src/Common/TLVParser.cpp b/src/Common/TLVParser.cpp index 9a177007..5ddf37e5 100644 --- a/src/Common/TLVParser.cpp +++ b/src/Common/TLVParser.cpp @@ -11,11 +11,11 @@ namespace VeraCrypt shared_ptr<TLVNode> node = shared_ptr<TLVNode>(new TLVNode()); return node; } /* Check if the bit is correct */ - uint16 TLVParser::CheckBit(byte value, int bit) + uint16 TLVParser::CheckBit(uint8 value, int bit) { unsigned char bitvalue[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; if ((bit >= 1) && (bit <= 8)) { @@ -34,17 +34,17 @@ namespace VeraCrypt //return(2); } } /* Parsing one TLV node */ - shared_ptr<TLVNode> TLVParser::TLV_Parse_One(byte* buf, size_t size) + shared_ptr<TLVNode> TLVParser::TLV_Parse_One(uint8* buf, size_t size) { size_t index = 0; size_t i = 0; - byte tag1, tag2, tagsize; - byte len, lensize; - shared_ptr<vector<byte>> value = make_shared<vector<byte>>(); + uint8 tag1, tag2, tagsize; + uint8 len, lensize; + shared_ptr<vector<uint8>> value = make_shared<vector<uint8>>(); shared_ptr<TLVNode> node = TLV_CreateNode(); tag1 = tag2 = 0; tagsize = 1; tag1 = buf[index++]; @@ -155,11 +155,11 @@ namespace VeraCrypt } } } /* Parsing TLV from a buffer and constructing TLV structure */ - shared_ptr<TLVNode> TLVParser::TLV_Parse(byte* buf, size_t size) + shared_ptr<TLVNode> TLVParser::TLV_Parse(uint8* buf, size_t size) { shared_ptr<TLVNode> node = TLV_Parse_One(buf, size); TLV_Parse_Sub(node); return node; @@ -167,21 +167,21 @@ namespace VeraCrypt /* Finding a TLV node with a particular tag */ shared_ptr<TLVNode> TLVParser::TLV_Find(shared_ptr<TLVNode> node, uint16 tag) { size_t i = 0; - shared_ptr<TLVNode> tmpnode = NULL; + shared_ptr<TLVNode> tmpnode; if (node->Tag == tag) { return node; } for (i = 0; i < node->Subs->size(); i++) { tmpnode = TLV_Find(node->Subs->at(i),tag); - if (tmpnode != NULL) + if (tmpnode) { return tmpnode; } } - return NULL; + return shared_ptr<TLVNode>(); } -}
\ No newline at end of file +} diff --git a/src/Common/TLVParser.h b/src/Common/TLVParser.h index b989ca41..2fc4a27c 100644 --- a/src/Common/TLVParser.h +++ b/src/Common/TLVParser.h @@ -8,20 +8,20 @@ namespace VeraCrypt { struct TLVNode { uint16 Tag; /* T */ uint16 Length; /* L */ - shared_ptr<vector<byte>> Value; /* V */ - byte TagSize; - byte LengthSize; + shared_ptr<vector<uint8>> Value; /* V */ + uint8 TagSize; + uint8 LengthSize; uint16 MoreFlag; /* Used In Sub */ uint16 SubFlag; /* Does it have sub-nodes? */ shared_ptr<vector<shared_ptr<TLVNode>>> Subs; TLVNode() : Tag(0), Length(0), TagSize(0), LengthSize(0), MoreFlag(0), SubFlag(0) { - Value = make_shared<vector<byte>>(); + Value = make_shared<vector<uint8>>(); Subs = make_shared<vector<shared_ptr<TLVNode>>>(); } ~TLVNode() { @@ -35,14 +35,14 @@ namespace VeraCrypt /* TLV node structure creation */ static shared_ptr<TLVNode> TLV_CreateNode(); /* Check if the bit is correct */ - static uint16 CheckBit(byte value, int bit); + static uint16 CheckBit(uint8 value, int bit); /* Parsing one TLV node */ - static shared_ptr<TLVNode> TLV_Parse_One(byte* buf, size_t size); + static shared_ptr<TLVNode> TLV_Parse_One(uint8* buf, size_t size); /* Parsing all TLV nodes */ static int TLV_Parse_SubNodes(shared_ptr<TLVNode> parent); /* Parsing all sub-nodes (in width not in depth) of a given parent node */ @@ -52,11 +52,11 @@ namespace VeraCrypt static void TLV_Parse_Sub(shared_ptr<TLVNode> parent); public: /* Parsing TLV from a buffer and constructing TLV structure */ - static shared_ptr<TLVNode> TLV_Parse(byte* buf, size_t size); + static shared_ptr<TLVNode> TLV_Parse(uint8* buf, size_t size); /* Finding a TLV node with a particular tag */ static shared_ptr<TLVNode> TLV_Find(shared_ptr<TLVNode> node, uint16 tag); }; diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h index 1223340e..ee5751b7 100644 --- a/src/Common/Tcdefs.h +++ b/src/Common/Tcdefs.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TCDEFS_H @@ -57,11 +57,11 @@ extern unsigned short _rotl16(unsigned short value, unsigned char shift); #endif #define TC_APP_NAME "VeraCrypt" // Version displayed to user -#define VERSION_STRING "1.26.8" +#define VERSION_STRING "1.26.20" #ifdef VC_EFI_CUSTOM_MODE #define VERSION_STRING_SUFFIX "-CustomEFI" #elif defined(VC_SKIP_OS_DRIVER_REQ_CHECK) #define VERSION_STRING_SUFFIX "-TESTSIGNING" @@ -71,13 +71,13 @@ extern unsigned short _rotl16(unsigned short value, unsigned char shift); // Version number to compare against driver #define VERSION_NUM 0x0126 // Release date -#define TC_STR_RELEASE_DATE L"October 7, 2023" -#define TC_RELEASE_DATE_YEAR 2023 -#define TC_RELEASE_DATE_MONTH 10 +#define TC_STR_RELEASE_DATE L"February 3, 2025" +#define TC_RELEASE_DATE_YEAR 2025 +#define TC_RELEASE_DATE_MONTH 2 #define BYTES_PER_KB 1024LL #define BYTES_PER_MB 1048576LL #define BYTES_PER_GB 1073741824LL #define BYTES_PER_TB 1099511627776LL @@ -93,11 +93,10 @@ extern unsigned short _rotl16(unsigned short value, unsigned char shift); #ifdef _MSC_VER typedef __int8 int8; typedef __int16 int16; typedef __int32 int32; -typedef unsigned __int8 byte; typedef unsigned __int8 uint8; typedef unsigned __int16 uint16; typedef unsigned __int32 uint32; #ifdef TC_NO_COMPILER_INT64 @@ -107,10 +106,16 @@ typedef unsigned __int64 TC_LARGEST_COMPILER_UINT; typedef __int64 int64; typedef unsigned __int64 uint64; #define LL(x) x##ui64 #endif +#if _MSC_VER > 1900 +#define VC_CDECL __cdecl // this is needed because Windows driver on VS2019 uses stdcall for build +#else +#define VC_CDECL +#endif + #pragma warning( disable : 4201 ) // disable: 4201 nonstandard extension used : nameless struct/union #pragma warning( disable : 4324 ) // disable: 4324 structure was padded due to __declspec(align()) #else // !_MSC_VER @@ -120,11 +125,10 @@ typedef unsigned __int64 uint64; typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; -typedef uint8_t byte; typedef uint8_t uint8; typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; @@ -151,10 +155,12 @@ typedef uint64 TC_LARGEST_COMPILER_UINT; #ifndef FALSE #define FALSE 0 #define TRUE 1 #endif +#define VC_CDECL + #endif // !_MSC_VER #define TC_INT_TYPES_DEFINED // Integer types required by Cryptolib @@ -232,10 +238,13 @@ void ThrowFatalException(int line); # define TC_THROW_FATAL_EXCEPTION ThrowFatalException (__LINE__) #elif (defined(__clang__) && __has_builtin(__builtin_trap)) \ || (defined(__GNUC__ ) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) \ || (__has_builtin(__builtin_trap)) # define TC_THROW_FATAL_EXCEPTION __builtin_trap() +#elif defined(_MSC_VER) +#include <intrin.h> +# define TC_THROW_FATAL_EXCEPTION __fastfail(FAST_FAIL_FATAL_APP_EXIT) #else # define TC_THROW_FATAL_EXCEPTION *(char *) 0 = 0 #endif #ifdef __COVERITY__ @@ -247,24 +256,14 @@ void ThrowFatalException(int line); #include <ntifs.h> #include <ntddk.h> /* Standard header file for nt drivers */ #include <ntdddisk.h> /* Standard I/O control codes */ -/* defines needed for using enhanced protection of NX pool under Windows 8 and later */ -#define NonPagedPoolNx 512 -#define MdlMappingNoExecute 0x40000000 -/* variables used in the implementation of enhanced protection of NX pool under Windows 8 and later */ -extern POOL_TYPE ExDefaultNonPagedPoolType; -extern ULONG ExDefaultMdlProtection; -#ifdef _WIN64 extern ULONG AllocTag; -#else -#define AllocTag 'MMCV' -#endif -#define TCalloc(size) ((void *) ExAllocatePoolWithTag( ExDefaultNonPagedPoolType, size, AllocTag )) +#define TCalloc(size) ((void *) ExAllocatePoolUninitialized( NonPagedPoolNx , size, AllocTag )) #define TCfree(memblock) ExFreePoolWithTag( memblock, AllocTag ) #define DEVICE_DRIVER #ifndef BOOL @@ -285,57 +284,10 @@ typedef unsigned char BOOLEAN; #ifndef FALSE #define FALSE !TRUE #endif -typedef NTSTATUS (NTAPI *KeSaveExtendedProcessorStateFn) ( - __in ULONG64 Mask, - PXSTATE_SAVE XStateSave - ); - - -typedef VOID (NTAPI *KeRestoreExtendedProcessorStateFn) ( - PXSTATE_SAVE XStateSave - ); - -typedef NTSTATUS (NTAPI *ExGetFirmwareEnvironmentVariableFn) ( - PUNICODE_STRING VariableName, - LPGUID VendorGuid, - PVOID Value, - PULONG ValueLength, - PULONG Attributes -); - -typedef ULONG64 (NTAPI *KeQueryInterruptTimePreciseFn)( - PULONG64 QpcTimeStamp -); - -typedef BOOLEAN (NTAPI *KeAreAllApcsDisabledFn) (); - -typedef void (NTAPI *KeSetSystemGroupAffinityThreadFn)( - PGROUP_AFFINITY Affinity, - PGROUP_AFFINITY PreviousAffinity -); - -typedef USHORT (NTAPI *KeQueryActiveGroupCountFn)(); - -typedef ULONG (NTAPI *KeQueryActiveProcessorCountExFn)( - USHORT GroupNumber -); - -extern NTSTATUS NTAPI KeSaveExtendedProcessorStateVC ( - __in ULONG64 Mask, - PXSTATE_SAVE XStateSave - ); - - -extern VOID NTAPI KeRestoreExtendedProcessorStateVC ( - PXSTATE_SAVE XStateSave - ); - -extern BOOLEAN VC_KeAreAllApcsDisabled (VOID); - #else /* !TC_WINDOWS_DRIVER */ #if !defined(_UEFI) #define TCalloc malloc #define TCfree free @@ -349,11 +301,17 @@ extern BOOLEAN VC_KeAreAllApcsDisabled (VOID); #ifndef TC_LOCAL_WIN32_WINNT_OVERRIDE # undef _WIN32_WINNT #ifdef _M_ARM64 # define _WIN32_WINNT 0x0A00 #else -# define _WIN32_WINNT 0x0601 /* Does not apply to the driver */ +// for Visual Studio 2015 and later, set minimum Windows version to Windows 8 +// for old versions of Visual Studio, set minimum Windows version to Windows 7 +#if _MSC_VER >= 1900 +# define _WIN32_WINNT 0x0602 +#else +# define _WIN32_WINNT 0x0601 +#endif #endif #endif #include <windows.h> /* Windows header */ #include <commctrl.h> /* The common controls */ @@ -494,9 +452,11 @@ enum ERR_PARAMETER_INCORRECT = 30, ERR_SYS_HIDVOL_HEAD_REENC_MODE_WRONG = 31, ERR_NONSYS_INPLACE_ENC_INCOMPLETE = 32, ERR_USER_ABORT = 33, ERR_RAND_INIT_FAILED = 34, - ERR_CAPI_INIT_FAILED = 35 + ERR_CAPI_INIT_FAILED = 35, + ERR_XTS_MASTERKEY_VULNERABLE = 36, + ERR_SYSENC_XTS_MASTERKEY_VULNERABLE = 37 }; #endif // #ifndef TCDEFS_H diff --git a/src/Common/Tests.c b/src/Common/Tests.c index 4f53d4ed..89af24f1 100644 --- a/src/Common/Tests.c +++ b/src/Common/Tests.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -309,10 +309,13 @@ AES_TEST aes_ecb_vectors[AES_TEST_COUNT] = { 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff, 0x8e,0xa2,0xb7,0xca,0x51,0x67,0x45,0xbf,0xea,0xfc,0x49,0x90,0x4b,0x49,0x60,0x89 }; + +#ifndef WOLFCRYPT_BACKEND + // Serpent ECB test vectors #define SERPENT_TEST_COUNT 1 typedef struct { @@ -417,10 +420,11 @@ KUZNYECHIK_TEST kuznyechik_vectors[KUZNYECHIK_TEST_COUNT] = { 0xD0, 0xB0, 0x9C, 0xCD, 0xE8, 0x30, 0xB9, 0xEB, 0x3A, 0x02, 0xC4, 0xC5, 0xAA, 0x8A, 0xDA, 0x98 } }; +#endif /* Test vectors from FIPS 198a, RFC 4231, RFC 2104, RFC 2202, and other sources. */ char *hmac_sha256_test_keys[] = { @@ -561,23 +565,17 @@ unsigned long HexStringToByteArray(const char* hexStr, unsigned char* pbData) count++; } return count; } -BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE) +BOOL RunHashTest (HashFunction fn, HashTestVector* vector) { CRYPTOPP_ALIGN_DATA (16) unsigned char input[256]; unsigned char output[64]; unsigned char digest[64]; unsigned long i = 0, inputLen, outputLen, digestLen; BOOL bRet = TRUE; -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - if (bUseSSE) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif while (vector[i].hexInput && vector[i].hexOutput) { inputLen = HexStringToByteArray (vector[i].hexInput, input); outputLen = HexStringToByteArray (vector[i].hexOutput, output); digestLen = fn (input, inputLen, digest); @@ -587,15 +585,10 @@ BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE) break; } i++; } -#if defined (DEVICE_DRIVER) && !defined (_WIN64) - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif - return bRet; } /* https://www.streebog.net/src/trunk/examples/ */ @@ -645,11 +638,11 @@ HashTestVector Blake2sTestVectors[] = { {NULL, NULL} }; unsigned char ks_tmp[MAX_EXPANDED_KEY]; -void CipherInit2(int cipher, void* key, void* ks, int key_len) +void CipherInit2(int cipher, void* key, void* ks) { switch (cipher) { case AES: @@ -730,14 +723,12 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) memcpy (key2, XTS_vectors[XTS_TEST_COUNT-1].key2, sizeof (XTS_vectors[XTS_TEST_COUNT-1].key2)); if (!EAInitMode (ci, key2)) return FALSE; -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (ci, VcGetEncryptionID (ci)); -#endif // Each data unit will contain the same plaintext for (i = 0; i < nbrUnits; i++) { memcpy ((unsigned char *) buf + i * ENCRYPTION_DATA_UNIT_SIZE, @@ -782,10 +773,11 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) return FALSE; nTestsPerformed++; break; } } + #ifndef WOLFCRYPT_BACKEND else if (wcscmp (name, L"Serpent") == 0) { switch (testCase) { case 0: @@ -1146,11 +1138,11 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) return FALSE; nTestsPerformed++; break; } } - + #endif if (crc == 0x9f5edd58) return FALSE; DecryptDataUnits (buf, &unitNo, nbrUnits, ci); @@ -1198,10 +1190,11 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) { if (crc != 0x33b91fab) return FALSE; nTestsPerformed++; } + #ifndef WOLFCRYPT_BACKEND else if (wcscmp (name, L"Serpent") == 0) { if (crc != 0x3494d480) return FALSE; nTestsPerformed++; @@ -1282,11 +1275,11 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) { if (crc != 0x755dad72) return FALSE; nTestsPerformed++; } - + #endif if (crc == 0x9f5edd58) return FALSE; DecryptBuffer (buf, sizeof (buf), ci); @@ -1299,11 +1292,11 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci) } static BOOL DoAutoTestAlgorithms (void) { PCRYPTO_INFO ci; - CRYPTOPP_ALIGN_DATA(16) char key[32]; + CRYPTOPP_ALIGN_DATA(16) unsigned char key[32]; unsigned char tmp[16]; BOOL bFailed = FALSE; int i; ci = crypto_open (); @@ -1332,17 +1325,16 @@ static BOOL DoAutoTestAlgorithms (void) if (i != AES_TEST_COUNT) bFailed = TRUE; // AES EncipherBlocks()/DecipherBlocks() { - byte testData[1024]; + uint8 testData[1024]; uint32 origCrc; - size_t i; for (i = 0; i < sizeof (testData); ++i) { - testData[i] = (byte) i; + testData[i] = (uint8) i; } origCrc = GetCrc32 (testData, sizeof (testData)); CipherInit (AES, testData, ks_tmp); @@ -1355,10 +1347,11 @@ static BOOL DoAutoTestAlgorithms (void) if (origCrc != GetCrc32 (testData, sizeof (testData))) bFailed = TRUE; } + #ifndef WOLFCRYPT_BACKEND /* Serpent */ for (i = 0; i < SERPENT_TEST_COUNT; i++) { int cipher = SERPENT; @@ -1435,10 +1428,11 @@ static BOOL DoAutoTestAlgorithms (void) if (memcmp(kuznyechik_vectors[i].plaintext, tmp, 16) != 0) break; } if (i != KUZNYECHIK_TEST_COUNT) bFailed = TRUE; + #endif /* PKCS #5 and HMACs */ if (!test_pkcs5 ()) bFailed = TRUE; @@ -1494,11 +1488,13 @@ BOOL AutoTestAlgorithms (void) if (exceptionCatched) { /* unexepected exception raised. Disable all CPU extended feature and try again */ EnableHwEncryption (hwEncryptionEnabled); +#ifndef _M_ARM64 DisableCPUExtendedFeatures (); +#endif __try { result = DoAutoTestAlgorithms(); } __except (EXCEPTION_EXECUTE_HANDLER) @@ -1516,16 +1512,16 @@ BOOL test_hmac_sha256 () unsigned int i; int nTestsPerformed = 0; for (i = 0; i < sizeof (hmac_sha256_test_data) / sizeof(char *); i++) { - char digest[1024]; /* large enough to hold digets and test vector inputs */ + unsigned char digest[1024]; /* large enough to hold digets and test vector inputs */ size_t dataLen = strlen (hmac_sha256_test_data[i]); if (dataLen <= sizeof(digest)) { memcpy (digest, hmac_sha256_test_data[i], dataLen); - hmac_sha256 (hmac_sha256_test_keys[i], (int) strlen (hmac_sha256_test_keys[i]), digest, (int) dataLen); + hmac_sha256 ((unsigned char*) hmac_sha256_test_keys[i], (int) strlen (hmac_sha256_test_keys[i]), digest, (int) dataLen); if (memcmp (digest, hmac_sha256_test_vectors[i], SHA256_DIGESTSIZE) != 0) return FALSE; else nTestsPerformed++; } @@ -1543,16 +1539,16 @@ BOOL test_hmac_sha512 () unsigned int i; int nTestsPerformed = 0; for (i = 0; i < sizeof (hmac_sha512_test_data) / sizeof(char *); i++) { - char digest[1024]; /* large enough to hold digets and test vector inputs */ + unsigned char digest[1024]; /* large enough to hold digets and test vector inputs */ size_t dataLen = strlen (hmac_sha512_test_data[i]); if (dataLen <= sizeof(digest)) { memcpy (digest, hmac_sha512_test_data[i], dataLen ); - hmac_sha512 (hmac_sha512_test_keys[i], (int) strlen (hmac_sha512_test_keys[i]), digest, (int) dataLen); + hmac_sha512 ((unsigned char*) hmac_sha512_test_keys[i], (int) strlen (hmac_sha512_test_keys[i]), digest, (int) dataLen); if (memcmp (digest, hmac_sha512_test_vectors[i], SHA512_DIGESTSIZE) != 0) return FALSE; else nTestsPerformed++; } @@ -1563,23 +1559,24 @@ BOOL test_hmac_sha512 () } return (nTestsPerformed == 6); } +#ifndef WOLFCRYPT_BACKEND BOOL test_hmac_blake2s () { unsigned int i; int nTestsPerformed = 0; for (i = 0; i < sizeof (hmac_blake2s_test_data) / sizeof(char *); i++) { - char digest[1024]; /* large enough to hold digets and test vector inputs */ + unsigned char digest[1024]; /* large enough to hold digets and test vector inputs */ size_t dataLen = strlen (hmac_blake2s_test_data[i]); if (dataLen <= sizeof(digest)) { memcpy (digest, hmac_blake2s_test_data[i], dataLen); - hmac_blake2s (hmac_blake2s_test_keys[i], (int) strlen (hmac_blake2s_test_keys[i]), digest, (int) dataLen); + hmac_blake2s ((unsigned char*)(unsigned char*)hmac_blake2s_test_keys[i], (int) strlen (hmac_blake2s_test_keys[i]), digest, (int) dataLen); if (memcmp (digest, hmac_blake2s_test_vectors[i], BLAKE2S_DIGESTSIZE) != 0) return FALSE; else nTestsPerformed++; } @@ -1601,16 +1598,17 @@ int __cdecl Blake2sHash (unsigned char* input, unsigned long inputLen, unsigned BOOL test_hmac_whirlpool () { unsigned char digest[1024]; /* large enough to hold digets and test vector inputs */ memcpy (digest, hmac_whirlpool_test_data, strlen (hmac_whirlpool_test_data)); - hmac_whirlpool (hmac_whirlpool_test_key, 64, digest, (int) strlen (hmac_whirlpool_test_data)); + hmac_whirlpool ((unsigned char*) hmac_whirlpool_test_key, 64, digest, (int) strlen (hmac_whirlpool_test_data)); if (memcmp (digest, hmac_whirlpool_test_vectors, WHIRLPOOL_DIGESTSIZE) != 0) return FALSE; return TRUE; } +#endif /* http://www.tc26.ru/methods/recommendation/%D0%A2%D0%9A26%D0%90%D0%9B%D0%93.pdf */ /* https://tools.ietf.org/html/draft-smyshlyaev-gost-usage-00 */ /* https://datatracker.ietf.org/doc/rfc7836/?include_text=1 */ static const unsigned char gost3411_2012_hmac_k1[] = { @@ -1631,16 +1629,17 @@ static const unsigned char gost3411_2012_hmac_r1[] = { 0x3A, 0xFE, 0x93, 0xB2, 0x81, 0x4F, 0x79, 0xF5, 0x00, 0x0F, 0xFC, 0x03, 0x66, 0xC2, 0x51, 0xE6 }; +#ifndef WOLFCRYPT_BACKEND BOOL test_hmac_streebog () { - CRYPTOPP_ALIGN_DATA(16) char digest[64]; /* large enough to hold digets and test vector inputs */ + CRYPTOPP_ALIGN_DATA(16) unsigned char digest[64]; /* large enough to hold digets and test vector inputs */ memcpy (digest, gost3411_2012_hmac_m1, sizeof (gost3411_2012_hmac_m1)); - hmac_streebog ((char*) gost3411_2012_hmac_k1, sizeof(gost3411_2012_hmac_k1), digest, (int) sizeof (gost3411_2012_hmac_m1)); + hmac_streebog ((unsigned char*) gost3411_2012_hmac_k1, sizeof(gost3411_2012_hmac_k1), digest, (int) sizeof (gost3411_2012_hmac_m1)); if (memcmp (digest, gost3411_2012_hmac_r1, STREEBOG_DIGESTSIZE) != 0) return FALSE; return TRUE; } @@ -1651,29 +1650,31 @@ int __cdecl StreebogHash (unsigned char* input, unsigned long inputLen, unsigned STREEBOG_init (&ctx); STREEBOG_add (&ctx, input, inputLen); STREEBOG_finalize (&ctx, output); return STREEBOG_DIGESTSIZE; } +#endif BOOL test_pkcs5 () { - char dk[144]; + unsigned char dk[144]; /* HMAC-SHA-256 tests */ if (!test_hmac_sha256()) return FALSE; /* HMAC-SHA-512 tests */ if (!test_hmac_sha512()) return FALSE; +#ifndef WOLFCRYPT_BACKEND /* HMAC-BLAKE2s tests */ if (test_hmac_blake2s() == FALSE) return FALSE; /* Blake2s hash tests */ - if (RunHashTest (Blake2sHash, Blake2sTestVectors, (HasSSE2())? TRUE : FALSE) == FALSE) + if (RunHashTest (Blake2sHash, Blake2sTestVectors) == FALSE) return FALSE; /* HMAC-Whirlpool tests */ if (test_hmac_whirlpool() == FALSE) return FALSE; @@ -1681,71 +1682,72 @@ BOOL test_pkcs5 () /* HMAC-STREEBOG tests */ if (test_hmac_streebog() == FALSE) return FALSE; /* STREEBOG hash tests */ - if (RunHashTest (StreebogHash, Streebog512TestVectors, (HasSSE2() || HasSSE41())? TRUE : FALSE) == FALSE) + if (RunHashTest (StreebogHash, Streebog512TestVectors) == FALSE) return FALSE; - +#endif /* PKCS-5 test 1 with HMAC-SHA-256 used as the PRF (https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-00) */ - derive_key_sha256 ("passwd", 6, "\x73\x61\x6C\x74", 4, 1, dk, 64); + derive_key_sha256 ((unsigned char*) "passwd", 6, (unsigned char*) "\x73\x61\x6C\x74", 4, 1, dk, 64); if (memcmp (dk, "\x55\xac\x04\x6e\x56\xe3\x08\x9f\xec\x16\x91\xc2\x25\x44\xb6\x05\xf9\x41\x85\x21\x6d\xde\x04\x65\xe6\x8b\x9d\x57\xc2\x0d\xac\xbc\x49\xca\x9c\xcc\xf1\x79\xb6\x45\x99\x16\x64\xb3\x9d\x77\xef\x31\x7c\x71\xb8\x45\xb1\xe3\x0b\xd5\x09\x11\x20\x41\xd3\xa1\x97\x83", 64) != 0) return FALSE; /* PKCS-5 test 2 with HMAC-SHA-256 used as the PRF (https://stackoverflow.com/questions/5130513/pbkdf2-hmac-sha2-test-vectors) */ - derive_key_sha256 ("password", 8, "\x73\x61\x6C\x74", 4, 2, dk, 32); + derive_key_sha256 ((unsigned char*) "password", 8, (unsigned char*) "\x73\x61\x6C\x74", 4, 2, dk, 32); if (memcmp (dk, "\xae\x4d\x0c\x95\xaf\x6b\x46\xd3\x2d\x0a\xdf\xf9\x28\xf0\x6d\xd0\x2a\x30\x3f\x8e\xf3\xc2\x51\xdf\xd6\xe2\xd8\x5a\x95\x47\x4c\x43", 32) != 0) return FALSE; /* PKCS-5 test 3 with HMAC-SHA-256 used as the PRF (MS CryptoAPI) */ - derive_key_sha256 ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 4); + derive_key_sha256 ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 4); if (memcmp (dk, "\xf2\xa0\x4f\xb2", 4) != 0) return FALSE; /* PKCS-5 test 4 with HMAC-SHA-256 used as the PRF (MS CryptoAPI) */ - derive_key_sha256 ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 144); + derive_key_sha256 ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 144); if (memcmp (dk, "\xf2\xa0\x4f\xb2\xd3\xe9\xa5\xd8\x51\x0b\x5c\x06\xdf\x70\x8e\x24\xe9\xc7\xd9\x15\x3d\x22\xcd\xde\xb8\xa6\xdb\xfd\x71\x85\xc6\x99\x32\xc0\xee\x37\x27\xf7\x24\xcf\xea\xa6\xac\x73\xa1\x4c\x4e\x52\x9b\x94\xf3\x54\x06\xfc\x04\x65\xa1\x0a\x24\xfe\xf0\x98\x1d\xa6\x22\x28\xeb\x24\x55\x74\xce\x6a\x3a\x28\xe2\x04\x3a\x59\x13\xec\x3f\xf2\xdb\xcf\x58\xdd\x53\xd9\xf9\x17\xf6\xda\x74\x06\x3c\x0b\x66\xf5\x0f\xf5\x58\xa3\x27\x52\x8c\x5b\x07\x91\xd0\x81\xeb\xb6\xbc\x30\x69\x42\x71\xf2\xd7\x18\x42\xbe\xe8\x02\x93\x70\x66\xad\x35\x65\xbc\xf7\x96\x8e\x64\xf1\xc6\x92\xda\xe0\xdc\x1f\xb5\xf4", 144) != 0) return FALSE; /* PKCS-5 test 1 with HMAC-SHA-512 used as the PRF */ - derive_key_sha512 ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 4); + derive_key_sha512 ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 4); if (memcmp (dk, "\x13\x64\xae\xf8", 4) != 0) return FALSE; /* PKCS-5 test 2 with HMAC-SHA-512 used as the PRF (derives a key longer than the underlying hash output size and block size) */ - derive_key_sha512 ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 144); + derive_key_sha512 ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 144); if (memcmp (dk, "\x13\x64\xae\xf8\x0d\xf5\x57\x6c\x30\xd5\x71\x4c\xa7\x75\x3f\xfd\x00\xe5\x25\x8b\x39\xc7\x44\x7f\xce\x23\x3d\x08\x75\xe0\x2f\x48\xd6\x30\xd7\x00\xb6\x24\xdb\xe0\x5a\xd7\x47\xef\x52\xca\xa6\x34\x83\x47\xe5\xcb\xe9\x87\xf1\x20\x59\x6a\xe6\xa9\xcf\x51\x78\xc6\xb6\x23\xa6\x74\x0d\xe8\x91\xbe\x1a\xd0\x28\xcc\xce\x16\x98\x9a\xbe\xfb\xdc\x78\xc9\xe1\x7d\x72\x67\xce\xe1\x61\x56\x5f\x96\x68\xe6\xe1\xdd\xf4\xbf\x1b\x80\xe0\x19\x1c\xf4\xc4\xd3\xdd\xd5\xd5\x57\x2d\x83\xc7\xa3\x37\x87\xf4\x4e\xe0\xf6\xd8\x6d\x65\xdc\xa0\x52\xa3\x13\xbe\x81\xfc\x30\xbe\x7d\x69\x58\x34\xb6\xdd\x41\xc6", 144) != 0) return FALSE; +#ifndef WOLFCRYPT_BACKEND /* PKCS-5 test 1 with HMAC-BLAKE2s used as the PRF */ - derive_key_blake2s ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 4); + derive_key_blake2s ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 4); if (memcmp (dk, "\x8d\x51\xfa\x31", 4) != 0) return FALSE; /* PKCS-5 test 2 with HMAC-BLAKE2s used as the PRF (derives a key longer than the underlying hash) */ - derive_key_blake2s ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 48); + derive_key_blake2s ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 48); if (memcmp (dk, "\x8d\x51\xfa\x31\x46\x25\x37\x67\xa3\x29\x6b\x3c\x6b\xc1\x5d\xb2\xee\xe1\x6c\x28\x00\x26\xea\x08\x65\x9c\x12\xf1\x07\xde\x0d\xb9\x9b\x4f\x39\xfa\xc6\x80\x26\xb1\x8f\x8e\x48\x89\x85\x2d\x24\x2d", 48) != 0) return FALSE; /* PKCS-5 test 1 with HMAC-Whirlpool used as the PRF */ - derive_key_whirlpool ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 4); + derive_key_whirlpool ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 4); if (memcmp (dk, "\x50\x7c\x36\x6f", 4) != 0) return FALSE; /* PKCS-5 test 2 with HMAC-Whirlpool used as the PRF (derives a key longer than the underlying hash) */ - derive_key_whirlpool ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 96); + derive_key_whirlpool ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 96); if (memcmp (dk, "\x50\x7c\x36\x6f\xee\x10\x2e\x9a\xe2\x8a\xd5\x82\x72\x7d\x27\x0f\xe8\x4d\x7f\x68\x7a\xcf\xb5\xe7\x43\x67\xaa\x98\x93\x52\x2b\x09\x6e\x42\xdf\x2c\x59\x4a\x91\x6d\x7e\x10\xae\xb2\x1a\x89\x8f\xb9\x8f\xe6\x31\xa9\xd8\x9f\x98\x26\xf4\xda\xcd\x7d\x65\x65\xde\x10\x95\x91\xb4\x84\x26\xae\x43\xa1\x00\x5b\x1e\xb8\x38\x97\xa4\x1e\x4b\xd2\x65\x64\xbc\xfa\x1f\x35\x85\xdb\x4f\x97\x65\x6f\xbd\x24", 96) != 0) return FALSE; /* PKCS-5 test 1 with HMAC-STREEBOG used as the PRF */ - derive_key_streebog ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 4); + derive_key_streebog ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 4); if (memcmp (dk, "\xd0\x53\xa2\x30", 4) != 0) return FALSE; /* PKCS-5 test 2 with HMAC-STREEBOG used as the PRF (derives a key longer than the underlying hash) */ - derive_key_streebog ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 96); + derive_key_streebog ((unsigned char*)"password", 8, (unsigned char*)"\x12\x34\x56\x78", 4, 5, dk, 96); if (memcmp (dk, "\xd0\x53\xa2\x30\x6f\x45\x81\xeb\xbc\x06\x81\xc5\xe7\x53\xa8\x5d\xc7\xf1\x23\x33\x1e\xbe\x64\x2c\x3b\x0f\x26\xd7\x00\xe1\x95\xc9\x65\x26\xb1\x85\xbe\x1e\xe2\xf4\x9b\xfc\x6b\x14\x84\xda\x24\x61\xa0\x1b\x9e\x79\x5c\xee\x69\x6e\xf9\x25\xb1\x1d\xca\xa0\x31\xba\x02\x6f\x9e\x99\x0f\xdb\x25\x01\x5b\xf1\xc7\x10\x19\x53\x3b\x29\x3f\x18\x00\xd6\xfc\x85\x03\xdc\xf2\xe5\xe9\x5a\xb1\x1e\x61\xde", 96) != 0) return FALSE; - +#endif return TRUE; } diff --git a/src/Common/Tests.h b/src/Common/Tests.h index 356d54f4..9b9d09e4 100644 --- a/src/Common/Tests.h +++ b/src/Common/Tests.h @@ -4,22 +4,22 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus extern "C" { #endif extern unsigned char ks_tmp[MAX_EXPANDED_KEY]; -void CipherInit2(int cipher, void* key, void* ks, int key_len); +void CipherInit2(int cipher, void* key, void* ks); BOOL test_hmac_sha512 (void); BOOL test_hmac_blake2s (void); BOOL test_hmac_whirlpool (void); BOOL test_pkcs5 (void); BOOL TestSectorBufEncryption (); diff --git a/src/Common/Token.h b/src/Common/Token.h index 754e2830..959c7e24 100644 --- a/src/Common/Token.h +++ b/src/Common/Token.h @@ -39,11 +39,11 @@ namespace VeraCrypt struct TokenKeyfile { virtual ~TokenKeyfile() {} virtual operator TokenKeyfilePath () const = 0; - virtual void GetKeyfileData(vector <byte>& keyfileData) const = 0; + virtual void GetKeyfileData(vector <uint8>& keyfileData) const = 0; shared_ptr<TokenInfo> Token; wstring Id; }; diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c index 5b1d4065..10f03636 100644 --- a/src/Common/Volumes.c +++ b/src/Common/Volumes.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -128,23 +128,23 @@ // For CBC (deprecated/legacy), data used to generate IV and whitening values // 288 224 Master key(s) -uint16 GetHeaderField16 (byte *header, int offset) +uint16 GetHeaderField16 (uint8 *header, int offset) { return BE16 (*(uint16 *) (header + offset)); } -uint32 GetHeaderField32 (byte *header, int offset) +uint32 GetHeaderField32 (uint8 *header, int offset) { return BE32 (*(uint32 *) (header + offset)); } -UINT64_STRUCT GetHeaderField64 (byte *header, int offset) +UINT64_STRUCT GetHeaderField64 (uint8 *header, int offset) { UINT64_STRUCT uint64Struct; #ifndef TC_NO_COMPILER_INT64 uint64Struct.Value = BE64 (*(uint64 *) (header + offset)); @@ -158,28 +158,28 @@ UINT64_STRUCT GetHeaderField64 (byte *header, int offset) #ifndef TC_WINDOWS_BOOT typedef struct { - char DerivedKey[MASTER_KEYDATA_SIZE]; + unsigned char DerivedKey[MASTER_KEYDATA_SIZE]; BOOL Free; LONG KeyReady; int Pkcs5Prf; } KeyDerivationWorkItem; BOOL ReadVolumeHeaderRecoveryMode = FALSE; -int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int selected_pkcs5_prf, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo) +int ReadVolumeHeader (BOOL bBoot, unsigned char *encryptedHeader, Password *password, int selected_pkcs5_prf, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo) { - char header[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; + unsigned char header[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; unsigned char* keyInfoBuffer = NULL; int keyInfoBufferSize = sizeof (KEY_INFO) + 16; size_t keyInfoBufferOffset; PKEY_INFO keyInfo; PCRYPTO_INFO cryptoInfo; - CRYPTOPP_ALIGN_DATA(16) char dk[MASTER_KEYDATA_SIZE]; + CRYPTOPP_ALIGN_DATA(16) unsigned char dk[MASTER_KEYDATA_SIZE]; int enqPkcs5Prf, pkcs5_prf; uint16 headerVersion; int status = ERR_PARAMETER_INCORRECT; int primaryKeyOffset; int pkcs5PrfCount = LAST_PRF_ID - FIRST_PRF_ID + 1; @@ -367,35 +367,38 @@ KeyReady: ; pkcs5_prf = enqPkcs5Prf; keyInfo->noIterations = get_pkcs5_iteration_count (enqPkcs5Prf, pim, bBoot); switch (pkcs5_prf) { - case BLAKE2S: - derive_key_blake2s (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, + case SHA512: + derive_key_sha512 (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize()); break; - case SHA512: - derive_key_sha512 (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, + case SHA256: + derive_key_sha256 (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize()); break; - case WHIRLPOOL: - derive_key_whirlpool (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, + #ifndef WOLFCRYPT_BACKEND + case BLAKE2S: + derive_key_blake2s (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize()); break; - case SHA256: - derive_key_sha256 (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, + case WHIRLPOOL: + derive_key_whirlpool (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize()); break; - case STREEBOG: + + case STREEBOG: derive_key_streebog(keyInfo->userKey, keyInfo->keyLength, keyInfo->salt, PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize()); break; - default: + #endif + default: // Unknown/wrong ID TC_THROW_FATAL_EXCEPTION; } } @@ -554,25 +557,15 @@ KeyReady: ; // Master key data memcpy (keyInfo->master_keydata, header + HEADER_MASTER_KEYDATA_OFFSET, MASTER_KEYDATA_SIZE); #ifdef TC_WINDOWS_DRIVER { blake2s_state ctx; -#ifndef _WIN64 - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - KFLOATING_SAVE floatingPointState; - if (HasSSE2()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif blake2s_init (&ctx); blake2s_update (&ctx, keyInfo->master_keydata, MASTER_KEYDATA_SIZE); blake2s_update (&ctx, header, sizeof(header)); blake2s_final (&ctx, cryptoInfo->master_keydata_hash); burn(&ctx, sizeof (ctx)); -#ifndef _WIN64 - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif } #else memcpy (cryptoInfo->master_keydata, keyInfo->master_keydata, MASTER_KEYDATA_SIZE); #endif // PKCS #5 @@ -592,10 +585,18 @@ KeyReady: ; { status = ERR_MODE_INIT_FAILED; goto err; } + // check that first half of keyInfo.master_keydata is different from the second half. If they are the same return error + if (memcmp (keyInfo->master_keydata, keyInfo->master_keydata + EAGetKeySize (cryptoInfo->ea), EAGetKeySize (cryptoInfo->ea)) == 0) + { + cryptoInfo->bVulnerableMasterKey = TRUE; + if (retHeaderCryptoInfo) + retHeaderCryptoInfo->bVulnerableMasterKey = TRUE; + } + status = ERR_SUCCESS; goto ret; } } } @@ -635,11 +636,11 @@ ret: } return status; } #if defined(_WIN32) && !defined(_UEFI) -void ComputeBootloaderFingerprint (byte *bootLoaderBuf, unsigned int bootLoaderSize, byte* fingerprint) +void ComputeBootloaderFingerprint (uint8 *bootLoaderBuf, unsigned int bootLoaderSize, uint8* fingerprint) { // compute Whirlpool+SHA512 fingerprint of bootloader including MBR // we skip user configuration fields: // TC_BOOT_SECTOR_PIM_VALUE_OFFSET = 400 // TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_OFFSET = 402 @@ -648,11 +649,12 @@ void ComputeBootloaderFingerprint (byte *bootLoaderBuf, unsigned int bootLoaderS // => TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH = 24 // TC_BOOT_SECTOR_USER_CONFIG_OFFSET = 438 // // we have: TC_BOOT_SECTOR_USER_MESSAGE_OFFSET = TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_OFFSET + TC_BOOT_SECTOR_OUTER_VOLUME_BAK_HEADER_CRC_SIZE - WHIRLPOOL_CTX whirlpool; +#ifndef WOLFCRYPT_BACKEND + WHIRLPOOL_CTX whirlpool; sha512_ctx sha2; WHIRLPOOL_init (&whirlpool); sha512_begin (&sha2); @@ -665,21 +667,41 @@ void ComputeBootloaderFingerprint (byte *bootLoaderBuf, unsigned int bootLoaderS WHIRLPOOL_add (bootLoaderBuf + TC_SECTOR_SIZE_BIOS, (bootLoaderSize - TC_SECTOR_SIZE_BIOS), &whirlpool); sha512_hash (bootLoaderBuf + TC_SECTOR_SIZE_BIOS, (bootLoaderSize - TC_SECTOR_SIZE_BIOS), &sha2); WHIRLPOOL_finalize (&whirlpool, fingerprint); sha512_end (&fingerprint [WHIRLPOOL_DIGESTSIZE], &sha2); +#else + sha512_ctx sha2_512; + sha256_ctx sha2_256; + + sha512_begin (&sha2_512); + sha256_begin (&sha2_256); + + sha512_hash (bootLoaderBuf, TC_BOOT_SECTOR_PIM_VALUE_OFFSET, &sha2_512); + sha256_hash (bootLoaderBuf, TC_BOOT_SECTOR_PIM_VALUE_OFFSET, &sha2_256); + + sha512_hash (bootLoaderBuf + TC_BOOT_SECTOR_USER_MESSAGE_OFFSET + TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH, (TC_BOOT_SECTOR_USER_CONFIG_OFFSET - (TC_BOOT_SECTOR_USER_MESSAGE_OFFSET + TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH)), &sha2_512); + sha256_hash (bootLoaderBuf + TC_BOOT_SECTOR_USER_MESSAGE_OFFSET + TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH, (TC_BOOT_SECTOR_USER_CONFIG_OFFSET - (TC_BOOT_SECTOR_USER_MESSAGE_OFFSET + TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH)), &sha2_256); + + sha512_hash (bootLoaderBuf + TC_SECTOR_SIZE_BIOS, (bootLoaderSize - TC_SECTOR_SIZE_BIOS), &sha2_512); + sha256_hash (bootLoaderBuf + TC_SECTOR_SIZE_BIOS, (bootLoaderSize - TC_SECTOR_SIZE_BIOS), &sha2_256); + + sha512_end (&fingerprint, &sha2_512); + sha256_end (&fingerprint [SHA512_DIGESTSIZE], &sha2_256); + sha256_end (&fingerprint [SHA512_DIGESTSIZE + SHA256_DIGESTSIZE], &sha2_256); +#endif } #endif #else // TC_WINDOWS_BOOT -int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo) +int ReadVolumeHeader (BOOL bBoot, unsigned char *header, Password *password, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo) { #ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE - char dk[32 * 2]; // 2 * 256-bit key + unsigned char dk[32 * 2]; // 2 * 256-bit key #else - char dk[32 * 2 * 3]; // 6 * 256-bit key + unsigned char dk[32 * 2 * 3]; // 6 * 256-bit key #endif PCRYPTO_INFO cryptoInfo; int status = ERR_SUCCESS; uint32 iterations = pim; @@ -709,15 +731,15 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR // Test all available encryption algorithms for (cryptoInfo->ea = EAGetFirst (); cryptoInfo->ea != 0; cryptoInfo->ea = EAGetNext (cryptoInfo->ea)) #endif { #ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE - #if defined (TC_WINDOWS_BOOT_SERPENT) + #if defined (TC_WINDOWS_BOOT_SERPENT) && !defined (WOLFCRYPT_BACKEND) serpent_set_key (dk, cryptoInfo->ks); - #elif defined (TC_WINDOWS_BOOT_TWOFISH) + #elif defined (TC_WINDOWS_BOOT_TWOFISH) && !defined (WOLFCRYPT_BACKEND) twofish_set_key ((TwofishInstance *) cryptoInfo->ks, (const u4byte *) dk); - #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) && !defined (WOLFCRYPT_BACKEND) camellia_set_key (dk, cryptoInfo->ks); #else status = EAInit (dk, cryptoInfo->ks); if (status == ERR_CIPHER_INIT_FAILURE) goto err; @@ -727,15 +749,15 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR if (status == ERR_CIPHER_INIT_FAILURE) goto err; #endif // Secondary key schedule #ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE - #if defined (TC_WINDOWS_BOOT_SERPENT) + #if defined (TC_WINDOWS_BOOT_SERPENT) && !defined (WOLFCRYPT_BACKEND) serpent_set_key (dk + 32, cryptoInfo->ks2); - #elif defined (TC_WINDOWS_BOOT_TWOFISH) + #elif defined (TC_WINDOWS_BOOT_TWOFISH) && !defined (WOLFCRYPT_BACKEND) twofish_set_key ((TwofishInstance *)cryptoInfo->ks2, (const u4byte *) (dk + 32)); - #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) && !defined (WOLFCRYPT_BACKEND) camellia_set_key (dk + 32, cryptoInfo->ks2); #else EAInit (dk + 32, cryptoInfo->ks2); #endif #else @@ -788,15 +810,15 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR if (retHeaderCryptoInfo) goto ret; // Init the encryption algorithm with the decrypted master key #ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE - #if defined (TC_WINDOWS_BOOT_SERPENT) + #if defined (TC_WINDOWS_BOOT_SERPENT) && !defined (WOLFCRYPT_BACKEND) serpent_set_key (dk, cryptoInfo->ks); - #elif defined (TC_WINDOWS_BOOT_TWOFISH) + #elif defined (TC_WINDOWS_BOOT_TWOFISH) && !defined (WOLFCRYPT_BACKEND) twofish_set_key ((TwofishInstance *) cryptoInfo->ks, (const u4byte *) dk); - #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) && !defined (WOLFCRYPT_BACKEND) camellia_set_key (dk, cryptoInfo->ks); #else status = EAInit (dk, cryptoInfo->ks); if (status == ERR_CIPHER_INIT_FAILURE) goto err; @@ -807,15 +829,15 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR goto err; #endif // The secondary master key (if cascade, multiple concatenated) #ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE - #if defined (TC_WINDOWS_BOOT_SERPENT) + #if defined (TC_WINDOWS_BOOT_SERPENT) && !defined (WOLFCRYPT_BACKEND) serpent_set_key (dk + 32, cryptoInfo->ks2); - #elif defined (TC_WINDOWS_BOOT_TWOFISH) + #elif defined (TC_WINDOWS_BOOT_TWOFISH) && !defined (WOLFCRYPT_BACKEND) twofish_set_key ((TwofishInstance *)cryptoInfo->ks2, (const u4byte *) (dk + 32)); - #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) && !defined (WOLFCRYPT_BACKEND) camellia_set_key (dk + 32, cryptoInfo->ks2); #else EAInit (dk + 32, cryptoInfo->ks2); #endif #else @@ -848,22 +870,22 @@ ret: # include "Dlgcode.h" #endif // Creates a volume header in memory #if defined(_UEFI) -int CreateVolumeHeaderInMemory(BOOL bBoot, char *header, int ea, int mode, Password *password, +int CreateVolumeHeaderInMemory(BOOL bBoot, unsigned char *header, int ea, int mode, Password *password, int pkcs5_prf, int pim, char *masterKeydata, PCRYPTO_INFO *retInfo, unsigned __int64 volumeSize, unsigned __int64 hiddenVolumeSize, unsigned __int64 encryptedAreaStart, unsigned __int64 encryptedAreaLength, uint16 requiredProgramVersion, uint32 headerFlags, uint32 sectorSize, BOOL bWipeMode) #else -int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, char *header, int ea, int mode, Password *password, +int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, unsigned char *header, int ea, int mode, Password *password, int pkcs5_prf, int pim, char *masterKeydata, PCRYPTO_INFO *retInfo, unsigned __int64 volumeSize, unsigned __int64 hiddenVolumeSize, unsigned __int64 encryptedAreaStart, unsigned __int64 encryptedAreaLength, uint16 requiredProgramVersion, uint32 headerFlags, uint32 sectorSize, BOOL bWipeMode) #endif // !defined(_UEFI) { - unsigned char *p = (unsigned char *) header; + unsigned char *p = header; static CRYPTOPP_ALIGN_DATA(16) KEY_INFO keyInfo; int nUserKeyLen = password? password->Length : 0; PCRYPTO_INFO cryptoInfo = crypto_open (); static char dk[MASTER_KEYDATA_SIZE]; @@ -974,10 +996,11 @@ int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, char *header, int ea, case SHA256: derive_key_sha256 (keyInfo.userKey, keyInfo.keyLength, keyInfo.salt, PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize()); break; + #ifndef WOLFCRYPT_BACKEND case BLAKE2S: derive_key_blake2s (keyInfo.userKey, keyInfo.keyLength, keyInfo.salt, PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize()); break; @@ -988,11 +1011,11 @@ int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, char *header, int ea, case STREEBOG: derive_key_streebog(keyInfo.userKey, keyInfo.keyLength, keyInfo.salt, PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize()); break; - + #endif default: // Unknown/wrong ID crypto_close (cryptoInfo); TC_THROW_FATAL_EXCEPTION; } @@ -1187,17 +1210,17 @@ err: return 0; } #if !defined(_UEFI) -BOOL ReadEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, byte *header, DWORD *bytesRead) +BOOL ReadEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, uint8 *header, DWORD *bytesRead) { #if TC_VOLUME_HEADER_EFFECTIVE_SIZE > TC_MAX_VOLUME_SECTOR_SIZE #error TC_VOLUME_HEADER_EFFECTIVE_SIZE > TC_MAX_VOLUME_SECTOR_SIZE #endif - byte sectorBuffer[TC_MAX_VOLUME_SECTOR_SIZE]; + uint8 sectorBuffer[TC_MAX_VOLUME_SECTOR_SIZE]; DISK_GEOMETRY geometry; if (!device) return ReadFile (fileHandle, header, TC_VOLUME_HEADER_EFFECTIVE_SIZE, bytesRead, NULL); @@ -1220,17 +1243,17 @@ BOOL ReadEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, byte *header, DW return TRUE; } -BOOL WriteEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, byte *header) +BOOL WriteEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, uint8 *header) { #if TC_VOLUME_HEADER_EFFECTIVE_SIZE > TC_MAX_VOLUME_SECTOR_SIZE #error TC_VOLUME_HEADER_EFFECTIVE_SIZE > TC_MAX_VOLUME_SECTOR_SIZE #endif - byte sectorBuffer[TC_MAX_VOLUME_SECTOR_SIZE]; + uint8 sectorBuffer[TC_MAX_VOLUME_SECTOR_SIZE]; DWORD bytesDone; DISK_GEOMETRY geometry; if (!device) { @@ -1295,11 +1318,11 @@ BOOL WriteEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, byte *header) int WriteRandomDataToReservedHeaderAreas (HWND hwndDlg, HANDLE dev, CRYPTO_INFO *cryptoInfo, uint64 dataAreaSize, BOOL bPrimaryOnly, BOOL bBackupOnly) { char temporaryKey[MASTER_KEYDATA_SIZE]; char originalK2[MASTER_KEYDATA_SIZE]; - byte buf[TC_VOLUME_HEADER_GROUP_SIZE]; + uint8 buf[TC_VOLUME_HEADER_GROUP_SIZE]; LARGE_INTEGER offset; int nStatus = ERR_SUCCESS; DWORD dwError; DWORD bytesDone; diff --git a/src/Common/Volumes.h b/src/Common/Volumes.h index 1c9981c2..98b2f8d6 100644 --- a/src/Common/Volumes.h +++ b/src/Common/Volumes.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_Common_Volumes @@ -127,30 +127,30 @@ extern "C" { #include "Password.h" extern BOOL ReadVolumeHeaderRecoveryMode; -uint16 GetHeaderField16 (byte *header, int offset); -uint32 GetHeaderField32 (byte *header, int offset); -UINT64_STRUCT GetHeaderField64 (byte *header, int offset); +uint16 GetHeaderField16 (uint8 *header, int offset); +uint32 GetHeaderField32 (uint8 *header, int offset); +UINT64_STRUCT GetHeaderField64 (uint8 *header, int offset); #if defined(TC_WINDOWS_BOOT) -int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo); +int ReadVolumeHeader (BOOL bBoot, unsigned char *encryptedHeader, Password *password, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo); #elif defined(_UEFI) -int ReadVolumeHeader(BOOL bBoot, char *encryptedHeader, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo); -int CreateVolumeHeaderInMemory(BOOL bBoot, char *encryptedHeader, int ea, int mode, Password *password, int pkcs5_prf, int pim, char *masterKeydata, PCRYPTO_INFO *retInfo, unsigned __int64 volumeSize, unsigned __int64 hiddenVolumeSize, unsigned __int64 encryptedAreaStart, unsigned __int64 encryptedAreaLength, uint16 requiredProgramVersion, uint32 headerFlags, uint32 sectorSize, BOOL bWipeMode); +int ReadVolumeHeader(BOOL bBoot, unsigned char *encryptedHeader, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo); +int CreateVolumeHeaderInMemory(BOOL bBoot, unsigned char *encryptedHeader, int ea, int mode, Password *password, int pkcs5_prf, int pim, char *masterKeydata, PCRYPTO_INFO *retInfo, unsigned __int64 volumeSize, unsigned __int64 hiddenVolumeSize, unsigned __int64 encryptedAreaStart, unsigned __int64 encryptedAreaLength, uint16 requiredProgramVersion, uint32 headerFlags, uint32 sectorSize, BOOL bWipeMode); BOOL RandgetBytes(unsigned char *buf, int len, BOOL forceSlowPoll); #else -int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo); +int ReadVolumeHeader (BOOL bBoot, unsigned char *encryptedHeader, Password *password, int pkcs5_prf, int pim, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo); #if defined(_WIN32) && !defined(_UEFI) -void ComputeBootloaderFingerprint (byte *bootLoaderBuf, unsigned int bootLoaderSize, byte* fingerprint); +void ComputeBootloaderFingerprint (uint8 *bootLoaderBuf, unsigned int bootLoaderSize, uint8* fingerprint); #endif #endif #if !defined (DEVICE_DRIVER) && !defined (TC_WINDOWS_BOOT) && !defined(_UEFI) -int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, char *encryptedHeader, int ea, int mode, Password *password, int pkcs5_prf, int pim, char *masterKeydata, PCRYPTO_INFO *retInfo, unsigned __int64 volumeSize, unsigned __int64 hiddenVolumeSize, unsigned __int64 encryptedAreaStart, unsigned __int64 encryptedAreaLength, uint16 requiredProgramVersion, uint32 headerFlags, uint32 sectorSize, BOOL bWipeMode); -BOOL ReadEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, byte *header, DWORD *bytesRead); -BOOL WriteEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, byte *header); +int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, unsigned char *encryptedHeader, int ea, int mode, Password *password, int pkcs5_prf, int pim, char *masterKeydata, PCRYPTO_INFO *retInfo, unsigned __int64 volumeSize, unsigned __int64 hiddenVolumeSize, unsigned __int64 encryptedAreaStart, unsigned __int64 encryptedAreaLength, uint16 requiredProgramVersion, uint32 headerFlags, uint32 sectorSize, BOOL bWipeMode); +BOOL ReadEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, uint8 *header, DWORD *bytesRead); +BOOL WriteEffectiveVolumeHeader (BOOL device, HANDLE fileHandle, uint8 *header); int WriteRandomDataToReservedHeaderAreas (HWND hwndDlg, HANDLE dev, CRYPTO_INFO *cryptoInfo, uint64 dataAreaSize, BOOL bPrimaryOnly, BOOL bBackupOnly); #endif #endif // !TC_HEADER_Volume_VolumeHeader diff --git a/src/Common/Wipe.c b/src/Common/Wipe.c index 2fe6aa03..66d633b8 100644 --- a/src/Common/Wipe.c +++ b/src/Common/Wipe.c @@ -2,32 +2,27 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" #include "Wipe.h" -static BOOL Wipe1PseudoRandom (int pass, byte *buffer, size_t size) -{ - return FALSE; -} - // Fill buffer with wipe patterns defined in "National Industrial Security Program Operating Manual", US DoD 5220.22-M. // Return: FALSE = buffer must be filled with random data -static BOOL Wipe3Dod5220 (int pass, byte *buffer, size_t size) +static BOOL Wipe3Dod5220 (int pass, uint8 *buffer, size_t size) { - byte wipeChar; + uint8 wipeChar; switch (pass) { case 1: wipeChar = 0; @@ -44,13 +39,13 @@ static BOOL Wipe3Dod5220 (int pass, byte *buffer, size_t size) memset (buffer, wipeChar, size); return TRUE; } -static BOOL Wipe7Dod5220 (int pass, byte randChars[TC_WIPE_RAND_CHAR_COUNT], byte *buffer, size_t size) +static BOOL Wipe7Dod5220 (int pass, uint8 randChars[TC_WIPE_RAND_CHAR_COUNT], uint8 *buffer, size_t size) { - byte wipeChar; + uint8 wipeChar; switch (pass) { case 1: wipeChar = randChars[0]; @@ -82,13 +77,13 @@ static BOOL Wipe7Dod5220 (int pass, byte randChars[TC_WIPE_RAND_CHAR_COUNT], byt // Fill the buffer with wipe patterns defined in the paper "Secure Deletion of Data from Magnetic and Solid-State Memory" by Peter Gutmann. // Return: FALSE = buffer must be filled with random data -static BOOL Wipe35Gutmann (int pass, byte *buffer, size_t size) +static BOOL Wipe35Gutmann (int pass, uint8 *buffer, size_t size) { - byte wipePat3[] = { 0x92, 0x49, 0x24 }; + uint8 wipePat3[] = { 0x92, 0x49, 0x24 }; int wipePat3Pos; size_t i; switch (pass) { @@ -165,17 +160,17 @@ int GetWipePassCount (WipeAlgorithmId algorithm) return -1; // Prevent compiler warnings } -BOOL WipeBuffer (WipeAlgorithmId algorithm, byte randChars[TC_WIPE_RAND_CHAR_COUNT], int pass, byte *buffer, size_t size) +BOOL WipeBuffer (WipeAlgorithmId algorithm, uint8 randChars[TC_WIPE_RAND_CHAR_COUNT], int pass, uint8 *buffer, size_t size) { switch (algorithm) { case TC_WIPE_1_RAND: case TC_WIPE_256: - return Wipe1PseudoRandom (pass, buffer, size); + return FALSE; // Delegate buffer filling to the caller case TC_WIPE_3_DOD_5220: return Wipe3Dod5220 (pass, buffer, size); case TC_WIPE_7_DOD_5220: diff --git a/src/Common/Wipe.h b/src/Common/Wipe.h index ef27eb06..b8bd0fac 100644 --- a/src/Common/Wipe.h +++ b/src/Common/Wipe.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -34,11 +34,11 @@ typedef enum } WipeAlgorithmId; #define TC_WIPE_RAND_CHAR_COUNT 3 int GetWipePassCount (WipeAlgorithmId algorithm); -BOOL WipeBuffer (WipeAlgorithmId algorithm, byte randChars[TC_WIPE_RAND_CHAR_COUNT], int pass, byte *buffer, size_t size); +BOOL WipeBuffer (WipeAlgorithmId algorithm, uint8 randChars[TC_WIPE_RAND_CHAR_COUNT], int pass, uint8 *buffer, size_t size); #ifdef __cplusplus } #endif diff --git a/src/Common/Xml.c b/src/Common/Xml.c index 9f77b3ba..d48940ed 100644 --- a/src/Common/Xml.c +++ b/src/Common/Xml.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #if !defined(_UEFI) diff --git a/src/Common/Xml.h b/src/Common/Xml.h index 09b8543a..d442f187 100644 --- a/src/Common/Xml.h +++ b/src/Common/Xml.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Xts.c b/src/Common/Xts.c index 390eb31e..99999f11 100644 --- a/src/Common/Xts.c +++ b/src/Common/Xts.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -52,14 +52,18 @@ void EncryptBufferXTS (unsigned __int8 *buffer, unsigned int startCipherBlockNo, unsigned __int8 *ks, unsigned __int8 *ks2, int cipher) { - if (CipherSupportsIntraDataUnitParallelization (cipher)) + #ifndef WOLFCRYPT_BACKEND + if (CipherSupportsIntraDataUnitParallelization (cipher)) EncryptBufferXTSParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher); else EncryptBufferXTSNonParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher); + #else + xts_encrypt(buffer, buffer, length, startDataUnitNo, ks); + #endif } #if (CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && CRYPTOPP_BOOL_X64) #define XorBlocks(result,ptr,len,start,end) \ @@ -378,14 +382,18 @@ void DecryptBufferXTS (unsigned __int8 *buffer, unsigned int startCipherBlockNo, unsigned __int8 *ks, unsigned __int8 *ks2, int cipher) { + #ifndef WOLFCRYPT_BACKEND if (CipherSupportsIntraDataUnitParallelization (cipher)) DecryptBufferXTSParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher); else DecryptBufferXTSNonParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher); + #else + xts_decrypt(buffer, buffer, length, startDataUnitNo, ks); + #endif } // Optimized for encryption algorithms supporting intra-data-unit parallelization static void DecryptBufferXTSParallel (unsigned __int8 *buffer, diff --git a/src/Common/Xts.h b/src/Common/Xts.h index b4b4058e..0cc3a99f 100644 --- a/src/Common/Xts.h +++ b/src/Common/Xts.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Common/Zip.vcxproj b/src/Common/Zip.vcxproj index 11a971b2..a8fbf1eb 100644 --- a/src/Common/Zip.vcxproj +++ b/src/Common/Zip.vcxproj @@ -1,16 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> @@ -104,10 +112,11 @@ <ClCompile Include="libzip\zip_source_file_win32_named.c" /> <ClCompile Include="libzip\zip_source_file_win32_utf16.c" /> <ClCompile Include="libzip\zip_source_file_win32_utf8.c" /> <ClCompile Include="libzip\zip_source_free.c" /> <ClCompile Include="libzip\zip_source_function.c" /> + <ClCompile Include="libzip\zip_source_get_dostime.c" /> <ClCompile Include="libzip\zip_source_get_file_attributes.c" /> <ClCompile Include="libzip\zip_source_is_deleted.c" /> <ClCompile Include="libzip\zip_source_layered.c" /> <ClCompile Include="libzip\zip_source_open.c" /> <ClCompile Include="libzip\zip_source_pass_to_lower_layer.c" /> @@ -173,67 +182,101 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>Zip</RootNamespace> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <ProjectName>Zip</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <WholeProgramOptimization>false</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>false</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>false</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>false</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\Zip\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\Zip\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <OutDir>$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Configuration)\Zip\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\Zip\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <OutDir>$(Configuration)\</OutDir> + <OutDir>$(ProjectDir)$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Configuration)\Zip\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(ProjectDir)$(Platform)\$(Configuration)\Zip\</IntDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader> </PrecompiledHeader> @@ -245,10 +288,33 @@ </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> + <Lib> + <AdditionalDependencies> + </AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <Lib> + <AdditionalDependencies> + </AdditionalDependencies> + </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader> </PrecompiledHeader> @@ -260,10 +326,14 @@ </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> + <Lib> + <AdditionalDependencies> + </AdditionalDependencies> + </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader> @@ -272,17 +342,46 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> + <ControlFlowGuard>Guard</ControlFlowGuard> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <Lib> + <AdditionalDependencies> + </AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> + <Lib> + <AdditionalDependencies> + </AdditionalDependencies> + </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader> @@ -291,17 +390,22 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> + <Lib> + <AdditionalDependencies> + </AdditionalDependencies> + </Lib> </ItemDefinitionGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/Common/Zip.vcxproj.filters b/src/Common/Zip.vcxproj.filters index 92bcf493..eb88a358 100644 --- a/src/Common/Zip.vcxproj.filters +++ b/src/Common/Zip.vcxproj.filters @@ -397,10 +397,13 @@ <Filter>libzip</Filter> </ClCompile> <ClCompile Include="libzip\zip_source_pass_to_lower_layer.c"> <Filter>zlib</Filter> </ClCompile> + <ClCompile Include="libzip\zip_source_get_dostime.c"> + <Filter>libzip</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="libzip\compat.h"> <Filter>libzip</Filter> </ClInclude> diff --git a/src/Common/Zip.vcxproj.user b/src/Common/Zip.vcxproj.user index ace9a86a..88a55094 100644 --- a/src/Common/Zip.vcxproj.user +++ b/src/Common/Zip.vcxproj.user @@ -1,3 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> </Project>
\ No newline at end of file diff --git a/src/Common/Zip_vs2019.vcxproj b/src/Common/Zip_vs2019.vcxproj deleted file mode 100644 index 26ab3310..00000000 --- a/src/Common/Zip_vs2019.vcxproj +++ /dev/null @@ -1,401 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|ARM64"> - <Configuration>Debug</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|ARM64"> - <Configuration>Release</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <ItemGroup> - <ClCompile Include="libzip\zip_add.c" /> - <ClCompile Include="libzip\zip_add_dir.c" /> - <ClCompile Include="libzip\zip_add_entry.c" /> - <ClCompile Include="libzip\zip_algorithm_deflate.c" /> - <ClCompile Include="libzip\zip_buffer.c" /> - <ClCompile Include="libzip\zip_close.c" /> - <ClCompile Include="libzip\zip_crypto_win.c" /> - <ClCompile Include="libzip\zip_delete.c" /> - <ClCompile Include="libzip\zip_dirent.c" /> - <ClCompile Include="libzip\zip_dir_add.c" /> - <ClCompile Include="libzip\zip_discard.c" /> - <ClCompile Include="libzip\zip_entry.c" /> - <ClCompile Include="libzip\zip_error.c" /> - <ClCompile Include="libzip\zip_error_clear.c" /> - <ClCompile Include="libzip\zip_error_get.c" /> - <ClCompile Include="libzip\zip_error_get_sys_type.c" /> - <ClCompile Include="libzip\zip_error_strerror.c" /> - <ClCompile Include="libzip\zip_error_to_str.c" /> - <ClCompile Include="libzip\zip_err_str.c" /> - <ClCompile Include="libzip\zip_extra_field.c" /> - <ClCompile Include="libzip\zip_extra_field_api.c" /> - <ClCompile Include="libzip\zip_fclose.c" /> - <ClCompile Include="libzip\zip_fdopen.c" /> - <ClCompile Include="libzip\zip_file_add.c" /> - <ClCompile Include="libzip\zip_file_error_clear.c" /> - <ClCompile Include="libzip\zip_file_error_get.c" /> - <ClCompile Include="libzip\zip_file_get_comment.c" /> - <ClCompile Include="libzip\zip_file_get_external_attributes.c" /> - <ClCompile Include="libzip\zip_file_get_offset.c" /> - <ClCompile Include="libzip\zip_file_rename.c" /> - <ClCompile Include="libzip\zip_file_replace.c" /> - <ClCompile Include="libzip\zip_file_set_comment.c" /> - <ClCompile Include="libzip\zip_file_set_encryption.c" /> - <ClCompile Include="libzip\zip_file_set_external_attributes.c" /> - <ClCompile Include="libzip\zip_file_set_mtime.c" /> - <ClCompile Include="libzip\zip_file_strerror.c" /> - <ClCompile Include="libzip\zip_fopen.c" /> - <ClCompile Include="libzip\zip_fopen_encrypted.c" /> - <ClCompile Include="libzip\zip_fopen_index.c" /> - <ClCompile Include="libzip\zip_fopen_index_encrypted.c" /> - <ClCompile Include="libzip\zip_fread.c" /> - <ClCompile Include="libzip\zip_fseek.c" /> - <ClCompile Include="libzip\zip_ftell.c" /> - <ClCompile Include="libzip\zip_get_archive_comment.c" /> - <ClCompile Include="libzip\zip_get_archive_flag.c" /> - <ClCompile Include="libzip\zip_get_encryption_implementation.c" /> - <ClCompile Include="libzip\zip_get_file_comment.c" /> - <ClCompile Include="libzip\zip_get_name.c" /> - <ClCompile Include="libzip\zip_get_num_entries.c" /> - <ClCompile Include="libzip\zip_get_num_files.c" /> - <ClCompile Include="libzip\zip_hash.c" /> - <ClCompile Include="libzip\zip_io_util.c" /> - <ClCompile Include="libzip\zip_libzip_version.c" /> - <ClCompile Include="libzip\zip_memdup.c" /> - <ClCompile Include="libzip\zip_name_locate.c" /> - <ClCompile Include="libzip\zip_new.c" /> - <ClCompile Include="libzip\zip_open.c" /> - <ClCompile Include="libzip\zip_pkware.c" /> - <ClCompile Include="libzip\zip_progress.c" /> - <ClCompile Include="libzip\zip_random_win32.c" /> - <ClCompile Include="libzip\zip_rename.c" /> - <ClCompile Include="libzip\zip_replace.c" /> - <ClCompile Include="libzip\zip_set_archive_comment.c" /> - <ClCompile Include="libzip\zip_set_archive_flag.c" /> - <ClCompile Include="libzip\zip_set_default_password.c" /> - <ClCompile Include="libzip\zip_set_file_comment.c" /> - <ClCompile Include="libzip\zip_set_file_compression.c" /> - <ClCompile Include="libzip\zip_set_name.c" /> - <ClCompile Include="libzip\zip_source_accept_empty.c" /> - <ClCompile Include="libzip\zip_source_begin_write.c" /> - <ClCompile Include="libzip\zip_source_begin_write_cloning.c" /> - <ClCompile Include="libzip\zip_source_buffer.c" /> - <ClCompile Include="libzip\zip_source_call.c" /> - <ClCompile Include="libzip\zip_source_close.c" /> - <ClCompile Include="libzip\zip_source_commit_write.c" /> - <ClCompile Include="libzip\zip_source_compress.c" /> - <ClCompile Include="libzip\zip_source_crc.c" /> - <ClCompile Include="libzip\zip_source_error.c" /> - <ClCompile Include="libzip\zip_source_file_common.c" /> - <ClCompile Include="libzip\zip_source_file_stdio.c" /> - <ClCompile Include="libzip\zip_source_file_win32.c" /> - <ClCompile Include="libzip\zip_source_file_win32_ansi.c" /> - <ClCompile Include="libzip\zip_source_file_win32_named.c" /> - <ClCompile Include="libzip\zip_source_file_win32_utf16.c" /> - <ClCompile Include="libzip\zip_source_file_win32_utf8.c" /> - <ClCompile Include="libzip\zip_source_free.c" /> - <ClCompile Include="libzip\zip_source_function.c" /> - <ClCompile Include="libzip\zip_source_get_file_attributes.c" /> - <ClCompile Include="libzip\zip_source_is_deleted.c" /> - <ClCompile Include="libzip\zip_source_layered.c" /> - <ClCompile Include="libzip\zip_source_open.c" /> - <ClCompile Include="libzip\zip_source_pass_to_lower_layer.c" /> - <ClCompile Include="libzip\zip_source_pkware_decode.c" /> - <ClCompile Include="libzip\zip_source_pkware_encode.c" /> - <ClCompile Include="libzip\zip_source_read.c" /> - <ClCompile Include="libzip\zip_source_remove.c" /> - <ClCompile Include="libzip\zip_source_rollback_write.c" /> - <ClCompile Include="libzip\zip_source_seek.c" /> - <ClCompile Include="libzip\zip_source_seek_write.c" /> - <ClCompile Include="libzip\zip_source_stat.c" /> - <ClCompile Include="libzip\zip_source_supports.c" /> - <ClCompile Include="libzip\zip_source_tell.c" /> - <ClCompile Include="libzip\zip_source_tell_write.c" /> - <ClCompile Include="libzip\zip_source_window.c" /> - <ClCompile Include="libzip\zip_source_winzip_aes_decode.c" /> - <ClCompile Include="libzip\zip_source_winzip_aes_encode.c" /> - <ClCompile Include="libzip\zip_source_write.c" /> - <ClCompile Include="libzip\zip_source_zip.c" /> - <ClCompile Include="libzip\zip_source_zip_new.c" /> - <ClCompile Include="libzip\zip_stat.c" /> - <ClCompile Include="libzip\zip_stat_index.c" /> - <ClCompile Include="libzip\zip_stat_init.c" /> - <ClCompile Include="libzip\zip_strerror.c" /> - <ClCompile Include="libzip\zip_string.c" /> - <ClCompile Include="libzip\zip_unchange.c" /> - <ClCompile Include="libzip\zip_unchange_all.c" /> - <ClCompile Include="libzip\zip_unchange_archive.c" /> - <ClCompile Include="libzip\zip_unchange_data.c" /> - <ClCompile Include="libzip\zip_utf-8.c" /> - <ClCompile Include="libzip\zip_winzip_aes.c" /> - <ClCompile Include="zlib\adler32.c" /> - <ClCompile Include="zlib\compress.c" /> - <ClCompile Include="zlib\crc32.c" /> - <ClCompile Include="zlib\deflate.c" /> - <ClCompile Include="zlib\inffast.c" /> - <ClCompile Include="zlib\inflate.c" /> - <ClCompile Include="zlib\inftrees.c" /> - <ClCompile Include="zlib\trees.c" /> - <ClCompile Include="zlib\uncompr.c" /> - <ClCompile Include="zlib\zutil.c" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="libzip\compat.h" /> - <ClInclude Include="libzip\config.h" /> - <ClInclude Include="libzip\zconf.h" /> - <ClInclude Include="libzip\zip.h" /> - <ClInclude Include="libzip\zipconf.h" /> - <ClInclude Include="libzip\zipint.h" /> - <ClInclude Include="libzip\zip_source_file.h" /> - <ClInclude Include="libzip\zip_source_file_stdio.h" /> - <ClInclude Include="libzip\zip_source_file_win32.h" /> - <ClInclude Include="zlib\crc32.h" /> - <ClInclude Include="zlib\deflate.h" /> - <ClInclude Include="zlib\inffast.h" /> - <ClInclude Include="zlib\inffixed.h" /> - <ClInclude Include="zlib\inflate.h" /> - <ClInclude Include="zlib\inftrees.h" /> - <ClInclude Include="zlib\trees.h" /> - <ClInclude Include="zlib\zconf.h" /> - <ClInclude Include="zlib\zlib.h" /> - <ClInclude Include="zlib\zutil.h" /> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>Zip</RootNamespace> - <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> - <ProjectName>Zip</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>false</WholeProgramOptimization> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>false</WholeProgramOptimization> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>false</WholeProgramOptimization> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>false</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>false</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>false</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <OutDir>$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <OutDir>$(Configuration)\</OutDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - <Lib> - <AdditionalDependencies> - </AdditionalDependencies> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - <Lib> - <AdditionalDependencies> - </AdditionalDependencies> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - <Lib> - <AdditionalDependencies> - </AdditionalDependencies> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - <Lib> - <AdditionalDependencies> - </AdditionalDependencies> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - <Lib> - <AdditionalDependencies> - </AdditionalDependencies> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;_LIB;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <AdditionalIncludeDirectories>zlib;libzip</AdditionalIncludeDirectories> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - <Lib> - <AdditionalDependencies> - </AdditionalDependencies> - </Lib> - </ItemDefinitionGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/src/Common/Zip_vs2019.vcxproj.user b/src/Common/Zip_vs2019.vcxproj.user deleted file mode 100644 index 88a55094..00000000 --- a/src/Common/Zip_vs2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup /> -</Project>
\ No newline at end of file diff --git a/src/Common/libzip/NEWS.md b/src/Common/libzip/NEWS.md index e117422d..d2b1e73d 100644 --- a/src/Common/libzip/NEWS.md +++ b/src/Common/libzip/NEWS.md @@ -1,5 +1,22 @@ +# 1.11.2 [2024-10-31] + +* Fix performance regression in `zip_stat` introduced in 1.11. + +# 1.11.1 [2024-09-19] + +* Fix zipconf.h for version number with missing third component. + +# 1.11 [2024-09-19] + +* Stop searching after finding acceptable central directory, even if it contains inconsistencies. +* Only write Zip64 EOCD if fields don't fit in normal EOCD. Previously libzip also wrote it when any directory entry required Zip64. +* Allow bytes from 0x00-0x1F as UTF-8. +* Add new error code `ZIP_ER_TRUNCATED_ZIP` for files that start with a valid local header signature. +* `zipcmp`: add `-T` option for comparing timestamps. +* `zip_file_replace` now removes the target's extra field information. + # 1.10.1 [2023-08-23] * Add `ZIP_LENGTH_TO_END` and `ZIP_LENGTH_UNCHECKED`. Unless `ZIP_LENGTH_UNCHECKED` is used as `length`, it is an error for a file to shrink between the time when the source is created and when its data is read. * Fix test on Windows. diff --git a/src/Common/libzip/compat.h b/src/Common/libzip/compat.h index 296ee59e..2cbc19f8 100644 --- a/src/Common/libzip/compat.h +++ b/src/Common/libzip/compat.h @@ -1,11 +1,11 @@ #ifndef _HAD_LIBZIP_COMPAT_H #define _HAD_LIBZIP_COMPAT_H /* compat.h -- compatibility defines. - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -124,18 +124,69 @@ typedef char bool; #if defined(HAVE__UNLINK) #define unlink _unlink #endif #endif -#ifndef HAVE_FSEEKO -#define fseeko(s, o, w) (fseek((s), (long int)(o), (w))) + +#if defined(HAVE__FSEEKI64) && defined(HAVE__FSTAT64) && defined(HAVE__FTELLI64) +/* Windows API using int64 */ +typedef zip_int64_t zip_off_t; +typedef struct _stat64 zip_os_stat_t; +#define zip_os_stat _stat64 +#define zip_os_fstat _fstat64 +#define zip_os_fseek _fseeki64 +#define zip_os_ftell _ftelli64 +#define ZIP_FSEEK_MAX ZIP_INT64_MAX +#define ZIP_FSEEK_MIN ZIP_INT64_MIN +#else + +/* Normal API */ +#include <sys/stat.h> +typedef struct stat zip_os_stat_t; +#define zip_os_fstat fstat +#define zip_os_stat stat + +#if defined(HAVE_FTELLO) && defined(HAVE_FSEEKO) +/* Using off_t */ +typedef off_t zip_off_t; +#if SIZEOF_OFF_T == 8 +#define ZIP_OFF_MAX ZIP_INT64_MAX +#define ZIP_OFF_MIN ZIP_INT64_MIN +#elif SIZEOF_OFF_T == 4 +#define ZIP_OFF_MAX ZIP_INT32_MAX +#define ZIP_OFF_MIN ZIP_INT32_MIN +#elif SIZEOF_OFF_T == 2 +#define ZIP_OFF_MAX ZIP_INT16_MAX +#define ZIP_OFF_MIN ZIP_INT16_MIN +#else +#error unsupported size of off_t +#endif + +#define ZIP_FSEEK_MAX ZIP_OFF_MAX +#define ZIP_FSEEK_MIN ZIP_OFF_MIN + +#define zip_os_fseek fseeko +#define zip_os_ftell ftello +#else + +/* Using long */ +typedef long zip_off_t; +#include <limits.h> +#define ZIP_FSEEK_MAX LONG_MAX +#define ZIP_FSEEK_MIN LONG_MIN + +#define zip_os_fseek fseek +#define zip_os_ftell ftell +#endif + #endif #ifndef HAVE_FTELLO #define ftello(s) ((long)ftell((s))) #endif + #ifdef HAVE_LOCALTIME_S #ifdef _WIN32 /* Windows is incompatible to the C11 standard, hurray! */ #define zip_localtime(t, tm) (localtime_s((tm), (t)) == 0 ? tm : NULL) #else @@ -180,31 +231,10 @@ typedef char bool; #ifndef HAVE_STRERRORLEN_S #define strerrorlen_s(errnum) 8192 #endif #endif -#if SIZEOF_OFF_T == 8 -#define ZIP_OFF_MAX ZIP_INT64_MAX -#define ZIP_OFF_MIN ZIP_INT64_MIN -#elif SIZEOF_OFF_T == 4 -#define ZIP_OFF_MAX ZIP_INT32_MAX -#define ZIP_OFF_MIN ZIP_INT32_MIN -#elif SIZEOF_OFF_T == 2 -#define ZIP_OFF_MAX ZIP_INT16_MAX -#define ZIP_OFF_MIN ZIP_INT16_MIN -#else -#error unsupported size of off_t -#endif - -#if defined(HAVE_FTELLO) && defined(HAVE_FSEEKO) -#define ZIP_FSEEK_MAX ZIP_OFF_MAX -#define ZIP_FSEEK_MIN ZIP_OFF_MIN -#else -#include <limits.h> -#define ZIP_FSEEK_MAX LONG_MAX -#define ZIP_FSEEK_MIN LONG_MIN -#endif #ifndef SIZE_MAX #if SIZEOF_SIZE_T == 8 #define SIZE_MAX ZIP_INT64_MAX #elif SIZEOF_SIZE_T == 4 diff --git a/src/Common/libzip/config.h b/src/Common/libzip/config.h index 2976249c..5edc625f 100644 --- a/src/Common/libzip/config.h +++ b/src/Common/libzip/config.h @@ -8,18 +8,22 @@ /* #undef HAVE___PROGNAME */ #define HAVE__CLOSE #define HAVE__DUP #define HAVE__FDOPEN #define HAVE__FILENO +#define HAVE__FSEEKI64 +#define HAVE__FSTAT64 +#define HAVE__FTELLI64 #define HAVE__SETMODE #if defined(_MSC_VER) && _MSC_VER < 1900 #define HAVE__SNPRINTF #else /* #undef HAVE__SNPRINTF */ #endif #define HAVE__SNPRINTF_S #define HAVE__SNWPRINTF_S +#define HAVE__STAT64 #define HAVE__STRDUP #define HAVE__STRICMP #define HAVE__STRTOI64 #define HAVE__STRTOUI64 #define HAVE__UNLINK @@ -86,8 +90,8 @@ /* #undef HAVE_SYS_NDIR_H */ /* #undef WORDS_BIGENDIAN */ #define HAVE_SHARED /* END DEFINES */ #define PACKAGE "libzip" -#define VERSION "1.10.1" +#define VERSION "1.11.2" #endif /* HAD_CONFIG_H */ diff --git a/src/Common/libzip/zip.h b/src/Common/libzip/zip.h index dc3751c8..da57ea56 100644 --- a/src/Common/libzip/zip.h +++ b/src/Common/libzip/zip.h @@ -1,11 +1,11 @@ #ifndef _HAD_ZIP_H #define _HAD_ZIP_H /* zip.h -- exported declarations. - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -156,10 +156,11 @@ extern "C" { #define ZIP_ER_TELL 30 /* S Tell error */ #define ZIP_ER_COMPRESSED_DATA 31 /* N Compressed data invalid */ #define ZIP_ER_CANCELLED 32 /* N Operation cancelled */ #define ZIP_ER_DATA_LENGTH 33 /* N Unexpected length of data */ #define ZIP_ER_NOT_ALLOWED 34 /* N Not allowed in torrentzip */ +#define ZIP_ER_TRUNCATED_ZIP 35 /* N Possibly truncated or corrupted zip archive */ /* type of system error value */ #define ZIP_ET_NONE 0 /* sys_err unused */ #define ZIP_ET_SYS 1 /* sys_err is errno */ @@ -258,11 +259,12 @@ enum zip_source_cmd { ZIP_SOURCE_REMOVE, /* remove file */ ZIP_SOURCE_RESERVED_1, /* previously used internally */ ZIP_SOURCE_BEGIN_WRITE_CLONING, /* like ZIP_SOURCE_BEGIN_WRITE, but keep part of original file */ ZIP_SOURCE_ACCEPT_EMPTY, /* whether empty files are valid archives */ ZIP_SOURCE_GET_FILE_ATTRIBUTES, /* get additional file attributes */ - ZIP_SOURCE_SUPPORTS_REOPEN /* allow reading from changed entry */ + ZIP_SOURCE_SUPPORTS_REOPEN, /* allow reading from changed entry */ + ZIP_SOURCE_GET_DOS_TIME /* get last modification time in DOS format */ }; typedef enum zip_source_cmd zip_source_cmd_t; #define ZIP_SOURCE_MAKE_COMMAND_BITMASK(cmd) (((zip_int64_t)1) << (cmd)) diff --git a/src/Common/libzip/zip_add.c b/src/Common/libzip/zip_add.c index 9770139d..a426a579 100644 --- a/src/Common/libzip/zip_add.c +++ b/src/Common/libzip/zip_add.c @@ -1,8 +1,8 @@ /* zip_add.c -- add file via callback function - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_add_dir.c b/src/Common/libzip/zip_add_dir.c index c31fea36..2faaa1a6 100644 --- a/src/Common/libzip/zip_add_dir.c +++ b/src/Common/libzip/zip_add_dir.c @@ -1,8 +1,8 @@ /* zip_add_dir.c -- add directory - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_add_entry.c b/src/Common/libzip/zip_add_entry.c index bf12dd54..e8beaa81 100644 --- a/src/Common/libzip/zip_add_entry.c +++ b/src/Common/libzip/zip_add_entry.c @@ -1,8 +1,8 @@ /* zip_add_entry.c -- create and init struct zip_entry - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -62,11 +62,11 @@ _zip_add_entry(zip_t *za) { if (sizeof(struct zip_entry) * (size_t)za->nentry_alloc > realloc_size) { zip_error_set(&za->error, ZIP_ER_MEMORY, 0); return -1; } rentries = (zip_entry_t *)realloc(za->entry, sizeof(struct zip_entry) * (size_t)nalloc); - if (!rentries) { + if (rentries == NULL) { zip_error_set(&za->error, ZIP_ER_MEMORY, 0); return -1; } za->entry = rentries; za->nentry_alloc = nalloc; diff --git a/src/Common/libzip/zip_algorithm_bzip2.c b/src/Common/libzip/zip_algorithm_bzip2.c index f25be143..1818039e 100644 --- a/src/Common/libzip/zip_algorithm_bzip2.c +++ b/src/Common/libzip/zip_algorithm_bzip2.c @@ -1,8 +1,8 @@ /* zip_algorithm_bzip2.c -- bzip2 (de)compression routines - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_algorithm_deflate.c b/src/Common/libzip/zip_algorithm_deflate.c index 3c85e204..5ab879df 100644 --- a/src/Common/libzip/zip_algorithm_deflate.c +++ b/src/Common/libzip/zip_algorithm_deflate.c @@ -1,8 +1,8 @@ /* zip_algorithm_deflate.c -- deflate (de)compression routines - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_algorithm_xz.c b/src/Common/libzip/zip_algorithm_xz.c index d7a7142d..b0413e01 100644 --- a/src/Common/libzip/zip_algorithm_xz.c +++ b/src/Common/libzip/zip_algorithm_xz.c @@ -1,9 +1,9 @@ /* zip_algorithm_xz.c -- LZMA/XZ (de)compression routines Bazed on zip_algorithm_deflate.c -- deflate (de)compression routines - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_algorithm_zstd.c b/src/Common/libzip/zip_algorithm_zstd.c index d005da9d..b2aa2132 100644 --- a/src/Common/libzip/zip_algorithm_zstd.c +++ b/src/Common/libzip/zip_algorithm_zstd.c @@ -1,8 +1,8 @@ /* zip_algorithm_zstd.c -- zstd (de)compression routines - Copyright (C) 2020-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2020-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_buffer.c b/src/Common/libzip/zip_buffer.c index e2103f04..de22bab1 100644 --- a/src/Common/libzip/zip_buffer.c +++ b/src/Common/libzip/zip_buffer.c @@ -1,8 +1,8 @@ /* zip_buffer.c -- bounds checked access to memory buffer - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -304,12 +304,11 @@ _zip_buffer_put_8(zip_buffer_t *buffer, zip_uint8_t i) { return 0; } -int -_zip_buffer_set_offset(zip_buffer_t *buffer, zip_uint64_t offset) { +int _zip_buffer_set_offset(zip_buffer_t *buffer, zip_uint64_t offset) { if (offset > buffer->size) { buffer->ok = false; return -1; } diff --git a/src/Common/libzip/zip_close.c b/src/Common/libzip/zip_close.c index ddc2c245..4313592c 100644 --- a/src/Common/libzip/zip_close.c +++ b/src/Common/libzip/zip_close.c @@ -1,8 +1,8 @@ /* zip_close.c -- close zip archive and update changes - Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -42,11 +42,11 @@ #endif static int add_data(zip_t *, zip_source_t *, zip_dirent_t *, zip_uint32_t); static int copy_data(zip_t *, zip_uint64_t); -static int copy_source(zip_t *, zip_source_t *, zip_int64_t); +static int copy_source(zip_t *, zip_source_t *, zip_source_t *, zip_int64_t); static int torrentzip_compare_names(const void *a, const void *b); static int write_cdir(zip_t *, const zip_filelist_t *, zip_uint64_t); static int write_data_descriptor(zip_t *za, const zip_dirent_t *dirent, int is_zip64); ZIP_EXTERN int @@ -466,15 +466,11 @@ add_data(zip_t *za, zip_source_t *src, zip_dirent_t *de, zip_uint32_t changed) { if (de->encryption_method == ZIP_EM_TRAD_PKWARE) { de->bitflags |= ZIP_GPBF_DATA_DESCRIPTOR; /* PKWare encryption uses last_mod, make sure it gets the right value. */ if (de->changed & ZIP_DIRENT_LAST_MOD) { - zip_stat_t st_mtime; - zip_stat_init(&st_mtime); - st_mtime.valid = ZIP_STAT_MTIME; - st_mtime.mtime = de->last_mod; - if ((src_tmp = _zip_source_window_new(src_final, 0, -1, &st_mtime, 0, NULL, NULL, 0, true, &za->error)) == NULL) { + if ((src_tmp = _zip_source_window_new(src_final, 0, -1, NULL, 0, NULL, &de->last_mod, NULL, 0, true, &za->error)) == NULL) { zip_source_free(src_final); return -1; } src_final = src_tmp; } @@ -493,11 +489,11 @@ add_data(zip_t *za, zip_source_t *src, zip_dirent_t *de, zip_uint32_t changed) { if ((offdata = zip_source_tell_write(za->src)) < 0) { zip_error_set_from_source(&za->error, za->src); return -1; } - ret = copy_source(za, src_final, data_length); + ret = copy_source(za, src_final, src, data_length); if (zip_source_stat(src_final, &st) < 0) { zip_error_set_from_source(&za->error, src_final); ret = -1; } @@ -527,14 +523,27 @@ add_data(zip_t *za, zip_source_t *src, zip_dirent_t *de, zip_uint32_t changed) { zip_error_set(&za->error, ZIP_ER_INTERNAL, 0); return -1; } if ((de->changed & ZIP_DIRENT_LAST_MOD) == 0) { - if (st.valid & ZIP_STAT_MTIME) - de->last_mod = st.mtime; - else - time(&de->last_mod); + int ret2 = zip_source_get_dos_time(src, &de->last_mod); + if (ret2 < 0) { + zip_error_set_from_source(&za->error, src); + return -1; + } + if (ret2 == 0) { + time_t mtime; + if (st.valid & ZIP_STAT_MTIME) { + mtime = st.mtime; + } + else { + time(&mtime); + } + if (_zip_u2d_time(mtime, &de->last_mod, &za->error) < 0) { + return -1; + } + } } de->comp_method = st.comp_method; de->crc = st.crc; de->uncomp_size = st.size; de->comp_size = (zip_uint64_t)(offend - offdata); @@ -603,11 +612,11 @@ copy_data(zip_t *za, zip_uint64_t len) { return 0; } static int -copy_source(zip_t *za, zip_source_t *src, zip_int64_t data_length) { +copy_source(zip_t *za, zip_source_t *src, zip_source_t *src_for_length, zip_int64_t data_length) { DEFINE_BYTE_ARRAY(buf, BUFSIZE); zip_int64_t n, current; int ret; if (zip_source_open(src) < 0) { @@ -626,11 +635,17 @@ copy_source(zip_t *za, zip_source_t *src, zip_int64_t data_length) { if (_zip_write(za, buf, (zip_uint64_t)n) < 0) { ret = -1; break; } if (n == BUFSIZE && za->progress && data_length > 0) { - current += n; + zip_int64_t t; + t = zip_source_tell(src_for_length); + if (t >= 0) { + current = t; + } else { + current += n; + } if (_zip_progress_update(za->progress, (double)current / (double)data_length) != 0) { zip_error_set(&za->error, ZIP_ER_CANCELLED, 0); ret = -1; break; } @@ -740,6 +755,6 @@ static int torrentzip_compare_names(const void *a, const void *b) { else if (bname == NULL) { return 1; } return strcasecmp(aname, bname); -}
\ No newline at end of file +} diff --git a/src/Common/libzip/zip_crypto.h b/src/Common/libzip/zip_crypto.h index 0d74d1a4..805af52f 100644 --- a/src/Common/libzip/zip_crypto.h +++ b/src/Common/libzip/zip_crypto.h @@ -1,8 +1,8 @@ /* zip_crypto.h -- crypto definitions - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_commoncrypto.c b/src/Common/libzip/zip_crypto_commoncrypto.c index b198be56..e6cb72d3 100644 --- a/src/Common/libzip/zip_crypto_commoncrypto.c +++ b/src/Common/libzip/zip_crypto_commoncrypto.c @@ -1,8 +1,8 @@ /* zip_crypto_commoncrypto.c -- CommonCrypto wrapper. - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_commoncrypto.h b/src/Common/libzip/zip_crypto_commoncrypto.h index 01828cc6..82dafdb4 100644 --- a/src/Common/libzip/zip_crypto_commoncrypto.h +++ b/src/Common/libzip/zip_crypto_commoncrypto.h @@ -1,8 +1,8 @@ /* zip_crypto_commoncrypto.h -- definitions for CommonCrypto wrapper. - Copyright (C) 2018 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_gnutls.c b/src/Common/libzip/zip_crypto_gnutls.c index 1a25aa12..fcc7fdfd 100644 --- a/src/Common/libzip/zip_crypto_gnutls.c +++ b/src/Common/libzip/zip_crypto_gnutls.c @@ -1,8 +1,8 @@ /* zip_crypto_gnutls.c -- GnuTLS wrapper. - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_gnutls.h b/src/Common/libzip/zip_crypto_gnutls.h index dc8b97a4..a6fa508a 100644 --- a/src/Common/libzip/zip_crypto_gnutls.h +++ b/src/Common/libzip/zip_crypto_gnutls.h @@ -1,8 +1,8 @@ /* zip_crypto_gnutls.h -- definitions for GnuTLS wrapper. - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_mbedtls.c b/src/Common/libzip/zip_crypto_mbedtls.c index 84544a82..0ed66c0d 100644 --- a/src/Common/libzip/zip_crypto_mbedtls.c +++ b/src/Common/libzip/zip_crypto_mbedtls.c @@ -1,8 +1,8 @@ /* zip_crypto_mbedtls.c -- mbed TLS wrapper - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_mbedtls.h b/src/Common/libzip/zip_crypto_mbedtls.h index 1151fff7..30ce21c9 100644 --- a/src/Common/libzip/zip_crypto_mbedtls.h +++ b/src/Common/libzip/zip_crypto_mbedtls.h @@ -1,8 +1,8 @@ /* zip_crypto_mbedtls.h -- definitions for mbedtls wrapper - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_openssl.c b/src/Common/libzip/zip_crypto_openssl.c index 7f1da10e..9e9e8e7c 100644 --- a/src/Common/libzip/zip_crypto_openssl.c +++ b/src/Common/libzip/zip_crypto_openssl.c @@ -1,8 +1,8 @@ /* zip_crypto_openssl.c -- OpenSSL wrapper. - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -124,12 +124,13 @@ _zip_crypto_aes_free(_zip_crypto_aes_t *aes) { } bool _zip_crypto_aes_encrypt_block(_zip_crypto_aes_t *aes, const zip_uint8_t *in, zip_uint8_t *out) { - int len; - if (EVP_EncryptUpdate(aes, out, &len, in, ZIP_CRYPTO_AES_BLOCK_LENGTH) != 1) { + int len = 0; + if (EVP_EncryptUpdate(aes, out, &len, in, ZIP_CRYPTO_AES_BLOCK_LENGTH) != 1 + || len != ZIP_CRYPTO_AES_BLOCK_LENGTH) { return false; } return true; } @@ -212,15 +213,15 @@ _zip_crypto_hmac_free(_zip_crypto_hmac_t *hmac) { bool _zip_crypto_hmac_output(_zip_crypto_hmac_t *hmac, zip_uint8_t *data) { #ifdef USE_OPENSSL_3_API - size_t length; + size_t length = 0; return EVP_MAC_final(hmac->ctx, data, &length, ZIP_CRYPTO_SHA1_LENGTH) == 1 && length == ZIP_CRYPTO_SHA1_LENGTH; #else - unsigned int length; - return HMAC_Final(hmac, data, &length) == 1; + unsigned int length = 0; + return HMAC_Final(hmac, data, &length) == 1 && length == ZIP_CRYPTO_SHA1_LENGTH; #endif } ZIP_EXTERN bool diff --git a/src/Common/libzip/zip_crypto_openssl.h b/src/Common/libzip/zip_crypto_openssl.h index 198a9071..e593ec55 100644 --- a/src/Common/libzip/zip_crypto_openssl.h +++ b/src/Common/libzip/zip_crypto_openssl.h @@ -1,8 +1,8 @@ /* zip_crypto_openssl.h -- definitions for OpenSSL wrapper. - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_crypto_win.c b/src/Common/libzip/zip_crypto_win.c index ee3ccc30..6d923038 100644 --- a/src/Common/libzip/zip_crypto_win.c +++ b/src/Common/libzip/zip_crypto_win.c @@ -1,8 +1,8 @@ /* zip_crypto_win.c -- Windows Crypto API wrapper. - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -35,13 +35,10 @@ #include "zipint.h" #include "zip_crypto.h" -#define WIN32_LEAN_AND_MEAN -#define NOCRYPT - #include <windows.h> #include <bcrypt.h> #pragma comment(lib, "bcrypt.lib") diff --git a/src/Common/libzip/zip_crypto_win.h b/src/Common/libzip/zip_crypto_win.h index a533fe2d..3f05b621 100644 --- a/src/Common/libzip/zip_crypto_win.h +++ b/src/Common/libzip/zip_crypto_win.h @@ -1,8 +1,8 @@ /* zip_crypto_win.h -- Windows Crypto API wrapper. - Copyright (C) 2018-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2018-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_delete.c b/src/Common/libzip/zip_delete.c index 676c16bf..4eefdd97 100644 --- a/src/Common/libzip/zip_delete.c +++ b/src/Common/libzip/zip_delete.c @@ -1,8 +1,8 @@ /* zip_delete.c -- delete file from zip archive - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_dir_add.c b/src/Common/libzip/zip_dir_add.c index c0108191..01d8ec9d 100644 --- a/src/Common/libzip/zip_dir_add.c +++ b/src/Common/libzip/zip_dir_add.c @@ -1,8 +1,8 @@ /* zip_dir_add.c -- add directory - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_dirent.c b/src/Common/libzip/zip_dirent.c index 45a2a6a2..24bc6abf 100644 --- a/src/Common/libzip/zip_dirent.c +++ b/src/Common/libzip/zip_dirent.c @@ -1,8 +1,8 @@ /* zip_dirent.c -- read directory entry (local or central), clean dirent - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -39,32 +39,33 @@ #include <time.h> #include <zlib.h> #include "zipint.h" -static zip_string_t *_zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string_t *str); +static zip_string_t *_zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string_t *str, bool check_consistency); static zip_extra_field_t *_zip_ef_utf8(zip_uint16_t, zip_string_t *, zip_error_t *); static bool _zip_dirent_process_winzip_aes(zip_dirent_t *de, zip_error_t *error); void _zip_cdir_free(zip_cdir_t *cd) { zip_uint64_t i; - if (!cd) + if (cd == NULL) { return; + } for (i = 0; i < cd->nentry; i++) _zip_entry_finalize(cd->entry + i); free(cd->entry); _zip_string_free(cd->comment); free(cd); } zip_cdir_t * -_zip_cdir_new(zip_uint64_t nentry, zip_error_t *error) { +_zip_cdir_new(zip_error_t *error) { zip_cdir_t *cd; if ((cd = (zip_cdir_t *)malloc(sizeof(*cd))) == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); return NULL; @@ -74,15 +75,10 @@ _zip_cdir_new(zip_uint64_t nentry, zip_error_t *error) { cd->nentry = cd->nentry_alloc = 0; cd->size = cd->offset = 0; cd->comment = NULL; cd->is_zip64 = false; - if (!_zip_cdir_grow(cd, nentry, error)) { - _zip_cdir_free(cd); - return NULL; - } - return cd; } bool @@ -124,54 +120,46 @@ _zip_cdir_write(zip_t *za, const zip_filelist_t *filelist, zip_uint64_t survivor zip_string_t *comment; zip_uint8_t buf[EOCDLEN + EOCD64LEN + EOCD64LOCLEN]; zip_buffer_t *buffer; zip_int64_t off; zip_uint64_t i; - bool is_zip64; - int ret; zip_uint32_t cdir_crc; if ((off = zip_source_tell_write(za->src)) < 0) { zip_error_set_from_source(&za->error, za->src); return -1; } offset = (zip_uint64_t)off; - is_zip64 = false; - if (ZIP_WANT_TORRENTZIP(za)) { cdir_crc = (zip_uint32_t)crc32(0, NULL, 0); za->write_crc = &cdir_crc; } for (i = 0; i < survivors; i++) { zip_entry_t *entry = za->entry + filelist[i].idx; - if ((ret = _zip_dirent_write(za, entry->changes ? entry->changes : entry->orig, ZIP_FL_CENTRAL)) < 0) + if (_zip_dirent_write(za, entry->changes ? entry->changes : entry->orig, ZIP_FL_CENTRAL) < 0) { + za->write_crc = NULL; return -1; - if (ret) - is_zip64 = true; + } } za->write_crc = NULL; if ((off = zip_source_tell_write(za->src)) < 0) { zip_error_set_from_source(&za->error, za->src); return -1; } size = (zip_uint64_t)off - offset; - if (offset > ZIP_UINT32_MAX || survivors > ZIP_UINT16_MAX) { - is_zip64 = true; - } - if ((buffer = _zip_buffer_new(buf, sizeof(buf))) == NULL) { zip_error_set(&za->error, ZIP_ER_MEMORY, 0); return -1; } - if (is_zip64) { + if (survivors > ZIP_UINT16_MAX || offset > ZIP_UINT32_MAX || size > ZIP_UINT32_MAX) { _zip_buffer_put(buffer, EOCD64_MAGIC, 4); _zip_buffer_put_64(buffer, EOCD64LEN - 12); _zip_buffer_put_16(buffer, 45); _zip_buffer_put_16(buffer, 45); _zip_buffer_put_32(buffer, 0); @@ -292,15 +280,17 @@ _zip_dirent_init(zip_dirent_t *de) { de->changed = 0; de->local_extra_fields_read = 0; de->cloned = 0; de->crc_valid = true; + de->last_mod_mtime_valid = false; de->version_madeby = 63 | (ZIP_OPSYS_DEFAULT << 8); de->version_needed = 10; /* 1.0 */ de->bitflags = 0; de->comp_method = ZIP_CM_DEFAULT; - de->last_mod = 0; + de->last_mod.date = 0; + de->last_mod.time = 0; de->crc = 0; de->comp_size = 0; de->uncomp_size = 0; de->filename = NULL; de->extra_fields = NULL; @@ -334,26 +324,27 @@ _zip_dirent_new(void) { _zip_dirent_init(de); return de; } -/* _zip_dirent_read(zde, fp, bufp, left, localp, error): +/* Fills the zip directory entry zde. If buffer is non-NULL, data is taken from there; otherwise data is read from fp as needed. If local is true, it reads a local header instead of a central directory entry. Returns size of dirent read if successful. On error, error is filled in and -1 is returned. */ zip_int64_t -_zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, bool local, zip_error_t *error) { +_zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, bool local, zip_uint64_t central_compressed_size, bool check_consistency, zip_error_t *error) { zip_uint8_t buf[CDENTRYSIZE]; - zip_uint16_t dostime, dosdate; zip_uint32_t size, variable_size; zip_uint16_t filename_len, comment_len, ef_len; + zip_string_t *utf8_string; + bool is_zip64 = false; bool from_buffer = (buffer != NULL); size = local ? LENTRYSIZE : CDENTRYSIZE; @@ -387,13 +378,12 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo zde->version_needed = _zip_buffer_get_16(buffer); zde->bitflags = _zip_buffer_get_16(buffer); zde->comp_method = _zip_buffer_get_16(buffer); /* convert to time_t */ - dostime = _zip_buffer_get_16(buffer); - dosdate = _zip_buffer_get_16(buffer); - zde->last_mod = _zip_d2u_time(dostime, dosdate); + zde->last_mod.time = _zip_buffer_get_16(buffer); + zde->last_mod.date = _zip_buffer_get_16(buffer); zde->crc = _zip_buffer_get_32(buffer); zde->comp_size = _zip_buffer_get_32(buffer); zde->uncomp_size = _zip_buffer_get_32(buffer); @@ -456,11 +446,11 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo } } if (filename_len) { zde->filename = _zip_read_string(buffer, src, filename_len, 1, error); - if (!zde->filename) { + if (zde->filename == NULL) { if (zip_error_code_zip(error) == ZIP_ER_EOF) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_VARIABLE_SIZE_OVERFLOW); } if (!from_buffer) { _zip_buffer_free(buffer); @@ -500,11 +490,11 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo zde->local_extra_fields_read = 1; } if (comment_len) { zde->comment = _zip_read_string(buffer, src, comment_len, 0, error); - if (!zde->comment) { + if (zde->comment == NULL) { if (!from_buffer) { _zip_buffer_free(buffer); } return -1; } @@ -517,12 +507,28 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo return -1; } } } - zde->filename = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_NAME, zde->filename); - zde->comment = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_COMMENT, zde->comment); + if ((utf8_string = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_NAME, zde->filename, check_consistency)) == NULL && zde->filename != NULL) { + zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_UTF8_FILENAME_MISMATCH); + if (!from_buffer) { + _zip_buffer_free(buffer); + } + return -1; + } + zde->filename = utf8_string; + if (!local) { + if ((utf8_string = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_COMMENT, zde->comment, check_consistency)) == NULL && zde->comment != NULL) { + zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_UTF8_COMMENT_MISMATCH); + if (!from_buffer) { + _zip_buffer_free(buffer); + } + return -1; + } + zde->comment = utf8_string; + } /* Zip64 */ if (zde->uncomp_size == ZIP_UINT32_MAX || zde->comp_size == ZIP_UINT32_MAX || zde->offset == ZIP_UINT32_MAX) { zip_uint16_t got_len; @@ -533,24 +539,55 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo _zip_buffer_free(buffer); } return -1; } } + is_zip64 = true; } if (!_zip_buffer_ok(buffer)) { zip_error_set(error, ZIP_ER_INTERNAL, 0); if (!from_buffer) { _zip_buffer_free(buffer); } return -1; } + if (!from_buffer) { _zip_buffer_free(buffer); } + if (local && zde->bitflags & ZIP_GPBF_DATA_DESCRIPTOR) { + zip_uint32_t df_crc; + zip_uint64_t df_comp_size, df_uncomp_size; + if (zip_source_seek(src, central_compressed_size, SEEK_CUR) != 0 || (buffer = _zip_buffer_new_from_source(src, MAX_DATA_DESCRIPTOR_LENGTH, buf, error)) == NULL) { + return -1; + } + if (memcmp(_zip_buffer_peek(buffer, MAGIC_LEN), DATADES_MAGIC, MAGIC_LEN) == 0) { + _zip_buffer_skip(buffer, MAGIC_LEN); + } + df_crc = _zip_buffer_get_32(buffer); + df_comp_size = is_zip64 ? _zip_buffer_get_64(buffer) : _zip_buffer_get_32(buffer); + df_uncomp_size = is_zip64 ? _zip_buffer_get_64(buffer) : _zip_buffer_get_32(buffer); + + if (!_zip_buffer_ok(buffer)) { + zip_error_set(error, ZIP_ER_INTERNAL, 0); + _zip_buffer_free(buffer); + return -1; + } + _zip_buffer_free(buffer); + + if ((zde->crc != 0 && zde->crc != df_crc) || (zde->comp_size != 0 && zde->comp_size != df_comp_size) || (zde->uncomp_size != 0 && zde->uncomp_size != df_uncomp_size)) { + zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_DATA_DESCRIPTOR_MISMATCH); + return -1; + } + zde->crc = df_crc; + zde->comp_size = df_comp_size; + zde->uncomp_size = df_uncomp_size; + } + /* zip_source_seek / zip_source_tell don't support values > ZIP_INT64_MAX */ if (zde->offset > ZIP_INT64_MAX) { zip_error_set(error, ZIP_ER_SEEK, EFBIG); return -1; } @@ -562,11 +599,12 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo zde->extra_fields = _zip_ef_remove_internal(zde->extra_fields); return (zip_int64_t)size + (zip_int64_t)variable_size; } -bool zip_dirent_process_ef_zip64(zip_dirent_t* zde, const zip_uint8_t* ef, zip_uint64_t got_len, bool local, zip_error_t* error) { +bool +zip_dirent_process_ef_zip64(zip_dirent_t *zde, const zip_uint8_t *ef, zip_uint64_t got_len, bool local, zip_error_t *error) { zip_buffer_t *ef_buffer; if ((ef_buffer = _zip_buffer_new((zip_uint8_t *)ef, got_len)) == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); return false; @@ -623,11 +661,11 @@ bool zip_dirent_process_ef_zip64(zip_dirent_t* zde, const zip_uint8_t* ef, zip_u return true; } static zip_string_t * -_zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string_t *str) { +_zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string_t *str, bool check_consistency) { zip_uint16_t ef_len; zip_uint32_t ef_crc; zip_buffer_t *buffer; const zip_uint8_t *ef = _zip_ef_get_by_id(de->extra_fields, &ef_len, id, 0, ZIP_EF_BOTH, NULL); @@ -646,10 +684,18 @@ _zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string if (_zip_string_crc32(str) == ef_crc) { zip_uint16_t len = (zip_uint16_t)_zip_buffer_left(buffer); zip_string_t *ef_str = _zip_string_new(_zip_buffer_get(buffer, len), len, ZIP_FL_ENC_UTF_8, NULL); if (ef_str != NULL) { + if (check_consistency) { + if (!_zip_string_equal(str, ef_str) && _zip_string_is_ascii(ef_str)) { + _zip_string_free(ef_str); + _zip_buffer_free(buffer); + return NULL; + } + } + _zip_string_free(str); str = ef_str; } } @@ -686,22 +732,22 @@ _zip_dirent_process_winzip_aes(zip_dirent_t *de, zip_error_t *error) { /* version */ crc_valid = true; switch (_zip_buffer_get_16(buffer)) { - case 1: - break; + case 1: + break; - case 2: - crc_valid = false; - /* TODO: When checking consistency, check that crc is 0. */ - break; - - default: - zip_error_set(error, ZIP_ER_ENCRNOTSUPP, 0); - _zip_buffer_free(buffer); - return false; + case 2: + crc_valid = false; + /* TODO: When checking consistency, check that crc is 0. */ + break; + + default: + zip_error_set(error, ZIP_ER_ENCRNOTSUPP, 0); + _zip_buffer_free(buffer); + return false; } /* vendor */ if (memcmp(_zip_buffer_get(buffer, 2), "AE", 2) != 0) { zip_error_set(error, ZIP_ER_ENCRNOTSUPP, 0); @@ -785,11 +831,11 @@ _zip_dirent_size(zip_source_t *src, zip_uint16_t flags, zip_error_t *error) { returned. */ int _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags) { - zip_uint16_t dostime, dosdate; + zip_dostime_t dostime; zip_encoding_type_t com_enc, name_enc; zip_extra_field_t *ef; zip_extra_field_t *ef64; zip_uint32_t ef_total_size; bool is_zip64; @@ -924,18 +970,18 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags) { else { _zip_buffer_put_16(buffer, (zip_uint16_t)de->comp_method); } if (ZIP_WANT_TORRENTZIP(za)) { - dostime = 0xbc00; - dosdate = 0x2198; + dostime.time = 0xbc00; + dostime.date = 0x2198; } else { - _zip_u2d_time(de->last_mod, &dostime, &dosdate); + dostime = de->last_mod; } - _zip_buffer_put_16(buffer, dostime); - _zip_buffer_put_16(buffer, dosdate); + _zip_buffer_put_16(buffer, dostime.time); + _zip_buffer_put_16(buffer, dostime.date); if (is_winzip_aes && de->uncomp_size < 20) { _zip_buffer_put_32(buffer, 0); } else { @@ -1032,25 +1078,25 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags) { return is_zip64; } time_t -_zip_d2u_time(zip_uint16_t dtime, zip_uint16_t ddate) { +_zip_d2u_time(const zip_dostime_t *dtime) { struct tm tm; memset(&tm, 0, sizeof(tm)); /* let mktime decide if DST is in effect */ tm.tm_isdst = -1; - tm.tm_year = ((ddate >> 9) & 127) + 1980 - 1900; - tm.tm_mon = ((ddate >> 5) & 15) - 1; - tm.tm_mday = ddate & 31; + tm.tm_year = ((dtime->date >> 9) & 127) + 1980 - 1900; + tm.tm_mon = ((dtime->date >> 5) & 15) - 1; + tm.tm_mday = dtime->date & 31; - tm.tm_hour = (dtime >> 11) & 31; - tm.tm_min = (dtime >> 5) & 63; - tm.tm_sec = (dtime << 1) & 62; + tm.tm_hour = (dtime->time >> 11) & 31; + tm.tm_min = (dtime->time >> 5) & 63; + tm.tm_sec = (dtime->time << 1) & 62; return mktime(&tm); } @@ -1117,27 +1163,32 @@ _zip_get_dirent(zip_t *za, zip_uint64_t idx, zip_flags_t flags, zip_error_t *err else return za->entry[idx].changes; } -void -_zip_u2d_time(time_t intime, zip_uint16_t *dtime, zip_uint16_t *ddate) { +int +_zip_u2d_time(time_t intime, zip_dostime_t *dtime, zip_error_t *ze) { struct tm *tpm; struct tm tm; tpm = zip_localtime(&intime, &tm); if (tpm == NULL) { /* if localtime fails, return an arbitrary date (1980-01-01 00:00:00) */ - *ddate = (1 << 5) + 1; - *dtime = 0; - return; + dtime->date = (1 << 5) + 1; + dtime->time = 0; + if (ze) { + zip_error_set(ze, ZIP_ER_INVAL, errno); + } + return -1; } if (tpm->tm_year < 80) { tpm->tm_year = 80; } - *ddate = (zip_uint16_t)(((tpm->tm_year + 1900 - 1980) << 9) + ((tpm->tm_mon + 1) << 5) + tpm->tm_mday); - *dtime = (zip_uint16_t)(((tpm->tm_hour) << 11) + ((tpm->tm_min) << 5) + ((tpm->tm_sec) >> 1)); + dtime->date = (zip_uint16_t)(((tpm->tm_year + 1900 - 1980) << 9) + ((tpm->tm_mon + 1) << 5) + tpm->tm_mday); + dtime->time = (zip_uint16_t)(((tpm->tm_hour) << 11) + ((tpm->tm_min) << 5) + ((tpm->tm_sec) >> 1)); + + return 0; } void _zip_dirent_apply_attributes(zip_dirent_t *de, zip_file_attributes_t *attributes, bool force_zip64, zip_uint32_t changed) { @@ -1190,18 +1241,35 @@ _zip_dirent_apply_attributes(zip_dirent_t *de, zip_file_attributes_t *attributes /* _zip_dirent_torrent_normalize(de); Set values suitable for torrentzip. */ -void zip_dirent_torrentzip_normalize(zip_dirent_t *de) { +void +zip_dirent_torrentzip_normalize(zip_dirent_t *de) { de->version_madeby = 0; de->version_needed = 20; /* 2.0 */ - de->bitflags = 2; /* maximum compression */ + de->bitflags = 2; /* maximum compression */ de->comp_method = ZIP_CM_DEFLATE; de->compression_level = TORRENTZIP_COMPRESSION_FLAGS; de->disk_number = 0; de->int_attrib = 0; de->ext_attrib = 0; /* last_mod, extra_fields, and comment are normalized in zip_dirent_write() directly */ +} +int +zip_dirent_check_consistency(zip_dirent_t *dirent) { + if (dirent->comp_method == ZIP_CM_STORE && dirent->comp_size != dirent->uncomp_size) { + return ZIP_ER_DETAIL_STORED_SIZE_MISMATCH; + } + return 0; } + +time_t zip_dirent_get_last_mod_mtime(zip_dirent_t *de) { + if (!de->last_mod_mtime_valid) { + de->last_mod_mtime = _zip_d2u_time(&de->last_mod); + de->last_mod_mtime_valid = true; + } + + return de->last_mod_mtime; +}
\ No newline at end of file diff --git a/src/Common/libzip/zip_discard.c b/src/Common/libzip/zip_discard.c index d1dc4f8b..841a80e2 100644 --- a/src/Common/libzip/zip_discard.c +++ b/src/Common/libzip/zip_discard.c @@ -1,8 +1,8 @@ /* zip_discard.c -- discard and free struct zip - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_entry.c b/src/Common/libzip/zip_entry.c index 35a36e4a..dd25e61f 100644 --- a/src/Common/libzip/zip_entry.c +++ b/src/Common/libzip/zip_entry.c @@ -1,8 +1,8 @@ /* zip_entry.c -- struct zip_entry helper functions - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_err_str.c b/src/Common/libzip/zip_err_str.c index 28af773b..fb4b69fa 100644 --- a/src/Common/libzip/zip_err_str.c +++ b/src/Common/libzip/zip_err_str.c @@ -47,10 +47,11 @@ const struct _zip_err_info _zip_err_str[] = { { S, "Tell error" }, { N, "Compressed data invalid" }, { N, "Operation cancelled" }, { N, "Unexpected length of data" }, { N, "Not allowed in torrentzip" }, + { N, "Possibly truncated or corrupted zip archive" }, }; const int _zip_err_str_count = sizeof(_zip_err_str)/sizeof(_zip_err_str[0]); const struct _zip_err_info _zip_err_details[] = { @@ -72,8 +73,13 @@ const struct _zip_err_info _zip_err_details[] = { { E, "invalid Zip64 extra field" }, { E, "invalid WinZip AES extra field" }, { E, "garbage at end of extra fields" }, { E, "extra field length is invalid" }, { E, "file length in header doesn't match actual file length" }, + { E, "compressed and uncompressed sizes don't match for stored file" }, + { E, "local header and data descriptor do not match" }, + { G, "EOCD64 and EOCD64 locator do not match" }, + { E, "UTF-8 filename is ASCII and doesn't match filename" }, + { E, "UTF-8 comment is ASCII and doesn't match comment" }, }; const int _zip_err_details_count = sizeof(_zip_err_details)/sizeof(_zip_err_details[0]); diff --git a/src/Common/libzip/zip_error.c b/src/Common/libzip/zip_error.c index c498e086..da910d44 100644 --- a/src/Common/libzip/zip_error.c +++ b/src/Common/libzip/zip_error.c @@ -1,8 +1,8 @@ /* zip_error.c -- zip_error_t helper functions - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_error_clear.c b/src/Common/libzip/zip_error_clear.c index 94ff5062..04062719 100644 --- a/src/Common/libzip/zip_error_clear.c +++ b/src/Common/libzip/zip_error_clear.c @@ -1,8 +1,8 @@ /* zip_error_clear.c -- clear zip error - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_error_get.c b/src/Common/libzip/zip_error_get.c index c0418f0d..2a5b3eaf 100644 --- a/src/Common/libzip/zip_error_get.c +++ b/src/Common/libzip/zip_error_get.c @@ -1,8 +1,8 @@ /* zip_error_get.c -- get zip error - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_error_get_sys_type.c b/src/Common/libzip/zip_error_get_sys_type.c index a22ffb03..973d26c0 100644 --- a/src/Common/libzip/zip_error_get_sys_type.c +++ b/src/Common/libzip/zip_error_get_sys_type.c @@ -1,8 +1,8 @@ /* zip_error_get_sys_type.c -- return type of system error code - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_error_strerror.c b/src/Common/libzip/zip_error_strerror.c index fe04cbb4..5be54b38 100644 --- a/src/Common/libzip/zip_error_strerror.c +++ b/src/Common/libzip/zip_error_strerror.c @@ -1,8 +1,8 @@ /* zip_error_sterror.c -- get string representation of struct zip_error - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -47,10 +47,13 @@ zip_error_strerror(zip_error_t *err) { zip_error_fini(err); if (err->zip_err < 0 || err->zip_err >= _zip_err_str_count) { system_error_buffer = (char *)malloc(128); + if (system_error_buffer == NULL) { + return _zip_err_str[ZIP_ER_MEMORY].description; + } snprintf_s(system_error_buffer, 128, "Unknown error %d", err->zip_err); system_error_buffer[128 - 1] = '\0'; /* make sure string is NUL-terminated */ zip_error_string = NULL; system_error_string = system_error_buffer; } @@ -59,10 +62,13 @@ zip_error_strerror(zip_error_t *err) { switch (_zip_err_str[err->zip_err].type) { case ZIP_ET_SYS: { size_t len = strerrorlen_s(err->sys_err) + 1; system_error_buffer = malloc(len); + if (system_error_buffer == NULL) { + return _zip_err_str[ZIP_ER_MEMORY].description; + } strerror_s(system_error_buffer, len, err->sys_err); system_error_string = system_error_buffer; break; } @@ -77,16 +83,22 @@ zip_error_strerror(zip_error_t *err) { if (error == 0) { system_error_string = NULL; } else if (error >= _zip_err_details_count) { system_error_buffer = (char *)malloc(128); + if (system_error_buffer == NULL) { + return _zip_err_str[ZIP_ER_MEMORY].description; + } snprintf_s(system_error_buffer, 128, "invalid detail error %u", error); system_error_buffer[128 - 1] = '\0'; /* make sure string is NUL-terminated */ system_error_string = system_error_buffer; } else if (_zip_err_details[error].type == ZIP_DETAIL_ET_ENTRY && index < MAX_DETAIL_INDEX) { system_error_buffer = (char *)malloc(128); + if (system_error_buffer == NULL) { + return _zip_err_str[ZIP_ER_MEMORY].description; + } snprintf_s(system_error_buffer, 128, "entry %d: %s", index, _zip_err_details[error].description); system_error_buffer[128 - 1] = '\0'; /* make sure string is NUL-terminated */ system_error_string = system_error_buffer; } else { diff --git a/src/Common/libzip/zip_error_to_str.c b/src/Common/libzip/zip_error_to_str.c index b60b7881..4186e3a4 100644 --- a/src/Common/libzip/zip_error_to_str.c +++ b/src/Common/libzip/zip_error_to_str.c @@ -1,8 +1,8 @@ /* zip_error_to_str.c -- get string representation of zip error code - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_extra_field.c b/src/Common/libzip/zip_extra_field.c index 7aed12ad..52837046 100644 --- a/src/Common/libzip/zip_extra_field.c +++ b/src/Common/libzip/zip_extra_field.c @@ -1,8 +1,8 @@ /* zip_extra_field.c -- manipulate extra fields - Copyright (C) 2012-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2012-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_extra_field_api.c b/src/Common/libzip/zip_extra_field_api.c index 560c71bb..6f2b4596 100644 --- a/src/Common/libzip/zip_extra_field_api.c +++ b/src/Common/libzip/zip_extra_field_api.c @@ -1,8 +1,8 @@ /* zip_extra_field_api.c -- public extra fields API functions - Copyright (C) 2012-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2012-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -54,14 +54,10 @@ zip_file_extra_field_delete(zip_t *za, zip_uint64_t idx, zip_uint16_t ef_idx, zi if (ZIP_IS_RDONLY(za)) { zip_error_set(&za->error, ZIP_ER_RDONLY, 0); return -1; } - if (ZIP_WANT_TORRENTZIP(za)) { - zip_error_set(&za->error, ZIP_ER_NOT_ALLOWED, 0); - return -1; - } if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) return -1; de = za->entry[idx].changes; diff --git a/src/Common/libzip/zip_fclose.c b/src/Common/libzip/zip_fclose.c index b820d98b..2ef579a0 100644 --- a/src/Common/libzip/zip_fclose.c +++ b/src/Common/libzip/zip_fclose.c @@ -1,8 +1,8 @@ /* zip_fclose.c -- close file in zip archive - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_fdopen.c b/src/Common/libzip/zip_fdopen.c index e72c55dc..94fe6c7c 100644 --- a/src/Common/libzip/zip_fdopen.c +++ b/src/Common/libzip/zip_fdopen.c @@ -1,8 +1,8 @@ /* zip_fdopen.c -- open read-only archive from file descriptor - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_add.c b/src/Common/libzip/zip_file_add.c index c2c41e15..5959d504 100644 --- a/src/Common/libzip/zip_file_add.c +++ b/src/Common/libzip/zip_file_add.c @@ -1,8 +1,8 @@ /* zip_file_add.c -- add file via callback function - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_error_clear.c b/src/Common/libzip/zip_file_error_clear.c index a10bff80..eb9a614e 100644 --- a/src/Common/libzip/zip_file_error_clear.c +++ b/src/Common/libzip/zip_file_error_clear.c @@ -1,8 +1,8 @@ /* zip_file_error_clear.c -- clear zip file error - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_error_get.c b/src/Common/libzip/zip_file_error_get.c index b93117bb..679aeefb 100644 --- a/src/Common/libzip/zip_file_error_get.c +++ b/src/Common/libzip/zip_file_error_get.c @@ -1,8 +1,8 @@ /* zip_file_error_get.c -- get zip file error - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_get_comment.c b/src/Common/libzip/zip_file_get_comment.c index fa998f02..ca04042a 100644 --- a/src/Common/libzip/zip_file_get_comment.c +++ b/src/Common/libzip/zip_file_get_comment.c @@ -1,8 +1,8 @@ /* zip_file_get_comment.c -- get file comment - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_get_external_attributes.c b/src/Common/libzip/zip_file_get_external_attributes.c index a79bb3ed..483557f0 100644 --- a/src/Common/libzip/zip_file_get_external_attributes.c +++ b/src/Common/libzip/zip_file_get_external_attributes.c @@ -1,8 +1,8 @@ /* zip_file_get_external_attributes.c -- get opsys/external attributes - Copyright (C) 2013-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2013-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_get_offset.c b/src/Common/libzip/zip_file_get_offset.c index 72f4880e..c50def54 100644 --- a/src/Common/libzip/zip_file_get_offset.c +++ b/src/Common/libzip/zip_file_get_offset.c @@ -1,8 +1,8 @@ /* zip_file_get_offset.c -- get offset of file data in archive. - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_rename.c b/src/Common/libzip/zip_file_rename.c index 9ac25814..03101e43 100644 --- a/src/Common/libzip/zip_file_rename.c +++ b/src/Common/libzip/zip_file_rename.c @@ -1,8 +1,8 @@ /* zip_file_rename.c -- rename file in zip archive - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_replace.c b/src/Common/libzip/zip_file_replace.c index 4262d453..ce457ed1 100644 --- a/src/Common/libzip/zip_file_replace.c +++ b/src/Common/libzip/zip_file_replace.c @@ -1,8 +1,8 @@ /* zip_file_replace.c -- replace file via callback function - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -81,10 +81,16 @@ _zip_file_replace(zip_t *za, zip_uint64_t idx, const char *name, zip_source_t *s za->nentry = za_nentry_prev; } return -1; } + /* delete all extra fields - these are usually data that are + * strongly coupled with the original data */ + if (zip_file_extra_field_delete(za, idx, ZIP_EXTRA_FIELD_ALL, ZIP_FL_CENTRAL | ZIP_FL_LOCAL) < 0) { + return -1; + } + /* does not change any name related data, so we can do it here; * needed for a double add of the same file name */ _zip_unchange_data(za->entry + idx); if (za->entry[idx].orig != NULL && (za->entry[idx].changes == NULL || (za->entry[idx].changes->changed & ZIP_DIRENT_COMP_METHOD) == 0)) { diff --git a/src/Common/libzip/zip_file_set_comment.c b/src/Common/libzip/zip_file_set_comment.c index 570f8e82..fb7b9edd 100644 --- a/src/Common/libzip/zip_file_set_comment.c +++ b/src/Common/libzip/zip_file_set_comment.c @@ -1,8 +1,8 @@ /* zip_file_set_comment.c -- set comment for file in archive - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_set_encryption.c b/src/Common/libzip/zip_file_set_encryption.c index 1cdcd4ab..7bb6cdc7 100644 --- a/src/Common/libzip/zip_file_set_encryption.c +++ b/src/Common/libzip/zip_file_set_encryption.c @@ -1,8 +1,8 @@ /* zip_file_set_encryption.c -- set encryption for file in archive - Copyright (C) 2016-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2016-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_set_external_attributes.c b/src/Common/libzip/zip_file_set_external_attributes.c index 2e0429b8..2f9d30f9 100644 --- a/src/Common/libzip/zip_file_set_external_attributes.c +++ b/src/Common/libzip/zip_file_set_external_attributes.c @@ -1,8 +1,8 @@ /* zip_file_set_external_attributes.c -- set external attributes for entry - Copyright (C) 2013-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2013-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_file_set_mtime.c b/src/Common/libzip/zip_file_set_mtime.c index 4126f5a1..e60f7a9a 100644 --- a/src/Common/libzip/zip_file_set_mtime.c +++ b/src/Common/libzip/zip_file_set_mtime.c @@ -1,8 +1,8 @@ /* zip_file_set_mtime.c -- set modification time of entry. - Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -31,23 +31,16 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "zipint.h" -ZIP_EXTERN int -zip_file_set_dostime(zip_t *za, zip_uint64_t idx, zip_uint16_t dtime, zip_uint16_t ddate, zip_flags_t flags) { - time_t mtime; - mtime = _zip_d2u_time(dtime, ddate); - return zip_file_set_mtime(za, idx, mtime, flags); -} - -ZIP_EXTERN int -zip_file_set_mtime(zip_t *za, zip_uint64_t idx, time_t mtime, zip_flags_t flags) { +static int zip_file_set_time(zip_t *za, zip_uint64_t idx, zip_uint16_t dtime, zip_uint16_t ddate, zip_flags_t flags, time_t *mtime) { zip_entry_t *e; - if (_zip_get_dirent(za, idx, 0, NULL) == NULL) + if (_zip_get_dirent(za, idx, 0, NULL) == NULL) { return -1; + } if (ZIP_IS_RDONLY(za)) { zip_error_set(&za->error, ZIP_ER_RDONLY, 0); return -1; } @@ -68,10 +61,33 @@ zip_file_set_mtime(zip_t *za, zip_uint64_t idx, time_t mtime, zip_flags_t flags) zip_error_set(&za->error, ZIP_ER_MEMORY, 0); return -1; } } - e->changes->last_mod = mtime; + e->changes->last_mod.time = dtime; + e->changes->last_mod.date = ddate; + if (mtime != NULL) { + e->changes->last_mod_mtime = *mtime; + e->changes->last_mod_mtime_valid = true; + } + else { + e->changes->last_mod_mtime_valid = false; + } e->changes->changed |= ZIP_DIRENT_LAST_MOD; return 0; } + +ZIP_EXTERN int zip_file_set_dostime(zip_t *za, zip_uint64_t idx, zip_uint16_t dtime, zip_uint16_t ddate, zip_flags_t flags) { + return zip_file_set_time(za, idx, dtime, ddate, flags, NULL); +} + + +ZIP_EXTERN int zip_file_set_mtime(zip_t *za, zip_uint64_t idx, time_t mtime, zip_flags_t flags) { + zip_dostime_t dostime; + + if (_zip_u2d_time(mtime, &dostime, &za->error) < 0) { + return -1; + } + + return zip_file_set_time(za, idx, dostime.time, dostime.date, flags, &mtime); +} diff --git a/src/Common/libzip/zip_file_strerror.c b/src/Common/libzip/zip_file_strerror.c index 5b5a0092..5e896b4c 100644 --- a/src/Common/libzip/zip_file_strerror.c +++ b/src/Common/libzip/zip_file_strerror.c @@ -1,8 +1,8 @@ /* zip_file_sterror.c -- get string representation of zip file error - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_fopen.c b/src/Common/libzip/zip_fopen.c index e3cde9be..93217f3d 100644 --- a/src/Common/libzip/zip_fopen.c +++ b/src/Common/libzip/zip_fopen.c @@ -1,8 +1,8 @@ /* zip_fopen.c -- open file in zip archive for reading - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_fopen_encrypted.c b/src/Common/libzip/zip_fopen_encrypted.c index d5880dcb..78143afe 100644 --- a/src/Common/libzip/zip_fopen_encrypted.c +++ b/src/Common/libzip/zip_fopen_encrypted.c @@ -1,8 +1,8 @@ /* zip_fopen_encrypted.c -- open file for reading with password - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_fopen_index.c b/src/Common/libzip/zip_fopen_index.c index a449b83a..b6676b7d 100644 --- a/src/Common/libzip/zip_fopen_index.c +++ b/src/Common/libzip/zip_fopen_index.c @@ -1,8 +1,8 @@ /* zip_fopen_index.c -- open file in zip archive for reading by index - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_fopen_index_encrypted.c b/src/Common/libzip/zip_fopen_index_encrypted.c index 40483709..86d69774 100644 --- a/src/Common/libzip/zip_fopen_index_encrypted.c +++ b/src/Common/libzip/zip_fopen_index_encrypted.c @@ -1,8 +1,8 @@ /* zip_fopen_index_encrypted.c -- open file for reading by index w/ password - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_fread.c b/src/Common/libzip/zip_fread.c index 5b7da46a..17cec4fb 100644 --- a/src/Common/libzip/zip_fread.c +++ b/src/Common/libzip/zip_fread.c @@ -1,8 +1,8 @@ /* zip_fread.c -- read from file - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -37,15 +37,17 @@ ZIP_EXTERN zip_int64_t zip_fread(zip_file_t *zf, void *outbuf, zip_uint64_t toread) { zip_int64_t n; - if (!zf) + if (zf == NULL) { return -1; + } - if (zf->error.zip_err != 0) + if (zf->error.zip_err != 0) { return -1; + } if (toread > ZIP_INT64_MAX) { zip_error_set(&zf->error, ZIP_ER_INVAL, 0); return -1; } diff --git a/src/Common/libzip/zip_fseek.c b/src/Common/libzip/zip_fseek.c index e68ffd36..107a6f73 100644 --- a/src/Common/libzip/zip_fseek.c +++ b/src/Common/libzip/zip_fseek.c @@ -1,8 +1,8 @@ /* zip_fseek.c -- seek in file - Copyright (C) 2016-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2016-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -34,15 +34,17 @@ #include "zipint.h" ZIP_EXTERN zip_int8_t zip_fseek(zip_file_t *zf, zip_int64_t offset, int whence) { - if (!zf) + if (zf == NULL) { return -1; + } - if (zf->error.zip_err != 0) + if (zf->error.zip_err != 0) { return -1; + } if (zip_source_seek(zf->src, offset, whence) < 0) { zip_error_set_from_source(&zf->error, zf->src); return -1; } @@ -51,11 +53,11 @@ zip_fseek(zip_file_t *zf, zip_int64_t offset, int whence) { } ZIP_EXTERN int zip_file_is_seekable(zip_file_t *zfile) { - if (!zfile) { + if (zfile == NULL) { return -1; } return zip_source_is_seekable(zfile->src); } diff --git a/src/Common/libzip/zip_ftell.c b/src/Common/libzip/zip_ftell.c index bf3b03d3..6299b2da 100644 --- a/src/Common/libzip/zip_ftell.c +++ b/src/Common/libzip/zip_ftell.c @@ -1,8 +1,8 @@ /* zip_ftell.c -- tell position in file - Copyright (C) 2016-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2016-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -36,15 +36,17 @@ ZIP_EXTERN zip_int64_t zip_ftell(zip_file_t *zf) { zip_int64_t res; - if (!zf) + if (zf == NULL) { return -1; + } - if (zf->error.zip_err != 0) + if (zf->error.zip_err != 0) { return -1; + } res = zip_source_tell(zf->src); if (res < 0) { zip_error_set_from_source(&zf->error, zf->src); return -1; diff --git a/src/Common/libzip/zip_get_archive_comment.c b/src/Common/libzip/zip_get_archive_comment.c index ea9a00ab..b83e6bcf 100644 --- a/src/Common/libzip/zip_get_archive_comment.c +++ b/src/Common/libzip/zip_get_archive_comment.c @@ -1,8 +1,8 @@ /* zip_get_archive_comment.c -- get archive comment - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_get_archive_flag.c b/src/Common/libzip/zip_get_archive_flag.c index fc200bdc..80d59914 100644 --- a/src/Common/libzip/zip_get_archive_flag.c +++ b/src/Common/libzip/zip_get_archive_flag.c @@ -1,8 +1,8 @@ /* zip_get_archive_flag.c -- get archive global flag - Copyright (C) 2008-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2008-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_get_encryption_implementation.c b/src/Common/libzip/zip_get_encryption_implementation.c index 72e48fe8..28ad3297 100644 --- a/src/Common/libzip/zip_get_encryption_implementation.c +++ b/src/Common/libzip/zip_get_encryption_implementation.c @@ -1,8 +1,8 @@ /* zip_get_encryption_implementation.c -- get encryption implementation - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_get_file_comment.c b/src/Common/libzip/zip_get_file_comment.c index d58e22ba..0284aecd 100644 --- a/src/Common/libzip/zip_get_file_comment.c +++ b/src/Common/libzip/zip_get_file_comment.c @@ -1,8 +1,8 @@ /* zip_get_file_comment.c -- get file comment - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_get_name.c b/src/Common/libzip/zip_get_name.c index 4828d781..d1c94532 100644 --- a/src/Common/libzip/zip_get_name.c +++ b/src/Common/libzip/zip_get_name.c @@ -1,8 +1,8 @@ /* zip_get_name.c -- get filename for a file in zip file - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_get_num_entries.c b/src/Common/libzip/zip_get_num_entries.c index 667dc511..b2595dec 100644 --- a/src/Common/libzip/zip_get_num_entries.c +++ b/src/Common/libzip/zip_get_num_entries.c @@ -1,8 +1,8 @@ /* zip_get_num_entries.c -- get number of entries in archive - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_get_num_files.c b/src/Common/libzip/zip_get_num_files.c index 140e34f9..16d7754b 100644 --- a/src/Common/libzip/zip_get_num_files.c +++ b/src/Common/libzip/zip_get_num_files.c @@ -1,8 +1,8 @@ /* zip_get_num_files.c -- get number of files in archive - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_hash.c b/src/Common/libzip/zip_hash.c index d3a954ec..8479bec1 100644 --- a/src/Common/libzip/zip_hash.c +++ b/src/Common/libzip/zip_hash.c @@ -1,8 +1,8 @@ /* zip_hash.c -- hash table string -> uint64 - Copyright (C) 2015-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2015-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_io_util.c b/src/Common/libzip/zip_io_util.c index 9fcd10b4..6ae8aac6 100644 --- a/src/Common/libzip/zip_io_util.c +++ b/src/Common/libzip/zip_io_util.c @@ -1,8 +1,8 @@ /* zip_io_util.c -- I/O helper functions - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -67,12 +67,18 @@ _zip_read_data(zip_buffer_t *buffer, zip_source_t *src, size_t length, bool nulp if (length == 0 && !nulp) { return NULL; } +// VS2022: Workaround an Internal compiler error for Release ARM (32-bit) build. +#if _MSC_VER >= 1940 && _MSC_VER < 1950 && defined(_M_ARM) && defined(NDEBUG) + size_t l = length + (nulp ? 1 : 0); + r = (zip_uint8_t *)malloc(l); +#else r = (zip_uint8_t *)malloc(length + (nulp ? 1 : 0)); - if (!r) { +#endif + if (r == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); return NULL; } if (buffer) { diff --git a/src/Common/libzip/zip_libzip_version.c b/src/Common/libzip/zip_libzip_version.c index 4200727f..139b250f 100644 --- a/src/Common/libzip/zip_libzip_version.c +++ b/src/Common/libzip/zip_libzip_version.c @@ -1,8 +1,8 @@ /* zip_libzip_version.c -- return run-time version of library - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_memdup.c b/src/Common/libzip/zip_memdup.c index 75d72c61..6ac9a5a2 100644 --- a/src/Common/libzip/zip_memdup.c +++ b/src/Common/libzip/zip_memdup.c @@ -1,8 +1,8 @@ /* zip_memdup.c -- internal zip function, "strdup" with len - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -43,11 +43,11 @@ _zip_memdup(const void *mem, size_t len, zip_error_t *error) { if (len == 0) return NULL; ret = malloc(len); - if (!ret) { + if (ret == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); return NULL; } (void)memcpy_s(ret, len, mem, len); diff --git a/src/Common/libzip/zip_new.c b/src/Common/libzip/zip_new.c index 4f69c8a2..68e1588f 100644 --- a/src/Common/libzip/zip_new.c +++ b/src/Common/libzip/zip_new.c @@ -1,8 +1,8 @@ /* zip_new.c -- create and init struct zip - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -44,11 +44,11 @@ zip_t * _zip_new(zip_error_t *error) { zip_t *za; za = (zip_t *)malloc(sizeof(struct zip)); - if (!za) { + if (za == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); return NULL; } if ((za->names = _zip_hash_new(error)) == NULL) { @@ -66,8 +66,9 @@ _zip_new(zip_error_t *error) { za->nentry = za->nentry_alloc = 0; za->entry = NULL; za->nopen_source = za->nopen_source_alloc = 0; za->open_source = NULL; za->progress = NULL; + za->torrent_mtime = 0; return za; } diff --git a/src/Common/libzip/zip_open.c b/src/Common/libzip/zip_open.c index ee7e9dec..9dccad61 100644 --- a/src/Common/libzip/zip_open.c +++ b/src/Common/libzip/zip_open.c @@ -1,8 +1,8 @@ /* zip_open.c -- open zip archive by name - Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -29,29 +29,41 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "zipint.h" -typedef enum { EXISTS_ERROR = -1, EXISTS_NOT = 0, EXISTS_OK } exists_t; +typedef enum { + EXISTS_ERROR = -1, + EXISTS_NOT = 0, + EXISTS_OK +} exists_t; +typedef enum { + CDIR_OK, + CDIR_INVALID, + CDIR_NOT_FOUND + +} cdir_status_t; + +static bool check_eocd(zip_cdir_t *cd, unsigned int flags, zip_error_t *error); +static bool check_magic(zip_uint64_t offset, zip_buffer_t *buffer, zip_uint64_t buffer_offset, zip_source_t *src, const char* magic); static zip_t *_zip_allocate_new(zip_source_t *src, unsigned int flags, zip_error_t *error); static zip_int64_t _zip_checkcons(zip_t *za, zip_cdir_t *cdir, zip_error_t *error); static void zip_check_torrentzip(zip_t *za, const zip_cdir_t *cdir); static zip_cdir_t *_zip_find_central_dir(zip_t *za, zip_uint64_t len); static exists_t _zip_file_exists(zip_source_t *src, zip_error_t *error); static int _zip_headercomp(const zip_dirent_t *, const zip_dirent_t *); -static const unsigned char *_zip_memmem(const unsigned char *, size_t, const unsigned char *, size_t); -static zip_cdir_t *_zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_error_t *error); -static zip_cdir_t *_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error); -static zip_cdir_t *_zip_read_eocd64(zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error); +static bool _zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_cdir_t **cdirp, zip_error_t *error); +static zip_cdir_t *_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_error_t *error); +static cdir_status_t _zip_read_eocd64(zip_cdir_t *cdir, zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error); +static const unsigned char *find_eocd(zip_buffer_t *buffer, const unsigned char *last); ZIP_EXTERN zip_t * zip_open(const char *fn, int _flags, int *zep) { zip_t *za; @@ -142,10 +154,31 @@ zip_open_from_source(zip_source_t *src, int _flags, zip_error_t *error) { } } } +static bool +_is_truncated_zip(zip_source_t *src) { + unsigned char data[4]; + /* check if the source is a truncated zip archive: true if yes, no + if not or can't be determined */ + if (zip_source_seek(src, 0, SEEK_SET) < 0) { + return false; + } + + if (zip_source_read(src, data, 4) != 4) { + return false; + } + + if (memcmp(data, LOCAL_MAGIC, 4) == 0) { + /* file starts with a ZIP local header signature */ + return true; + } + return false; +} + + zip_t * _zip_open(zip_source_t *src, unsigned int flags, zip_error_t *error) { zip_t *za; zip_cdir_t *cdir; struct zip_stat st; @@ -172,10 +205,16 @@ _zip_open(zip_source_t *src, unsigned int flags, zip_error_t *error) { return za; } if ((cdir = _zip_find_central_dir(za, len)) == NULL) { _zip_error_copy(error, &za->error); + if (zip_error_code_zip(error) == ZIP_ER_NOZIP) { + /* not a zip - find out if it's truncated */ + if (_is_truncated_zip(src)) { + zip_error_set(error, ZIP_ER_TRUNCATED_ZIP, 0); + } + } /* keep src so discard does not get rid of it */ zip_source_keep(src); zip_discard(za); return NULL; } @@ -226,18 +265,18 @@ _zip_open(zip_source_t *src, unsigned int flags, zip_error_t *error) { void _zip_set_open_error(int *zep, const zip_error_t *err, int ze) { if (err) { ze = zip_error_code_zip(err); - switch (zip_error_system_type(err)) { - case ZIP_ET_SYS: - case ZIP_ET_LIBZIP: - errno = zip_error_code_system(err); - break; - - default: - break; + switch (zip_error_system_type(err)) { + case ZIP_ET_SYS: + case ZIP_ET_LIBZIP: + errno = zip_error_code_system(err); + break; + + default: + break; } } if (zep) *zep = ze; @@ -248,68 +287,103 @@ _zip_set_open_error(int *zep, const zip_error_t *err, int ze) { tries to find a valid end-of-central-directory at the beginning of buf, and then the corresponding central directory entries. Returns a struct zip_cdir which contains the central directory entries, or NULL if unsuccessful. */ -static zip_cdir_t * -_zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_error_t *error) { +static bool _zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_cdir_t **cdirp, zip_error_t *error) { zip_cdir_t *cd; zip_uint16_t comment_len; zip_uint64_t i, left; zip_uint64_t eocd_offset = _zip_buffer_offset(buffer); zip_buffer_t *cd_buffer; + bool eocd64_found = false; - if (_zip_buffer_left(buffer) < EOCDLEN) { - /* not enough bytes left for comment */ - zip_error_set(error, ZIP_ER_NOZIP, 0); - return NULL; - } + *cdirp = NULL; - /* check for end-of-central-dir magic */ - if (memcmp(_zip_buffer_get(buffer, 4), EOCD_MAGIC, 4) != 0) { - zip_error_set(error, ZIP_ER_NOZIP, 0); - return NULL; + if ((cd = _zip_read_eocd(buffer, buf_offset, error)) == NULL) { + return false; } if (eocd_offset >= EOCD64LOCLEN && memcmp(_zip_buffer_data(buffer) + eocd_offset - EOCD64LOCLEN, EOCD64LOC_MAGIC, 4) == 0) { + eocd64_found = true; _zip_buffer_set_offset(buffer, eocd_offset - EOCD64LOCLEN); - cd = _zip_read_eocd64(za->src, buffer, buf_offset, za->flags, error); + switch (_zip_read_eocd64(cd, za->src, buffer, buf_offset, za->flags, error)) { + case CDIR_OK: + break; + + case CDIR_INVALID: + _zip_cdir_free(cd); + return true; + + case CDIR_NOT_FOUND: + _zip_cdir_free(cd); + return false; + } } - else { - _zip_buffer_set_offset(buffer, eocd_offset); - cd = _zip_read_eocd(buffer, buf_offset, za->flags, error); + + if ((cd->eocd_disk != 0 || cd->this_disk != 0) && !eocd64_found && cd->eocd_disk != cd->this_disk) { + /* If the central directory doesn't start on this disk, we can't check that offset is valid. Check as much as we can instead. */ + if (cd->this_disk < cd->eocd_disk) { + /* Disks before the start of the central directory don't contain an EOCD. */ + _zip_cdir_free(cd); + return false; + } + if (cd->size <= cd->eocd_offset) { + /* The complete central directory would fit on this disk. */ + _zip_cdir_free(cd); + return false; + } } - if (cd == NULL) - return NULL; + if (!eocd64_found) { + if (cd->this_disk == 0 && cd->eocd_disk == 0 && cd->eocd_offset == 0 && cd->offset == 0 && cd->num_entries == 0) { + /* An empty archive doesn't contain central directory entries. */ + } + else if (!check_magic(cd->offset, buffer, buf_offset, za->src, CENTRAL_MAGIC)) { + _zip_cdir_free(cd); + return false; + } + } + + /* We accept this EOCD as valid and won't search for an earlier one if it is unusable. */ + + if (!check_eocd(cd, za->flags, error)) { + _zip_cdir_free(cd); + return true; + } _zip_buffer_set_offset(buffer, eocd_offset + 20); comment_len = _zip_buffer_get_16(buffer); if (cd->offset + cd->size > buf_offset + eocd_offset) { /* cdir spans past EOCD record */ zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD); _zip_cdir_free(cd); - return NULL; + return true; } if (comment_len || (za->open_flags & ZIP_CHECKCONS)) { zip_uint64_t tail_len; _zip_buffer_set_offset(buffer, eocd_offset + EOCDLEN); tail_len = _zip_buffer_left(buffer); - if (tail_len < comment_len || ((za->open_flags & ZIP_CHECKCONS) && tail_len != comment_len)) { - zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_COMMENT_LENGTH_INVALID); - _zip_cdir_free(cd); - return NULL; + if (tail_len != comment_len) { + if (za->open_flags & ZIP_CHECKCONS) { + zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_COMMENT_LENGTH_INVALID); + _zip_cdir_free(cd); + return true; + } + if (tail_len < comment_len) { + comment_len = tail_len; + } } if (comment_len) { if ((cd->comment = _zip_string_new(_zip_buffer_get(buffer, comment_len), comment_len, ZIP_FL_ENC_GUESS, error)) == NULL) { _zip_cdir_free(cd); - return NULL; + return true; } } } if (cd->offset >= buf_offset) { @@ -318,35 +392,40 @@ _zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_err _zip_buffer_set_offset(buffer, cd->offset - buf_offset); if ((data = _zip_buffer_get(buffer, cd->size)) == NULL) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_LENGTH_INVALID); _zip_cdir_free(cd); - return NULL; + return true; } if ((cd_buffer = _zip_buffer_new(data, cd->size)) == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); _zip_cdir_free(cd); - return NULL; + return true; } } else { cd_buffer = NULL; if (zip_source_seek(za->src, (zip_int64_t)cd->offset, SEEK_SET) < 0) { zip_error_set_from_source(error, za->src); _zip_cdir_free(cd); - return NULL; + return true; } /* possible consistency check: cd->offset = len-(cd->size+cd->comment_len+EOCDLEN) ? */ if (zip_source_tell(za->src) != (zip_int64_t)cd->offset) { zip_error_set(error, ZIP_ER_NOZIP, 0); _zip_cdir_free(cd); - return NULL; + return true; } } + if (!_zip_cdir_grow(cd, cd->num_entries, error)) { + _zip_cdir_free(cd); + _zip_buffer_free(cd_buffer); + return true; + } left = (zip_uint64_t)cd->size; i = 0; while (left > 0) { bool grown = false; zip_int64_t entry_size; @@ -360,35 +439,36 @@ _zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_err } if (!_zip_cdir_grow(cd, 0x10000, error)) { _zip_cdir_free(cd); _zip_buffer_free(cd_buffer); - return NULL; + return true; } grown = true; } - if ((cd->entry[i].orig = _zip_dirent_new()) == NULL || (entry_size = _zip_dirent_read(cd->entry[i].orig, za->src, cd_buffer, false, error)) < 0) { - if (zip_error_code_zip(error) == ZIP_ER_INCONS) { - zip_error_set(error, ZIP_ER_INCONS, ADD_INDEX_TO_DETAIL(zip_error_code_system(error), i)); - } - else if (grown && zip_error_code_zip(error) == ZIP_ER_NOZIP) { + if ((cd->entry[i].orig = _zip_dirent_new()) == NULL || (entry_size = _zip_dirent_read(cd->entry[i].orig, za->src, cd_buffer, false, 0, za->open_flags & ZIP_CHECKCONS, error)) < 0) { + if (zip_error_code_zip(error) == ZIP_ER_INCONS) { + zip_error_set(error, ZIP_ER_INCONS, ADD_INDEX_TO_DETAIL(zip_error_code_system(error), i)); + } + else if (grown && zip_error_code_zip(error) == ZIP_ER_NOZIP) { zip_error_set(error, ZIP_ER_INCONS, MAKE_DETAIL_WITH_INDEX(ZIP_ER_DETAIL_CDIR_ENTRY_INVALID, i)); } _zip_cdir_free(cd); _zip_buffer_free(cd_buffer); - return NULL; + return true; } i++; left -= (zip_uint64_t)entry_size; } + /* If we didn't fill all we grew, cd->num_entries was wrong. */ if (i != cd->nentry || left > 0) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_WRONG_ENTRIES_COUNT); _zip_buffer_free(cd_buffer); _zip_cdir_free(cd); - return NULL; + return true; } if (za->open_flags & ZIP_CHECKCONS) { bool ok; @@ -399,25 +479,45 @@ _zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_err zip_int64_t offset = zip_source_tell(za->src); if (offset < 0) { zip_error_set_from_source(error, za->src); _zip_cdir_free(cd); - return NULL; + return true; } ok = ((zip_uint64_t)offset == cd->offset + cd->size); } if (!ok) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_LENGTH_INVALID); _zip_buffer_free(cd_buffer); _zip_cdir_free(cd); - return NULL; + return true; } } _zip_buffer_free(cd_buffer); - return cd; + *cdirp = cd; + return true; +} + + +static bool check_magic(zip_uint64_t offset, zip_buffer_t *buffer, zip_uint64_t buffer_offset, zip_source_t *src, const char* magic) { + if (buffer_offset <= offset) { + zip_uint8_t* data; + if (_zip_buffer_set_offset(buffer, offset - buffer_offset) < 0 || (data = _zip_buffer_get(buffer, MAGIC_LEN)) == NULL) { + return false; + } + return memcmp(data, magic, MAGIC_LEN) == 0; + } + else { + zip_uint8_t data[MAGIC_LEN]; + + if (zip_source_seek(src, offset, SEEK_SET) < 0 || zip_source_read(src, data, MAGIC_LEN) != MAGIC_LEN) { + return false; + } + return memcmp(data, magic, MAGIC_LEN) == 0; + } } /* _zip_checkcons: Checks the consistency of the central directory by comparing central @@ -428,10 +528,11 @@ _zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_err static zip_int64_t _zip_checkcons(zip_t *za, zip_cdir_t *cd, zip_error_t *error) { zip_uint64_t i; zip_uint64_t min, max, j; struct zip_dirent temp; + int detail; _zip_dirent_init(&temp); if (cd->nentry) { max = cd->entry[0].orig->offset; min = cd->entry[0].orig->offset; @@ -458,14 +559,14 @@ _zip_checkcons(zip_t *za, zip_cdir_t *cd, zip_error_t *error) { if (zip_source_seek(za->src, (zip_int64_t)cd->entry[i].orig->offset, SEEK_SET) < 0) { zip_error_set_from_source(error, za->src); return -1; } - if (_zip_dirent_read(&temp, za->src, NULL, true, error) == -1) { - if (zip_error_code_zip(error) == ZIP_ER_INCONS) { - zip_error_set(error, ZIP_ER_INCONS, ADD_INDEX_TO_DETAIL(zip_error_code_system(error), i)); - } + if (_zip_dirent_read(&temp, za->src, NULL, true, cd->entry[i].orig->comp_size, true, error) == -1) { + if (zip_error_code_zip(error) == ZIP_ER_INCONS) { + zip_error_set(error, ZIP_ER_INCONS, ADD_INDEX_TO_DETAIL(zip_error_code_system(error), i)); + } _zip_dirent_finalize(&temp); return -1; } if (_zip_headercomp(cd->entry[i].orig, &temp) != 0) { @@ -477,10 +578,15 @@ _zip_checkcons(zip_t *za, zip_cdir_t *cd, zip_error_t *error) { cd->entry[i].orig->extra_fields = _zip_ef_merge(cd->entry[i].orig->extra_fields, temp.extra_fields); cd->entry[i].orig->local_extra_fields_read = 1; temp.extra_fields = NULL; _zip_dirent_finalize(&temp); + + if ((detail = zip_dirent_check_consistency(cd->entry[i].orig)) != 0) { + zip_error_set(error, ZIP_ER_INCONS, MAKE_DETAIL_WITH_INDEX(detail, i)); + return -1; + } } return (max - min) < ZIP_INT64_MAX ? (zip_int64_t)(max - min) : ZIP_INT64_MAX; } @@ -495,29 +601,27 @@ _zip_headercomp(const zip_dirent_t *central, const zip_dirent_t *local) { #if 0 /* some zip-files have different values in local and global headers for the bitflags */ || (central->bitflags != local->bitflags) #endif - || (central->comp_method != local->comp_method) || (central->last_mod != local->last_mod) || !_zip_string_equal(central->filename, local->filename)) + || (central->comp_method != local->comp_method) || (central->last_mod.time != local->last_mod.time) || (central->last_mod.date != local->last_mod.date) || !_zip_string_equal(central->filename, local->filename)) return -1; if ((central->crc != local->crc) || (central->comp_size != local->comp_size) || (central->uncomp_size != local->uncomp_size)) { /* InfoZip stores valid values in local header even when data descriptor is used. This is in violation of the appnote. - macOS Archive sets the compressed size even when data descriptor is used ( but not the others), - also in violation of the appnote. - */ - /* if data descriptor is not used, the values must match */ + macOS Archive sets the compressed size even when data descriptor is used ( but not the others), + also in violation of the appnote. + */ + /* if data descriptor is not used, the values must match */ if ((local->bitflags & ZIP_GPBF_DATA_DESCRIPTOR) == 0) { return -1; - } - /* when using a data descriptor, the local header value must be zero or match */ - if ((local->crc != 0 && central->crc != local->crc) || - (local->comp_size != 0 && central->comp_size != local->comp_size) || - (local->uncomp_size != 0 && central->uncomp_size != local->uncomp_size)) { - return -1; - } + } + /* when using a data descriptor, the local header value must be zero or match */ + if ((local->crc != 0 && central->crc != local->crc) || (local->comp_size != 0 && central->comp_size != local->comp_size) || (local->uncomp_size != 0 && central->uncomp_size != local->uncomp_size)) { + return -1; + } } return 0; } @@ -566,16 +670,14 @@ _zip_file_exists(zip_source_t *src, zip_error_t *error) { } static zip_cdir_t * _zip_find_central_dir(zip_t *za, zip_uint64_t len) { - zip_cdir_t *cdir, *cdirnew; + zip_cdir_t *cdir; const zip_uint8_t *match; zip_int64_t buf_offset; zip_uint64_t buflen; - zip_int64_t a; - zip_int64_t best; zip_error_t error; zip_buffer_t *buffer; if (len < EOCDLEN) { zip_error_set(&za->error, ZIP_ER_NOZIP, 0); @@ -598,201 +700,174 @@ _zip_find_central_dir(zip_t *za, zip_uint64_t len) { if ((buffer = _zip_buffer_new_from_source(za->src, buflen, NULL, &za->error)) == NULL) { return NULL; } - best = -1; cdir = NULL; if (buflen >= CDBUFSIZE) { /* EOCD64 locator is before EOCD, so leave place for it */ _zip_buffer_set_offset(buffer, EOCD64LOCLEN); } zip_error_set(&error, ZIP_ER_NOZIP, 0); - match = _zip_buffer_get(buffer, 0); - /* The size of buffer never greater than CDBUFSIZE. */ - while (_zip_buffer_left(buffer) >= EOCDLEN && (match = _zip_memmem(match, (size_t)_zip_buffer_left(buffer) - (EOCDLEN - 4), (const unsigned char *)EOCD_MAGIC, 4)) != NULL) { + match = NULL; + while ((match = find_eocd(buffer, match)) != NULL) { _zip_buffer_set_offset(buffer, (zip_uint64_t)(match - _zip_buffer_data(buffer))); - if ((cdirnew = _zip_read_cdir(za, buffer, (zip_uint64_t)buf_offset, &error)) != NULL) { - if (cdir) { - if (best <= 0) { - best = _zip_checkcons(za, cdir, &error); - } - - a = _zip_checkcons(za, cdirnew, &error); - if (best < a) { - _zip_cdir_free(cdir); - cdir = cdirnew; - best = a; - } - else { - _zip_cdir_free(cdirnew); - } + if (_zip_read_cdir(za, buffer, (zip_uint64_t)buf_offset, &cdir, &error)) { + if (cdir != NULL && (za->open_flags & ZIP_CHECKCONS) && _zip_checkcons(za, cdir, &error) < 0) { + _zip_cdir_free(cdir); + cdir = NULL; } - else { - cdir = cdirnew; - if (za->open_flags & ZIP_CHECKCONS) - best = _zip_checkcons(za, cdir, &error); - else { - best = 0; - } - } - cdirnew = NULL; + break; } - - match++; - _zip_buffer_set_offset(buffer, (zip_uint64_t)(match - _zip_buffer_data(buffer))); } _zip_buffer_free(buffer); - if (best < 0) { + if (cdir == NULL) { _zip_error_copy(&za->error, &error); - _zip_cdir_free(cdir); - return NULL; } - return cdir; } -static const unsigned char *_zip_memmem(const unsigned char *big, size_t biglen, const unsigned char *little, size_t littlelen) { +static const unsigned char * +find_eocd(zip_buffer_t *buffer, const unsigned char *last) { + const unsigned char *data = _zip_buffer_data(buffer); const unsigned char *p; - if (littlelen == 0) { - return big; + if (last == NULL) { + last = data + _zip_buffer_size(buffer) - MAGIC_LEN; } - - if (biglen < littlelen) { + else if (last == _zip_buffer_data(buffer)) { return NULL; } + else { + last -= 1; + } - p = big; - while (true) { - p = (const unsigned char *)memchr(p, little[0], biglen - (littlelen - 1) - (size_t)(p - big)); - if (p == NULL) { - return NULL; - } - if (memcmp(p + 1, little + 1, littlelen - 1) == 0) { - return p; + for (p = last; p >= data; p -= 1) { + if (*p == EOCD_MAGIC[0]) { + if (memcmp(p, EOCD_MAGIC, MAGIC_LEN) == 0) { + return p; + } } - p += 1; } + + return NULL; } static zip_cdir_t * -_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error) { +_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_error_t *error) { zip_cdir_t *cd; - zip_uint64_t i, nentry, size, offset, eocd_offset; if (_zip_buffer_left(buffer) < EOCDLEN) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_EOCD_LENGTH_INVALID); return NULL; } - eocd_offset = _zip_buffer_offset(buffer); - - _zip_buffer_get(buffer, 4); /* magic already verified */ - - if (_zip_buffer_get_32(buffer) != 0) { - zip_error_set(error, ZIP_ER_MULTIDISK, 0); + if ((cd = _zip_cdir_new(error)) == NULL) { return NULL; } + cd->eocd_offset = buf_offset + _zip_buffer_offset(buffer); + /* This function is only called where EOCD magic was found, so no need to check that here. */ + _zip_buffer_skip(buffer, MAGIC_LEN); + cd->is_zip64 = false; + cd->this_disk = _zip_buffer_get_16(buffer); + cd->eocd_disk = _zip_buffer_get_16(buffer); + /* number of cdir-entries on this disk */ - i = _zip_buffer_get_16(buffer); + cd->disk_entries = _zip_buffer_get_16(buffer); /* number of cdir-entries */ - nentry = _zip_buffer_get_16(buffer); - - if (nentry != i) { - zip_error_set(error, ZIP_ER_NOZIP, 0); - return NULL; - } + cd->num_entries = _zip_buffer_get_16(buffer); + cd->size = _zip_buffer_get_32(buffer); + cd->offset = _zip_buffer_get_32(buffer); - size = _zip_buffer_get_32(buffer); - offset = _zip_buffer_get_32(buffer); + return cd; +} - if (offset + size < offset) { - zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return NULL; +static bool +check_eocd(zip_cdir_t *cd, unsigned int flags, zip_error_t *error) { + if (cd->disk_entries != cd->num_entries || cd->this_disk != 0 || cd->eocd_disk != 0) { + zip_error_set(error, ZIP_ER_MULTIDISK, 0); + return false; } - if (offset + size > buf_offset + eocd_offset) { - /* cdir spans past EOCD record */ - zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD); - return NULL; + if (cd->offset + cd->size < cd->offset) { + zip_error_set(error, ZIP_ER_SEEK, EFBIG); + return false; } - - if ((flags & ZIP_CHECKCONS) && offset + size != buf_offset + eocd_offset) { + if ((flags & ZIP_CHECKCONS) && cd->offset + cd->size != cd->eocd_offset) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_LENGTH_INVALID); - return NULL; + return false; } - if ((cd = _zip_cdir_new(nentry, error)) == NULL) - return NULL; - - cd->is_zip64 = false; - cd->size = size; - cd->offset = offset; - - return cd; + return true; } -static zip_cdir_t * -_zip_read_eocd64(zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error) { - zip_cdir_t *cd; +cdir_status_t _zip_read_eocd64(zip_cdir_t *cdir, zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error) { zip_uint64_t offset; zip_uint8_t eocd[EOCD64LEN]; zip_uint64_t eocd_offset; zip_uint64_t size, nentry, i, eocdloc_offset; bool free_buffer; - zip_uint32_t num_disks, num_disks64, eocd_disk, eocd_disk64; + zip_uint32_t num_disks, eocd_disk, this_disk; eocdloc_offset = _zip_buffer_offset(buffer); _zip_buffer_get(buffer, 4); /* magic already verified */ - num_disks = _zip_buffer_get_16(buffer); - eocd_disk = _zip_buffer_get_16(buffer); + eocd_disk = _zip_buffer_get_32(buffer); eocd_offset = _zip_buffer_get_64(buffer); + num_disks = _zip_buffer_get_32(buffer); + + if (!check_magic(eocd_offset, buffer, buf_offset, src, EOCD64_MAGIC)) { + return CDIR_NOT_FOUND; + } + + if (num_disks != 1) { + zip_error_set(error, ZIP_ER_MULTIDISK, 0); + return CDIR_INVALID; + } /* valid seek value for start of EOCD */ if (eocd_offset > ZIP_INT64_MAX) { zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return NULL; + return CDIR_INVALID; } /* does EOCD fit before EOCD locator? */ if (eocd_offset + EOCD64LEN > eocdloc_offset + buf_offset) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_EOCD64_OVERLAPS_EOCD); - return NULL; + return CDIR_INVALID; } /* make sure current position of buffer is beginning of EOCD */ if (eocd_offset >= buf_offset && eocd_offset + EOCD64LEN <= buf_offset + _zip_buffer_size(buffer)) { _zip_buffer_set_offset(buffer, eocd_offset - buf_offset); free_buffer = false; } else { if (zip_source_seek(src, (zip_int64_t)eocd_offset, SEEK_SET) < 0) { zip_error_set_from_source(error, src); - return NULL; + return CDIR_INVALID; } if ((buffer = _zip_buffer_new_from_source(src, EOCD64LEN, eocd, error)) == NULL) { - return NULL; + return CDIR_INVALID; } free_buffer = true; } if (memcmp(_zip_buffer_get(buffer, 4), EOCD64_MAGIC, 4) != 0) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_EOCD64_WRONG_MAGIC); if (free_buffer) { _zip_buffer_free(buffer); } - return NULL; + return CDIR_INVALID; } /* size of EOCD */ size = _zip_buffer_get_64(buffer); @@ -800,51 +875,33 @@ _zip_read_eocd64(zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offse if ((flags & ZIP_CHECKCONS) && size + eocd_offset + 12 != buf_offset + eocdloc_offset) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_EOCD64_OVERLAPS_EOCD); if (free_buffer) { _zip_buffer_free(buffer); } - return NULL; + return CDIR_INVALID; } _zip_buffer_get(buffer, 4); /* skip version made by/needed */ - num_disks64 = _zip_buffer_get_32(buffer); - eocd_disk64 = _zip_buffer_get_32(buffer); - - /* if eocd values are 0xffff, we have to use eocd64 values. - otherwise, if the values are not the same, it's inconsistent; - in any case, if the value is not 0, we don't support it */ - if (num_disks == 0xffff) { - num_disks = num_disks64; - } - if (eocd_disk == 0xffff) { - eocd_disk = eocd_disk64; - } - if ((flags & ZIP_CHECKCONS) && (eocd_disk != eocd_disk64 || num_disks != num_disks64)) { - zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_EOCD64_MISMATCH); + this_disk = _zip_buffer_get_32(buffer); + if (_zip_buffer_get_32(buffer) != eocd_disk) { + zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_EOCD64_LOCATOR_MISMATCH); if (free_buffer) { _zip_buffer_free(buffer); } - return NULL; - } - if (num_disks != 0 || eocd_disk != 0) { - zip_error_set(error, ZIP_ER_MULTIDISK, 0); - if (free_buffer) { - _zip_buffer_free(buffer); - } - return NULL; + return CDIR_INVALID; } - nentry = _zip_buffer_get_64(buffer); i = _zip_buffer_get_64(buffer); + nentry = _zip_buffer_get_64(buffer); if (nentry != i) { zip_error_set(error, ZIP_ER_MULTIDISK, 0); if (free_buffer) { _zip_buffer_free(buffer); } - return NULL; + return CDIR_INVALID; } size = _zip_buffer_get_64(buffer); offset = _zip_buffer_get_64(buffer); @@ -852,48 +909,46 @@ _zip_read_eocd64(zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offse if (!_zip_buffer_ok(buffer)) { zip_error_set(error, ZIP_ER_INTERNAL, 0); if (free_buffer) { _zip_buffer_free(buffer); } - return NULL; + return CDIR_INVALID; } if (free_buffer) { _zip_buffer_free(buffer); } if (offset > ZIP_INT64_MAX || offset + size < offset) { zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return NULL; - } - if (offset + size > buf_offset + eocd_offset) { - /* cdir spans past EOCD record */ - zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD); - return NULL; - } - if ((flags & ZIP_CHECKCONS) && offset + size != buf_offset + eocd_offset) { - zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD); - return NULL; + return CDIR_INVALID; } if (nentry > size / CDENTRYSIZE) { zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_CDIR_INVALID); - return NULL; + return CDIR_INVALID; } - if ((cd = _zip_cdir_new(nentry, error)) == NULL) - return NULL; + if ((cdir->size != 0xffffffff && cdir->size != size) || (cdir->offset != 0xffffffff && cdir->offset != offset) || (cdir->num_entries != 0xffff && cdir->num_entries != nentry) || (cdir->disk_entries != 0xffff && cdir->disk_entries != i) || (cdir->this_disk != 0xffff && cdir->this_disk != this_disk) || (cdir->eocd_disk != 0xffff && cdir->eocd_disk != eocd_disk)) { + zip_error_set(error, ZIP_ER_INCONS, ZIP_ER_DETAIL_EOCD64_MISMATCH); + return CDIR_INVALID; + } - cd->is_zip64 = true; - cd->size = size; - cd->offset = offset; + cdir->is_zip64 = true; + cdir->size = size; + cdir->offset = offset; + cdir->disk_entries = i; + cdir->num_entries = nentry; + cdir->this_disk = this_disk; + cdir->eocd_disk = eocd_disk; - return cd; + return CDIR_OK; } -static int decode_hex(char c) { +static int +decode_hex(char c) { if (c >= '0' && c <= '9') { return c - '0'; } else if (c >= 'A' && c <= 'F') { return c - 'A' + 10; @@ -904,21 +959,21 @@ static int decode_hex(char c) { } /* _zip_check_torrentzip: check whether ZA has a valid TORRENTZIP comment, i.e. is torrentzipped */ -static void zip_check_torrentzip(zip_t *za, const zip_cdir_t *cdir) { +static void +zip_check_torrentzip(zip_t *za, const zip_cdir_t *cdir) { zip_uint32_t crc_should; - char buf[8+1]; + char buf[8 + 1]; size_t i; if (cdir == NULL) { return; } - if (_zip_string_length(cdir->comment) != TORRENTZIP_SIGNATURE_LENGTH + TORRENTZIP_CRC_LENGTH - || strncmp((const char *)cdir->comment->raw, TORRENTZIP_SIGNATURE, TORRENTZIP_SIGNATURE_LENGTH) != 0) + if (_zip_string_length(cdir->comment) != TORRENTZIP_SIGNATURE_LENGTH + TORRENTZIP_CRC_LENGTH || strncmp((const char *)cdir->comment->raw, TORRENTZIP_SIGNATURE, TORRENTZIP_SIGNATURE_LENGTH) != 0) return; memcpy(buf, cdir->comment->raw + TORRENTZIP_SIGNATURE_LENGTH, TORRENTZIP_CRC_LENGTH); buf[TORRENTZIP_CRC_LENGTH] = '\0'; crc_should = 0; @@ -932,20 +987,20 @@ static void zip_check_torrentzip(zip_t *za, const zip_cdir_t *cdir) { crc_should = (crc_should << 8) + (high << 4) + low; } { zip_stat_t st; - zip_source_t* src_window; - zip_source_t* src_crc; + zip_source_t *src_window; + zip_source_t *src_crc; zip_uint8_t buffer[512]; zip_int64_t ret; zip_stat_init(&st); st.valid |= ZIP_STAT_SIZE | ZIP_STAT_CRC; st.size = cdir->size; st.crc = crc_should; - if ((src_window = _zip_source_window_new(za->src, cdir->offset, cdir->size, &st, 0, NULL, NULL, 0, false, NULL)) == NULL) { + if ((src_window = _zip_source_window_new(za->src, cdir->offset, cdir->size, &st, 0, NULL, NULL, NULL, 0, false, NULL)) == NULL) { return; } if ((src_crc = zip_source_crc_create(src_window, 1, NULL)) == NULL) { zip_source_free(src_window); return; diff --git a/src/Common/libzip/zip_pkware.c b/src/Common/libzip/zip_pkware.c index 6a8c9fcd..ef3a30bb 100644 --- a/src/Common/libzip/zip_pkware.c +++ b/src/Common/libzip/zip_pkware.c @@ -1,8 +1,8 @@ /* zip_pkware.c -- Traditional PKWARE de/encryption backend routines - Copyright (C) 2009-2020 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_progress.c b/src/Common/libzip/zip_progress.c index e080514b..5693d7a5 100644 --- a/src/Common/libzip/zip_progress.c +++ b/src/Common/libzip/zip_progress.c @@ -1,8 +1,8 @@ /* zip_progress.c -- progress reporting - Copyright (C) 2017-2020 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -189,11 +189,11 @@ _zip_progress_update(zip_progress_t *progress, double sub_current) { } if (progress->callback_progress != NULL) { current = ZIP_MIN(ZIP_MAX(sub_current, 0.0), 1.0) * (progress->end - progress->start) + progress->start; - if (current - progress->last_update > progress->precision) { + if (current - progress->last_update > progress->precision || (progress->last_update < 1 && current == 1)) { progress->callback_progress(progress->za, current, progress->ud_progress); progress->last_update = current; } } diff --git a/src/Common/libzip/zip_random_unix.c b/src/Common/libzip/zip_random_unix.c index 867df790..9446ca92 100644 --- a/src/Common/libzip/zip_random_unix.c +++ b/src/Common/libzip/zip_random_unix.c @@ -1,8 +1,8 @@ /* zip_random_unix.c -- fill the user's buffer with random stuff (Unix version) - Copyright (C) 2016-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2016-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_random_uwp.c b/src/Common/libzip/zip_random_uwp.c index 0883ce45..7accdeb2 100644 --- a/src/Common/libzip/zip_random_uwp.c +++ b/src/Common/libzip/zip_random_uwp.c @@ -1,8 +1,8 @@ /* zip_random_uwp.c -- fill the user's buffer with random stuff (UWP version) - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_random_win32.c b/src/Common/libzip/zip_random_win32.c index 789b9c20..209ca4b8 100644 --- a/src/Common/libzip/zip_random_win32.c +++ b/src/Common/libzip/zip_random_win32.c @@ -1,8 +1,8 @@ /* zip_random_win32.c -- fill the user's buffer with random stuff (Windows version) - Copyright (C) 2016-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2016-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_rename.c b/src/Common/libzip/zip_rename.c index c89b06c9..b356de45 100644 --- a/src/Common/libzip/zip_rename.c +++ b/src/Common/libzip/zip_rename.c @@ -1,8 +1,8 @@ /* zip_rename.c -- rename file in zip archive - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_replace.c b/src/Common/libzip/zip_replace.c index 96c083c3..549306a0 100644 --- a/src/Common/libzip/zip_replace.c +++ b/src/Common/libzip/zip_replace.c @@ -1,8 +1,8 @@ /* zip_replace.c -- replace file via callback function - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_set_archive_comment.c b/src/Common/libzip/zip_set_archive_comment.c index 7d06688e..2c75bda6 100644 --- a/src/Common/libzip/zip_set_archive_comment.c +++ b/src/Common/libzip/zip_set_archive_comment.c @@ -1,8 +1,8 @@ /* zip_set_archive_comment.c -- set archive comment - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_set_archive_flag.c b/src/Common/libzip/zip_set_archive_flag.c index 834ef5ba..7533ac50 100644 --- a/src/Common/libzip/zip_set_archive_flag.c +++ b/src/Common/libzip/zip_set_archive_flag.c @@ -1,8 +1,8 @@ /* zip_get_archive_flag.c -- set archive global flag - Copyright (C) 2008-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2008-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_set_default_password.c b/src/Common/libzip/zip_set_default_password.c index 4bab513f..07b3a06e 100644 --- a/src/Common/libzip/zip_set_default_password.c +++ b/src/Common/libzip/zip_set_default_password.c @@ -1,8 +1,8 @@ /* zip_set_default_password.c -- set default password for decryption - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_set_file_comment.c b/src/Common/libzip/zip_set_file_comment.c index 5d2b0b8a..b587ae95 100644 --- a/src/Common/libzip/zip_set_file_comment.c +++ b/src/Common/libzip/zip_set_file_comment.c @@ -1,8 +1,8 @@ /* zip_set_file_comment.c -- set comment for file in archive - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_set_file_compression.c b/src/Common/libzip/zip_set_file_compression.c index a193bb77..cee099d5 100644 --- a/src/Common/libzip/zip_set_file_compression.c +++ b/src/Common/libzip/zip_set_file_compression.c @@ -1,8 +1,8 @@ /* zip_set_file_compression.c -- set compression for file in archive - Copyright (C) 2012-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2012-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_set_name.c b/src/Common/libzip/zip_set_name.c index f1bf703e..0087af1a 100644 --- a/src/Common/libzip/zip_set_name.c +++ b/src/Common/libzip/zip_set_name.c @@ -1,8 +1,8 @@ /* zip_set_name.c -- rename helper function - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_accept_empty.c b/src/Common/libzip/zip_source_accept_empty.c index e772aeea..be319434 100644 --- a/src/Common/libzip/zip_source_accept_empty.c +++ b/src/Common/libzip/zip_source_accept_empty.c @@ -1,8 +1,8 @@ /* zip_source_accept_empty.c -- if empty source is a valid archive - Copyright (C) 2019-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2019-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_begin_write.c b/src/Common/libzip/zip_source_begin_write.c index 4a9d5d5d..2724335d 100644 --- a/src/Common/libzip/zip_source_begin_write.c +++ b/src/Common/libzip/zip_source_begin_write.c @@ -1,8 +1,8 @@ /* zip_source_begin_write.c -- start a new file for writing - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_begin_write_cloning.c b/src/Common/libzip/zip_source_begin_write_cloning.c index df195fcd..67d3475b 100644 --- a/src/Common/libzip/zip_source_begin_write_cloning.c +++ b/src/Common/libzip/zip_source_begin_write_cloning.c @@ -1,8 +1,8 @@ /* zip_source_begin_write_cloning.c -- clone part of file for writing - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_buffer.c b/src/Common/libzip/zip_source_buffer.c index 44159536..bdd522d6 100644 --- a/src/Common/libzip/zip_source_buffer.c +++ b/src/Common/libzip/zip_source_buffer.c @@ -1,8 +1,8 @@ /* zip_source_buffer.c -- create zip data source from buffer - Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_call.c b/src/Common/libzip/zip_source_call.c index 8c98fc2e..bc13c3b0 100644 --- a/src/Common/libzip/zip_source_call.c +++ b/src/Common/libzip/zip_source_call.c @@ -1,8 +1,8 @@ /* zip_source_call.c -- invoke callback command on zip_source - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_close.c b/src/Common/libzip/zip_source_close.c index f4f3ff2b..f1ae6f3e 100644 --- a/src/Common/libzip/zip_source_close.c +++ b/src/Common/libzip/zip_source_close.c @@ -1,8 +1,8 @@ /* zip_source_close.c -- close zip_source (stop reading) - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_commit_write.c b/src/Common/libzip/zip_source_commit_write.c index d7f567b8..ca7563ce 100644 --- a/src/Common/libzip/zip_source_commit_write.c +++ b/src/Common/libzip/zip_source_commit_write.c @@ -1,8 +1,8 @@ /* zip_source_commit_write.c -- commit changes to file - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_compress.c b/src/Common/libzip/zip_source_compress.c index 3cf709ff..54387eca 100644 --- a/src/Common/libzip/zip_source_compress.c +++ b/src/Common/libzip/zip_source_compress.c @@ -1,8 +1,8 @@ /* zip_source_compress.c -- (de)compression routines - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_crc.c b/src/Common/libzip/zip_source_crc.c index 435a084b..931a729c 100644 --- a/src/Common/libzip/zip_source_crc.c +++ b/src/Common/libzip/zip_source_crc.c @@ -1,8 +1,8 @@ /* zip_source_crc.c -- pass-through source that calculates CRC32 and size - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_error.c b/src/Common/libzip/zip_source_error.c index dc7fa20c..774eec0a 100644 --- a/src/Common/libzip/zip_source_error.c +++ b/src/Common/libzip/zip_source_error.c @@ -1,8 +1,8 @@ /* zip_source_error.c -- get last error from zip_source - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_file.h b/src/Common/libzip/zip_source_file.h index cca9fd2b..de07aecc 100644 --- a/src/Common/libzip/zip_source_file.h +++ b/src/Common/libzip/zip_source_file.h @@ -1,8 +1,11 @@ +#ifndef _HAD_ZIP_SOURCE_FILE_H +#define _HAD_ZIP_SOURCE_FILE_H + /* zip_source_file.h -- header for common file operations - Copyright (C) 2020-2022 Dieter Baron and Thomas Klausner + Copyright (C) 2020-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -86,5 +89,7 @@ struct zip_source_file_operations { zip_int64_t (*tell)(zip_source_file_context_t *ctx, void *f); zip_int64_t (*write)(zip_source_file_context_t *ctx, const void *data, zip_uint64_t len); }; zip_source_t *zip_source_file_common_new(const char *fname, void *file, zip_uint64_t start, zip_int64_t len, const zip_stat_t *st, zip_source_file_operations_t *ops, void *ops_userdata, zip_error_t *error); + +#endif /* _HAD_ZIP_SOURCE_FILE_H */ diff --git a/src/Common/libzip/zip_source_file_common.c b/src/Common/libzip/zip_source_file_common.c index 6c58320f..99f893eb 100644 --- a/src/Common/libzip/zip_source_file_common.c +++ b/src/Common/libzip/zip_source_file_common.c @@ -1,8 +1,8 @@ /* zip_source_file_common.c -- create data source from file - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_file_stdio.c b/src/Common/libzip/zip_source_file_stdio.c index 6dcc5639..fd16f392 100644 --- a/src/Common/libzip/zip_source_file_stdio.c +++ b/src/Common/libzip/zip_source_file_stdio.c @@ -1,8 +1,8 @@ /* zip_source_file_stdio.c -- read-only stdio file source implementation - Copyright (C) 2020 Dieter Baron and Thomas Klausner + Copyright (C) 2020-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -118,29 +118,29 @@ _zip_stdio_op_seek(zip_source_file_context_t *ctx, void *f, zip_int64_t offset, zip_error_set(&ctx->error, ZIP_ER_SEEK, EOVERFLOW); return false; } #endif - if (fseeko((FILE *)f, (off_t)offset, whence) < 0) { + if (zip_os_fseek((FILE *)f, (zip_off_t)offset, whence) < 0) { zip_error_set(&ctx->error, ZIP_ER_SEEK, errno); return false; } return true; } bool _zip_stdio_op_stat(zip_source_file_context_t *ctx, zip_source_file_stat_t *st) { - struct stat sb; + zip_os_stat_t sb; int ret; if (ctx->fname) { - ret = stat(ctx->fname, &sb); + ret = zip_os_stat(ctx->fname, &sb); } else { - ret = fstat(fileno((FILE *)ctx->f), &sb); + ret = zip_os_fstat(fileno((FILE *)ctx->f), &sb); } if (ret < 0) { if (errno == ENOENT) { st->exists = false; @@ -166,11 +166,11 @@ _zip_stdio_op_stat(zip_source_file_context_t *ctx, zip_source_file_stat_t *st) { } zip_int64_t _zip_stdio_op_tell(zip_source_file_context_t *ctx, void *f) { - off_t offset = ftello((FILE *)f); + zip_off_t offset = zip_os_ftell((FILE *)f); if (offset < 0) { zip_error_set(&ctx->error, ZIP_ER_SEEK, errno); } diff --git a/src/Common/libzip/zip_source_file_stdio.h b/src/Common/libzip/zip_source_file_stdio.h index 802e6071..417a28c0 100644 --- a/src/Common/libzip/zip_source_file_stdio.h +++ b/src/Common/libzip/zip_source_file_stdio.h @@ -1,11 +1,11 @@ #ifndef _HAD_ZIP_SOURCE_FILE_STDIO_H #define _HAD_ZIP_SOURCE_FILE_STDIO_H /* zip_source_file_stdio.h -- common header for stdio file implementation - Copyright (C) 2020 Dieter Baron and Thomas Klausner + Copyright (C) 2020-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_file_stdio_named.c b/src/Common/libzip/zip_source_file_stdio_named.c index 1495d7dd..1a5ca226 100644 --- a/src/Common/libzip/zip_source_file_stdio_named.c +++ b/src/Common/libzip/zip_source_file_stdio_named.c @@ -1,8 +1,8 @@ /* zip_source_file_stdio_named.c -- source for stdio file opened by name - Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -176,13 +176,13 @@ _zip_stdio_op_create_temp_output_cloning(zip_source_file_context_t *ctx, zip_uin } #else { int fd; struct file_clone_range range; - struct stat st; + zip_os_stat_t st; - if (fstat(fileno(ctx->f), &st) < 0) { + if (zip_os_fstat(fileno(ctx->f), &st) < 0) { zip_error_set(&ctx->error, ZIP_ER_TMPOPEN, errno); return -1; } if ((fd = create_temp_file(ctx, true)) < 0) { @@ -221,11 +221,11 @@ _zip_stdio_op_create_temp_output_cloning(zip_source_file_context_t *ctx, zip_uin (void)remove(ctx->tmpname); free(ctx->tmpname); ctx->tmpname = NULL; return -1; } - if (fseeko(tfp, (off_t)offset, SEEK_SET) < 0) { + if (zip_os_fseek(tfp, (zip_off_t)offset, SEEK_SET) < 0) { zip_error_set(&ctx->error, ZIP_ER_TMPOPEN, errno); (void)fclose(tfp); (void)remove(ctx->tmpname); free(ctx->tmpname); ctx->tmpname = NULL; @@ -288,15 +288,15 @@ _zip_stdio_op_write(zip_source_file_context_t *ctx, const void *data, zip_uint64 static int create_temp_file(zip_source_file_context_t *ctx, bool create_file) { char *temp; int mode; - struct stat st; + zip_os_stat_t st; int fd = 0; char *start, *end; - if (stat(ctx->fname, &st) == 0) { + if (zip_os_stat(ctx->fname, &st) == 0) { mode = st.st_mode; } else { mode = -1; } @@ -342,11 +342,11 @@ static int create_temp_file(zip_source_file_context_t *ctx, bool create_file) { free(temp); return -1; } } else { - if (stat(temp, &st) < 0) { + if (zip_os_stat(temp, &st) < 0) { if (errno == ENOENT) { break; } else { zip_error_set(&ctx->error, ZIP_ER_TMPOPEN, errno); diff --git a/src/Common/libzip/zip_source_file_win32.c b/src/Common/libzip/zip_source_file_win32.c index 624860b1..aa669766 100644 --- a/src/Common/libzip/zip_source_file_win32.c +++ b/src/Common/libzip/zip_source_file_win32.c @@ -1,8 +1,8 @@ /* zip_source_file_win32.c -- read-only Windows file source implementation - Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_file_win32.h b/src/Common/libzip/zip_source_file_win32.h index d86069ec..da691f0a 100644 --- a/src/Common/libzip/zip_source_file_win32.h +++ b/src/Common/libzip/zip_source_file_win32.h @@ -1,11 +1,11 @@ #ifndef _HAD_ZIP_SOURCE_FILE_WIN32_H #define _HAD_ZIP_SOURCE_FILE_WIN32_H /* zip_source_file_win32.h -- common header for Windows file implementation - Copyright (C) 2020 Dieter Baron and Thomas Klausner + Copyright (C) 2020-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -57,10 +57,11 @@ struct zip_win32_file_operations { BOOL(__stdcall *get_file_attributes_ex)(const void *name, GET_FILEEX_INFO_LEVELS info_level, void *information); void (*make_tempname)(char *buf, size_t len, const char *name, zip_uint32_t i); BOOL(__stdcall *move_file)(const void *from, const void *to, DWORD flags); BOOL(__stdcall *set_file_attributes)(const void *name, DWORD attributes); char *(*string_duplicate)(const char *string); + HANDLE(__stdcall *find_first_file)(const void *name, void *data); }; typedef struct zip_win32_file_operations zip_win32_file_operations_t; extern zip_source_file_operations_t _zip_source_file_win32_named_ops; @@ -71,14 +72,6 @@ bool _zip_win32_op_seek(zip_source_file_context_t *ctx, void *f, zip_int64_t off zip_int64_t _zip_win32_op_tell(zip_source_file_context_t *ctx, void *f); bool _zip_filetime_to_time_t(FILETIME ft, time_t *t); int _zip_win32_error_to_errno(DWORD win32err); -#ifdef __clang__ -#define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wincompatible-function-pointer-types\"") -#define DONT_WARN_INCOMPATIBLE_FN_PTR_END _Pragma("GCC diagnostic pop") -#else -#define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN -#define DONT_WARN_INCOMPATIBLE_FN_PTR_END -#endif - #endif /* _HAD_ZIP_SOURCE_FILE_WIN32_H */ diff --git a/src/Common/libzip/zip_source_file_win32_ansi.c b/src/Common/libzip/zip_source_file_win32_ansi.c index 58034cc2..f10f8ae3 100644 --- a/src/Common/libzip/zip_source_file_win32_ansi.c +++ b/src/Common/libzip/zip_source_file_win32_ansi.c @@ -1,8 +1,8 @@ /* zip_source_file_win32_ansi.c -- source for Windows file opened by ANSI name - Copyright (C) 1999-2020 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -32,28 +32,32 @@ */ #include "zip_source_file_win32.h" static char *ansi_allocate_tempname(const char *name, size_t extra_chars, size_t *lengthp); +static HANDLE __stdcall ansi_create_file(const void *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file); +static BOOL __stdcall ansi_delete_file(const void *name); +static DWORD __stdcall ansi_get_file_attributes(const void *name); +static BOOL __stdcall ansi_get_file_attributes_ex(const void *name, GET_FILEEX_INFO_LEVELS info_level, void *information); static void ansi_make_tempname(char *buf, size_t len, const char *name, zip_uint32_t i); +static BOOL __stdcall ansi_move_file(const void *from, const void *to, DWORD flags); +static BOOL __stdcall ansi_set_file_attributes(const void *name, DWORD attributes); +static HANDLE __stdcall ansi_find_first_file(const void *name, void* data); /* clang-format off */ -DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN - zip_win32_file_operations_t ops_ansi = { ansi_allocate_tempname, - CreateFileA, - DeleteFileA, - GetFileAttributesA, - GetFileAttributesExA, + ansi_create_file, + ansi_delete_file, + ansi_get_file_attributes, + ansi_get_file_attributes_ex, ansi_make_tempname, - MoveFileExA, - SetFileAttributesA, - strdup + ansi_move_file, + ansi_set_file_attributes, + strdup, + ansi_find_first_file, }; - -DONT_WARN_INCOMPATIBLE_FN_PTR_END /* clang-format on */ ZIP_EXTERN zip_source_t * zip_source_win32a(zip_t *za, const char *fname, zip_uint64_t start, zip_int64_t len) { if (za == NULL) @@ -78,10 +82,51 @@ static char * ansi_allocate_tempname(const char *name, size_t extra_chars, size_t *lengthp) { *lengthp = strlen(name) + extra_chars; return (char *)malloc(*lengthp); } +static HANDLE __stdcall +ansi_create_file(const void *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file) +{ + return CreateFileA((const char *)name, access, share_mode, security_attributes, creation_disposition, file_attributes, template_file); +} + +static BOOL __stdcall +ansi_delete_file(const void *name) +{ + return DeleteFileA((const char *)name); +} + +static DWORD __stdcall +ansi_get_file_attributes(const void *name) +{ + return GetFileAttributesA((const char *)name); +} + +static BOOL __stdcall +ansi_get_file_attributes_ex(const void *name, GET_FILEEX_INFO_LEVELS info_level, void *information) +{ + return GetFileAttributesExA((const char *)name, info_level, information); +} static void ansi_make_tempname(char *buf, size_t len, const char *name, zip_uint32_t i) { snprintf_s(buf, len, "%s.%08x", name, i); } + +static BOOL __stdcall +ansi_move_file(const void *from, const void *to, DWORD flags) +{ + return MoveFileExA((const char *)from, (const char *)to, flags); +} + +static BOOL __stdcall +ansi_set_file_attributes(const void *name, DWORD attributes) +{ + return SetFileAttributesA((const char *)name, attributes); +} + +static HANDLE __stdcall +ansi_find_first_file(const void *name, void *data) +{ + return FindFirstFileA((const char *)name, data); +} diff --git a/src/Common/libzip/zip_source_file_win32_named.c b/src/Common/libzip/zip_source_file_win32_named.c index 855e605a..ae72db19 100644 --- a/src/Common/libzip/zip_source_file_win32_named.c +++ b/src/Common/libzip/zip_source_file_win32_named.c @@ -1,8 +1,8 @@ /* zip_source_file_win32_named.c -- source for Windows file opened by name - Copyright (C) 1999-2020 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -31,10 +31,17 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "zip_source_file_win32.h" +/* ACL is not available when targeting the games API partition */ +#if defined(WINAPI_FAMILY_PARTITION) && defined(WINAPI_PARTITION_GAMES) +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_GAMES) +#define ACL_UNSUPPORTED +#endif +#endif + static zip_int64_t _zip_win32_named_op_commit_write(zip_source_file_context_t *ctx); static zip_int64_t _zip_win32_named_op_create_temp_output(zip_source_file_context_t *ctx); static bool _zip_win32_named_op_open(zip_source_file_context_t *ctx); static zip_int64_t _zip_win32_named_op_remove(zip_source_file_context_t *ctx); static void _zip_win32_named_op_rollback_write(zip_source_file_context_t *ctx); @@ -108,11 +115,15 @@ _zip_win32_named_op_create_temp_output(zip_source_file_context_t *ctx) { char *tempname = NULL; size_t tempname_size = 0; if ((HANDLE)ctx->f != INVALID_HANDLE_VALUE && GetFileType((HANDLE)ctx->f) == FILE_TYPE_DISK) { si = DACL_SECURITY_INFORMATION | UNPROTECTED_DACL_SECURITY_INFORMATION; + #ifdef ACL_UNSUPPORTED + success = ERROR_NOT_SUPPORTED; + #else success = GetSecurityInfo((HANDLE)ctx->f, SE_FILE_OBJECT, si, NULL, NULL, &dacl, NULL, &psd); + #endif if (success == ERROR_SUCCESS) { sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle = FALSE; sa.lpSecurityDescriptor = psd; psa = &sa; @@ -208,12 +219,24 @@ _zip_win32_named_op_stat(zip_source_file_context_t *ctx, zip_source_file_stat_t st->exists = true; st->regular_file = false; if (file_attributes.dwFileAttributes != INVALID_FILE_ATTRIBUTES) { - if ((file_attributes.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE | FILE_ATTRIBUTE_REPARSE_POINT)) == 0) { - st->regular_file = true; + if ((file_attributes.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE)) == 0) { + if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) { +#ifdef IO_REPARSE_TAG_DEDUP // Not defined in WinSDK 7.1 or before (VS2010). + WIN32_FIND_DATA find_data; + /* Deduplication on Windows replaces files with reparse points; + * accept them as regular files. */ + if (file_ops->find_first_file(ctx->fname, &find_data) != INVALID_HANDLE_VALUE) { + st->regular_file = (find_data.dwReserved0 == IO_REPARSE_TAG_DEDUP); + } +#endif + } + else { + st->regular_file = true; + } } } if (!_zip_filetime_to_time_t(file_attributes.ftLastWriteTime, &st->mtime)) { zip_error_set(&ctx->error, ZIP_ER_READ, ERANGE); diff --git a/src/Common/libzip/zip_source_file_win32_utf16.c b/src/Common/libzip/zip_source_file_win32_utf16.c index 8f07d021..73e25666 100644 --- a/src/Common/libzip/zip_source_file_win32_utf16.c +++ b/src/Common/libzip/zip_source_file_win32_utf16.c @@ -1,8 +1,8 @@ /* zip_source_file_win32_utf16.c -- source for Windows file opened by UTF-16 name - Copyright (C) 1999-2020 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -32,30 +32,34 @@ */ #include "zip_source_file_win32.h" static char *utf16_allocate_tempname(const char *name, size_t extra_chars, size_t *lengthp); -static HANDLE __stdcall utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file); +static HANDLE __stdcall utf16_create_file(const void *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file); +static BOOL __stdcall utf16_delete_file(const void *name); +static DWORD __stdcall utf16_get_file_attributes(const void *name); +static BOOL __stdcall utf16_get_file_attributes_ex(const void *name, GET_FILEEX_INFO_LEVELS info_level, void *information); static void utf16_make_tempname(char *buf, size_t len, const char *name, zip_uint32_t i); +static BOOL __stdcall utf16_move_file(const void *from, const void *to, DWORD flags); +static BOOL __stdcall utf16_set_file_attributes(const void *name, DWORD attributes); static char *utf16_strdup(const char *string); +static HANDLE __stdcall utf16_find_first_file(const void *name, void* data); -/* clang-format off */ -DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN +/* clang-format off */ zip_win32_file_operations_t ops_utf16 = { utf16_allocate_tempname, utf16_create_file, - DeleteFileW, - GetFileAttributesW, - GetFileAttributesExW, + utf16_delete_file, + utf16_get_file_attributes, + utf16_get_file_attributes_ex, utf16_make_tempname, - MoveFileExW, - SetFileAttributesW, - utf16_strdup + utf16_move_file, + utf16_set_file_attributes, + utf16_strdup, + utf16_find_first_file }; - -DONT_WARN_INCOMPATIBLE_FN_PTR_END /* clang-format on */ ZIP_EXTERN zip_source_t * zip_source_win32w(zip_t *za, const wchar_t *fname, zip_uint64_t start, zip_int64_t len) { if (za == NULL) @@ -82,11 +86,11 @@ utf16_allocate_tempname(const char *name, size_t extra_chars, size_t *lengthp) { *lengthp = wcslen((const wchar_t *)name) + extra_chars; return (char *)malloc(*lengthp * sizeof(wchar_t)); } -static HANDLE __stdcall utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file) { +static HANDLE __stdcall utf16_create_file(const void *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file) { #ifdef MS_UWP CREATEFILE2_EXTENDED_PARAMETERS extParams = {0}; extParams.dwFileAttributes = file_attributes; extParams.dwFileFlags = FILE_FLAG_RANDOM_ACCESS; extParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; @@ -98,16 +102,51 @@ static HANDLE __stdcall utf16_create_file(const char *name, DWORD access, DWORD #else return CreateFileW((const wchar_t *)name, access, share_mode, security_attributes, creation_disposition, file_attributes, template_file); #endif } +static BOOL __stdcall +utf16_delete_file(const void *name) +{ + return DeleteFileW((const wchar_t *)name); +} + +static DWORD __stdcall +utf16_get_file_attributes(const void *name) +{ + return GetFileAttributesW((const wchar_t *)name); +} + +static BOOL __stdcall +utf16_get_file_attributes_ex(const void *name, GET_FILEEX_INFO_LEVELS info_level, void *information) +{ + return GetFileAttributesExW((const wchar_t *)name, info_level, information); +} static void utf16_make_tempname(char *buf, size_t len, const char *name, zip_uint32_t i) { _snwprintf_s((wchar_t *)buf, len, len, L"%s.%08x", (const wchar_t *)name, i); } +static BOOL __stdcall +utf16_move_file(const void *from, const void *to, DWORD flags) +{ + return MoveFileExW((const wchar_t *)from, (const wchar_t *)to, flags); +} + +static BOOL __stdcall +utf16_set_file_attributes(const void *name, DWORD attributes) +{ + return SetFileAttributesW((const wchar_t *)name, attributes); +} static char * utf16_strdup(const char *string) { return (char *)_wcsdup((const wchar_t *)string); } + + +static HANDLE __stdcall +utf16_find_first_file(const void *name, void* data) +{ + return FindFirstFileW((const wchar_t *)name, data); +} diff --git a/src/Common/libzip/zip_source_file_win32_utf8.c b/src/Common/libzip/zip_source_file_win32_utf8.c index d154f97a..5c27df92 100644 --- a/src/Common/libzip/zip_source_file_win32_utf8.c +++ b/src/Common/libzip/zip_source_file_win32_utf8.c @@ -1,8 +1,8 @@ /* zip_source_file_win32_ansi.c -- source for Windows file opened by UTF-8 name - Copyright (C) 1999-2020 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_free.c b/src/Common/libzip/zip_source_free.c index 1a800405..df4b08d8 100644 --- a/src/Common/libzip/zip_source_free.c +++ b/src/Common/libzip/zip_source_free.c @@ -1,8 +1,8 @@ /* zip_source_free.c -- free zip data source - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_get_dostime.c b/src/Common/libzip/zip_source_get_dostime.c new file mode 100644 index 00000000..17f652bb --- /dev/null +++ b/src/Common/libzip/zip_source_get_dostime.c @@ -0,0 +1,72 @@ +/* + zip_source_get_dostime.c -- get modification time in DOS format from source + Copyright (C) 2024 Dieter Baron and Thomas Klausner + + This file is part of libzip, a library to manipulate ZIP archives. + The authors can be contacted at <info@libzip.org> + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior + written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +#include "zipint.h" + +/* Returns -1 on error, 0 on no dostime available, 1 for dostime returned */ +int +zip_source_get_dos_time(zip_source_t *src, zip_dostime_t *dos_time) { + if (src->source_closed) { + return -1; + } + if (dos_time == NULL) { + zip_error_set(&src->error, ZIP_ER_INVAL, 0); + return -1; + } + + if (src->write_state == ZIP_SOURCE_WRITE_REMOVED) { + zip_error_set(&src->error, ZIP_ER_READ, ENOENT); + } + + if (zip_source_supports(src) & ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_GET_DOS_TIME)) { + zip_int64_t n = _zip_source_call(src, dos_time, sizeof(*dos_time), ZIP_SOURCE_GET_DOS_TIME); + + if (n < 0) { + return -1; + } + else if (n == 0) { + return 0; + } + else if (n == sizeof(*dos_time)) { + return 1; + } + else { + zip_error_set(&src->error, ZIP_ER_INTERNAL, 0); + return -1; + } + } + else { + return 0; + } +} diff --git a/src/Common/libzip/zip_source_get_file_attributes.c b/src/Common/libzip/zip_source_get_file_attributes.c index 4771dc16..209e39f5 100644 --- a/src/Common/libzip/zip_source_get_file_attributes.c +++ b/src/Common/libzip/zip_source_get_file_attributes.c @@ -1,8 +1,8 @@ /* zip_source_get_file_attributes.c -- get attributes for file from source - Copyright (C) 2020 Dieter Baron and Thomas Klausner + Copyright (C) 2020-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_is_deleted.c b/src/Common/libzip/zip_source_is_deleted.c index 838aa909..d6016a02 100644 --- a/src/Common/libzip/zip_source_is_deleted.c +++ b/src/Common/libzip/zip_source_is_deleted.c @@ -1,8 +1,8 @@ /* zip_source_is_deleted.c -- was archive was removed? - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_layered.c b/src/Common/libzip/zip_source_layered.c index 62b78e68..be428190 100644 --- a/src/Common/libzip/zip_source_layered.c +++ b/src/Common/libzip/zip_source_layered.c @@ -1,8 +1,8 @@ /* zip_source_layered.c -- create layered source - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_open.c b/src/Common/libzip/zip_source_open.c index b34fa2c6..9e42d0a9 100644 --- a/src/Common/libzip/zip_source_open.c +++ b/src/Common/libzip/zip_source_open.c @@ -1,8 +1,8 @@ /* zip_source_open.c -- open zip_source (prepare for reading) - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_pass_to_lower_layer.c b/src/Common/libzip/zip_source_pass_to_lower_layer.c index 4a98222e..391729e4 100644 --- a/src/Common/libzip/zip_source_pass_to_lower_layer.c +++ b/src/Common/libzip/zip_source_pass_to_lower_layer.c @@ -1,8 +1,8 @@ /* zip_source_pass_to_lower_layer.c -- pass command to lower layer - Copyright (C) 2022 Dieter Baron and Thomas Klausner + Copyright (C) 2022-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -45,16 +45,16 @@ zip_int64_t zip_source_pass_to_lower_layer(zip_source_t *src, void *data, zip_ui case ZIP_SOURCE_STAT: return sizeof(zip_stat_t); case ZIP_SOURCE_ACCEPT_EMPTY: case ZIP_SOURCE_ERROR: + case ZIP_SOURCE_GET_DOS_TIME: case ZIP_SOURCE_READ: case ZIP_SOURCE_SEEK: case ZIP_SOURCE_TELL: return _zip_source_call(src, data, length, command); - case ZIP_SOURCE_BEGIN_WRITE: case ZIP_SOURCE_BEGIN_WRITE_CLONING: case ZIP_SOURCE_COMMIT_WRITE: case ZIP_SOURCE_REMOVE: case ZIP_SOURCE_ROLLBACK_WRITE: diff --git a/src/Common/libzip/zip_source_pkware_decode.c b/src/Common/libzip/zip_source_pkware_decode.c index b4c482b3..9c22a069 100644 --- a/src/Common/libzip/zip_source_pkware_decode.c +++ b/src/Common/libzip/zip_source_pkware_decode.c @@ -1,8 +1,8 @@ /* zip_source_pkware_decode.c -- Traditional PKWARE decryption routines - Copyright (C) 2009-2020 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -78,13 +78,13 @@ zip_source_pkware_decode(zip_t *za, zip_source_t *src, zip_uint16_t em, int flag static int decrypt_header(zip_source_t *src, struct trad_pkware *ctx) { zip_uint8_t header[ZIP_CRYPTO_PKWARE_HEADERLEN]; - struct zip_stat st; + zip_stat_t st; + zip_dostime_t dostime; zip_int64_t n; - bool ok = false; if ((n = zip_source_read(src, header, ZIP_CRYPTO_PKWARE_HEADERLEN)) < 0) { zip_error_set_from_source(&ctx->error, src); return -1; } @@ -94,40 +94,39 @@ decrypt_header(zip_source_t *src, struct trad_pkware *ctx) { return -1; } _zip_pkware_decrypt(&ctx->keys, header, header, ZIP_CRYPTO_PKWARE_HEADERLEN); - if (zip_source_stat(src, &st)) { - /* stat failed, skip password validation */ + if (zip_source_stat(src, &st) < 0 || (st.valid & ZIP_STAT_CRC) == 0) { + /* skip password validation */ return 0; } - /* password verification - two ways: - * mtime - InfoZIP way, to avoid computing complete CRC before encrypting data - * CRC - old PKWare way - */ - - if (st.valid & ZIP_STAT_MTIME) { - unsigned short dostime, dosdate; - _zip_u2d_time(st.mtime, &dostime, &dosdate); - if (header[ZIP_CRYPTO_PKWARE_HEADERLEN - 1] == dostime >> 8) { - ok = true; + if (zip_source_get_dos_time(src, &dostime) <= 0) { + if ((st.valid & ZIP_STAT_MTIME) == 0) { + /* no date available, skip password validation */ + return 0; } - } - if (st.valid & ZIP_STAT_CRC) { - if (header[ZIP_CRYPTO_PKWARE_HEADERLEN - 1] == st.crc >> 24) { - ok = true; + if (_zip_u2d_time(st.mtime, &dostime, &ctx->error) < 0) { + return -1; } } - if (!ok && ((st.valid & (ZIP_STAT_MTIME | ZIP_STAT_CRC)) != 0)) { + /* + password verification - two ways: + - mtime - InfoZIP way, to avoid computing complete CRC before encrypting data + - CRC - old PKWare way + */ + if (header[ZIP_CRYPTO_PKWARE_HEADERLEN - 1] == dostime.time >> 8 + || header[ZIP_CRYPTO_PKWARE_HEADERLEN - 1] == st.crc >> 24) { + return 0; + } + else { zip_error_set(&ctx->error, ZIP_ER_WRONGPASSWD, 0); return -1; } - - return 0; } static zip_int64_t pkware_decrypt(zip_source_t *src, void *ud, void *data, zip_uint64_t len, zip_source_cmd_t cmd) { diff --git a/src/Common/libzip/zip_source_pkware_encode.c b/src/Common/libzip/zip_source_pkware_encode.c index d89b9f4e..fed76115 100644 --- a/src/Common/libzip/zip_source_pkware_encode.c +++ b/src/Common/libzip/zip_source_pkware_encode.c @@ -1,8 +1,8 @@ /* zip_source_pkware_encode.c -- Traditional PKWARE encryption routines - Copyright (C) 2009-2020 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -40,21 +40,19 @@ struct trad_pkware { char *password; zip_pkware_keys_t keys; zip_buffer_t *buffer; bool eof; - bool mtime_set; - time_t mtime; + zip_dostime_t dostime; zip_error_t error; }; static int encrypt_header(zip_source_t *, struct trad_pkware *); static zip_int64_t pkware_encrypt(zip_source_t *, void *, void *, zip_uint64_t, zip_source_cmd_t); static void trad_pkware_free(struct trad_pkware *); static struct trad_pkware *trad_pkware_new(const char *password, zip_error_t *error); -static void set_mtime(struct trad_pkware* ctx, zip_stat_t* st); zip_source_t * zip_source_pkware_encode(zip_t *za, zip_source_t *src, zip_uint16_t em, int flags, const char *password) { struct trad_pkware *ctx; zip_source_t *s2; @@ -67,13 +65,28 @@ zip_source_pkware_encode(zip_t *za, zip_source_t *src, zip_uint16_t em, int flag zip_error_set(&za->error, ZIP_ER_ENCRNOTSUPP, 0); return NULL; } if ((ctx = trad_pkware_new(password, &za->error)) == NULL) { + zip_error_set(&za->error, ZIP_ER_MEMORY, 0); return NULL; } + if (zip_source_get_dos_time(src, &ctx->dostime) <= 0) { + zip_stat_t st; + + if (zip_source_stat(src, &st) < 0) { + zip_error_set_from_source(&za->error, src); + trad_pkware_free(ctx); + return NULL; + } + if (_zip_u2d_time((st.valid & ZIP_STAT_MTIME) ? st.mtime : time(NULL), &ctx->dostime, &za->error) < 0) { + trad_pkware_free(ctx); + return NULL; + } + } + if ((s2 = zip_source_layered(za, src, pkware_encrypt, ctx)) == NULL) { trad_pkware_free(ctx); return NULL; } @@ -81,24 +94,12 @@ zip_source_pkware_encode(zip_t *za, zip_source_t *src, zip_uint16_t em, int flag } static int encrypt_header(zip_source_t *src, struct trad_pkware *ctx) { - unsigned short dostime, dosdate; zip_uint8_t *header; - if (!ctx->mtime_set) { - struct zip_stat st; - if (zip_source_stat(src, &st) != 0) { - zip_error_set_from_source(&ctx->error, src); - return -1; - } - set_mtime(ctx, &st); - } - - _zip_u2d_time(ctx->mtime, &dostime, &dosdate); - if ((ctx->buffer = _zip_buffer_new(NULL, ZIP_CRYPTO_PKWARE_HEADERLEN)) == NULL) { zip_error_set(&ctx->error, ZIP_ER_MEMORY, 0); return -1; } @@ -110,11 +111,11 @@ encrypt_header(zip_source_t *src, struct trad_pkware *ctx) { zip_error_set(&ctx->error, ZIP_ER_INTERNAL, 0); _zip_buffer_free(ctx->buffer); ctx->buffer = NULL; return -1; } - header[ZIP_CRYPTO_PKWARE_HEADERLEN - 1] = (zip_uint8_t)((dostime >> 8) & 0xff); + header[ZIP_CRYPTO_PKWARE_HEADERLEN - 1] = (zip_uint8_t)((ctx->dostime.time >> 8) & 0xff); _zip_pkware_encrypt(&ctx->keys, header, header, ZIP_CRYPTO_PKWARE_HEADERLEN); return 0; } @@ -185,13 +186,10 @@ pkware_encrypt(zip_source_t *src, void *ud, void *data, zip_uint64_t length, zip st->encryption_method = ZIP_EM_TRAD_PKWARE; st->valid |= ZIP_STAT_ENCRYPTION_METHOD; if (st->valid & ZIP_STAT_COMP_SIZE) { st->comp_size += ZIP_CRYPTO_PKWARE_HEADERLEN; } - set_mtime(ctx, st); - st->mtime = ctx->mtime; - st->valid |= ZIP_STAT_MTIME; return 0; } case ZIP_SOURCE_GET_FILE_ATTRIBUTES: { @@ -204,12 +202,20 @@ pkware_encrypt(zip_source_t *src, void *ud, void *data, zip_uint64_t length, zip attributes->version_needed = 20; return 0; } + case ZIP_SOURCE_GET_DOS_TIME: + if (length < sizeof(ctx->dostime)) { + zip_error_set(&ctx->error, ZIP_ER_INVAL, 0); + return -1; + } + (void)memcpy_s(data, sizeof(ctx->dostime), &ctx->dostime, sizeof(ctx->dostime)); + return sizeof(ctx->dostime); + case ZIP_SOURCE_SUPPORTS: - return zip_source_make_command_bitmap(ZIP_SOURCE_OPEN, ZIP_SOURCE_READ, ZIP_SOURCE_CLOSE, ZIP_SOURCE_STAT, ZIP_SOURCE_ERROR, ZIP_SOURCE_FREE, ZIP_SOURCE_GET_FILE_ATTRIBUTES, -1); + return zip_source_make_command_bitmap(ZIP_SOURCE_OPEN, ZIP_SOURCE_READ, ZIP_SOURCE_CLOSE, ZIP_SOURCE_STAT, ZIP_SOURCE_ERROR, ZIP_SOURCE_FREE, ZIP_SOURCE_GET_FILE_ATTRIBUTES, ZIP_SOURCE_GET_DOS_TIME, -1); case ZIP_SOURCE_ERROR: return zip_error_to_data(&ctx->error, data, length); case ZIP_SOURCE_FREE: @@ -235,12 +241,10 @@ trad_pkware_new(const char *password, zip_error_t *error) { zip_error_set(error, ZIP_ER_MEMORY, 0); free(ctx); return NULL; } ctx->buffer = NULL; - ctx->mtime_set = false; - ctx->mtime = 0; zip_error_init(&ctx->error); return ctx; } @@ -254,18 +258,5 @@ trad_pkware_free(struct trad_pkware *ctx) { free(ctx->password); _zip_buffer_free(ctx->buffer); zip_error_fini(&ctx->error); free(ctx); } - - -static void set_mtime(struct trad_pkware* ctx, zip_stat_t* st) { - if (!ctx->mtime_set) { - if (st->valid & ZIP_STAT_MTIME) { - ctx->mtime = st->mtime; - } - else { - time(&ctx->mtime); - } - ctx->mtime_set = true; - } -} diff --git a/src/Common/libzip/zip_source_read.c b/src/Common/libzip/zip_source_read.c index 0938fcb0..910d4c3e 100644 --- a/src/Common/libzip/zip_source_read.c +++ b/src/Common/libzip/zip_source_read.c @@ -1,8 +1,8 @@ /* zip_source_read.c -- read data from zip_source - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_remove.c b/src/Common/libzip/zip_source_remove.c index c1d73ab9..06325b72 100644 --- a/src/Common/libzip/zip_source_remove.c +++ b/src/Common/libzip/zip_source_remove.c @@ -1,8 +1,8 @@ /* zip_source_remove.c -- remove empty archive - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_rollback_write.c b/src/Common/libzip/zip_source_rollback_write.c index ea1a1510..51613252 100644 --- a/src/Common/libzip/zip_source_rollback_write.c +++ b/src/Common/libzip/zip_source_rollback_write.c @@ -1,8 +1,8 @@ /* zip_source_rollback_write.c -- discard changes - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_seek.c b/src/Common/libzip/zip_source_seek.c index e3baad5a..42d6b0d2 100644 --- a/src/Common/libzip/zip_source_seek.c +++ b/src/Common/libzip/zip_source_seek.c @@ -1,8 +1,8 @@ /* zip_source_seek.c -- seek to offset - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_seek_write.c b/src/Common/libzip/zip_source_seek_write.c index 34ae2f5a..9e87fa4d 100644 --- a/src/Common/libzip/zip_source_seek_write.c +++ b/src/Common/libzip/zip_source_seek_write.c @@ -1,8 +1,8 @@ /* zip_source_seek_write.c -- seek to offset for writing - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_stat.c b/src/Common/libzip/zip_source_stat.c index 05dcb84d..7c8bacac 100644 --- a/src/Common/libzip/zip_source_stat.c +++ b/src/Common/libzip/zip_source_stat.c @@ -1,8 +1,8 @@ /* zip_source_stat.c -- get meta information from zip_source - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_supports.c b/src/Common/libzip/zip_source_supports.c index 8fea2ae9..e30ee757 100644 --- a/src/Common/libzip/zip_source_supports.c +++ b/src/Common/libzip/zip_source_supports.c @@ -1,8 +1,8 @@ /* zip_source_supports.c -- check for supported functions - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_tell.c b/src/Common/libzip/zip_source_tell.c index 49057ce5..33ec475e 100644 --- a/src/Common/libzip/zip_source_tell.c +++ b/src/Common/libzip/zip_source_tell.c @@ -1,8 +1,8 @@ /* zip_source_tell.c -- report current offset - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_tell_write.c b/src/Common/libzip/zip_source_tell_write.c index a5b0e531..6912af9e 100644 --- a/src/Common/libzip/zip_source_tell_write.c +++ b/src/Common/libzip/zip_source_tell_write.c @@ -1,8 +1,8 @@ /* zip_source_tell_write.c -- report current offset for writing - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_window.c b/src/Common/libzip/zip_source_window.c index 524e27c8..eac27c39 100644 --- a/src/Common/libzip/zip_source_window.c +++ b/src/Common/libzip/zip_source_window.c @@ -1,8 +1,8 @@ /* zip_source_window.c -- return part of lower source - Copyright (C) 2012-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2012-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -49,26 +49,28 @@ struct window { zip_uint64_t offset; /* offset in src for next read */ zip_stat_t stat; zip_uint64_t stat_invalid; zip_file_attributes_t attributes; + zip_dostime_t dostime; + bool dostime_valid; zip_error_t error; zip_int64_t supports; bool needs_seek; }; static zip_int64_t window_read(zip_source_t *, void *, void *, zip_uint64_t, zip_source_cmd_t); ZIP_EXTERN zip_source_t * zip_source_window_create(zip_source_t *src, zip_uint64_t start, zip_int64_t len, zip_error_t *error) { - return _zip_source_window_new(src, start, len, NULL, 0, NULL, NULL, 0, false, error); + return _zip_source_window_new(src, start, len, NULL, 0, NULL, NULL, NULL, 0, false, error); } zip_source_t * -_zip_source_window_new(zip_source_t *src, zip_uint64_t start, zip_int64_t length, zip_stat_t *st, zip_uint64_t st_invalid, zip_file_attributes_t *attributes, zip_t *source_archive, zip_uint64_t source_index, bool take_ownership, zip_error_t *error) { +_zip_source_window_new(zip_source_t *src, zip_uint64_t start, zip_int64_t length, zip_stat_t *st, zip_uint64_t st_invalid, zip_file_attributes_t *attributes, zip_dostime_t *dostime, zip_t *source_archive, zip_uint64_t source_index, bool take_ownership, zip_error_t *error) { zip_source_t* window_source; struct window *ctx; if (src == NULL || length < -1 || (source_archive == NULL && source_index != 0)) { zip_error_set(error, ZIP_ER_INVAL, 0); @@ -101,14 +103,21 @@ _zip_source_window_new(zip_source_t *src, zip_uint64_t start, zip_int64_t length (void)memcpy_s(&ctx->attributes, sizeof(ctx->attributes), attributes, sizeof(ctx->attributes)); } else { zip_file_attributes_init(&ctx->attributes); } + if (dostime != NULL) { + ctx->dostime = *dostime; + ctx->dostime_valid = true; + } + else { + ctx->dostime_valid = false; + } ctx->source_archive = source_archive; ctx->source_index = source_index; zip_error_init(&ctx->error); - ctx->supports = (zip_source_supports(src) & (ZIP_SOURCE_SUPPORTS_SEEKABLE | ZIP_SOURCE_SUPPORTS_REOPEN)) | (zip_source_make_command_bitmap(ZIP_SOURCE_GET_FILE_ATTRIBUTES, ZIP_SOURCE_SUPPORTS, ZIP_SOURCE_TELL, ZIP_SOURCE_FREE, -1)); + ctx->supports = (zip_source_supports(src) & (ZIP_SOURCE_SUPPORTS_SEEKABLE | ZIP_SOURCE_SUPPORTS_REOPEN)) | (zip_source_make_command_bitmap(ZIP_SOURCE_GET_FILE_ATTRIBUTES, ZIP_SOURCE_GET_DOS_TIME, ZIP_SOURCE_SUPPORTS, ZIP_SOURCE_TELL, ZIP_SOURCE_FREE, -1)); ctx->needs_seek = (ctx->supports & ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_SEEK)) ? true : false; if (st) { if (_zip_stat_merge(&ctx->stat, st, error) < 0) { free(ctx); @@ -307,10 +316,23 @@ window_read(zip_source_t *src, void *_ctx, void *data, zip_uint64_t len, zip_sou } (void)memcpy_s(data, sizeof(ctx->attributes), &ctx->attributes, sizeof(ctx->attributes)); return sizeof(ctx->attributes); + case ZIP_SOURCE_GET_DOS_TIME: + if (len < sizeof(ctx->dostime)) { + zip_error_set(&ctx->error, ZIP_ER_INVAL, 0); + return -1; + } + if (ctx->dostime_valid) { + (void)memcpy_s(data, sizeof(ctx->dostime), &ctx->dostime, sizeof(ctx->dostime)); + return sizeof(ctx->dostime); + } + else { + return 0; + } + case ZIP_SOURCE_SUPPORTS: return ctx->supports; case ZIP_SOURCE_TELL: return (zip_int64_t)(ctx->offset - ctx->start); diff --git a/src/Common/libzip/zip_source_winzip_aes_decode.c b/src/Common/libzip/zip_source_winzip_aes_decode.c index ee53fb41..8830a005 100644 --- a/src/Common/libzip/zip_source_winzip_aes_decode.c +++ b/src/Common/libzip/zip_source_winzip_aes_decode.c @@ -1,8 +1,8 @@ /* zip_source_winzip_aes_decode.c -- Winzip AES decryption routines - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_winzip_aes_encode.c b/src/Common/libzip/zip_source_winzip_aes_encode.c index 87e2865a..c704b123 100644 --- a/src/Common/libzip/zip_source_winzip_aes_encode.c +++ b/src/Common/libzip/zip_source_winzip_aes_encode.c @@ -1,8 +1,8 @@ /* zip_source_winzip_aes_encode.c -- Winzip AES encryption routines - Copyright (C) 2009-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_write.c b/src/Common/libzip/zip_source_write.c index 24dde9b2..20ca361c 100644 --- a/src/Common/libzip/zip_source_write.c +++ b/src/Common/libzip/zip_source_write.c @@ -1,8 +1,8 @@ /* zip_source_write.c -- start a new file for writing - Copyright (C) 2014-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2014-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_zip.c b/src/Common/libzip/zip_source_zip.c index faabf0d2..07819865 100644 --- a/src/Common/libzip/zip_source_zip.c +++ b/src/Common/libzip/zip_source_zip.c @@ -1,8 +1,8 @@ /* zip_source_zip.c -- create data source from zip file - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_source_zip_new.c b/src/Common/libzip/zip_source_zip_new.c index ecccdd68..3eb8a4c2 100644 --- a/src/Common/libzip/zip_source_zip_new.c +++ b/src/Common/libzip/zip_source_zip_new.c @@ -1,8 +1,8 @@ /* zip_source_zip_new.c -- prepare data structures for zip_fopen/zip_source_zip - Copyright (C) 2012-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2012-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -198,11 +198,11 @@ ZIP_EXTERN zip_source_t *zip_source_zip_file_create(zip_t *srcza, zip_uint64_t s if (st.valid & ZIP_STAT_MTIME) { st2.mtime = st.mtime; st2.valid |= ZIP_STAT_MTIME; } - if ((src = _zip_source_window_new(src, start, data_len, &st2, ZIP_STAT_NAME, &attributes, source_archive, source_index, take_ownership, error)) == NULL) { + if ((src = _zip_source_window_new(src, start, data_len, &st2, ZIP_STAT_NAME, &attributes, &de->last_mod, source_archive, source_index, take_ownership, error)) == NULL) { return NULL; } } /* here we restrict src to file data, so no point in doing it for source that already represents only the file data */ @@ -217,11 +217,11 @@ ZIP_EXTERN zip_source_t *zip_source_zip_file_create(zip_t *srcza, zip_uint64_t s /* despite the fact that we want the whole data file, we still wrap the source into a window source to add st and attributes and to have a source that positions the read offset properly before each read for multiple zip_file_t referring to the same underlying source */ - if ((src = _zip_source_window_new(srcza->src, 0, (zip_int64_t)st.comp_size, &st, ZIP_STAT_NAME, &attributes, srcza, srcidx, take_ownership, error)) == NULL) { + if ((src = _zip_source_window_new(srcza->src, 0, (zip_int64_t)st.comp_size, &st, ZIP_STAT_NAME, &attributes, &de->last_mod, srcza, srcidx, take_ownership, error)) == NULL) { return NULL; } } else { /* this branch gets executed when reading the whole changed @@ -233,11 +233,11 @@ ZIP_EXTERN zip_source_t *zip_source_zip_file_create(zip_t *srcza, zip_uint64_t s /* despite the fact that we want the whole data file, we still wrap the source into a window source to add st and attributes and to have a source that positions the read offset properly before each read for multiple zip_file_t referring to the same underlying source */ - if ((src = _zip_source_window_new(src, 0, data_len, &st, ZIP_STAT_NAME, &attributes, NULL, 0, take_ownership, error)) == NULL) { + if ((src = _zip_source_window_new(src, 0, data_len, &st, ZIP_STAT_NAME, &attributes, &de->last_mod, NULL, 0, take_ownership, error)) == NULL) { return NULL; } } /* In all cases, src is a window source and therefore is owned by this function. */ @@ -251,10 +251,11 @@ ZIP_EXTERN zip_source_t *zip_source_zip_file_create(zip_t *srcza, zip_uint64_t s if (needs_decrypt) { zip_encryption_implementation enc_impl; if ((enc_impl = _zip_get_encryption_implementation(st.encryption_method, ZIP_CODEC_DECODE)) == NULL) { + zip_source_free(src); zip_error_set(error, ZIP_ER_ENCRNOTSUPP, 0); return NULL; } s2 = enc_impl(srcza, src, st.encryption_method, 0, password); @@ -287,11 +288,11 @@ ZIP_EXTERN zip_source_t *zip_source_zip_file_create(zip_t *srcza, zip_uint64_t s zip_stat_init(&st2); if (data_len >= 0) { st2.valid = ZIP_STAT_SIZE; st2.size = (zip_uint64_t)data_len; } - s2 = _zip_source_window_new(src, start, data_len, &st2, ZIP_STAT_NAME, NULL, NULL, 0, true, error); + s2 = _zip_source_window_new(src, start, data_len, &st2, ZIP_STAT_NAME, NULL, NULL, NULL, 0, true, error); if (s2 == NULL) { zip_source_free(src); return NULL; } src = s2; diff --git a/src/Common/libzip/zip_stat.c b/src/Common/libzip/zip_stat.c index 51d8026d..74fc5c37 100644 --- a/src/Common/libzip/zip_stat.c +++ b/src/Common/libzip/zip_stat.c @@ -1,8 +1,8 @@ /* zip_stat.c -- get information about file by name - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_stat_index.c b/src/Common/libzip/zip_stat_index.c index da33c09e..af9f0e5f 100644 --- a/src/Common/libzip/zip_stat_index.c +++ b/src/Common/libzip/zip_stat_index.c @@ -1,8 +1,8 @@ /* zip_stat_index.c -- get information about file by index - Copyright (C) 1999-2020 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -75,32 +75,36 @@ zip_stat_index(zip_t *za, zip_uint64_t index, zip_flags_t flags, zip_stat_t *st) st->valid |= ZIP_STAT_COMP_SIZE; st->comp_size = st->size; } if (entry->changes != NULL && entry->changes->changed & ZIP_DIRENT_LAST_MOD) { - st->mtime = de->last_mod; + st->mtime = zip_dirent_get_last_mod_mtime(de); st->valid |= ZIP_STAT_MTIME; } } else { zip_stat_init(st); st->crc = de->crc; st->size = de->uncomp_size; - st->mtime = de->last_mod; + st->mtime = zip_dirent_get_last_mod_mtime(de); st->comp_size = de->comp_size; st->comp_method = (zip_uint16_t)de->comp_method; st->encryption_method = de->encryption_method; st->valid = (de->crc_valid ? ZIP_STAT_CRC : 0) | ZIP_STAT_SIZE | ZIP_STAT_MTIME | ZIP_STAT_COMP_SIZE | ZIP_STAT_COMP_METHOD | ZIP_STAT_ENCRYPTION_METHOD; if (entry->changes != NULL && entry->changes->changed & ZIP_DIRENT_COMP_METHOD) { st->valid &= ~ZIP_STAT_COMP_SIZE; } } if ((za->ch_flags & ZIP_AFL_WANT_TORRENTZIP) && (flags & ZIP_FL_UNCHANGED) == 0) { + if (za->torrent_mtime == 0) { + zip_dostime_t dostime = {0xbc00, 0x2198}; + za->torrent_mtime = _zip_d2u_time(&dostime); + } st->comp_method = ZIP_CM_DEFLATE; - st->mtime = _zip_d2u_time(0xbc00, 0x2198); + st->mtime = za->torrent_mtime; st->valid |= ZIP_STAT_MTIME | ZIP_STAT_COMP_METHOD; st->valid &= ~ZIP_STAT_COMP_SIZE; } st->index = index; diff --git a/src/Common/libzip/zip_stat_init.c b/src/Common/libzip/zip_stat_init.c index 9c6088a7..bd83565b 100644 --- a/src/Common/libzip/zip_stat_init.c +++ b/src/Common/libzip/zip_stat_init.c @@ -1,8 +1,8 @@ /* zip_stat_init.c -- initialize struct zip_stat. - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_strerror.c b/src/Common/libzip/zip_strerror.c index 7d827931..681024a3 100644 --- a/src/Common/libzip/zip_strerror.c +++ b/src/Common/libzip/zip_strerror.c @@ -1,8 +1,8 @@ /* zip_sterror.c -- get string representation of zip error - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_string.c b/src/Common/libzip/zip_string.c index 1c964491..bb06c1d6 100644 --- a/src/Common/libzip/zip_string.c +++ b/src/Common/libzip/zip_string.c @@ -1,8 +1,8 @@ /* zip_string.c -- string handling (with encoding) - Copyright (C) 2012-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2012-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -86,12 +86,14 @@ _zip_string_get(zip_string_t *string, zip_uint32_t *lenp, zip_flags_t flags, zip return empty; } if ((flags & ZIP_FL_ENC_RAW) == 0) { /* start guessing */ - if (string->encoding == ZIP_ENCODING_UNKNOWN) - _zip_guess_encoding(string, ZIP_ENCODING_UNKNOWN); + if (string->encoding == ZIP_ENCODING_UNKNOWN) { + /* guess encoding, sets string->encoding */ + (void)_zip_guess_encoding(string, ZIP_ENCODING_UNKNOWN); + } if (((flags & ZIP_FL_ENC_STRICT) && string->encoding != ZIP_ENCODING_ASCII && string->encoding != ZIP_ENCODING_UTF8_KNOWN) || (string->encoding == ZIP_ENCODING_CP437)) { if (string->converted == NULL) { if ((string->converted = _zip_cp437_to_utf8(string->raw, string->length, &string->converted_length, error)) == NULL) return NULL; @@ -105,10 +107,24 @@ _zip_string_get(zip_string_t *string, zip_uint32_t *lenp, zip_flags_t flags, zip if (lenp) *lenp = string->length; return string->raw; } +bool _zip_string_is_ascii(const zip_string_t *string) { + if (string->encoding != ZIP_ENCODING_ASCII) { + zip_uint16_t i; + + for (i = 0; i < string->length; i++) { + if (string->raw[i] & 0x80) { + return false; + } + } + } + + return true; +} + zip_uint16_t _zip_string_length(const zip_string_t *s) { if (s == NULL) return 0; diff --git a/src/Common/libzip/zip_unchange_all.c b/src/Common/libzip/zip_unchange_all.c index 34f3702e..0b22c803 100644 --- a/src/Common/libzip/zip_unchange_all.c +++ b/src/Common/libzip/zip_unchange_all.c @@ -1,8 +1,8 @@ /* zip_unchange.c -- undo changes to all files in zip archive - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_unchange_archive.c b/src/Common/libzip/zip_unchange_archive.c index 56a8e31f..ddd617bc 100644 --- a/src/Common/libzip/zip_unchange_archive.c +++ b/src/Common/libzip/zip_unchange_archive.c @@ -1,8 +1,8 @@ /* zip_unchange_archive.c -- undo global changes to ZIP archive - Copyright (C) 2006-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2006-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_unchange_data.c b/src/Common/libzip/zip_unchange_data.c index 6bdecd18..30a7be7b 100644 --- a/src/Common/libzip/zip_unchange_data.c +++ b/src/Common/libzip/zip_unchange_data.c @@ -1,8 +1,8 @@ /* zip_unchange_data.c -- undo helper function - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zip_utf-8.c b/src/Common/libzip/zip_utf-8.c index 678912f6..7d671f60 100644 --- a/src/Common/libzip/zip_utf-8.c +++ b/src/Common/libzip/zip_utf-8.c @@ -1,8 +1,8 @@ /* zip_utf-8.c -- UTF-8 support functions for libzip - Copyright (C) 2011-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2011-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -99,74 +99,128 @@ static const zip_uint16_t _cp437_to_unicode[256] = { zip_encoding_type_t _zip_guess_encoding(zip_string_t *str, zip_encoding_type_t expected_encoding) { zip_encoding_type_t enc; const zip_uint8_t *name; zip_uint32_t i, j, ulen; + bool can_be_ascii = true; + bool can_be_utf8 = true; + bool has_control_characters = false; - if (str == NULL) + if (str == NULL) { return ZIP_ENCODING_ASCII; + } name = str->raw; - if (str->encoding != ZIP_ENCODING_UNKNOWN) - enc = str->encoding; - else { - enc = ZIP_ENCODING_ASCII; - for (i = 0; i < str->length; i++) { - if ((name[i] > 31 && name[i] < 128) || name[i] == '\r' || name[i] == '\n' || name[i] == '\t') - continue; - - enc = ZIP_ENCODING_UTF8_GUESSED; - if ((name[i] & UTF_8_LEN_2_MASK) == UTF_8_LEN_2_MATCH) - ulen = 1; - else if ((name[i] & UTF_8_LEN_3_MASK) == UTF_8_LEN_3_MATCH) - ulen = 2; - else if ((name[i] & UTF_8_LEN_4_MASK) == UTF_8_LEN_4_MATCH) - ulen = 3; - else { - enc = ZIP_ENCODING_CP437; - break; - } + if (str->encoding != ZIP_ENCODING_UNKNOWN) { + return str->encoding; + } - if (i + ulen >= str->length) { - enc = ZIP_ENCODING_CP437; - break; + for (i = 0; i < str->length; i++) { + if (name[i] < 128) { + if (name[i] < 32 && name[i] != '\r' && name[i] != '\n' && name[i] != '\t') { + has_control_characters = true; } + continue; + } + + can_be_ascii = false; + if ((name[i] & UTF_8_LEN_2_MASK) == UTF_8_LEN_2_MATCH) { + ulen = 1; + } + else if ((name[i] & UTF_8_LEN_3_MASK) == UTF_8_LEN_3_MATCH) { + ulen = 2; + } + else if ((name[i] & UTF_8_LEN_4_MASK) == UTF_8_LEN_4_MATCH) { + ulen = 3; + } + else { + can_be_utf8 = false; + break; + } - for (j = 1; j <= ulen; j++) { - if ((name[i + j] & UTF_8_CONTINUE_MASK) != UTF_8_CONTINUE_MATCH) { - enc = ZIP_ENCODING_CP437; - goto done; - } + if (i + ulen >= str->length) { + can_be_utf8 = false; + break; + } + + for (j = 1; j <= ulen; j++) { + if ((name[i + j] & UTF_8_CONTINUE_MASK) != UTF_8_CONTINUE_MATCH) { + can_be_utf8 = false; + goto done; } - i += ulen; } + i += ulen; } -done: - str->encoding = enc; + done: + enc = ZIP_ENCODING_CP437; + + switch (expected_encoding) { + case ZIP_ENCODING_UTF8_KNOWN: + case ZIP_ENCODING_UTF8_GUESSED: + if (can_be_utf8) { + enc = ZIP_ENCODING_UTF8_KNOWN; + } + else { + enc = ZIP_ENCODING_ERROR; + } + break; - if (expected_encoding != ZIP_ENCODING_UNKNOWN) { - if (expected_encoding == ZIP_ENCODING_UTF8_KNOWN && enc == ZIP_ENCODING_UTF8_GUESSED) - str->encoding = enc = ZIP_ENCODING_UTF8_KNOWN; + case ZIP_ENCODING_ASCII: + if (can_be_ascii && !has_control_characters) { + enc = ZIP_ENCODING_ASCII; + } + else { + enc = ZIP_ENCODING_ERROR; + } + break; - if (expected_encoding != enc && enc != ZIP_ENCODING_ASCII) - return ZIP_ENCODING_ERROR; + case ZIP_ENCODING_CP437: + enc = ZIP_ENCODING_CP437; + break; + + case ZIP_ENCODING_UNKNOWN: + if (can_be_ascii && !has_control_characters) { + /* only bytes from 0x20-0x7F */ + enc = ZIP_ENCODING_ASCII; + } + else if (can_be_ascii && has_control_characters) { + /* only bytes from 0x00-0x7F */ + enc = ZIP_ENCODING_CP437; + } + else if (can_be_utf8) { + /* contains bytes from 0x80-0xFF and is valid UTF-8 */ + enc = ZIP_ENCODING_UTF8_GUESSED; + } + else { + /* fallback */ + enc = ZIP_ENCODING_CP437; + } + break; + case ZIP_ENCODING_ERROR: + /* invalid, shouldn't happen */ + enc = ZIP_ENCODING_ERROR; + break; } + str->encoding = enc; return enc; } static zip_uint32_t _zip_unicode_to_utf8_len(zip_uint32_t codepoint) { - if (codepoint < 0x0080) + if (codepoint < 0x0080) { return 1; - if (codepoint < 0x0800) + } + if (codepoint < 0x0800) { return 2; - if (codepoint < 0x10000) + } + if (codepoint < 0x10000) { return 3; + } return 4; } static zip_uint32_t @@ -199,28 +253,32 @@ _zip_cp437_to_utf8(const zip_uint8_t *const _cp437buf, zip_uint32_t len, zip_uin zip_uint8_t *cp437buf = (zip_uint8_t *)_cp437buf; zip_uint8_t *utf8buf; zip_uint32_t buflen, i, offset; if (len == 0) { - if (utf8_lenp) + if (utf8_lenp) { *utf8_lenp = 0; + } return NULL; } buflen = 1; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { buflen += _zip_unicode_to_utf8_len(_cp437_to_unicode[cp437buf[i]]); + } if ((utf8buf = (zip_uint8_t *)malloc(buflen)) == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); return NULL; } offset = 0; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { offset += _zip_unicode_to_utf8(_cp437_to_unicode[cp437buf[i]], utf8buf + offset); + } utf8buf[buflen - 1] = 0; - if (utf8_lenp) + if (utf8_lenp) { *utf8_lenp = buflen - 1; + } return utf8buf; } diff --git a/src/Common/libzip/zip_winzip_aes.c b/src/Common/libzip/zip_winzip_aes.c index ce269036..2c9874b0 100644 --- a/src/Common/libzip/zip_winzip_aes.c +++ b/src/Common/libzip/zip_winzip_aes.c @@ -1,8 +1,8 @@ /* zip_winzip_aes.c -- Winzip AES de/encryption backend routines - Copyright (C) 2017-2021 Dieter Baron and Thomas Klausner + Copyright (C) 2017-2022 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without diff --git a/src/Common/libzip/zipconf.h b/src/Common/libzip/zipconf.h index 472e06c1..28954780 100644 --- a/src/Common/libzip/zipconf.h +++ b/src/Common/libzip/zipconf.h @@ -6,14 +6,14 @@ This file was generated automatically by CMake based on ../cmake-zipconf.h.in. */ -#define LIBZIP_VERSION "1.10.1" +#define LIBZIP_VERSION "1.11.2" #define LIBZIP_VERSION_MAJOR 1 -#define LIBZIP_VERSION_MINOR 10 -#define LIBZIP_VERSION_MICRO 1 +#define LIBZIP_VERSION_MINOR 11 +#define LIBZIP_VERSION_MICRO 2 /* #undef ZIP_STATIC */ #define _Nullable #define _Nonnull diff --git a/src/Common/libzip/zipint.h b/src/Common/libzip/zipint.h index 4887b6c5..e22d74c2 100644 --- a/src/Common/libzip/zipint.h +++ b/src/Common/libzip/zipint.h @@ -1,11 +1,11 @@ #ifndef _HAD_ZIPINT_H #define _HAD_ZIPINT_H /* zipint.h -- internal declarations. - Copyright (C) 1999-2022 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> Redistribution and use in source and binary forms, with or without @@ -54,10 +54,11 @@ #define LOCAL_MAGIC "PK\3\4" #define EOCD_MAGIC "PK\5\6" #define DATADES_MAGIC "PK\7\10" #define EOCD64LOC_MAGIC "PK\6\7" #define EOCD64_MAGIC "PK\6\6" +#define MAGIC_LEN 4 #define CDENTRYSIZE 46u #define LENTRYSIZE 30 #define MAXCOMLEN 65536 #define MAXEXTLEN 65536 #define EOCDLEN 22 @@ -227,16 +228,21 @@ extern const int _zip_err_details_count; #define ZIP_ER_DETAIL_EOCD64_WRONG_MAGIC 9 /* G EOCD64 magic incorrect */ #define ZIP_ER_DETAIL_EOCD64_MISMATCH 10 /* G EOCD64 and EOCD do not match */ #define ZIP_ER_DETAIL_CDIR_INVALID 11 /* G invalid value in central directory */ #define ZIP_ER_DETAIL_VARIABLE_SIZE_OVERFLOW 12 /* E variable size fields overflow header */ #define ZIP_ER_DETAIL_INVALID_UTF8_IN_FILENAME 13 /* E invalid UTF-8 in filename */ -#define ZIP_ER_DETAIL_INVALID_UTF8_IN_COMMENT 13 /* E invalid UTF-8 in comment */ -#define ZIP_ER_DETAIL_INVALID_ZIP64_EF 14 /* E invalid Zip64 extra field */ -#define ZIP_ER_DETAIL_INVALID_WINZIPAES_EF 14 /* E invalid WinZip AES extra field */ -#define ZIP_ER_DETAIL_EF_TRAILING_GARBAGE 15 /* E garbage at end of extra fields */ -#define ZIP_ER_DETAIL_INVALID_EF_LENGTH 16 /* E extra field length is invalid */ -#define ZIP_ER_DETAIL_INVALID_FILE_LENGTH 17 /* E file length in header doesn't match actual file length */ +#define ZIP_ER_DETAIL_INVALID_UTF8_IN_COMMENT 14 /* E invalid UTF-8 in comment */ +#define ZIP_ER_DETAIL_INVALID_ZIP64_EF 15 /* E invalid Zip64 extra field */ +#define ZIP_ER_DETAIL_INVALID_WINZIPAES_EF 16 /* E invalid WinZip AES extra field */ +#define ZIP_ER_DETAIL_EF_TRAILING_GARBAGE 17 /* E garbage at end of extra fields */ +#define ZIP_ER_DETAIL_INVALID_EF_LENGTH 18 /* E extra field length is invalid */ +#define ZIP_ER_DETAIL_INVALID_FILE_LENGTH 19 /* E file length in header doesn't match actual file length */ +#define ZIP_ER_DETAIL_STORED_SIZE_MISMATCH 20 /* E compressed and uncompressed sizes don't match for stored file */ +#define ZIP_ER_DETAIL_DATA_DESCRIPTOR_MISMATCH 21 /* E local header and data descriptor do not match */ +#define ZIP_ER_DETAIL_EOCD64_LOCATOR_MISMATCH 22 /* G EOCD64 and EOCD64 locator do not match */ +#define ZIP_ER_DETAIL_UTF8_FILENAME_MISMATCH 23 /* E UTF-8 filename is ASCII and doesn't match filename */ +#define ZIP_ER_DETAIL_UTF8_COMMENT_MISMATCH 24 /* E UTF-8 comment is ASCII and doesn't match comment */ /* directory entry: general purpose bit flags */ #define ZIP_GPBF_ENCRYPTED 0x0001u /* is encrypted */ #define ZIP_GPBF_DATA_DESCRIPTOR 0x0008u /* crc/size after file data */ @@ -268,10 +274,11 @@ typedef enum zip_encoding_type zip_encoding_type_t; struct zip_hash; struct zip_progress; typedef struct zip_cdir zip_cdir_t; +typedef struct zip_dostime zip_dostime_t; typedef struct zip_dirent zip_dirent_t; typedef struct zip_entry zip_entry_t; typedef struct zip_extra_field zip_extra_field_t; typedef struct zip_string zip_string_t; typedef struct zip_buffer zip_buffer_t; @@ -305,10 +312,11 @@ struct zip { zip_hash_t *names; /* hash table for name lookup */ zip_progress_t *progress; /* progress callback for zip_close() */ zip_uint32_t* write_crc; /* have _zip_write() compute CRC */ + time_t torrent_mtime; }; /* file in zip archive, part of API */ struct zip_file { @@ -326,22 +334,28 @@ struct zip_file { #define ZIP_DIRENT_LAST_MOD 0x0020u #define ZIP_DIRENT_ENCRYPTION_METHOD 0x0040u #define ZIP_DIRENT_PASSWORD 0x0080u #define ZIP_DIRENT_ALL ZIP_UINT32_MAX +struct zip_dostime { + zip_uint16_t time; + zip_uint16_t date; +}; + struct zip_dirent { zip_uint32_t changed; bool local_extra_fields_read; /* whether we already read in local header extra fields */ bool cloned; /* whether this instance is cloned, and thus shares non-changed strings */ bool crc_valid; /* if CRC is valid (sometimes not for encrypted archives) */ + bool last_mod_mtime_valid; zip_uint16_t version_madeby; /* (c) version of creator */ zip_uint16_t version_needed; /* (cl) version needed to extract */ zip_uint16_t bitflags; /* (cl) general purpose bit flag */ zip_int32_t comp_method; /* (cl) compression method used (uint16 and ZIP_CM_DEFAULT (-1)) */ - time_t last_mod; /* (cl) time of last modification */ + zip_dostime_t last_mod; /* (cl) time of last modification */ zip_uint32_t crc; /* (cl) CRC-32 of uncompressed data */ zip_uint64_t comp_size; /* (cl) size of compressed data */ zip_uint64_t uncomp_size; /* (cl) size of uncompressed data */ zip_string_t *filename; /* (cl) file name (NUL-terminated) */ zip_extra_field_t *extra_fields; /* (cl) extra fields, parsed */ @@ -352,21 +366,28 @@ struct zip_dirent { zip_uint64_t offset; /* (c) offset of local header */ zip_uint32_t compression_level; /* level of compression to use (never valid in orig) */ zip_uint16_t encryption_method; /* encryption method, computed from other fields */ char *password; /* file specific encryption password */ + + time_t last_mod_mtime; /* cached last_mod in Unix time format */ }; /* zip archive central directory */ struct zip_cdir { zip_entry_t *entry; /* directory entries */ zip_uint64_t nentry; /* number of entries */ zip_uint64_t nentry_alloc; /* number of entries allocated */ + zip_uint32_t this_disk; + zip_uint32_t eocd_disk; + zip_uint64_t disk_entries; /* number of entries on this disk */ + zip_uint64_t num_entries; /* number of entries on all disks */ zip_uint64_t size; /* size of central directory */ zip_uint64_t offset; /* offset of central directory in file */ + zip_uint64_t eocd_offset; /* offset of EOCD in file */ zip_string_t *comment; /* zip archive comment */ bool is_zip64; /* central directory in zip64 format */ }; struct zip_extra_field { @@ -524,24 +545,26 @@ int _zip_buffer_skip(zip_buffer_t *buffer, zip_uint64_t length); int _zip_buffer_set_offset(zip_buffer_t *buffer, zip_uint64_t offset); zip_uint64_t _zip_buffer_size(zip_buffer_t *buffer); void _zip_cdir_free(zip_cdir_t *); bool _zip_cdir_grow(zip_cdir_t *cd, zip_uint64_t additional_entries, zip_error_t *error); -zip_cdir_t *_zip_cdir_new(zip_uint64_t, zip_error_t *); +zip_cdir_t *_zip_cdir_new(zip_error_t *); zip_int64_t _zip_cdir_write(zip_t *za, const zip_filelist_t *filelist, zip_uint64_t survivors); -time_t _zip_d2u_time(zip_uint16_t, zip_uint16_t); +time_t _zip_d2u_time(const zip_dostime_t*); void _zip_deregister_source(zip_t *za, zip_source_t *src); void _zip_dirent_apply_attributes(zip_dirent_t *, zip_file_attributes_t *, bool, zip_uint32_t); +int zip_dirent_check_consistency(zip_dirent_t *dirent); zip_dirent_t *_zip_dirent_clone(const zip_dirent_t *); void _zip_dirent_free(zip_dirent_t *); void _zip_dirent_finalize(zip_dirent_t *); +time_t zip_dirent_get_last_mod_mtime(zip_dirent_t *de); void _zip_dirent_init(zip_dirent_t *); bool _zip_dirent_needs_zip64(const zip_dirent_t *, zip_flags_t); zip_dirent_t *_zip_dirent_new(void); bool zip_dirent_process_ef_zip64(zip_dirent_t * zde, const zip_uint8_t * ef, zip_uint64_t got_len, bool local, zip_error_t * error); -zip_int64_t _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, bool local, zip_error_t *error); +zip_int64_t _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, bool local, zip_uint64_t central_compressed_size, bool check_consistency, zip_error_t *error); void _zip_dirent_set_version_needed(zip_dirent_t *de, bool force_zip64); void zip_dirent_torrentzip_normalize(zip_dirent_t *de); zip_int32_t _zip_dirent_size(zip_source_t *src, zip_uint16_t, zip_error_t *); int _zip_dirent_write(zip_t *za, zip_dirent_t *dirent, zip_flags_t flags); @@ -609,22 +632,25 @@ int _zip_register_source(zip_t *za, zip_source_t *src); void _zip_set_open_error(int *zep, const zip_error_t *err, int ze); bool zip_source_accept_empty(zip_source_t *src); zip_int64_t _zip_source_call(zip_source_t *src, void *data, zip_uint64_t length, zip_source_cmd_t command); bool _zip_source_eof(zip_source_t *); +int zip_source_get_dos_time(zip_source_t *src, zip_dostime_t *dos_time); + zip_source_t *_zip_source_file_or_p(const char *, FILE *, zip_uint64_t, zip_int64_t, const zip_stat_t *, zip_error_t *error); bool _zip_source_had_error(zip_source_t *); void _zip_source_invalidate(zip_source_t *src); zip_source_t *_zip_source_new(zip_error_t *error); int _zip_source_set_source_archive(zip_source_t *, zip_t *); -zip_source_t *_zip_source_window_new(zip_source_t *src, zip_uint64_t start, zip_int64_t length, zip_stat_t *st, zip_uint64_t st_invalid, zip_file_attributes_t *attributes, zip_t *source_archive, zip_uint64_t source_index, bool take_ownership, zip_error_t *error); +zip_source_t *_zip_source_window_new(zip_source_t *src, zip_uint64_t start, zip_int64_t length, zip_stat_t *st, zip_uint64_t st_invalid, zip_file_attributes_t *attributes, zip_dostime_t *dostime, zip_t *source_archive, zip_uint64_t source_index, bool take_ownership, zip_error_t *error); int _zip_stat_merge(zip_stat_t *dst, const zip_stat_t *src, zip_error_t *error); int _zip_string_equal(const zip_string_t *a, const zip_string_t *b); void _zip_string_free(zip_string_t *string); zip_uint32_t _zip_string_crc32(const zip_string_t *string); const zip_uint8_t *_zip_string_get(zip_string_t *string, zip_uint32_t *lenp, zip_flags_t flags, zip_error_t *error); +bool _zip_string_is_ascii(const zip_string_t *string); zip_uint16_t _zip_string_length(const zip_string_t *string); zip_string_t *_zip_string_new(const zip_uint8_t *raw, zip_uint16_t length, zip_flags_t flags, zip_error_t *error); int _zip_string_write(zip_t *za, const zip_string_t *string); bool _zip_winzip_aes_decrypt(zip_winzip_aes_t *ctx, zip_uint8_t *data, zip_uint64_t length); bool _zip_winzip_aes_encrypt(zip_winzip_aes_t *ctx, zip_uint8_t *data, zip_uint64_t length); @@ -645,11 +671,11 @@ void *_zip_memdup(const void *, size_t, zip_error_t *); zip_int64_t _zip_name_locate(zip_t *, const char *, zip_flags_t, zip_error_t *); zip_t *_zip_new(zip_error_t *); zip_int64_t _zip_file_replace(zip_t *, zip_uint64_t, const char *, zip_source_t *, zip_flags_t); int _zip_set_name(zip_t *, zip_uint64_t, const char *, zip_flags_t); -void _zip_u2d_time(time_t, zip_uint16_t *, zip_uint16_t *); +int _zip_u2d_time(time_t, zip_dostime_t *, zip_error_t *); int _zip_unchange(zip_t *, zip_uint64_t, int); void _zip_unchange_data(zip_entry_t *); int _zip_write(zip_t *za, const void *data, zip_uint64_t length); -#endif /* zipint.h */ +#endif /* _HAD_ZIPINT_H */ diff --git a/src/Common/lzma/7zTypes.h b/src/Common/lzma/7zTypes.h index 1fcb2473..5b77420a 100644 --- a/src/Common/lzma/7zTypes.h +++ b/src/Common/lzma/7zTypes.h @@ -1,7 +1,7 @@ /* 7zTypes.h -- Basic types -2023-04-02 : Igor Pavlov : Public domain */ +2024-01-24 : Igor Pavlov : Public domain */ #ifndef ZIP7_7Z_TYPES_H #define ZIP7_7Z_TYPES_H #ifdef _WIN32 @@ -528,24 +528,24 @@ struct ISzAlloc #define Z7_CONTAINER_FROM_VTBL_CLS(ptr, type, m) Z7_CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m) /* #define Z7_CONTAINER_FROM_VTBL_CLS(ptr, type, m) Z7_CONTAINER_FROM_VTBL(ptr, type, m) */ #if defined (__clang__) || defined(__GNUC__) -#define Z7_DIAGNOSCTIC_IGNORE_BEGIN_CAST_QUAL \ +#define Z7_DIAGNOSTIC_IGNORE_BEGIN_CAST_QUAL \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") -#define Z7_DIAGNOSCTIC_IGNORE_END_CAST_QUAL \ +#define Z7_DIAGNOSTIC_IGNORE_END_CAST_QUAL \ _Pragma("GCC diagnostic pop") #else -#define Z7_DIAGNOSCTIC_IGNORE_BEGIN_CAST_QUAL -#define Z7_DIAGNOSCTIC_IGNORE_END_CAST_QUAL +#define Z7_DIAGNOSTIC_IGNORE_BEGIN_CAST_QUAL +#define Z7_DIAGNOSTIC_IGNORE_END_CAST_QUAL #endif #define Z7_CONTAINER_FROM_VTBL_TO_DECL_VAR(ptr, type, m, p) \ - Z7_DIAGNOSCTIC_IGNORE_BEGIN_CAST_QUAL \ + Z7_DIAGNOSTIC_IGNORE_BEGIN_CAST_QUAL \ type *p = Z7_CONTAINER_FROM_VTBL(ptr, type, m); \ - Z7_DIAGNOSCTIC_IGNORE_END_CAST_QUAL + Z7_DIAGNOSTIC_IGNORE_END_CAST_QUAL #define Z7_CONTAINER_FROM_VTBL_TO_DECL_VAR_pp_vt_p(type) \ Z7_CONTAINER_FROM_VTBL_TO_DECL_VAR(pp, type, vt, p) diff --git a/src/Common/lzma/Alloc.c b/src/Common/lzma/Alloc.c index d841bf20..63e1a121 100644 --- a/src/Common/lzma/Alloc.c +++ b/src/Common/lzma/Alloc.c @@ -1,30 +1,29 @@ /* Alloc.c -- Memory allocation functions -2023-04-02 : Igor Pavlov : Public domain */ +2024-02-18 : Igor Pavlov : Public domain */ #include "Precomp.h" #ifdef _WIN32 #include "7zWindows.h" #endif #include <stdlib.h> #include "Alloc.h" -#ifdef _WIN32 -#ifdef Z7_LARGE_PAGES -#if defined(__clang__) || defined(__GNUC__) -typedef void (*Z7_voidFunction)(void); -#define MY_CAST_FUNC (Z7_voidFunction) -#elif defined(_MSC_VER) && _MSC_VER > 1920 -#define MY_CAST_FUNC (void *) -// #pragma warning(disable : 4191) // 'type cast': unsafe conversion from 'FARPROC' to 'void (__cdecl *)()' -#else -#define MY_CAST_FUNC +#if defined(Z7_LARGE_PAGES) && defined(_WIN32) && \ + (!defined(Z7_WIN32_WINNT_MIN) || Z7_WIN32_WINNT_MIN < 0x0502) // < Win2003 (xp-64) + #define Z7_USE_DYN_GetLargePageMinimum +#endif + +// for debug: +#if 0 +#if defined(__CHERI__) && defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 16) +// #pragma message("=== Z7_ALLOC_NO_OFFSET_ALLOCATOR === ") +#define Z7_ALLOC_NO_OFFSET_ALLOCATOR +#endif #endif -#endif // Z7_LARGE_PAGES -#endif // _WIN32 // #define SZ_ALLOC_DEBUG /* #define SZ_ALLOC_DEBUG */ /* use SZ_ALLOC_DEBUG to debug alloc/free operations */ @@ -144,11 +143,13 @@ static void PrintAddr(void *p) #define PRINT_ALLOC(name, cnt, size, ptr) #endif #define PRINT_FREE(name, cnt, ptr) #define Print(s) #define PrintLn() +#ifndef Z7_ALLOC_NO_OFFSET_ALLOCATOR #define PrintHex(v, align) +#endif #define PrintAddr(p) #endif @@ -244,35 +245,39 @@ void MidFree(void *address) } #ifdef Z7_LARGE_PAGES #ifdef MEM_LARGE_PAGES - #define MY__MEM_LARGE_PAGES MEM_LARGE_PAGES + #define MY_MEM_LARGE_PAGES MEM_LARGE_PAGES #else - #define MY__MEM_LARGE_PAGES 0x20000000 + #define MY_MEM_LARGE_PAGES 0x20000000 #endif extern SIZE_T g_LargePageSize; SIZE_T g_LargePageSize = 0; typedef SIZE_T (WINAPI *Func_GetLargePageMinimum)(VOID); void SetLargePageSize(void) { - #ifdef Z7_LARGE_PAGES SIZE_T size; +#ifdef Z7_USE_DYN_GetLargePageMinimum +Z7_DIAGNOSTIC_IGNORE_CAST_FUNCTION + const Func_GetLargePageMinimum fn = - (Func_GetLargePageMinimum) MY_CAST_FUNC GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), + (Func_GetLargePageMinimum) Z7_CAST_FUNC_C GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); if (!fn) return; size = fn(); +#else + size = GetLargePageMinimum(); +#endif if (size == 0 || (size & (size - 1)) != 0) return; g_LargePageSize = size; - #endif } #endif // Z7_LARGE_PAGES void *BigAlloc(size_t size) @@ -290,11 +295,11 @@ void *BigAlloc(size_t size) size_t size2; ps--; size2 = (size + ps) & ~ps; if (size2 >= size) { - void *p = VirtualAlloc(NULL, size2, MEM_COMMIT | MY__MEM_LARGE_PAGES, PAGE_READWRITE); + void *p = VirtualAlloc(NULL, size2, MEM_COMMIT | MY_MEM_LARGE_PAGES, PAGE_READWRITE); if (p) { PRINT_ALLOC("Alloc-BM ", g_allocCountMid, size2, p) return p; } @@ -326,42 +331,51 @@ static void *SzBigAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p) return BigA static void SzBigFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p) BigFree(address); } const ISzAlloc g_MidAlloc = { SzMidAlloc, SzMidFree }; const ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; #endif -/* - uintptr_t : <stdint.h> C99 (optional) - : unsupported in VS6 -*/ - -#ifdef _WIN32 - typedef UINT_PTR UIntPtr; -#else - /* - typedef uintptr_t UIntPtr; - */ - typedef ptrdiff_t UIntPtr; -#endif - +#ifndef Z7_ALLOC_NO_OFFSET_ALLOCATOR #define ADJUST_ALLOC_SIZE 0 /* #define ADJUST_ALLOC_SIZE (sizeof(void *) - 1) */ /* Use (ADJUST_ALLOC_SIZE = (sizeof(void *) - 1)), if MyAlloc() can return address that is NOT multiple of sizeof(void *). */ - /* -#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((char *)(p) - ((size_t)(UIntPtr)(p) & ((align) - 1)))) + uintptr_t : <stdint.h> C99 (optional) + : unsupported in VS6 */ -#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((((UIntPtr)(p)) & ~((UIntPtr)(align) - 1)))) +typedef + #ifdef _WIN32 + UINT_PTR + #elif 1 + uintptr_t + #else + ptrdiff_t + #endif + MY_uintptr_t; + +#if 0 \ + || (defined(__CHERI__) \ + || defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ > 8)) +// for 128-bit pointers (cheri): +#define MY_ALIGN_PTR_DOWN(p, align) \ + ((void *)((char *)(p) - ((size_t)(MY_uintptr_t)(p) & ((align) - 1)))) +#else +#define MY_ALIGN_PTR_DOWN(p, align) \ + ((void *)((((MY_uintptr_t)(p)) & ~((MY_uintptr_t)(align) - 1)))) +#endif +#endif -#if !defined(_WIN32) && defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) +#if !defined(_WIN32) \ + && (defined(Z7_ALLOC_NO_OFFSET_ALLOCATOR) \ + || defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) #define USE_posix_memalign #endif #ifndef USE_posix_memalign #define MY_ALIGN_PTR_UP_PLUS(p, align) MY_ALIGN_PTR_DOWN(((char *)(p) + (align) + ADJUST_ALLOC_SIZE), align) @@ -397,18 +411,17 @@ static int posix_memalign(void **ptr, size_t align, size_t size) ALLOC_ALIGN_SIZE >= cache_line_size */ #define ALLOC_ALIGN_SIZE ((size_t)1 << 7) -static void *SzAlignedAlloc(ISzAllocPtr pp, size_t size) +void *z7_AlignedAlloc(size_t size) { - #ifndef USE_posix_memalign +#ifndef USE_posix_memalign void *p; void *pAligned; size_t newSize; - UNUSED_VAR(pp) /* also we can allocate additional dummy ALLOC_ALIGN_SIZE bytes after aligned block to prevent cache line sharing with another allocated blocks */ newSize = size + ALLOC_ALIGN_SIZE * 1 + ADJUST_ALLOC_SIZE; @@ -429,52 +442,97 @@ static void *SzAlignedAlloc(ISzAllocPtr pp, size_t size) ((void **)pAligned)[-1] = p; return pAligned; - #else +#else void *p; - UNUSED_VAR(pp) if (posix_memalign(&p, ALLOC_ALIGN_SIZE, size)) return NULL; Print(" posix_memalign="); PrintAddr(p); PrintLn(); return p; - #endif +#endif +} + + +void z7_AlignedFree(void *address) +{ +#ifndef USE_posix_memalign + if (address) + MyFree(((void **)address)[-1]); +#else + free(address); +#endif +} + + +static void *SzAlignedAlloc(ISzAllocPtr pp, size_t size) +{ + UNUSED_VAR(pp) + return z7_AlignedAlloc(size); } static void SzAlignedFree(ISzAllocPtr pp, void *address) { UNUSED_VAR(pp) - #ifndef USE_posix_memalign +#ifndef USE_posix_memalign if (address) MyFree(((void **)address)[-1]); - #else +#else free(address); - #endif +#endif } const ISzAlloc g_AlignedAlloc = { SzAlignedAlloc, SzAlignedFree }; -#define MY_ALIGN_PTR_DOWN_1(p) MY_ALIGN_PTR_DOWN(p, sizeof(void *)) - /* we align ptr to support cases where CAlignOffsetAlloc::offset is not multiply of sizeof(void *) */ -#define REAL_BLOCK_PTR_VAR(p) ((void **)MY_ALIGN_PTR_DOWN_1(p))[-1] -/* -#define REAL_BLOCK_PTR_VAR(p) ((void **)(p))[-1] -*/ +#ifndef Z7_ALLOC_NO_OFFSET_ALLOCATOR +#if 1 + #define MY_ALIGN_PTR_DOWN_1(p) MY_ALIGN_PTR_DOWN(p, sizeof(void *)) + #define REAL_BLOCK_PTR_VAR(p) ((void **)MY_ALIGN_PTR_DOWN_1(p))[-1] +#else + // we can use this simplified code, + // if (CAlignOffsetAlloc::offset == (k * sizeof(void *)) + #define REAL_BLOCK_PTR_VAR(p) (((void **)(p))[-1]) +#endif +#endif + + +#if 0 +#ifndef Z7_ALLOC_NO_OFFSET_ALLOCATOR +#include <stdio.h> +static void PrintPtr(const char *s, const void *p) +{ + const Byte *p2 = (const Byte *)&p; + unsigned i; + printf("%s %p ", s, p); + for (i = sizeof(p); i != 0;) + { + i--; + printf("%02x", p2[i]); + } + printf("\n"); +} +#endif +#endif + static void *AlignOffsetAlloc_Alloc(ISzAllocPtr pp, size_t size) { +#if defined(Z7_ALLOC_NO_OFFSET_ALLOCATOR) + UNUSED_VAR(pp) + return z7_AlignedAlloc(size); +#else const CAlignOffsetAlloc *p = Z7_CONTAINER_FROM_VTBL_CONST(pp, CAlignOffsetAlloc, vt); void *adr; void *pAligned; size_t newSize; size_t extra; @@ -499,10 +557,16 @@ static void *AlignOffsetAlloc_Alloc(ISzAllocPtr pp, size_t size) return NULL; pAligned = (char *)MY_ALIGN_PTR_DOWN((char *)adr + alignSize - p->offset + extra + ADJUST_ALLOC_SIZE, alignSize) + p->offset; +#if 0 + printf("\nalignSize = %6x, offset=%6x, size=%8x \n", (unsigned)alignSize, (unsigned)p->offset, (unsigned)size); + PrintPtr("base", adr); + PrintPtr("alig", pAligned); +#endif + PrintLn(); Print("- Aligned: "); Print(" size="); PrintHex(size, 8); Print(" a_size="); PrintHex(newSize, 8); Print(" ptr="); PrintAddr(adr); @@ -510,23 +574,29 @@ static void *AlignOffsetAlloc_Alloc(ISzAllocPtr pp, size_t size) PrintLn(); REAL_BLOCK_PTR_VAR(pAligned) = adr; return pAligned; +#endif } static void AlignOffsetAlloc_Free(ISzAllocPtr pp, void *address) { +#if defined(Z7_ALLOC_NO_OFFSET_ALLOCATOR) + UNUSED_VAR(pp) + z7_AlignedFree(address); +#else if (address) { const CAlignOffsetAlloc *p = Z7_CONTAINER_FROM_VTBL_CONST(pp, CAlignOffsetAlloc, vt); PrintLn(); Print("- Aligned Free: "); PrintLn(); ISzAlloc_Free(p->baseAlloc, REAL_BLOCK_PTR_VAR(address)); } +#endif } void AlignOffsetAlloc_CreateVTable(CAlignOffsetAlloc *p) { diff --git a/src/Common/lzma/Alloc.h b/src/Common/lzma/Alloc.h index fac5b62f..01bf6b7d 100644 --- a/src/Common/lzma/Alloc.h +++ b/src/Common/lzma/Alloc.h @@ -1,7 +1,7 @@ /* Alloc.h -- Memory allocation functions -2023-03-04 : Igor Pavlov : Public domain */ +2024-01-22 : Igor Pavlov : Public domain */ #ifndef ZIP7_INC_ALLOC_H #define ZIP7_INC_ALLOC_H #include "7zTypes.h" @@ -20,10 +20,13 @@ MyRealloc() is similar to realloc() for the following cases: void *MyAlloc(size_t size); void MyFree(void *address); void *MyRealloc(void *address, size_t size); +void *z7_AlignedAlloc(size_t size); +void z7_AlignedFree(void *p); + #ifdef _WIN32 #ifdef Z7_LARGE_PAGES void SetLargePageSize(void); #endif @@ -31,16 +34,18 @@ void SetLargePageSize(void); void *MidAlloc(size_t size); void MidFree(void *address); void *BigAlloc(size_t size); void BigFree(void *address); +/* #define Z7_BIG_ALLOC_IS_ZERO_FILLED */ + #else -#define MidAlloc(size) MyAlloc(size) -#define MidFree(address) MyFree(address) -#define BigAlloc(size) MyAlloc(size) -#define BigFree(address) MyFree(address) +#define MidAlloc(size) z7_AlignedAlloc(size) +#define MidFree(address) z7_AlignedFree(address) +#define BigAlloc(size) z7_AlignedAlloc(size) +#define BigFree(address) z7_AlignedFree(address) #endif extern const ISzAlloc g_Alloc; diff --git a/src/Common/lzma/Compiler.h b/src/Common/lzma/Compiler.h index 185a52de..2a9c2b7a 100644 --- a/src/Common/lzma/Compiler.h +++ b/src/Common/lzma/Compiler.h @@ -1,7 +1,7 @@ /* Compiler.h : Compiler specific defines and pragmas -2023-04-02 : Igor Pavlov : Public domain */ +2024-01-22 : Igor Pavlov : Public domain */ #ifndef ZIP7_INC_COMPILER_H #define ZIP7_INC_COMPILER_H #if defined(__clang__) @@ -23,15 +23,83 @@ #if defined(__MINGW32__) || defined(__MINGW64__) #define Z7_MINGW #endif +#if defined(__LCC__) && (defined(__MCST__) || defined(__e2k__)) +#define Z7_MCST_LCC +#define Z7_MCST_LCC_VERSION (__LCC__ * 100 + __LCC_MINOR__) +#endif + +/* +#if defined(__AVX2__) \ + || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40900) \ + || defined(Z7_APPLE_CLANG_VERSION) && (Z7_APPLE_CLANG_VERSION >= 40600) \ + || defined(Z7_LLVM_CLANG_VERSION) && (Z7_LLVM_CLANG_VERSION >= 30100) \ + || defined(Z7_MSC_VER_ORIGINAL) && (Z7_MSC_VER_ORIGINAL >= 1800) \ + || defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1400) + #define Z7_COMPILER_AVX2_SUPPORTED + #endif +#endif +*/ + // #pragma GCC diagnostic ignored "-Wunknown-pragmas" #ifdef __clang__ // padding size of '' with 4 bytes to alignment boundary #pragma GCC diagnostic ignored "-Wpadded" + +#if defined(Z7_LLVM_CLANG_VERSION) && (__clang_major__ == 13) \ + && defined(__FreeBSD__) +// freebsd: +#pragma GCC diagnostic ignored "-Wexcess-padding" +#endif + +#if __clang_major__ >= 16 +#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage" +#endif + +#if __clang_major__ == 13 +#if defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 16) +// cheri +#pragma GCC diagnostic ignored "-Wcapability-to-integer-cast" +#endif +#endif + +#if __clang_major__ == 13 + // for <arm_neon.h> + #pragma GCC diagnostic ignored "-Wreserved-identifier" +#endif + +#endif // __clang__ + +#if defined(_WIN32) && defined(__clang__) && __clang_major__ >= 16 +// #pragma GCC diagnostic ignored "-Wcast-function-type-strict" +#define Z7_DIAGNOSTIC_IGNORE_CAST_FUNCTION \ + _Pragma("GCC diagnostic ignored \"-Wcast-function-type-strict\"") +#else +#define Z7_DIAGNOSTIC_IGNORE_CAST_FUNCTION +#endif + +typedef void (*Z7_void_Function)(void); +#if defined(__clang__) || defined(__GNUC__) +#define Z7_CAST_FUNC_C (Z7_void_Function) +#elif defined(_MSC_VER) && _MSC_VER > 1920 +#define Z7_CAST_FUNC_C (void *) +// #pragma warning(disable : 4191) // 'type cast': unsafe conversion from 'FARPROC' to 'void (__cdecl *)()' +#else +#define Z7_CAST_FUNC_C +#endif +/* +#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__) + // #pragma GCC diagnostic ignored "-Wcast-function-type" +#endif +*/ +#ifdef __GNUC__ +#if defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40000) && (Z7_GCC_VERSION < 70000) +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif #endif #ifdef _MSC_VER @@ -99,11 +167,12 @@ #if defined(__clang__) && (__clang_major__ >= 4) #define Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE \ _Pragma("clang loop unroll(disable)") \ _Pragma("clang loop vectorize(disable)") #define Z7_ATTRIB_NO_VECTORIZE -#elif defined(__GNUC__) && (__GNUC__ >= 5) +#elif defined(__GNUC__) && (__GNUC__ >= 5) \ + && (!defined(Z7_MCST_LCC_VERSION) || (Z7_MCST_LCC_VERSION >= 12610)) #define Z7_ATTRIB_NO_VECTORIZE __attribute__((optimize("no-tree-vectorize"))) // __attribute__((optimize("no-unroll-loops"))); #define Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE #elif defined(_MSC_VER) && (_MSC_VER >= 1920) #define Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE \ @@ -140,19 +209,27 @@ #define Z7_UNLIKELY(x) (x) // #define Z7_likely #endif -#if (defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 36000)) -#define Z7_DIAGNOSCTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER \ +#if (defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 30600)) + +#if (Z7_CLANG_VERSION < 130000) +#define Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wreserved-id-macro\"") +#else +#define Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wreserved-macro-identifier\"") -#define Z7_DIAGNOSCTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER \ +#endif + +#define Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER \ _Pragma("GCC diagnostic pop") #else -#define Z7_DIAGNOSCTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER -#define Z7_DIAGNOSCTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER +#define Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER +#define Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER #endif #define UNUSED_VAR(x) (void)x; /* #define UNUSED_VAR(x) x=x; */ diff --git a/src/Common/lzma/CpuArch.c b/src/Common/lzma/CpuArch.c index 33f8a3ab..6e02551e 100644 --- a/src/Common/lzma/CpuArch.c +++ b/src/Common/lzma/CpuArch.c @@ -1,7 +1,7 @@ /* CpuArch.c -- CPU specific code -2023-05-18 : Igor Pavlov : Public domain */ +Igor Pavlov : Public domain */ #include "Precomp.h" // #include <stdio.h> @@ -15,11 +15,11 @@ #endif /* cpuid instruction supports (subFunction) parameter in ECX, that is used only with some specific (function) parameter values. - But we always use only (subFunction==0). + most functions use only (subFunction==0). */ /* __cpuid(): MSVC and GCC/CLANG use same function/macro name but parameters are different. We use MSVC __cpuid() parameters style for our z7_x86_cpuid() function. @@ -47,47 +47,53 @@ #define ASM_LN "\n" #if defined(MY_CPU_AMD64) && defined(__PIC__) \ && ((defined (__GNUC__) && (__GNUC__ < 5)) || defined(__clang__)) -#define x86_cpuid_MACRO(p, func) { \ + /* "=&r" selects free register. It can select even rbx, if that register is free. + "=&D" for (RDI) also works, but the code can be larger with "=&D" + "2"(subFun) : 2 is (zero-based) index in the output constraint list "=c" (ECX). */ + +#define x86_cpuid_MACRO_2(p, func, subFunc) { \ __asm__ __volatile__ ( \ ASM_LN "mov %%rbx, %q1" \ ASM_LN "cpuid" \ ASM_LN "xchg %%rbx, %q1" \ - : "=a" ((p)[0]), "=&r" ((p)[1]), "=c" ((p)[2]), "=d" ((p)[3]) : "0" (func), "2"(0)); } - - /* "=&r" selects free register. It can select even rbx, if that register is free. - "=&D" for (RDI) also works, but the code can be larger with "=&D" - "2"(0) means (subFunction = 0), - 2 is (zero-based) index in the output constraint list "=c" (ECX). */ + : "=a" ((p)[0]), "=&r" ((p)[1]), "=c" ((p)[2]), "=d" ((p)[3]) : "0" (func), "2"(subFunc)); } #elif defined(MY_CPU_X86) && defined(__PIC__) \ && ((defined (__GNUC__) && (__GNUC__ < 5)) || defined(__clang__)) -#define x86_cpuid_MACRO(p, func) { \ +#define x86_cpuid_MACRO_2(p, func, subFunc) { \ __asm__ __volatile__ ( \ ASM_LN "mov %%ebx, %k1" \ ASM_LN "cpuid" \ ASM_LN "xchg %%ebx, %k1" \ - : "=a" ((p)[0]), "=&r" ((p)[1]), "=c" ((p)[2]), "=d" ((p)[3]) : "0" (func), "2"(0)); } + : "=a" ((p)[0]), "=&r" ((p)[1]), "=c" ((p)[2]), "=d" ((p)[3]) : "0" (func), "2"(subFunc)); } #else -#define x86_cpuid_MACRO(p, func) { \ +#define x86_cpuid_MACRO_2(p, func, subFunc) { \ __asm__ __volatile__ ( \ ASM_LN "cpuid" \ - : "=a" ((p)[0]), "=b" ((p)[1]), "=c" ((p)[2]), "=d" ((p)[3]) : "0" (func), "2"(0)); } + : "=a" ((p)[0]), "=b" ((p)[1]), "=c" ((p)[2]), "=d" ((p)[3]) : "0" (func), "2"(subFunc)); } #endif +#define x86_cpuid_MACRO(p, func) x86_cpuid_MACRO_2(p, func, 0) void Z7_FASTCALL z7_x86_cpuid(UInt32 p[4], UInt32 func) { x86_cpuid_MACRO(p, func) } +static +void Z7_FASTCALL z7_x86_cpuid_subFunc(UInt32 p[4], UInt32 func, UInt32 subFunc) +{ + x86_cpuid_MACRO_2(p, func, subFunc) +} + Z7_NO_INLINE UInt32 Z7_FASTCALL z7_x86_cpuid_GetMaxFunc(void) { #if defined(NEED_CHECK_FOR_CPUID) @@ -203,54 +209,87 @@ void __declspec(naked) Z7_FASTCALL z7_x86_cpuid(UInt32 p[4], UInt32 func) __asm pop edi __asm pop ebx __asm ret 0 } +static +void __declspec(naked) Z7_FASTCALL z7_x86_cpuid_subFunc(UInt32 p[4], UInt32 func, UInt32 subFunc) +{ + UNUSED_VAR(p) + UNUSED_VAR(func) + UNUSED_VAR(subFunc) + __asm push ebx + __asm push edi + __asm mov edi, ecx // p + __asm mov eax, edx // func + __asm mov ecx, [esp + 12] // subFunc + __asm cpuid + __asm mov [edi ], eax + __asm mov [edi + 4], ebx + __asm mov [edi + 8], ecx + __asm mov [edi + 12], edx + __asm pop edi + __asm pop ebx + __asm ret 4 +} + #else // MY_CPU_AMD64 #if _MSC_VER >= 1600 #include <intrin.h> #define MY_cpuidex __cpuidex + +static +void Z7_FASTCALL z7_x86_cpuid_subFunc(UInt32 p[4], UInt32 func, UInt32 subFunc) +{ + __cpuidex((int *)p, func, subFunc); +} + #else /* __cpuid (func == (0 or 7)) requires subfunction number in ECX. MSDN: The __cpuid intrinsic clears the ECX register before calling the cpuid instruction. __cpuid() in new MSVC clears ECX. __cpuid() in old MSVC (14.00) x64 doesn't clear ECX We still can use __cpuid for low (func) values that don't require ECX, but __cpuid() in old MSVC will be incorrect for some func values: (func == 7). So here we use the hack for old MSVC to send (subFunction) in ECX register to cpuid instruction, - where ECX value is first parameter for FASTCALL / NO_INLINE func, + where ECX value is first parameter for FASTCALL / NO_INLINE func. So the caller of MY_cpuidex_HACK() sets ECX as subFunction, and old MSVC for __cpuid() doesn't change ECX and cpuid instruction gets (subFunction) value. DON'T remove Z7_NO_INLINE and Z7_FASTCALL for MY_cpuidex_HACK(): !!! */ static -Z7_NO_INLINE void Z7_FASTCALL MY_cpuidex_HACK(UInt32 subFunction, UInt32 func, int *CPUInfo) +Z7_NO_INLINE void Z7_FASTCALL MY_cpuidex_HACK(Int32 subFunction, Int32 func, Int32 *CPUInfo) { UNUSED_VAR(subFunction) __cpuid(CPUInfo, func); } #define MY_cpuidex(info, func, func2) MY_cpuidex_HACK(func2, func, info) #pragma message("======== MY_cpuidex_HACK WAS USED ========") +static +void Z7_FASTCALL z7_x86_cpuid_subFunc(UInt32 p[4], UInt32 func, UInt32 subFunc) +{ + MY_cpuidex_HACK(subFunc, func, (Int32 *)p); +} #endif // _MSC_VER >= 1600 #if !defined(MY_CPU_AMD64) /* inlining for __cpuid() in MSVC x86 (32-bit) produces big ineffective code, so we disable inlining here */ Z7_NO_INLINE #endif void Z7_FASTCALL z7_x86_cpuid(UInt32 p[4], UInt32 func) { - MY_cpuidex((int *)p, (int)func, 0); + MY_cpuidex((Int32 *)p, (Int32)func, 0); } Z7_NO_INLINE UInt32 Z7_FASTCALL z7_x86_cpuid_GetMaxFunc(void) { - int a[4]; + Int32 a[4]; MY_cpuidex(a, 0, 0); return a[0]; } #endif // MY_CPU_AMD64 @@ -382,29 +421,29 @@ static BoolInt CPU_Sys_Is_SSE_Supported(void) BoolInt CPU_IsSupported_CMOV(void) { UInt32 a[4]; if (!x86cpuid_Func_1(&a[0])) return 0; - return (a[3] >> 15) & 1; + return (BoolInt)(a[3] >> 15) & 1; } BoolInt CPU_IsSupported_SSE(void) { UInt32 a[4]; CHECK_SYS_SSE_SUPPORT if (!x86cpuid_Func_1(&a[0])) return 0; - return (a[3] >> 25) & 1; + return (BoolInt)(a[3] >> 25) & 1; } BoolInt CPU_IsSupported_SSE2(void) { UInt32 a[4]; CHECK_SYS_SSE_SUPPORT if (!x86cpuid_Func_1(&a[0])) return 0; - return (a[3] >> 26) & 1; + return (BoolInt)(a[3] >> 26) & 1; } #endif @@ -417,21 +456,21 @@ static UInt32 x86cpuid_Func_1_ECX(void) return a[2]; } BoolInt CPU_IsSupported_AES(void) { - return (x86cpuid_Func_1_ECX() >> 25) & 1; + return (BoolInt)(x86cpuid_Func_1_ECX() >> 25) & 1; } BoolInt CPU_IsSupported_SSSE3(void) { - return (x86cpuid_Func_1_ECX() >> 9) & 1; + return (BoolInt)(x86cpuid_Func_1_ECX() >> 9) & 1; } BoolInt CPU_IsSupported_SSE41(void) { - return (x86cpuid_Func_1_ECX() >> 19) & 1; + return (BoolInt)(x86cpuid_Func_1_ECX() >> 19) & 1; } BoolInt CPU_IsSupported_SHA(void) { CHECK_SYS_SSE_SUPPORT @@ -439,11 +478,28 @@ BoolInt CPU_IsSupported_SHA(void) if (z7_x86_cpuid_GetMaxFunc() < 7) return False; { UInt32 d[4]; z7_x86_cpuid(d, 7); - return (d[1] >> 29) & 1; + return (BoolInt)(d[1] >> 29) & 1; + } +} + + +BoolInt CPU_IsSupported_SHA512(void) +{ + if (!CPU_IsSupported_AVX2()) return False; // maybe CPU_IsSupported_AVX() is enough here + + if (z7_x86_cpuid_GetMaxFunc() < 7) + return False; + { + UInt32 d[4]; + z7_x86_cpuid_subFunc(d, 7, 0); + if (d[0] < 1) // d[0] - is max supported subleaf value + return False; + z7_x86_cpuid_subFunc(d, 7, 1); + return (BoolInt)(d[0]) & 1; } } /* MSVC: _xgetbv() intrinsic is available since VS2010SP1. @@ -636,14 +692,14 @@ BoolInt CPU_IsSupported_AVX(void) what exact states(registers) OS have enabled for storing/restoring. */ { const UInt32 bm = (UInt32)x86_xgetbv_0(MY_XCR_XFEATURE_ENABLED_MASK); - // printf("\n=== XGetBV=%d\n", bm); + // printf("\n=== XGetBV=0x%x\n", bm); return 1 - & (bm >> 1) // SSE state is supported (set by OS) for storing/restoring - & (bm >> 2); // AVX state is supported (set by OS) for storing/restoring + & (BoolInt)(bm >> 1) // SSE state is supported (set by OS) for storing/restoring + & (BoolInt)(bm >> 2); // AVX state is supported (set by OS) for storing/restoring } // since Win7SP1: we can use GetEnabledXStateFeatures(); } @@ -656,13 +712,42 @@ BoolInt CPU_IsSupported_AVX2(void) { UInt32 d[4]; z7_x86_cpuid(d, 7); // printf("\ncpuid(7): ebx=%8x ecx=%8x\n", d[1], d[2]); return 1 - & (d[1] >> 5); // avx2 + & (BoolInt)(d[1] >> 5); // avx2 + } +} + +#if 0 +BoolInt CPU_IsSupported_AVX512F_AVX512VL(void) +{ + if (!CPU_IsSupported_AVX()) + return False; + if (z7_x86_cpuid_GetMaxFunc() < 7) + return False; + { + UInt32 d[4]; + BoolInt v; + z7_x86_cpuid(d, 7); + // printf("\ncpuid(7): ebx=%8x ecx=%8x\n", d[1], d[2]); + v = 1 + & (BoolInt)(d[1] >> 16) // avx512f + & (BoolInt)(d[1] >> 31); // avx512vl + if (!v) + return False; + } + { + const UInt32 bm = (UInt32)x86_xgetbv_0(MY_XCR_XFEATURE_ENABLED_MASK); + // printf("\n=== XGetBV=0x%x\n", bm); + return 1 + & (BoolInt)(bm >> 5) // OPMASK + & (BoolInt)(bm >> 6) // ZMM upper 256-bit + & (BoolInt)(bm >> 7); // ZMM16 ... ZMM31 } } +#endif BoolInt CPU_IsSupported_VAES_AVX2(void) { if (!CPU_IsSupported_AVX()) return False; @@ -671,13 +756,13 @@ BoolInt CPU_IsSupported_VAES_AVX2(void) { UInt32 d[4]; z7_x86_cpuid(d, 7); // printf("\ncpuid(7): ebx=%8x ecx=%8x\n", d[1], d[2]); return 1 - & (d[1] >> 5) // avx2 + & (BoolInt)(d[1] >> 5) // avx2 // & (d[1] >> 31) // avx512vl - & (d[2] >> 9); // vaes // VEX-256/EVEX + & (BoolInt)(d[2] >> 9); // vaes // VEX-256/EVEX } } BoolInt CPU_IsSupported_PageGB(void) { @@ -686,11 +771,11 @@ BoolInt CPU_IsSupported_PageGB(void) UInt32 d[4]; z7_x86_cpuid(d, 0x80000000); if (d[0] < 0x80000001) return False; z7_x86_cpuid(d, 0x80000001); - return (d[3] >> 26) & 1; + return (BoolInt)(d[3] >> 26) & 1; } } #elif defined(MY_CPU_ARM_OR_ARM64) @@ -745,10 +830,22 @@ BoolInt CPU_IsSupported_CRC32(void) BoolInt CPU_IsSupported_NEON(void) { return z7_sysctlbyname_Get_BoolInt("hw.optional.neon"); } +BoolInt CPU_IsSupported_SHA512(void) +{ + return z7_sysctlbyname_Get_BoolInt("hw.optional.armv8_2_sha512"); +} + +/* +BoolInt CPU_IsSupported_SHA3(void) +{ + return z7_sysctlbyname_Get_BoolInt("hw.optional.armv8_2_sha3"); +} +*/ + #ifdef MY_CPU_ARM64 #define APPLE_CRYPTO_SUPPORT_VAL 1 #else #define APPLE_CRYPTO_SUPPORT_VAL 0 #endif @@ -758,44 +855,94 @@ BoolInt CPU_IsSupported_SHA2(void) { return APPLE_CRYPTO_SUPPORT_VAL; } BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYPTO_SUPPORT_VAL; } #else // __APPLE__ -#include <sys/auxv.h> +#if defined(__GLIBC__) && (__GLIBC__ * 100 + __GLIBC_MINOR__ >= 216) + #define Z7_GETAUXV_AVAILABLE +#else +// #pragma message("=== is not NEW GLIBC === ") + #if defined __has_include + #if __has_include (<sys/auxv.h>) +// #pragma message("=== sys/auxv.h is avail=== ") + #define Z7_GETAUXV_AVAILABLE + #endif + #endif +#endif +#ifdef Z7_GETAUXV_AVAILABLE +// #pragma message("=== Z7_GETAUXV_AVAILABLE === ") +#include <sys/auxv.h> #define USE_HWCAP +#endif #ifdef USE_HWCAP +#if defined(__FreeBSD__) +static unsigned long MY_getauxval(int aux) +{ + unsigned long val; + if (elf_aux_info(aux, &val, sizeof(val))) + return 0; + return val; +} +#else +#define MY_getauxval getauxval + #if defined __has_include + #if __has_include (<asm/hwcap.h>) #include <asm/hwcap.h> + #endif + #endif +#endif #define MY_HWCAP_CHECK_FUNC_2(name1, name2) \ - BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP) & (HWCAP_ ## name2)) ? 1 : 0; } + BoolInt CPU_IsSupported_ ## name1(void) { return (MY_getauxval(AT_HWCAP) & (HWCAP_ ## name2)); } #ifdef MY_CPU_ARM64 #define MY_HWCAP_CHECK_FUNC(name) \ MY_HWCAP_CHECK_FUNC_2(name, name) +#if 1 || defined(__ARM_NEON) + BoolInt CPU_IsSupported_NEON(void) { return True; } +#else MY_HWCAP_CHECK_FUNC_2(NEON, ASIMD) +#endif // MY_HWCAP_CHECK_FUNC (ASIMD) #elif defined(MY_CPU_ARM) #define MY_HWCAP_CHECK_FUNC(name) \ - BoolInt CPU_IsSupported_ ## name() { return (getauxval(AT_HWCAP2) & (HWCAP2_ ## name)) ? 1 : 0; } + BoolInt CPU_IsSupported_ ## name(void) { return (MY_getauxval(AT_HWCAP2) & (HWCAP2_ ## name)); } MY_HWCAP_CHECK_FUNC_2(NEON, NEON) #endif #else // USE_HWCAP #define MY_HWCAP_CHECK_FUNC(name) \ - BoolInt CPU_IsSupported_ ## name() { return 0; } + BoolInt CPU_IsSupported_ ## name(void) { return 0; } +#if defined(__ARM_NEON) + BoolInt CPU_IsSupported_NEON(void) { return True; } +#else MY_HWCAP_CHECK_FUNC(NEON) +#endif #endif // USE_HWCAP MY_HWCAP_CHECK_FUNC (CRC32) MY_HWCAP_CHECK_FUNC (SHA1) MY_HWCAP_CHECK_FUNC (SHA2) MY_HWCAP_CHECK_FUNC (AES) +#ifdef MY_CPU_ARM64 +// <hwcap.h> supports HWCAP_SHA512 and HWCAP_SHA3 since 2017. +// we define them here, if they are not defined +#ifndef HWCAP_SHA3 +// #define HWCAP_SHA3 (1 << 17) +#endif +#ifndef HWCAP_SHA512 +// #pragma message("=== HWCAP_SHA512 define === ") +#define HWCAP_SHA512 (1 << 21) +#endif +MY_HWCAP_CHECK_FUNC (SHA512) +// MY_HWCAP_CHECK_FUNC (SHA3) +#endif #endif // __APPLE__ #endif // _WIN32 #endif // MY_CPU_ARM_OR_ARM64 diff --git a/src/Common/lzma/CpuArch.h b/src/Common/lzma/CpuArch.h index 8e5d8a54..a6297ea4 100644 --- a/src/Common/lzma/CpuArch.h +++ b/src/Common/lzma/CpuArch.h @@ -1,7 +1,7 @@ /* CpuArch.h -- CPU specific code -2023-04-02 : Igor Pavlov : Public domain */ +Igor Pavlov : Public domain */ #ifndef ZIP7_INC_CPU_ARCH_H #define ZIP7_INC_CPU_ARCH_H #include "7zTypes.h" @@ -18,10 +18,11 @@ MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned mem MY_CPU_64BIT means that processor can work with 64-bit registers. MY_CPU_64BIT can be used to select fast code branch MY_CPU_64BIT doesn't mean that (sizeof(void *) == 8) */ +#if !defined(_M_ARM64EC) #if defined(_M_X64) \ || defined(_M_AMD64) \ || defined(__x86_64__) \ || defined(__AMD64__) \ || defined(__amd64__) @@ -33,10 +34,11 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #define MY_CPU_NAME "x64" #define MY_CPU_SIZEOF_POINTER 8 #endif #define MY_CPU_64BIT #endif +#endif #if defined(_M_IX86) \ || defined(__i386__) #define MY_CPU_X86 @@ -45,21 +47,30 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #define MY_CPU_SIZEOF_POINTER 4 #endif #if defined(_M_ARM64) \ + || defined(_M_ARM64EC) \ || defined(__AARCH64EL__) \ || defined(__AARCH64EB__) \ || defined(__aarch64__) #define MY_CPU_ARM64 - #ifdef __ILP32__ +#if defined(__ILP32__) \ + || defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 4) #define MY_CPU_NAME "arm64-32" #define MY_CPU_SIZEOF_POINTER 4 - #else +#elif defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 16) + #define MY_CPU_NAME "arm64-128" + #define MY_CPU_SIZEOF_POINTER 16 +#else +#if defined(_M_ARM64EC) + #define MY_CPU_NAME "arm64ec" +#else #define MY_CPU_NAME "arm64" +#endif #define MY_CPU_SIZEOF_POINTER 8 - #endif +#endif #define MY_CPU_64BIT #endif #if defined(_M_ARM) \ @@ -131,22 +142,83 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. /* #define MY_CPU_32BIT */ #endif #endif +#if defined(__sparc__) \ + || defined(__sparc) + #define MY_CPU_SPARC + #if defined(__LP64__) \ + || defined(_LP64) \ + || defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 8) + #define MY_CPU_NAME "sparcv9" + #define MY_CPU_SIZEOF_POINTER 8 + #define MY_CPU_64BIT + #elif defined(__sparc_v9__) \ + || defined(__sparcv9) + #define MY_CPU_64BIT + #if defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 4) + #define MY_CPU_NAME "sparcv9-32" + #else + #define MY_CPU_NAME "sparcv9m" + #endif + #elif defined(__sparc_v8__) \ + || defined(__sparcv8) + #define MY_CPU_NAME "sparcv8" + #define MY_CPU_SIZEOF_POINTER 4 + #else + #define MY_CPU_NAME "sparc" + #endif +#endif + + #if defined(__riscv) \ || defined(__riscv__) + #define MY_CPU_RISCV #if __riscv_xlen == 32 #define MY_CPU_NAME "riscv32" #elif __riscv_xlen == 64 #define MY_CPU_NAME "riscv64" #else #define MY_CPU_NAME "riscv" #endif #endif +#if defined(__loongarch__) + #define MY_CPU_LOONGARCH + #if defined(__loongarch64) || defined(__loongarch_grlen) && (__loongarch_grlen == 64) + #define MY_CPU_64BIT + #endif + #if defined(__loongarch64) + #define MY_CPU_NAME "loongarch64" + #define MY_CPU_LOONGARCH64 + #else + #define MY_CPU_NAME "loongarch" + #endif +#endif + + +// #undef MY_CPU_NAME +// #undef MY_CPU_SIZEOF_POINTER +// #define __e2k__ +// #define __SIZEOF_POINTER__ 4 +#if defined(__e2k__) + #define MY_CPU_E2K + #if defined(__ILP32__) || defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 4) + #define MY_CPU_NAME "e2k-32" + #define MY_CPU_SIZEOF_POINTER 4 + #else + #define MY_CPU_NAME "e2k" + #if defined(__LP64__) || defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 8) + #define MY_CPU_SIZEOF_POINTER 8 + #endif + #endif + #define MY_CPU_64BIT +#endif + + #if defined(MY_CPU_X86) || defined(MY_CPU_AMD64) #define MY_CPU_X86_OR_AMD64 #endif #if defined(MY_CPU_ARM) || defined(MY_CPU_ARM64) @@ -173,10 +245,11 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #if defined(MY_CPU_X86_OR_AMD64) \ || defined(MY_CPU_ARM_LE) \ || defined(MY_CPU_ARM64_LE) \ || defined(MY_CPU_IA64_LE) \ + || defined(_LITTLE_ENDIAN) \ || defined(__LITTLE_ENDIAN__) \ || defined(__ARMEL__) \ || defined(__THUMBEL__) \ || defined(__AARCH64EL__) \ || defined(__MIPSEL__) \ @@ -249,10 +322,11 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #endif #endif #ifndef MY_CPU_NAME + // #define MY_CPU_IS_UNKNOWN #ifdef MY_CPU_LE #define MY_CPU_NAME "LE" #elif defined(MY_CPU_BE) #define MY_CPU_NAME "BE" #else @@ -293,13 +367,23 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #define Z7_BSWAP16(v) _byteswap_ushort(v) #define Z7_BSWAP32(v) _byteswap_ulong (v) #define Z7_BSWAP64(v) _byteswap_uint64(v) #define Z7_CPU_FAST_BSWAP_SUPPORTED -#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) \ - || (defined(__clang__) && Z7_has_builtin(__builtin_bswap16)) - +/* GCC can generate slow code that calls function for __builtin_bswap32() for: + - GCC for RISCV, if Zbb/XTHeadBb extension is not used. + - GCC for SPARC. + The code from CLANG for SPARC also is not fastest. + So we don't define Z7_CPU_FAST_BSWAP_SUPPORTED in some cases. +*/ +#elif (!defined(MY_CPU_RISCV) || defined (__riscv_zbb) || defined(__riscv_xtheadbb)) \ + && !defined(MY_CPU_SPARC) \ + && ( \ + (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) \ + || (defined(__clang__) && Z7_has_builtin(__builtin_bswap16)) \ + ) + #define Z7_BSWAP16(v) __builtin_bswap16(v) #define Z7_BSWAP32(v) __builtin_bswap32(v) #define Z7_BSWAP64(v) __builtin_bswap64(v) #define Z7_CPU_FAST_BSWAP_SUPPORTED @@ -327,17 +411,52 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #ifdef MY_CPU_LE #if defined(MY_CPU_X86_OR_AMD64) \ - || defined(MY_CPU_ARM64) + || defined(MY_CPU_ARM64) \ + || defined(MY_CPU_RISCV) && defined(__riscv_misaligned_fast) \ + || defined(MY_CPU_E2K) && defined(__iset__) && (__iset__ >= 6) #define MY_CPU_LE_UNALIGN #define MY_CPU_LE_UNALIGN_64 #elif defined(__ARM_FEATURE_UNALIGNED) - /* gcc9 for 32-bit arm can use LDRD instruction that requires 32-bit alignment. - So we can't use unaligned 64-bit operations. */ - #define MY_CPU_LE_UNALIGN +/* === ALIGNMENT on 32-bit arm and LDRD/STRD/LDM/STM instructions. + Description of problems: +problem-1 : 32-bit ARM architecture: + multi-access (pair of 32-bit accesses) instructions (LDRD/STRD/LDM/STM) + require 32-bit (WORD) alignment (by 32-bit ARM architecture). + So there is "Alignment fault exception", if data is not aligned for 32-bit. + +problem-2 : 32-bit kernels and arm64 kernels: + 32-bit linux kernels provide fixup for these "paired" instruction "Alignment fault exception". + So unaligned paired-access instructions work via exception handler in kernel in 32-bit linux. + + But some arm64 kernels do not handle these faults in 32-bit programs. + So we have unhandled exception for such instructions. + Probably some new arm64 kernels have fixed it, and unaligned + paired-access instructions work in new kernels? + +problem-3 : compiler for 32-bit arm: + Compilers use LDRD/STRD/LDM/STM for UInt64 accesses + and for another cases where two 32-bit accesses are fused + to one multi-access instruction. + So UInt64 variables must be aligned for 32-bit, and each + 32-bit access must be aligned for 32-bit, if we want to + avoid "Alignment fault" exception (handled or unhandled). + +problem-4 : performace: + Even if unaligned access is handled by kernel, it will be slow. + So if we allow unaligned access, we can get fast unaligned + single-access, and slow unaligned paired-access. + + We don't allow unaligned access on 32-bit arm, because compiler + genarates paired-access instructions that require 32-bit alignment, + and some arm64 kernels have no handler for these instructions. + Also unaligned paired-access instructions will be slow, if kernel handles them. +*/ + // it must be disabled: + // #define MY_CPU_LE_UNALIGN #endif #endif #ifdef MY_CPU_LE_UNALIGN @@ -388,15 +507,23 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #endif #if defined(MY_CPU_LE_UNALIGN) && defined(Z7_CPU_FAST_BSWAP_SUPPORTED) +#if 0 +// Z7_BSWAP16 can be slow for x86-msvc +#define GetBe16_to32(p) (Z7_BSWAP16 (*(const UInt16 *)(const void *)(p))) +#else +#define GetBe16_to32(p) (Z7_BSWAP32 (*(const UInt16 *)(const void *)(p)) >> 16) +#endif + #define GetBe32(p) Z7_BSWAP32 (*(const UInt32 *)(const void *)(p)) #define SetBe32(p, v) { (*(UInt32 *)(void *)(p)) = Z7_BSWAP32(v); } #if defined(MY_CPU_LE_UNALIGN_64) #define GetBe64(p) Z7_BSWAP64 (*(const UInt64 *)(const void *)(p)) +#define SetBe64(p, v) { (*(UInt64 *)(void *)(p)) = Z7_BSWAP64(v); } #endif #else #define GetBe32(p) ( \ @@ -415,15 +542,31 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #ifndef GetBe64 #define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4)) #endif +#ifndef SetBe64 +#define SetBe64(p, v) { Byte *_ppp_ = (Byte *)(p); UInt64 _vvv_ = (v); \ + _ppp_[0] = (Byte)(_vvv_ >> 56); \ + _ppp_[1] = (Byte)(_vvv_ >> 48); \ + _ppp_[2] = (Byte)(_vvv_ >> 40); \ + _ppp_[3] = (Byte)(_vvv_ >> 32); \ + _ppp_[4] = (Byte)(_vvv_ >> 24); \ + _ppp_[5] = (Byte)(_vvv_ >> 16); \ + _ppp_[6] = (Byte)(_vvv_ >> 8); \ + _ppp_[7] = (Byte)_vvv_; } +#endif + #ifndef GetBe16 +#ifdef GetBe16_to32 +#define GetBe16(p) ( (UInt16) GetBe16_to32(p)) +#else #define GetBe16(p) ( (UInt16) ( \ ((UInt16)((const Byte *)(p))[0] << 8) | \ ((const Byte *)(p))[1] )) #endif +#endif #if defined(MY_CPU_BE) #define Z7_CONV_BE_TO_NATIVE_CONST32(v) (v) #define Z7_CONV_LE_TO_NATIVE_CONST32(v) Z7_BSWAP32_CONST(v) @@ -437,37 +580,46 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. #endif #if defined(MY_CPU_BE) +#define GetBe64a(p) (*(const UInt64 *)(const void *)(p)) #define GetBe32a(p) (*(const UInt32 *)(const void *)(p)) #define GetBe16a(p) (*(const UInt16 *)(const void *)(p)) #define SetBe32a(p, v) { *(UInt32 *)(void *)(p) = (v); } #define SetBe16a(p, v) { *(UInt16 *)(void *)(p) = (v); } +#define GetUi64a(p) GetUi64(p) #define GetUi32a(p) GetUi32(p) #define GetUi16a(p) GetUi16(p) #define SetUi32a(p, v) SetUi32(p, v) #define SetUi16a(p, v) SetUi16(p, v) #elif defined(MY_CPU_LE) +#define GetUi64a(p) (*(const UInt64 *)(const void *)(p)) #define GetUi32a(p) (*(const UInt32 *)(const void *)(p)) #define GetUi16a(p) (*(const UInt16 *)(const void *)(p)) #define SetUi32a(p, v) { *(UInt32 *)(void *)(p) = (v); } #define SetUi16a(p, v) { *(UInt16 *)(void *)(p) = (v); } +#define GetBe64a(p) GetBe64(p) #define GetBe32a(p) GetBe32(p) #define GetBe16a(p) GetBe16(p) #define SetBe32a(p, v) SetBe32(p, v) #define SetBe16a(p, v) SetBe16(p, v) #else #error Stop_Compiling_Unknown_Endian_CPU_a #endif +#ifndef GetBe16_to32 +#define GetBe16_to32(p) GetBe16(p) +#endif + + #if defined(MY_CPU_X86_OR_AMD64) \ || defined(MY_CPU_ARM_OR_ARM64) \ || defined(MY_CPU_PPC_OR_PPC64) #define Z7_CPU_FAST_ROTATE_SUPPORTED #endif @@ -484,17 +636,19 @@ UInt32 Z7_FASTCALL z7_x86_cpuid_GetMaxFunc(void); #endif BoolInt CPU_IsSupported_AES(void); BoolInt CPU_IsSupported_AVX(void); BoolInt CPU_IsSupported_AVX2(void); +BoolInt CPU_IsSupported_AVX512F_AVX512VL(void); BoolInt CPU_IsSupported_VAES_AVX2(void); BoolInt CPU_IsSupported_CMOV(void); BoolInt CPU_IsSupported_SSE(void); BoolInt CPU_IsSupported_SSE2(void); BoolInt CPU_IsSupported_SSSE3(void); BoolInt CPU_IsSupported_SSE41(void); BoolInt CPU_IsSupported_SHA(void); +BoolInt CPU_IsSupported_SHA512(void); BoolInt CPU_IsSupported_PageGB(void); #elif defined(MY_CPU_ARM_OR_ARM64) BoolInt CPU_IsSupported_CRC32(void); @@ -508,10 +662,11 @@ BoolInt CPU_IsSupported_CRYPTO(void); #else BoolInt CPU_IsSupported_SHA1(void); BoolInt CPU_IsSupported_SHA2(void); BoolInt CPU_IsSupported_AES(void); #endif +BoolInt CPU_IsSupported_SHA512(void); #endif #if defined(__APPLE__) int z7_sysctlbyname_Get(const char *name, void *buf, size_t *bufSize); diff --git a/src/Common/lzma/LzFind.c b/src/Common/lzma/LzFind.c index 0fbd5aae..1ce40464 100644 --- a/src/Common/lzma/LzFind.c +++ b/src/Common/lzma/LzFind.c @@ -1,7 +1,7 @@ /* LzFind.c -- Match finder for LZ algorithms -2023-03-14 : Igor Pavlov : Public domain */ +2024-03-01 : Igor Pavlov : Public domain */ #include "Precomp.h" #include <string.h> // #include <stdio.h> @@ -106,13 +106,19 @@ static int LzInWindow_Create2(CMatchFinder *p, UInt32 blockSize, ISzAllocPtr all // return 0; // for debug } return (p->bufBase != NULL); } -static const Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } +static const Byte *MatchFinder_GetPointerToCurrentPos(void *p) +{ + return ((CMatchFinder *)p)->buffer; +} -static UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return GET_AVAIL_BYTES(p); } +static UInt32 MatchFinder_GetNumAvailableBytes(void *p) +{ + return GET_AVAIL_BYTES((CMatchFinder *)p); +} Z7_NO_INLINE static void MatchFinder_ReadBlock(CMatchFinder *p) { @@ -569,12 +575,13 @@ void MatchFinder_Init_4(CMatchFinder *p) // (CYC_TO_POS_OFFSET == 0) is expected by some optimized code #define CYC_TO_POS_OFFSET 0 // #define CYC_TO_POS_OFFSET 1 // for debug -void MatchFinder_Init(CMatchFinder *p) +void MatchFinder_Init(void *_p) { + CMatchFinder *p = (CMatchFinder *)_p; MatchFinder_Init_HighHash(p); MatchFinder_Init_LowHash(p); MatchFinder_Init_4(p); // if (readData) MatchFinder_ReadBlock(p); @@ -605,29 +612,29 @@ void MatchFinder_Init(CMatchFinder *p) #if (_MSC_VER >= 1900) #define USE_LZFIND_SATUR_SUB_256 #endif #endif -// #elif defined(MY_CPU_ARM_OR_ARM64) -#elif defined(MY_CPU_ARM64) +#elif defined(MY_CPU_ARM64) \ + /* || (defined(__ARM_ARCH) && (__ARM_ARCH >= 7)) */ - #if defined(__clang__) && (__clang_major__ >= 8) \ - || defined(__GNUC__) && (__GNUC__ >= 8) + #if defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 30800) \ + || defined(__GNUC__) && (__GNUC__ >= 6) #define USE_LZFIND_SATUR_SUB_128 #ifdef MY_CPU_ARM64 // #define LZFIND_ATTRIB_SSE41 __attribute__((__target__(""))) #else - // #define LZFIND_ATTRIB_SSE41 __attribute__((__target__("fpu=crypto-neon-fp-armv8"))) + #define LZFIND_ATTRIB_SSE41 __attribute__((__target__("fpu=neon"))) #endif #elif defined(_MSC_VER) #if (_MSC_VER >= 1910) #define USE_LZFIND_SATUR_SUB_128 #endif #endif - #if defined(_MSC_VER) && defined(MY_CPU_ARM64) + #if defined(Z7_MSC_VER_ORIGINAL) && defined(MY_CPU_ARM64) #include <arm64_neon.h> #else #include <arm_neon.h> #endif @@ -1080,13 +1087,15 @@ static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const return; } #define MOVE_POS \ - ++p->cyclicBufferPos; \ + p->cyclicBufferPos++; \ p->buffer++; \ - { const UInt32 pos1 = p->pos + 1; p->pos = pos1; if (pos1 == p->posLimit) MatchFinder_CheckLimits(p); } + { const UInt32 pos1 = p->pos + 1; \ + p->pos = pos1; \ + if (pos1 == p->posLimit) MatchFinder_CheckLimits(p); } #define MOVE_POS_RET MOVE_POS return distances; Z7_NO_INLINE static void MatchFinder_MovePos(CMatchFinder *p) @@ -1101,24 +1110,30 @@ static void MatchFinder_MovePos(CMatchFinder *p) */ MOVE_POS } #define GET_MATCHES_HEADER2(minLen, ret_op) \ - unsigned lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \ - lenLimit = (unsigned)p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ + UInt32 hv; const Byte *cur; UInt32 curMatch; \ + UInt32 lenLimit = p->lenLimit; \ + if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; } \ cur = p->buffer; #define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return distances) -#define SKIP_HEADER(minLen) do { GET_MATCHES_HEADER2(minLen, continue) +#define SKIP_HEADER(minLen) \ + do { GET_MATCHES_HEADER2(minLen, continue) -#define MF_PARAMS(p) lenLimit, curMatch, p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue +#define MF_PARAMS(p) lenLimit, curMatch, p->pos, p->buffer, p->son, \ + p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue -#define SKIP_FOOTER SkipMatchesSpec(MF_PARAMS(p)); MOVE_POS } while (--num); +#define SKIP_FOOTER \ + SkipMatchesSpec(MF_PARAMS(p)); \ + MOVE_POS \ + } while (--num); #define GET_MATCHES_FOOTER_BASE(_maxLen_, func) \ - distances = func(MF_PARAMS(p), \ - distances, (UInt32)_maxLen_); MOVE_POS_RET + distances = func(MF_PARAMS(p), distances, (UInt32)_maxLen_); \ + MOVE_POS_RET #define GET_MATCHES_FOOTER_BT(_maxLen_) \ GET_MATCHES_FOOTER_BASE(_maxLen_, GetMatchesSpec1) #define GET_MATCHES_FOOTER_HC(_maxLen_) \ @@ -1131,12 +1146,13 @@ static void MatchFinder_MovePos(CMatchFinder *p) const Byte *c = cur + maxLen; \ const Byte *lim = cur + lenLimit; \ for (; c != lim; c++) if (*(c + diff) != *c) break; \ maxLen = (unsigned)(c - cur); } -static UInt32* Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +static UInt32* Bt2_MatchFinder_GetMatches(void *_p, UInt32 *distances) { + CMatchFinder *p = (CMatchFinder *)_p; GET_MATCHES_HEADER(2) HASH2_CALC curMatch = p->hash[hv]; p->hash[hv] = p->pos; GET_MATCHES_FOOTER_BT(1) @@ -1156,12 +1172,13 @@ UInt32* Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) mmm = p->cyclicBufferSize; \ if (pos < mmm) \ mmm = pos; -static UInt32* Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +static UInt32* Bt3_MatchFinder_GetMatches(void *_p, UInt32 *distances) { + CMatchFinder *p = (CMatchFinder *)_p; UInt32 mmm; UInt32 h2, d2, pos; unsigned maxLen; UInt32 *hash; GET_MATCHES_HEADER(3) @@ -1197,12 +1214,13 @@ static UInt32* Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) GET_MATCHES_FOOTER_BT(maxLen) } -static UInt32* Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +static UInt32* Bt4_MatchFinder_GetMatches(void *_p, UInt32 *distances) { + CMatchFinder *p = (CMatchFinder *)_p; UInt32 mmm; UInt32 h2, h3, d2, d3, pos; unsigned maxLen; UInt32 *hash; GET_MATCHES_HEADER(4) @@ -1265,14 +1283,16 @@ static UInt32* Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) GET_MATCHES_FOOTER_BT(maxLen) } -static UInt32* Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +static UInt32* Bt5_MatchFinder_GetMatches(void *_p, UInt32 *distances) { + CMatchFinder *p = (CMatchFinder *)_p; UInt32 mmm; - UInt32 h2, h3, d2, d3, maxLen, pos; + UInt32 h2, h3, d2, d3, pos; + unsigned maxLen; UInt32 *hash; GET_MATCHES_HEADER(5) HASH5_CALC @@ -1337,12 +1357,13 @@ static UInt32* Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) GET_MATCHES_FOOTER_BT(maxLen) } -static UInt32* Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +static UInt32* Hc4_MatchFinder_GetMatches(void *_p, UInt32 *distances) { + CMatchFinder *p = (CMatchFinder *)_p; UInt32 mmm; UInt32 h2, h3, d2, d3, pos; unsigned maxLen; UInt32 *hash; GET_MATCHES_HEADER(4) @@ -1405,14 +1426,16 @@ static UInt32* Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) GET_MATCHES_FOOTER_HC(maxLen) } -static UInt32 * Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +static UInt32 * Hc5_MatchFinder_GetMatches(void *_p, UInt32 *distances) { + CMatchFinder *p = (CMatchFinder *)_p; UInt32 mmm; - UInt32 h2, h3, d2, d3, maxLen, pos; + UInt32 h2, h3, d2, d3, pos; + unsigned maxLen; UInt32 *hash; GET_MATCHES_HEADER(5) HASH5_CALC @@ -1464,11 +1487,11 @@ static UInt32 * Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) distances[-2] = 3; if (*(cur - d2 + 3) != cur[3]) break; UPDATE_maxLen - distances[-2] = maxLen; + distances[-2] = (UInt32)maxLen; if (maxLen == lenLimit) { p->son[p->cyclicBufferPos] = curMatch; MOVE_POS_RET } @@ -1487,12 +1510,13 @@ UInt32* Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) p->hash[hv] = p->pos; GET_MATCHES_FOOTER_HC(2) } -static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +static void Bt2_MatchFinder_Skip(void *_p, UInt32 num) { + CMatchFinder *p = (CMatchFinder *)_p; SKIP_HEADER(2) { HASH2_CALC curMatch = p->hash[hv]; p->hash[hv] = p->pos; @@ -1509,12 +1533,13 @@ void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) p->hash[hv] = p->pos; } SKIP_FOOTER } -static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +static void Bt3_MatchFinder_Skip(void *_p, UInt32 num) { + CMatchFinder *p = (CMatchFinder *)_p; SKIP_HEADER(3) { UInt32 h2; UInt32 *hash; HASH3_CALC @@ -1524,12 +1549,13 @@ static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num) (hash + kFix3HashSize)[hv] = p->pos; } SKIP_FOOTER } -static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +static void Bt4_MatchFinder_Skip(void *_p, UInt32 num) { + CMatchFinder *p = (CMatchFinder *)_p; SKIP_HEADER(4) { UInt32 h2, h3; UInt32 *hash; HASH4_CALC @@ -1540,12 +1566,13 @@ static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) (hash + kFix4HashSize)[hv] = p->pos; } SKIP_FOOTER } -static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +static void Bt5_MatchFinder_Skip(void *_p, UInt32 num) { + CMatchFinder *p = (CMatchFinder *)_p; SKIP_HEADER(5) { UInt32 h2, h3; UInt32 *hash; HASH5_CALC @@ -1587,12 +1614,13 @@ static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) p->pos = pos; \ if (pos == p->posLimit) MatchFinder_CheckLimits(p); \ }} while(num); \ -static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +static void Hc4_MatchFinder_Skip(void *_p, UInt32 num) { + CMatchFinder *p = (CMatchFinder *)_p; HC_SKIP_HEADER(4) UInt32 h2, h3; HASH4_CALC curMatch = (hash + kFix4HashSize)[hv]; @@ -1602,12 +1630,13 @@ static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) HC_SKIP_FOOTER } -static void Hc5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +static void Hc5_MatchFinder_Skip(void *_p, UInt32 num) { + CMatchFinder *p = (CMatchFinder *)_p; HC_SKIP_HEADER(5) UInt32 h2, h3; HASH5_CALC curMatch = (hash + kFix5HashSize)[hv]; @@ -1632,45 +1661,45 @@ void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) } void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder2 *vTable) { - vTable->Init = (Mf_Init_Func)MatchFinder_Init; - vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; - vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; + vTable->Init = MatchFinder_Init; + vTable->GetNumAvailableBytes = MatchFinder_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = MatchFinder_GetPointerToCurrentPos; if (!p->btMode) { if (p->numHashBytes <= 4) { - vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; + vTable->GetMatches = Hc4_MatchFinder_GetMatches; + vTable->Skip = Hc4_MatchFinder_Skip; } else { - vTable->GetMatches = (Mf_GetMatches_Func)Hc5_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Hc5_MatchFinder_Skip; + vTable->GetMatches = Hc5_MatchFinder_GetMatches; + vTable->Skip = Hc5_MatchFinder_Skip; } } else if (p->numHashBytes == 2) { - vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; + vTable->GetMatches = Bt2_MatchFinder_GetMatches; + vTable->Skip = Bt2_MatchFinder_Skip; } else if (p->numHashBytes == 3) { - vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; + vTable->GetMatches = Bt3_MatchFinder_GetMatches; + vTable->Skip = Bt3_MatchFinder_Skip; } else if (p->numHashBytes == 4) { - vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; + vTable->GetMatches = Bt4_MatchFinder_GetMatches; + vTable->Skip = Bt4_MatchFinder_Skip; } else { - vTable->GetMatches = (Mf_GetMatches_Func)Bt5_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt5_MatchFinder_Skip; + vTable->GetMatches = Bt5_MatchFinder_GetMatches; + vTable->Skip = Bt5_MatchFinder_Skip; } } diff --git a/src/Common/lzma/LzFind.h b/src/Common/lzma/LzFind.h index a3f72c98..67e8a6e0 100644 --- a/src/Common/lzma/LzFind.h +++ b/src/Common/lzma/LzFind.h @@ -1,7 +1,7 @@ /* LzFind.h -- Match finder for LZ algorithms -2023-03-04 : Igor Pavlov : Public domain */ +2024-01-22 : Igor Pavlov : Public domain */ #ifndef ZIP7_INC_LZ_FIND_H #define ZIP7_INC_LZ_FIND_H #include "7zTypes.h" @@ -142,11 +142,12 @@ typedef struct void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder2 *vTable); void MatchFinder_Init_LowHash(CMatchFinder *p); void MatchFinder_Init_HighHash(CMatchFinder *p); void MatchFinder_Init_4(CMatchFinder *p); -void MatchFinder_Init(CMatchFinder *p); +// void MatchFinder_Init(CMatchFinder *p); +void MatchFinder_Init(void *p); UInt32* Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); UInt32* Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); diff --git a/src/Common/lzma/LzFindMt.c b/src/Common/lzma/LzFindMt.c index 5253e6eb..ac9d59d0 100644 --- a/src/Common/lzma/LzFindMt.c +++ b/src/Common/lzma/LzFindMt.c @@ -1,7 +1,7 @@ /* LzFindMt.c -- multithreaded Match finder for LZ algorithms -2023-04-02 : Igor Pavlov : Public domain */ +2024-01-22 : Igor Pavlov : Public domain */ #include "Precomp.h" // #include <stdio.h> @@ -92,11 +92,11 @@ static void MtSync_Construct(CMtSync *p) Semaphore_Construct(&p->freeSemaphore); Semaphore_Construct(&p->filledSemaphore); } -#define DEBUG_BUFFER_LOCK // define it to debug lock state +// #define DEBUG_BUFFER_LOCK // define it to debug lock state #ifdef DEBUG_BUFFER_LOCK #include <stdlib.h> #define BUFFER_MUST_BE_LOCKED(p) if (!(p)->csWasEntered) exit(1); #define BUFFER_MUST_BE_UNLOCKED(p) if ( (p)->csWasEntered) exit(1); @@ -875,12 +875,13 @@ SRes MatchFinderMt_InitMt(CMatchFinderMt *p) RINOK(MtSync_Init(&p->hashSync, kMtHashNumBlocks)) return MtSync_Init(&p->btSync, kMtBtNumBlocks); } -static void MatchFinderMt_Init(CMatchFinderMt *p) +static void MatchFinderMt_Init(void *_p) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; CMatchFinder *mf = MF(p); p->btBufPos = p->btBufPosLimit = NULL; p->hashBufPos = @@ -979,21 +980,23 @@ static UInt32 MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p) return p->btNumAvailBytes; } -static const Byte * MatchFinderMt_GetPointerToCurrentPos(CMatchFinderMt *p) +static const Byte * MatchFinderMt_GetPointerToCurrentPos(void *_p) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; return p->pointerToCurPos; } #define GET_NEXT_BLOCK_IF_REQUIRED if (p->btBufPos == p->btBufPosLimit) MatchFinderMt_GetNextBlock_Bt(p); -static UInt32 MatchFinderMt_GetNumAvailableBytes(CMatchFinderMt *p) +static UInt32 MatchFinderMt_GetNumAvailableBytes(void *_p) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; if (p->btBufPos != p->btBufPosLimit) return p->btNumAvailBytes; return MatchFinderMt_GetNextBlock_Bt(p); } @@ -1241,12 +1244,13 @@ static UInt32 * MixMatches4(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *d) return d; } -static UInt32 * MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *d) +static UInt32 * MatchFinderMt2_GetMatches(void *_p, UInt32 *d) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; const UInt32 *bt = p->btBufPos; const UInt32 len = *bt++; const UInt32 *btLim = bt + len; p->btBufPos = btLim; p->btNumAvailBytes--; @@ -1265,12 +1269,13 @@ static UInt32 * MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *d) return d; } -static UInt32 * MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *d) +static UInt32 * MatchFinderMt_GetMatches(void *_p, UInt32 *d) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; const UInt32 *bt = p->btBufPos; UInt32 len = *bt++; const UInt32 avail = p->btNumAvailBytes - 1; p->btNumAvailBytes = avail; p->btBufPos = bt + len; @@ -1313,27 +1318,30 @@ static UInt32 * MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *d) #define SKIP_HEADER2_MT do { GET_NEXT_BLOCK_IF_REQUIRED #define SKIP_HEADER_MT(n) SKIP_HEADER2_MT if (p->btNumAvailBytes-- >= (n)) { const Byte *cur = p->pointerToCurPos; UInt32 *hash = p->hash; #define SKIP_FOOTER_MT } INCREASE_LZ_POS p->btBufPos += (size_t)*p->btBufPos + 1; } while (--num != 0); -static void MatchFinderMt0_Skip(CMatchFinderMt *p, UInt32 num) +static void MatchFinderMt0_Skip(void *_p, UInt32 num) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; SKIP_HEADER2_MT { p->btNumAvailBytes--; SKIP_FOOTER_MT } -static void MatchFinderMt2_Skip(CMatchFinderMt *p, UInt32 num) +static void MatchFinderMt2_Skip(void *_p, UInt32 num) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; SKIP_HEADER_MT(2) UInt32 h2; MT_HASH2_CALC hash[h2] = p->lzPos; SKIP_FOOTER_MT } -static void MatchFinderMt3_Skip(CMatchFinderMt *p, UInt32 num) +static void MatchFinderMt3_Skip(void *_p, UInt32 num) { + CMatchFinderMt *p = (CMatchFinderMt *)_p; SKIP_HEADER_MT(3) UInt32 h2, h3; MT_HASH3_CALC (hash + kFix3HashSize)[h3] = hash[ h2] = @@ -1359,43 +1367,43 @@ static void MatchFinderMt4_Skip(CMatchFinderMt *p, UInt32 num) } */ void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder2 *vTable) { - vTable->Init = (Mf_Init_Func)MatchFinderMt_Init; - vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinderMt_GetNumAvailableBytes; - vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinderMt_GetPointerToCurrentPos; - vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt_GetMatches; + vTable->Init = MatchFinderMt_Init; + vTable->GetNumAvailableBytes = MatchFinderMt_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = MatchFinderMt_GetPointerToCurrentPos; + vTable->GetMatches = MatchFinderMt_GetMatches; switch (MF(p)->numHashBytes) { case 2: p->GetHeadsFunc = GetHeads2; - p->MixMatchesFunc = (Mf_Mix_Matches)NULL; - vTable->Skip = (Mf_Skip_Func)MatchFinderMt0_Skip; - vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt2_GetMatches; + p->MixMatchesFunc = NULL; + vTable->Skip = MatchFinderMt0_Skip; + vTable->GetMatches = MatchFinderMt2_GetMatches; break; case 3: p->GetHeadsFunc = MF(p)->bigHash ? GetHeads3b : GetHeads3; - p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches2; - vTable->Skip = (Mf_Skip_Func)MatchFinderMt2_Skip; + p->MixMatchesFunc = MixMatches2; + vTable->Skip = MatchFinderMt2_Skip; break; case 4: p->GetHeadsFunc = MF(p)->bigHash ? GetHeads4b : GetHeads4; // it's fast inline version of GetMatches() - // vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt_GetMatches_Bt4; + // vTable->GetMatches = MatchFinderMt_GetMatches_Bt4; - p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches3; - vTable->Skip = (Mf_Skip_Func)MatchFinderMt3_Skip; + p->MixMatchesFunc = MixMatches3; + vTable->Skip = MatchFinderMt3_Skip; break; default: p->GetHeadsFunc = MF(p)->bigHash ? GetHeads5b : GetHeads5; - p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches4; + p->MixMatchesFunc = MixMatches4; vTable->Skip = - (Mf_Skip_Func)MatchFinderMt3_Skip; - // (Mf_Skip_Func)MatchFinderMt4_Skip; + MatchFinderMt3_Skip; + // MatchFinderMt4_Skip; break; } } #undef RINOK_THREAD diff --git a/src/Common/lzma/LzFindMt.h b/src/Common/lzma/LzFindMt.h index db5923ea..fcb479da 100644 --- a/src/Common/lzma/LzFindMt.h +++ b/src/Common/lzma/LzFindMt.h @@ -1,7 +1,7 @@ /* LzFindMt.h -- multithreaded Match finder for LZ algorithms -2023-03-05 : Igor Pavlov : Public domain */ +2024-01-22 : Igor Pavlov : Public domain */ #ifndef ZIP7_INC_LZ_FIND_MT_H #define ZIP7_INC_LZ_FIND_MT_H #include "LzFind.h" @@ -29,19 +29,22 @@ typedef struct CSemaphore filledSemaphore; CCriticalSection cs; // UInt32 numBlocks_Sent; } CMtSync; -typedef UInt32 * (*Mf_Mix_Matches)(void *p, UInt32 matchMinPos, UInt32 *distances); + +struct CMatchFinderMt_; + +typedef UInt32 * (*Mf_Mix_Matches)(struct CMatchFinderMt_ *p, UInt32 matchMinPos, UInt32 *distances); /* kMtCacheLineDummy must be >= size_of_CPU_cache_line */ #define kMtCacheLineDummy 128 typedef void (*Mf_GetHeads)(const Byte *buffer, UInt32 pos, UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc); -typedef struct +typedef struct CMatchFinderMt_ { /* LZ */ const Byte *pointerToCurPos; UInt32 *btBuf; const UInt32 *btBufPos; diff --git a/src/Common/lzma/LzmaEnc.c b/src/Common/lzma/LzmaEnc.c index 6d13cac8..088b78f8 100644 --- a/src/Common/lzma/LzmaEnc.c +++ b/src/Common/lzma/LzmaEnc.c @@ -1,7 +1,7 @@ /* LzmaEnc.c -- LZMA Encoder -2023-04-13: Igor Pavlov : Public domain */ +Igor Pavlov : Public domain */ #include "Precomp.h" #include <string.h> @@ -70,15 +70,15 @@ void LzmaEncProps_Normalize(CLzmaEncProps *p) int level = p->level; if (level < 0) level = 5; p->level = level; if (p->dictSize == 0) - p->dictSize = - ( level <= 3 ? ((UInt32)1 << (level * 2 + 16)) : - ( level <= 6 ? ((UInt32)1 << (level + 19)) : - ( level <= 7 ? ((UInt32)1 << 25) : ((UInt32)1 << 26) - ))); + p->dictSize = (unsigned)level <= 4 ? + (UInt32)1 << (level * 2 + 16) : + (unsigned)level <= sizeof(size_t) / 2 + 4 ? + (UInt32)1 << (level + 20) : + (UInt32)1 << (sizeof(size_t) / 2 + 24); if (p->dictSize > p->reduceSize) { UInt32 v = (UInt32)p->reduceSize; const UInt32 kReduceMin = ((UInt32)1 << 12); @@ -90,12 +90,12 @@ void LzmaEncProps_Normalize(CLzmaEncProps *p) if (p->lc < 0) p->lc = 3; if (p->lp < 0) p->lp = 0; if (p->pb < 0) p->pb = 2; - if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); - if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); + if (p->algo < 0) p->algo = (unsigned)level < 5 ? 0 : 1; + if (p->fb < 0) p->fb = (unsigned)level < 7 ? 32 : 64; if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); if (p->numHashBytes < 0) p->numHashBytes = (p->btMode ? 4 : 5); if (p->mc == 0) p->mc = (16 + ((unsigned)p->fb >> 1)) >> (p->btMode ? 0 : 1); if (p->numThreads < 0) @@ -193,15 +193,15 @@ LZCNT can be faster than BSR, if supported. unsigned GetPosSlot1(UInt32 pos); unsigned GetPosSlot1(UInt32 pos) { unsigned res; - BSR2_RET(pos, res); + BSR2_RET(pos, res) return res; } -#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } -#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res) } +#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res) } #else // ! LZMA_LOG_BSR #define kNumLogBits (11 + sizeof(size_t) / 8 * 3) @@ -510,11 +510,11 @@ struct CLzmaEnc COPY_ARR(d, s, isRep0Long) \ COPY_ARR(d, s, posSlotEncoder) \ COPY_ARR(d, s, posEncoders) \ (d)->lenProbs = (s)->lenProbs; \ (d)->repLenProbs = (s)->repLenProbs; \ - memcpy((d)->litProbs, (s)->litProbs, ((UInt32)0x300 << (p)->lclp) * sizeof(CLzmaProb)); + memcpy((d)->litProbs, (s)->litProbs, ((size_t)0x300 * sizeof(CLzmaProb)) << (p)->lclp); void LzmaEnc_SaveState(CLzmaEncHandle p) { // GET_CLzmaEnc_p CSaveState *v = &p->saveState; @@ -1038,27 +1038,27 @@ Z7_NO_INLINE static void Z7_FASTCALL LenPriceEnc_UpdateTables( // UInt32 price = a + RcTree_GetPrice(probs, kLenNumHighBits - 1, sym, ProbPrices); unsigned sym = --i + (1 << (kLenNumHighBits - 1)); UInt32 price = b; do { - unsigned bit = sym & 1; + const unsigned bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); } while (sym >= 2); { - unsigned prob = probs[(size_t)i + (1 << (kLenNumHighBits - 1))]; + const unsigned prob = probs[(size_t)i + (1 << (kLenNumHighBits - 1))]; prices[(size_t)i * 2 ] = price + GET_PRICEa_0(prob); prices[(size_t)i * 2 + 1] = price + GET_PRICEa_1(prob); } } while (i); { unsigned posState; - size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof(p->prices[0][0]); + const size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof(p->prices[0][0]); for (posState = 1; posState < numPosStates; posState++) memcpy(p->prices[posState] + kLenNumLowSymbols * 2, p->prices[0] + kLenNumLowSymbols * 2, num); } } } @@ -2694,16 +2694,16 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, #ifndef Z7_ST p->mtMode = (p->multiThread && !p->fastMode && (MFB.btMode != 0)); #endif { - unsigned lclp = p->lc + p->lp; + const unsigned lclp = p->lc + p->lp; if (!p->litProbs || !p->saveState.litProbs || p->lclp != lclp) { LzmaEnc_FreeLits(p, alloc); - p->litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); - p->saveState.litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); + p->litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((size_t)0x300 * sizeof(CLzmaProb)) << lclp); + p->saveState.litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((size_t)0x300 * sizeof(CLzmaProb)) << lclp); if (!p->litProbs || !p->saveState.litProbs) { LzmaEnc_FreeLits(p, alloc); return SZ_ERROR_MEM; } @@ -2800,12 +2800,12 @@ static void LzmaEnc_Init(CLzmaEnc *p) for (i = 0; i < kNumFullDistances; i++) p->posEncoders[i] = kProbInitValue; } { - UInt32 num = (UInt32)0x300 << (p->lp + p->lc); - UInt32 k; + const size_t num = (size_t)0x300 << (p->lp + p->lc); + size_t k; CLzmaProb *probs = p->litProbs; for (k = 0; k < num; k++) probs[k] = kProbInitValue; } diff --git a/src/Common/lzma/Precomp.h b/src/Common/lzma/Precomp.h index 69afb2ff..7747fdd7 100644 --- a/src/Common/lzma/Precomp.h +++ b/src/Common/lzma/Precomp.h @@ -1,10 +1,127 @@ -/* Precomp.h -- StdAfx -2023-04-02 : Igor Pavlov : Public domain */ +/* Precomp.h -- precompilation file +2024-01-25 : Igor Pavlov : Public domain */ #ifndef ZIP7_INC_PRECOMP_H #define ZIP7_INC_PRECOMP_H +/* + this file must be included before another *.h files and before <windows.h>. + this file is included from the following files: + C\*.c + C\Util\*\Precomp.h <- C\Util\*\*.c + CPP\Common\Common.h <- *\StdAfx.h <- *\*.cpp + + this file can set the following macros: + Z7_LARGE_PAGES 1 + Z7_LONG_PATH 1 + Z7_WIN32_WINNT_MIN 0x0500 (or higher) : we require at least win2000+ for 7-Zip + _WIN32_WINNT 0x0500 (or higher) + WINVER _WIN32_WINNT + UNICODE 1 + _UNICODE 1 +*/ + #include "Compiler.h" -/* #include "7zTypes.h" */ + +#ifdef _MSC_VER +// #pragma warning(disable : 4206) // nonstandard extension used : translation unit is empty +#if _MSC_VER >= 1912 +// #pragma warning(disable : 5039) // pointer or reference to potentially throwing function passed to 'extern "C"' function under - EHc.Undefined behavior may occur if this function throws an exception. +#endif +#endif + +/* +// for debug: +#define UNICODE 1 +#define _UNICODE 1 +#define _WIN32_WINNT 0x0500 // win2000 +#ifndef WINVER + #define WINVER _WIN32_WINNT +#endif +*/ + +#ifdef _WIN32 +/* + this "Precomp.h" file must be included before <windows.h>, + if we want to define _WIN32_WINNT before <windows.h>. +*/ + +#ifndef Z7_LARGE_PAGES +#ifndef Z7_NO_LARGE_PAGES +#define Z7_LARGE_PAGES 1 +#endif +#endif + +#ifndef Z7_LONG_PATH +#ifndef Z7_NO_LONG_PATH +#define Z7_LONG_PATH 1 +#endif +#endif + +#ifndef Z7_DEVICE_FILE +#ifndef Z7_NO_DEVICE_FILE +// #define Z7_DEVICE_FILE 1 +#endif +#endif + +// we don't change macros if included after <windows.h> +#ifndef _WINDOWS_ + +#ifndef Z7_WIN32_WINNT_MIN + #if defined(_M_ARM64) || defined(__aarch64__) + // #define Z7_WIN32_WINNT_MIN 0x0a00 // win10 + #define Z7_WIN32_WINNT_MIN 0x0600 // vista + #elif defined(_M_ARM) && defined(_M_ARMT) && defined(_M_ARM_NT) + // #define Z7_WIN32_WINNT_MIN 0x0602 // win8 + #define Z7_WIN32_WINNT_MIN 0x0600 // vista + #elif defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) || defined(_M_IA64) + #define Z7_WIN32_WINNT_MIN 0x0503 // win2003 + // #elif defined(_M_IX86) || defined(__i386__) + // #define Z7_WIN32_WINNT_MIN 0x0500 // win2000 + #else // x86 and another(old) systems + #define Z7_WIN32_WINNT_MIN 0x0500 // win2000 + // #define Z7_WIN32_WINNT_MIN 0x0502 // win2003 // for debug + #endif +#endif // Z7_WIN32_WINNT_MIN + + +#ifndef Z7_DO_NOT_DEFINE_WIN32_WINNT +#ifdef _WIN32_WINNT + // #error Stop_Compiling_Bad_WIN32_WINNT +#else + #ifndef Z7_NO_DEFINE_WIN32_WINNT +Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER + #define _WIN32_WINNT Z7_WIN32_WINNT_MIN +Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER + #endif +#endif // _WIN32_WINNT + +#ifndef WINVER + #define WINVER _WIN32_WINNT +#endif +#endif // Z7_DO_NOT_DEFINE_WIN32_WINNT + + +#ifndef _MBCS +#ifndef Z7_NO_UNICODE +// UNICODE and _UNICODE are used by <windows.h> and by 7-zip code. + +#ifndef UNICODE +#define UNICODE 1 +#endif + +#ifndef _UNICODE +Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER +#define _UNICODE 1 +Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER +#endif + +#endif // Z7_NO_UNICODE +#endif // _MBCS +#endif // _WINDOWS_ + +// #include "7zWindows.h" + +#endif // _WIN32 #endif diff --git a/src/Common/lzma/Threads.c b/src/Common/lzma/Threads.c index cf52bd30..464efeca 100644 --- a/src/Common/lzma/Threads.c +++ b/src/Common/lzma/Threads.c @@ -1,7 +1,7 @@ /* Threads.c -- multithreading library -2023-03-04 : Igor Pavlov : Public domain */ +2024-03-28 : Igor Pavlov : Public domain */ #include "Precomp.h" #ifdef _WIN32 @@ -193,24 +193,23 @@ WRes CriticalSection_Init(CCriticalSection *p) #else // _WIN32 // ---------- POSIX ---------- -#ifndef __APPLE__ +#if defined(__linux__) && !defined(__APPLE__) && !defined(_AIX) && !defined(__ANDROID__) #ifndef Z7_AFFINITY_DISABLE // _GNU_SOURCE can be required for pthread_setaffinity_np() / CPU_ZERO / CPU_SET // clang < 3.6 : unknown warning group '-Wreserved-id-macro' // clang 3.6 - 12.01 : gives warning "macro name is a reserved identifier" // clang >= 13 : do not give warning #if !defined(_GNU_SOURCE) - #if defined(__clang__) && (__clang_major__ >= 4) && (__clang_major__ <= 12) - #pragma GCC diagnostic ignored "-Wreserved-id-macro" - #endif -#define _GNU_SOURCE +Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER +// #define _GNU_SOURCE +Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER #endif // !defined(_GNU_SOURCE) #endif // Z7_AFFINITY_DISABLE -#endif // __APPLE__ +#endif // __linux__ #include "Threads.h" #include <errno.h> #include <stdlib.h> @@ -242,12 +241,13 @@ WRes Thread_Create_With_CpuSet(CThread *p, THREAD_FUNC_TYPE func, LPVOID param, if (!ret) { if (cpuSet) { - #ifdef Z7_AFFINITY_SUPPORTED - + // pthread_attr_setaffinity_np() is not supported for MUSL compile. + // so we check for __GLIBC__ here +#if defined(Z7_AFFINITY_SUPPORTED) && defined( __GLIBC__) /* printf("\n affinity :"); unsigned i; for (i = 0; i < sizeof(*cpuSet) && i < 8; i++) { @@ -265,11 +265,11 @@ WRes Thread_Create_With_CpuSet(CThread *p, THREAD_FUNC_TYPE func, LPVOID param, */ // ret2 = pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet); // if (ret2) ret = ret2; - #endif +#endif } ret = pthread_create(&p->_tid, &attr, func, param); if (!ret) @@ -367,17 +367,24 @@ WRes AutoResetEvent_Create(CAutoResetEvent *p, int signaled) { return Event_Create(p, False, signaled); } WRes AutoResetEvent_CreateNotSignaled(CAutoResetEvent *p) { return AutoResetEvent_Create(p, 0); } +#if defined(Z7_LLVM_CLANG_VERSION) && (__clang_major__ == 13) +// freebsd: +#pragma GCC diagnostic ignored "-Wthread-safety-analysis" +#endif + WRes Event_Set(CEvent *p) { RINOK(pthread_mutex_lock(&p->_mutex)) p->_state = True; - int res1 = pthread_cond_broadcast(&p->_cond); - int res2 = pthread_mutex_unlock(&p->_mutex); - return (res2 ? res2 : res1); + { + const int res1 = pthread_cond_broadcast(&p->_cond); + const int res2 = pthread_mutex_unlock(&p->_mutex); + return (res2 ? res2 : res1); + } } WRes Event_Reset(CEvent *p) { RINOK(pthread_mutex_lock(&p->_mutex)) @@ -406,12 +413,12 @@ WRes Event_Close(CEvent *p) { if (!p->_created) return 0; p->_created = 0; { - int res1 = pthread_mutex_destroy(&p->_mutex); - int res2 = pthread_cond_destroy(&p->_cond); + const int res1 = pthread_mutex_destroy(&p->_mutex); + const int res2 = pthread_cond_destroy(&p->_cond); return (res1 ? res1 : res2); } } @@ -485,12 +492,12 @@ WRes Semaphore_Close(CSemaphore *p) { if (!p->_created) return 0; p->_created = 0; { - int res1 = pthread_mutex_destroy(&p->_mutex); - int res2 = pthread_cond_destroy(&p->_cond); + const int res1 = pthread_mutex_destroy(&p->_mutex); + const int res2 = pthread_cond_destroy(&p->_cond); return (res1 ? res1 : res2); } } @@ -547,10 +554,22 @@ LONG InterlockedIncrement(LONG volatile *addend) #endif return __sync_add_and_fetch(addend, 1); #endif } +LONG InterlockedDecrement(LONG volatile *addend) +{ + // Print("InterlockedDecrement") + #ifdef USE_HACK_UNSAFE_ATOMIC + LONG val = *addend - 1; + *addend = val; + return val; + #else + return __sync_sub_and_fetch(addend, 1); + #endif +} + #endif // _WIN32 WRes AutoResetEvent_OptCreate_And_Reset(CAutoResetEvent *p) { if (Event_IsCreated(p)) diff --git a/src/Common/lzma/Threads.h b/src/Common/lzma/Threads.h index 4028464a..c1484a27 100644 --- a/src/Common/lzma/Threads.h +++ b/src/Common/lzma/Threads.h @@ -1,22 +1,31 @@ /* Threads.h -- multithreading library -2023-04-02 : Igor Pavlov : Public domain */ +2024-03-28 : Igor Pavlov : Public domain */ #ifndef ZIP7_INC_THREADS_H #define ZIP7_INC_THREADS_H #ifdef _WIN32 #include "7zWindows.h" #else +#include "Compiler.h" + +// #define Z7_AFFINITY_DISABLE #if defined(__linux__) #if !defined(__APPLE__) && !defined(_AIX) && !defined(__ANDROID__) #ifndef Z7_AFFINITY_DISABLE #define Z7_AFFINITY_SUPPORTED // #pragma message(" ==== Z7_AFFINITY_SUPPORTED") -// #define _GNU_SOURCE +#if !defined(_GNU_SOURCE) +// #pragma message(" ==== _GNU_SOURCE set") +// we need _GNU_SOURCE for cpu_set_t, if we compile for MUSL +Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER +#define _GNU_SOURCE +Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER +#endif #endif #endif #endif #include <pthread.h> @@ -171,11 +180,11 @@ WRes CriticalSection_Init(CCriticalSection *p); #define CriticalSection_Leave(p) LeaveCriticalSection(p) #else // _WIN32 -typedef struct _CEvent +typedef struct { int _created; int _manual_reset; int _state; pthread_mutex_t _mutex; @@ -197,11 +206,11 @@ WRes Event_Set(CEvent *p); WRes Event_Reset(CEvent *p); WRes Event_Wait(CEvent *p); WRes Event_Close(CEvent *p); -typedef struct _CSemaphore +typedef struct { int _created; UInt32 _count; UInt32 _maxCount; pthread_mutex_t _mutex; @@ -217,21 +226,22 @@ WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 num); #define Semaphore_Release1(p) Semaphore_ReleaseN(p, 1) WRes Semaphore_Wait(CSemaphore *p); WRes Semaphore_Close(CSemaphore *p); -typedef struct _CCriticalSection +typedef struct { pthread_mutex_t _mutex; } CCriticalSection; WRes CriticalSection_Init(CCriticalSection *p); void CriticalSection_Delete(CCriticalSection *cs); void CriticalSection_Enter(CCriticalSection *cs); void CriticalSection_Leave(CCriticalSection *cs); LONG InterlockedIncrement(LONG volatile *addend); +LONG InterlockedDecrement(LONG volatile *addend); #endif // _WIN32 WRes AutoResetEvent_OptCreate_And_Reset(CAutoResetEvent *p); diff --git a/src/Common/lzma/lzma-history.txt b/src/Common/lzma/lzma-history.txt index a151c4b9..20e0a441 100644 --- a/src/Common/lzma/lzma-history.txt +++ b/src/Common/lzma/lzma-history.txt @@ -1,8 +1,82 @@ HISTORY of the LZMA SDK ----------------------- +24.09 2024-11-29 +------------------------- +- The default dictionary size values for LZMA/LZMA2 compression methods were increased: + dictionary size compression level + v24.08 v24.09 v24.09 + 32-bit 64-bit + 8 MB 16 MB 16 MB -mx4 + 16 MB 32 MB 32 MB -mx5 : Normal + 32 MB 64 MB 64 MB -mx6 + 32 MB 64 MB 128 MB -mx7 : Maximum + 64 MB 64 MB 256 MB -mx8 + 64 MB 64 MB 256 MB -mx9 : Ultra + The default dictionary size values for 32-bit versions of LZMA/LZMA2 don't exceed 64 MB. +- If an archive update operation uses a temporary archive folder and + the archive is moved to the destination folder, 7-Zip shows the progress of moving + the archive file, as this operation can take a long time if the archive is large. +- Some bugs were fixed. + + +24.07 2024-06-19 +------------------------- +- Changes in files: + Asm/x86/Sha256Opt.asm + Now it uses "READONLY" flag for constant array segment. + It fixes an issue where ".rodata" section in 7-Zip for x86/x64 Linux had a "WRITE" attribute. + + +24.05 2024-05-14 +------------------------- +- New switch -myv={MMNN} to set decoder compatibility version for 7z archive creating. + {MMNN} is 4-digit number that represents the version of 7-Zip without a dot. + If -myv={MMNN} switch is specified, 7-Zip will only use compression methods that can + be decoded by the specified version {MMNN} of 7-Zip and newer versions. + If -myv={MMNN} switch is not specified, -myv=2300 is used, and 7-Zip will only + use compression methods that can be decoded by 7-Zip 23.00 and newer versions. +- New switch -myfa={FilterID} to allow 7-Zip to use the specified filter method for 7z archive creating. +- New switch -myfd={FilterID} to disallow 7-Zip to use the specified filter method for 7z archive creating. + + +24.03 2024-03-23 +------------------------- +- 7-Zip now can use new RISCV filter for compression to 7z and xz archives. + RISCV filter can increase compression ratio for data containing executable + files compiled for RISC-V architecture. +- The speed for LZMA and LZMA2 decompression in ARM64 version for Windows + was increased by 20%-60%. + It uses arm64 assembler code, and clang-cl is required for arm64 assembler code compiling. +- -slmu switch : to show timestamps as UTC instead of LOCAL TIME. +- -slsl switch : in console 7-Zip for Windows : to show file paths with + linux path separator slash '/' instead of backslash separator '\'. +- 7-Zip supports .sha256 files that use backslash path separator '\'. +- Some bugs were fixed. + + +24.01 2024-01-31 +------------------------- +- 7-Zip uses file C/Precomp.h that is included to all c and c++ files. + CPP/Common/Common.h also includes C/Precomp.h. + C/Precomp.h defines the following macros (if _WIN32 is defined): + Z7_LARGE_PAGES 1 + Z7_LONG_PATH 1 + Z7_WIN32_WINNT_MIN 0x0500 (or higher) + _WIN32_WINNT 0x0500 (or higher) + WINVER _WIN32_WINNT + UNICODE 1 + _UNICODE 1 + if _WIN32_WINNT is defined already, C/Precomp.h doesn't redefine it. + +- Speed optimizations for hash caclulation: CRC-32, CRC-64. +- The bug was fixed: 7-Zip for Linux could fail for multivolume creation in some cases. +- 7zr.exe for arm64 is included to LZMA SDK package. +- Some bugs were fixed. + + 23.01 2023-06-20 ------------------------- - 7-Zip now can use new ARM64 filter for compression to 7z and xz archives. ARM64 filter can increase compression ratio for data containing executable files compiled for ARM64 (AArch64) architecture. diff --git a/src/Common/lzma/lzma-sdk.txt b/src/Common/lzma/lzma-sdk.txt index 141b0fd4..f7016709 100644 --- a/src/Common/lzma/lzma-sdk.txt +++ b/src/Common/lzma/lzma-sdk.txt @@ -1,6 +1,6 @@ -LZMA SDK 23.01 +LZMA SDK 24.09 -------------- LZMA SDK provides the documentation, samples, header files, libraries, and tools you need to develop applications that use 7z / LZMA / LZMA2 / XZ compression. @@ -135,13 +135,16 @@ DOC/lzma-history.txt - history of LZMA SDK DOC/lzma-specification.txt - Specification of LZMA DOC/Methods.txt - Compression method IDs for .7z bin/installer/ - example script to create installer that uses SFX module, -bin/7zdec.exe - simplified 7z archive decoder -bin/7zr.exe - 7-Zip console program (reduced version) +bin/7zdec.exe - simplified 7z archive decoder (x86 32-bit version) +bin/7zr.exe - 7-Zip console program (reduced version) (x86 32-bit version) bin/x64/7zr.exe - 7-Zip console program (reduced version) (x64 version) +bin/x64/7zdec.exe - simplified 7z archive decoder (x64 version) +bin/arm64/7zr.exe - 7-Zip console program (reduced version) (arm64 version) +bin/arm64/7zdec.exe - simplified 7z archive decoder (arm64 version) bin/lzma.exe - file->file LZMA encoder/decoder for Windows bin/7zS2.sfx - small SFX module for installers (GUI version) bin/7zS2con.sfx - small SFX module for installers (Console version) bin/7zSD.sfx - SFX module for installers. @@ -233,11 +236,11 @@ Note: LZMA features ------------- - - Variable dictionary size (up to 1 GB) + - Variable dictionary size (up to 4 GB) - Estimated compressing speed: about 2 MB/s on 2 GHz CPU - Estimated decompressing speed: - 20-30 MB/s on modern 2 GHz cpu - 1-2 MB/s on 200 MHz simple RISC cpu: (ARM, MIPS, PowerPC) - Small memory requirements for decompressing (16 KB + DictionarySize) @@ -283,12 +286,12 @@ Usage: LZMA <e|d> inputFile outputFile [<switches>...] -a{N}: set compression mode 0 = fast, 1 = normal default: 1 (normal) - d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB) - The maximum value for dictionary size is 1 GB = 2^30 bytes. + d{N}: Sets Dictionary size - [0, 31], default: N=24 (32 MB) + The maximum value for dictionary size is N=31 (2 GB). Dictionary size is calculated as DictionarySize = 2^N bytes. For decompressing file compressed by LZMA method with dictionary size D = 2^N you need about D bytes of memory (RAM). -fb{N}: set number of fast bytes - [5, 273], default: 128 @@ -319,11 +322,13 @@ Usage: LZMA <e|d> inputFile outputFile [<switches>...] MF_ID Memory Description bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing. bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing. bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing. + bt5 d * 11.5 + 4MB Binary Tree with 5 bytes hashing. hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing. + hc5 d * 7.5 + 4MB Hash Chain with 5 bytes hashing. -eos: write End Of Stream marker. By default LZMA doesn't write eos marker, since LZMA decoder knows uncompressed size stored in .lzma file header. diff --git a/src/Common/zlib/ChangeLog b/src/Common/zlib/ChangeLog new file mode 100644 index 00000000..b801a103 --- /dev/null +++ b/src/Common/zlib/ChangeLog @@ -0,0 +1,1618 @@ + + ChangeLog file for zlib + +Changes in 1.3.1 (22 Jan 2024) +- Reject overflows of zip header fields in minizip +- Fix bug in inflateSync() for data held in bit buffer +- Add LIT_MEM define to use more memory for a small deflate speedup +- Fix decision on the emission of Zip64 end records in minizip +- Add bounds checking to ERR_MSG() macro, used by zError() +- Neutralize zip file traversal attacks in miniunz +- Fix a bug in ZLIB_DEBUG compiles in check_match() +- Various portability and appearance improvements + +Changes in 1.3 (18 Aug 2023) +- Remove K&R function definitions and zlib2ansi +- Fix bug in deflateBound() for level 0 and memLevel 9 +- Fix bug when gzungetc() is used immediately after gzopen() +- Fix bug when using gzflush() with a very small buffer +- Fix crash when gzsetparams() attempted for transparent write +- Fix test/example.c to work with FORCE_STORED +- Rewrite of zran in examples (see zran.c version history) +- Fix minizip to allow it to open an empty zip file +- Fix reading disk number start on zip64 files in minizip +- Fix logic error in minizip argument processing +- Add minizip testing to Makefile +- Read multiple bytes instead of byte-by-byte in minizip unzip.c +- Add memory sanitizer to configure (--memory) +- Various portability improvements +- Various documentation improvements +- Various spelling and typo corrections + +Changes in 1.2.13 (13 Oct 2022) +- Fix configure issue that discarded provided CC definition +- Correct incorrect inputs provided to the CRC functions +- Repair prototypes and exporting of new CRC functions +- Fix inflateBack to detect invalid input with distances too far +- Have infback() deliver all of the available output up to any error +- Fix a bug when getting a gzip header extra field with inflate() +- Fix bug in block type selection when Z_FIXED used +- Tighten deflateBound bounds +- Remove deleted assembler code references +- Various portability and appearance improvements + +Changes in 1.2.12 (27 Mar 2022) +- Cygwin does not have _wopen(), so do not create gzopen_w() there +- Permit a deflateParams() parameter change as soon as possible +- Limit hash table inserts after switch from stored deflate +- Fix bug when window full in deflate_stored() +- Fix CLEAR_HASH macro to be usable as a single statement +- Avoid a conversion error in gzseek when off_t type too small +- Have Makefile return non-zero error code on test failure +- Avoid some conversion warnings in gzread.c and gzwrite.c +- Update use of errno for newer Windows CE versions +- Small speedup to inflate [psumbera] +- Return an error if the gzputs string length can't fit in an int +- Add address checking in clang to -w option of configure +- Don't compute check value for raw inflate if asked to validate +- Handle case where inflateSync used when header never processed +- Avoid the use of ptrdiff_t +- Avoid an undefined behavior of memcpy() in gzappend() +- Avoid undefined behaviors of memcpy() in gz*printf() +- Avoid an undefined behavior of memcpy() in _tr_stored_block() +- Make the names in functions declarations identical to definitions +- Remove old assembler code in which bugs have manifested +- Fix deflateEnd() to not report an error at start of raw deflate +- Add legal disclaimer to README +- Emphasize the need to continue decompressing gzip members +- Correct the initialization requirements for deflateInit2() +- Fix a bug that can crash deflate on some input when using Z_FIXED +- Assure that the number of bits for deflatePrime() is valid +- Use a structure to make globals in enough.c evident +- Use a macro for the printf format of big_t in enough.c +- Clean up code style in enough.c, update version +- Use inline function instead of macro for index in enough.c +- Clarify that prefix codes are counted in enough.c +- Show all the codes for the maximum tables size in enough.c +- Add gznorm.c example, which normalizes gzip files +- Fix the zran.c example to work on a multiple-member gzip file +- Add tables for crc32_combine(), to speed it up by a factor of 200 +- Add crc32_combine_gen() and crc32_combine_op() for fast combines +- Speed up software CRC-32 computation by a factor of 1.5 to 3 +- Use atomic test and set, if available, for dynamic CRC tables +- Don't bother computing check value after successful inflateSync() +- Correct comment in crc32.c +- Add use of the ARMv8 crc32 instructions when requested +- Use ARM crc32 instructions if the ARM architecture has them +- Explicitly note that the 32-bit check values are 32 bits +- Avoid adding empty gzip member after gzflush with Z_FINISH +- Fix memory leak on error in gzlog.c +- Fix error in comment on the polynomial representation of a byte +- Clarify gz* function interfaces, referring to parameter names +- Change macro name in inflate.c to avoid collision in VxWorks +- Correct typo in blast.c +- Improve portability of contrib/minizip +- Fix indentation in minizip's zip.c +- Replace black/white with allow/block. (theresa-m) +- minizip warning fix if MAXU32 already defined. (gvollant) +- Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner) +- Clean up minizip to reduce warnings for testing +- Add fallthrough comments for gcc +- Eliminate use of ULL constants +- Separate out address sanitizing from warnings in configure +- Remove destructive aspects of make distclean +- Check for cc masquerading as gcc or clang in configure +- Fix crc32.c to compile local functions only if used + +Changes in 1.2.11 (15 Jan 2017) +- Fix deflate stored bug when pulling last block from window +- Permit immediate deflateParams changes before any deflate input + +Changes in 1.2.10 (2 Jan 2017) +- Avoid warnings on snprintf() return value +- Fix bug in deflate_stored() for zero-length input +- Fix bug in gzwrite.c that produced corrupt gzip files +- Remove files to be installed before copying them in Makefile.in +- Add warnings when compiling with assembler code + +Changes in 1.2.9 (31 Dec 2016) +- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] +- Improve contrib/blast to return unused bytes +- Assure that gzoffset() is correct when appending +- Improve compress() and uncompress() to support large lengths +- Fix bug in test/example.c where error code not saved +- Remedy Coverity warning [Randers-Pehrson] +- Improve speed of gzprintf() in transparent mode +- Fix inflateInit2() bug when windowBits is 16 or 32 +- Change DEBUG macro to ZLIB_DEBUG +- Avoid uninitialized access by gzclose_w() +- Allow building zlib outside of the source directory +- Fix bug that accepted invalid zlib header when windowBits is zero +- Fix gzseek() problem on MinGW due to buggy _lseeki64 there +- Loop on write() calls in gzwrite.c in case of non-blocking I/O +- Add --warn (-w) option to ./configure for more compiler warnings +- Reject a window size of 256 bytes if not using the zlib wrapper +- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE +- Add --debug (-d) option to ./configure to define ZLIB_DEBUG +- Fix bugs in creating a very large gzip header +- Add uncompress2() function, which returns the input size used +- Assure that deflateParams() will not switch functions mid-block +- Dramatically speed up deflation for level 0 (storing) +- Add gzfread(), duplicating the interface of fread() +- Add gzfwrite(), duplicating the interface of fwrite() +- Add deflateGetDictionary() function +- Use snprintf() for later versions of Microsoft C +- Fix *Init macros to use z_ prefix when requested +- Replace as400 with os400 for OS/400 support [Monnerat] +- Add crc32_z() and adler32_z() functions with size_t lengths +- Update Visual Studio project files [AraHaan] + +Changes in 1.2.8 (28 Apr 2013) +- Update contrib/minizip/iowin32.c for Windows RT [Vollant] +- Do not force Z_CONST for C++ +- Clean up contrib/vstudio [Roß] +- Correct spelling error in zlib.h +- Fix mixed line endings in contrib/vstudio + +Changes in 1.2.7.3 (13 Apr 2013) +- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc + +Changes in 1.2.7.2 (13 Apr 2013) +- Change check for a four-byte type back to hexadecimal +- Fix typo in win32/Makefile.msc +- Add casts in gzwrite.c for pointer differences + +Changes in 1.2.7.1 (24 Mar 2013) +- Replace use of unsafe string functions with snprintf if available +- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] +- Fix gzgetc undefine when Z_PREFIX set [Turk] +- Eliminate use of mktemp in Makefile (not always available) +- Fix bug in 'F' mode for gzopen() +- Add inflateGetDictionary() function +- Correct comment in deflate.h +- Use _snprintf for snprintf in Microsoft C +- On Darwin, only use /usr/bin/libtool if libtool is not Apple +- Delete "--version" file if created by "ar --version" [Richard G.] +- Fix configure check for veracity of compiler error return codes +- Fix CMake compilation of static lib for MSVC2010 x64 +- Remove unused variable in infback9.c +- Fix argument checks in gzlog_compress() and gzlog_write() +- Clean up the usage of z_const and respect const usage within zlib +- Clean up examples/gzlog.[ch] comparisons of different types +- Avoid shift equal to bits in type (caused endless loop) +- Fix uninitialized value bug in gzputc() introduced by const patches +- Fix memory allocation error in examples/zran.c [Nor] +- Fix bug where gzopen(), gzclose() would write an empty file +- Fix bug in gzclose() when gzwrite() runs out of memory +- Check for input buffer malloc failure in examples/gzappend.c +- Add note to contrib/blast to use binary mode in stdio +- Fix comparisons of differently signed integers in contrib/blast +- Check for invalid code length codes in contrib/puff +- Fix serious but very rare decompression bug in inftrees.c +- Update inflateBack() comments, since inflate() can be faster +- Use underscored I/O function names for WINAPI_FAMILY +- Add _tr_flush_bits to the external symbols prefixed by --zprefix +- Add contrib/vstudio/vc10 pre-build step for static only +- Quote --version-script argument in CMakeLists.txt +- Don't specify --version-script on Apple platforms in CMakeLists.txt +- Fix casting error in contrib/testzlib/testzlib.c +- Fix types in contrib/minizip to match result of get_crc_table() +- Simplify contrib/vstudio/vc10 with 'd' suffix +- Add TOP support to win32/Makefile.msc +- Support i686 and amd64 assembler builds in CMakeLists.txt +- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h +- Add vc11 and vc12 build files to contrib/vstudio +- Add gzvprintf() as an undocumented function in zlib +- Fix configure for Sun shell +- Remove runtime check in configure for four-byte integer type +- Add casts and consts to ease user conversion to C++ +- Add man pages for minizip and miniunzip +- In Makefile uninstall, don't rm if preceding cd fails +- Do not return Z_BUF_ERROR if deflateParam() has nothing to write + +Changes in 1.2.7 (2 May 2012) +- Replace use of memmove() with a simple copy for portability +- Test for existence of strerror +- Restore gzgetc_ for backward compatibility with 1.2.6 +- Fix build with non-GNU make on Solaris +- Require gcc 4.0 or later on Mac OS X to use the hidden attribute +- Include unistd.h for Watcom C +- Use __WATCOMC__ instead of __WATCOM__ +- Do not use the visibility attribute if NO_VIZ defined +- Improve the detection of no hidden visibility attribute +- Avoid using __int64 for gcc or solo compilation +- Cast to char * in gzprintf to avoid warnings [Zinser] +- Fix make_vms.com for VAX [Zinser] +- Don't use library or built-in byte swaps +- Simplify test and use of gcc hidden attribute +- Fix bug in gzclose_w() when gzwrite() fails to allocate memory +- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen() +- Fix bug in test/minigzip.c for configure --solo +- Fix contrib/vstudio project link errors [Mohanathas] +- Add ability to choose the builder in make_vms.com [Schweda] +- Add DESTDIR support to mingw32 win32/Makefile.gcc +- Fix comments in win32/Makefile.gcc for proper usage +- Allow overriding the default install locations for cmake +- Generate and install the pkg-config file with cmake +- Build both a static and a shared version of zlib with cmake +- Include version symbols for cmake builds +- If using cmake with MSVC, add the source directory to the includes +- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta] +- Move obsolete emx makefile to old [Truta] +- Allow the use of -Wundef when compiling or using zlib +- Avoid the use of the -u option with mktemp +- Improve inflate() documentation on the use of Z_FINISH +- Recognize clang as gcc +- Add gzopen_w() in Windows for wide character path names +- Rename zconf.h in CMakeLists.txt to move it out of the way +- Add source directory in CMakeLists.txt for building examples +- Look in build directory for zlib.pc in CMakeLists.txt +- Remove gzflags from zlibvc.def in vc9 and vc10 +- Fix contrib/minizip compilation in the MinGW environment +- Update ./configure for Solaris, support --64 [Mooney] +- Remove -R. from Solaris shared build (possible security issue) +- Avoid race condition for parallel make (-j) running example +- Fix type mismatch between get_crc_table() and crc_table +- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler] +- Fix the path to zlib.map in CMakeLists.txt +- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe] +- Add instructions to win32/Makefile.gcc for shared install [Torri] + +Changes in 1.2.6.1 (12 Feb 2012) +- Avoid the use of the Objective-C reserved name "id" +- Include io.h in gzguts.h for Microsoft compilers +- Fix problem with ./configure --prefix and gzgetc macro +- Include gz_header definition when compiling zlib solo +- Put gzflags() functionality back in zutil.c +- Avoid library header include in crc32.c for Z_SOLO +- Use name in GCC_CLASSIC as C compiler for coverage testing, if set +- Minor cleanup in contrib/minizip/zip.c [Vollant] +- Update make_vms.com [Zinser] +- Remove unnecessary gzgetc_ function +- Use optimized byte swap operations for Microsoft and GNU [Snyder] +- Fix minor typo in zlib.h comments [Rzesniowiecki] + +Changes in 1.2.6 (29 Jan 2012) +- Update the Pascal interface in contrib/pascal +- Fix function numbers for gzgetc_ in zlibvc.def files +- Fix configure.ac for contrib/minizip [Schiffer] +- Fix large-entry detection in minizip on 64-bit systems [Schiffer] +- Have ./configure use the compiler return code for error indication +- Fix CMakeLists.txt for cross compilation [McClure] +- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes] +- Fix compilation of contrib/minizip on FreeBSD [Marquez] +- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath] +- Include io.h for Turbo C / Borland C on all platforms [Truta] +- Make version explicit in contrib/minizip/configure.ac [Bosmans] +- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant] +- Minor cleanup up contrib/minizip/unzip.c [Vollant] +- Fix bug when compiling minizip with C++ [Vollant] +- Protect for long name and extra fields in contrib/minizip [Vollant] +- Avoid some warnings in contrib/minizip [Vollant] +- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip +- Add missing libs to minizip linker command +- Add support for VPATH builds in contrib/minizip +- Add an --enable-demos option to contrib/minizip/configure +- Add the generation of configure.log by ./configure +- Exit when required parameters not provided to win32/Makefile.gcc +- Have gzputc return the character written instead of the argument +- Use the -m option on ldconfig for BSD systems [Tobias] +- Correct in zlib.map when deflateResetKeep was added + +Changes in 1.2.5.3 (15 Jan 2012) +- Restore gzgetc function for binary compatibility +- Do not use _lseeki64 under Borland C++ [Truta] +- Update win32/Makefile.msc to build test/*.c [Truta] +- Remove old/visualc6 given CMakefile and other alternatives +- Update AS400 build files and documentation [Monnerat] +- Update win32/Makefile.gcc to build test/*.c [Truta] +- Permit stronger flushes after Z_BLOCK flushes +- Avoid extraneous empty blocks when doing empty flushes +- Permit Z_NULL arguments to deflatePending +- Allow deflatePrime() to insert bits in the middle of a stream +- Remove second empty static block for Z_PARTIAL_FLUSH +- Write out all of the available bits when using Z_BLOCK +- Insert the first two strings in the hash table after a flush + +Changes in 1.2.5.2 (17 Dec 2011) +- fix ld error: unable to find version dependency 'ZLIB_1.2.5' +- use relative symlinks for shared libs +- Avoid searching past window for Z_RLE strategy +- Assure that high-water mark initialization is always applied in deflate +- Add assertions to fill_window() in deflate.c to match comments +- Update python link in README +- Correct spelling error in gzread.c +- Fix bug in gzgets() for a concatenated empty gzip stream +- Correct error in comment for gz_make() +- Change gzread() and related to ignore junk after gzip streams +- Allow gzread() and related to continue after gzclearerr() +- Allow gzrewind() and gzseek() after a premature end-of-file +- Simplify gzseek() now that raw after gzip is ignored +- Change gzgetc() to a macro for speed (~40% speedup in testing) +- Fix gzclose() to return the actual error last encountered +- Always add large file support for windows +- Include zconf.h for windows large file support +- Include zconf.h.cmakein for windows large file support +- Update zconf.h.cmakein on make distclean +- Merge vestigial vsnprintf determination from zutil.h to gzguts.h +- Clarify how gzopen() appends in zlib.h comments +- Correct documentation of gzdirect() since junk at end now ignored +- Add a transparent write mode to gzopen() when 'T' is in the mode +- Update python link in zlib man page +- Get inffixed.h and MAKEFIXED result to match +- Add a ./config --solo option to make zlib subset with no library use +- Add undocumented inflateResetKeep() function for CAB file decoding +- Add --cover option to ./configure for gcc coverage testing +- Add #define ZLIB_CONST option to use const in the z_stream interface +- Add comment to gzdopen() in zlib.h to use dup() when using fileno() +- Note behavior of uncompress() to provide as much data as it can +- Add files in contrib/minizip to aid in building libminizip +- Split off AR options in Makefile.in and configure +- Change ON macro to Z_ARG to avoid application conflicts +- Facilitate compilation with Borland C++ for pragmas and vsnprintf +- Include io.h for Turbo C / Borland C++ +- Move example.c and minigzip.c to test/ +- Simplify incomplete code table filling in inflate_table() +- Remove code from inflate.c and infback.c that is impossible to execute +- Test the inflate code with full coverage +- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw) +- Add deflateResetKeep and fix inflateResetKeep to retain dictionary +- Fix gzwrite.c to accommodate reduced memory zlib compilation +- Have inflate() with Z_FINISH avoid the allocation of a window +- Do not set strm->adler when doing raw inflate +- Fix gzeof() to behave just like feof() when read is not past end of file +- Fix bug in gzread.c when end-of-file is reached +- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF +- Document gzread() capability to read concurrently written files +- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo] + +Changes in 1.2.5.1 (10 Sep 2011) +- Update FAQ entry on shared builds (#13) +- Avoid symbolic argument to chmod in Makefile.in +- Fix bug and add consts in contrib/puff [Oberhumer] +- Update contrib/puff/zeros.raw test file to have all block types +- Add full coverage test for puff in contrib/puff/Makefile +- Fix static-only-build install in Makefile.in +- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno] +- Add libz.a dependency to shared in Makefile.in for parallel builds +- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out +- Replace $(...) with `...` in configure for non-bash sh [Bowler] +- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen] +- Add solaris* to Linux* in configure to allow gcc use [Groffen] +- Add *bsd* to Linux* case in configure [Bar-Lev] +- Add inffast.obj to dependencies in win32/Makefile.msc +- Correct spelling error in deflate.h [Kohler] +- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc +- Add test to configure for GNU C looking for gcc in output of $cc -v +- Add zlib.pc generation to win32/Makefile.gcc [Weigelt] +- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not +- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense +- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser) +- Make stronger test in zconf.h to include unistd.h for LFS +- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack] +- Fix zlib.h LFS support when Z_PREFIX used +- Add updated as400 support (removed from old) [Monnerat] +- Avoid deflate sensitivity to volatile input data +- Avoid division in adler32_combine for NO_DIVIDE +- Clarify the use of Z_FINISH with deflateBound() amount of space +- Set binary for output file in puff.c +- Use u4 type for crc_table to avoid conversion warnings +- Apply casts in zlib.h to avoid conversion warnings +- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller] +- Improve inflateSync() documentation to note indeterminacy +- Add deflatePending() function to return the amount of pending output +- Correct the spelling of "specification" in FAQ [Randers-Pehrson] +- Add a check in configure for stdarg.h, use for gzprintf() +- Check that pointers fit in ints when gzprint() compiled old style +- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler] +- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt] +- Add debug records in assembler code [Londer] +- Update RFC references to use http://tools.ietf.org/html/... [Li] +- Add --archs option, use of libtool to configure for Mac OS X [Borstel] + +Changes in 1.2.5 (19 Apr 2010) +- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev] +- Default to libdir as sharedlibdir in configure [Nieder] +- Update copyright dates on modified source files +- Update trees.c to be able to generate modified trees.h +- Exit configure for MinGW, suggesting win32/Makefile.gcc +- Check for NULL path in gz_open [Homurlu] + +Changes in 1.2.4.5 (18 Apr 2010) +- Set sharedlibdir in configure [Torok] +- Set LDFLAGS in Makefile.in [Bar-Lev] +- Avoid mkdir objs race condition in Makefile.in [Bowler] +- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays +- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C +- Don't use hidden attribute when it is a warning generator (e.g. Solaris) + +Changes in 1.2.4.4 (18 Apr 2010) +- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok] +- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty +- Try to use bash or ksh regardless of functionality of /bin/sh +- Fix configure incompatibility with NetBSD sh +- Remove attempt to run under bash or ksh since have better NetBSD fix +- Fix win32/Makefile.gcc for MinGW [Bar-Lev] +- Add diagnostic messages when using CROSS_PREFIX in configure +- Added --sharedlibdir option to configure [Weigelt] +- Use hidden visibility attribute when available [Frysinger] + +Changes in 1.2.4.3 (10 Apr 2010) +- Only use CROSS_PREFIX in configure for ar and ranlib if they exist +- Use CROSS_PREFIX for nm [Bar-Lev] +- Assume _LARGEFILE64_SOURCE defined is equivalent to true +- Avoid use of undefined symbols in #if with && and || +- Make *64 prototypes in gzguts.h consistent with functions +- Add -shared load option for MinGW in configure [Bowler] +- Move z_off64_t to public interface, use instead of off64_t +- Remove ! from shell test in configure (not portable to Solaris) +- Change +0 macro tests to -0 for possibly increased portability + +Changes in 1.2.4.2 (9 Apr 2010) +- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 +- Really provide prototypes for *64 functions when building without LFS +- Only define unlink() in minigzip.c if unistd.h not included +- Update README to point to contrib/vstudio project files +- Move projects/vc6 to old/ and remove projects/ +- Include stdlib.h in minigzip.c for setmode() definition under WinCE +- Clean up assembler builds in win32/Makefile.msc [Rowe] +- Include sys/types.h for Microsoft for off_t definition +- Fix memory leak on error in gz_open() +- Symbolize nm as $NM in configure [Weigelt] +- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] +- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined +- Fix bug in gzeof() to take into account unused input data +- Avoid initialization of structures with variables in puff.c +- Updated win32/README-WIN32.txt [Rowe] + +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + +Changes in 1.2.4 (14 Mar 2010) +- Fix VER3 extraction in configure for no fourth subversion +- Update zlib.3, add docs to Makefile.in to make .pdf out of it +- Add zlib.3.pdf to distribution +- Don't set error code in gzerror() if passed pointer is NULL +- Apply destination directory fixes to CMakeLists.txt [Lowman] +- Move #cmakedefine's to a new zconf.in.cmakein +- Restore zconf.h for builds that don't use configure or cmake +- Add distclean to dummy Makefile for convenience +- Update and improve INDEX, README, and FAQ +- Update CMakeLists.txt for the return of zconf.h [Lowman] +- Update contrib/vstudio/vc9 and vc10 [Vollant] +- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc +- Apply license and readme changes to contrib/asm686 [Raiter] +- Check file name lengths and add -c option in minigzip.c [Li] +- Update contrib/amd64 and contrib/masmx86/ [Vollant] +- Avoid use of "eof" parameter in trees.c to not shadow library variable +- Update make_vms.com for removal of zlibdefs.h [Zinser] +- Update assembler code and vstudio projects in contrib [Vollant] +- Remove outdated assembler code contrib/masm686 and contrib/asm586 +- Remove old vc7 and vc8 from contrib/vstudio +- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] +- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() +- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] +- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) +- Fix bug in void-returning vsprintf() case in gzwrite.c +- Fix name change from inflate.h in contrib/inflate86/inffas86.c +- Check if temporary file exists before removing in make_vms.com [Zinser] +- Fix make install and uninstall for --static option +- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] +- Update readme.txt in contrib/masmx64 and masmx86 to assemble + +Changes in 1.2.3.9 (21 Feb 2010) +- Expunge gzio.c +- Move as400 build information to old +- Fix updates in contrib/minizip and contrib/vstudio +- Add const to vsnprintf test in configure to avoid warnings [Weigelt] +- Delete zconf.h (made by configure) [Weigelt] +- Change zconf.in.h to zconf.h.in per convention [Weigelt] +- Check for NULL buf in gzgets() +- Return empty string for gzgets() with len == 1 (like fgets()) +- Fix description of gzgets() in zlib.h for end-of-file, NULL return +- Update minizip to 1.1 [Vollant] +- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c +- Note in zlib.h that gzerror() should be used to distinguish from EOF +- Remove use of snprintf() from gzlib.c +- Fix bug in gzseek() +- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] +- Fix zconf.h generation in CMakeLists.txt [Lowman] +- Improve comments in zconf.h where modified by configure + +Changes in 1.2.3.8 (13 Feb 2010) +- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] +- Use z_off64_t in gz_zero() and gz_skip() to match state->skip +- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) +- Revert to Makefile.in from 1.2.3.6 (live with the clutter) +- Fix missing error return in gzflush(), add zlib.h note +- Add *64 functions to zlib.map [Levin] +- Fix signed/unsigned comparison in gz_comp() +- Use SFLAGS when testing shared linking in configure +- Add --64 option to ./configure to use -m64 with gcc +- Fix ./configure --help to correctly name options +- Have make fail if a test fails [Levin] +- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] +- Remove assembler object files from contrib + +Changes in 1.2.3.7 (24 Jan 2010) +- Always gzopen() with O_LARGEFILE if available +- Fix gzdirect() to work immediately after gzopen() or gzdopen() +- Make gzdirect() more precise when the state changes while reading +- Improve zlib.h documentation in many places +- Catch memory allocation failure in gz_open() +- Complete close operation if seek forward in gzclose_w() fails +- Return Z_ERRNO from gzclose_r() if close() fails +- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL +- Return zero for gzwrite() errors to match zlib.h description +- Return -1 on gzputs() error to match zlib.h description +- Add zconf.in.h to allow recovery from configure modification [Weigelt] +- Fix static library permissions in Makefile.in [Weigelt] +- Avoid warnings in configure tests that hide functionality [Weigelt] +- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] +- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] +- Avoid access of uninitialized data for first inflateReset2 call [Gomes] +- Keep object files in subdirectories to reduce the clutter somewhat +- Remove default Makefile and zlibdefs.h, add dummy Makefile +- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ +- Remove zlibdefs.h completely -- modify zconf.h instead + +Changes in 1.2.3.6 (17 Jan 2010) +- Avoid void * arithmetic in gzread.c and gzwrite.c +- Make compilers happier with const char * for gz_error message +- Avoid unused parameter warning in inflate.c +- Avoid signed-unsigned comparison warning in inflate.c +- Indent #pragma's for traditional C +- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() +- Correct email address in configure for system options +- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] +- Update zlib.map [Brown] +- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok] +- Apply various fixes to CMakeLists.txt [Lowman] +- Add checks on len in gzread() and gzwrite() +- Add error message for no more room for gzungetc() +- Remove zlib version check in gzwrite() +- Defer compression of gzprintf() result until need to +- Use snprintf() in gzdopen() if available +- Remove USE_MMAP configuration determination (only used by minigzip) +- Remove examples/pigz.c (available separately) +- Update examples/gun.c to 1.6 + +Changes in 1.2.3.5 (8 Jan 2010) +- Add space after #if in zutil.h for some compilers +- Fix relatively harmless bug in deflate_fast() [Exarevsky] +- Fix same problem in deflate_slow() +- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] +- Add deflate_rle() for faster Z_RLE strategy run-length encoding +- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding +- Change name of "write" variable in inffast.c to avoid library collisions +- Fix premature EOF from gzread() in gzio.c [Brown] +- Use zlib header window size if windowBits is 0 in inflateInit2() +- Remove compressBound() call in deflate.c to avoid linking compress.o +- Replace use of errno in gz* with functions, support WinCE [Alves] +- Provide alternative to perror() in minigzip.c for WinCE [Alves] +- Don't use _vsnprintf on later versions of MSVC [Lowman] +- Add CMake build script and input file [Lowman] +- Update contrib/minizip to 1.1 [Svensson, Vollant] +- Moved nintendods directory from contrib to root +- Replace gzio.c with a new set of routines with the same functionality +- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above +- Update contrib/minizip to 1.1b +- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h + +Changes in 1.2.3.4 (21 Dec 2009) +- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility +- Update comments in configure and Makefile.in for default --shared +- Fix test -z's in configure [Marquess] +- Build examplesh and minigzipsh when not testing +- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h +- Import LDFLAGS from the environment in configure +- Fix configure to populate SFLAGS with discovered CFLAGS options +- Adapt make_vms.com to the new Makefile.in [Zinser] +- Add zlib2ansi script for C++ compilation [Marquess] +- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) +- Add AMD64 assembler code for longest match to contrib [Teterin] +- Include options from $SFLAGS when doing $LDSHARED +- Simplify 64-bit file support by introducing z_off64_t type +- Make shared object files in objs directory to work around old Sun cc +- Use only three-part version number for Darwin shared compiles +- Add rc option to ar in Makefile.in for when ./configure not run +- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* +- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile +- Protect against _FILE_OFFSET_BITS being defined when compiling zlib +- Rename Makefile.in targets allstatic to static and allshared to shared +- Fix static and shared Makefile.in targets to be independent +- Correct error return bug in gz_open() by setting state [Brown] +- Put spaces before ;;'s in configure for better sh compatibility +- Add pigz.c (parallel implementation of gzip) to examples/ +- Correct constant in crc32.c to UL [Leventhal] +- Reject negative lengths in crc32_combine() +- Add inflateReset2() function to work like inflateEnd()/inflateInit2() +- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] +- Correct typo in doc/algorithm.txt [Janik] +- Fix bug in adler32_combine() [Zhu] +- Catch missing-end-of-block-code error in all inflates and in puff + Assures that random input to inflate eventually results in an error +- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ +- Update ENOUGH and its usage to reflect discovered bounds +- Fix gzerror() error report on empty input file [Brown] +- Add ush casts in trees.c to avoid pedantic runtime errors +- Fix typo in zlib.h uncompress() description [Reiss] +- Correct inflate() comments with regard to automatic header detection +- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) +- Put new version of gzlog (2.0) in examples with interruption recovery +- Add puff compile option to permit invalid distance-too-far streams +- Add puff TEST command options, ability to read piped input +- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but + _LARGEFILE64_SOURCE not defined +- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart +- Fix deflateSetDictionary() to use all 32K for output consistency +- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) +- Clear bytes after deflate lookahead to avoid use of uninitialized data +- Change a limit in inftrees.c to be more transparent to Coverity Prevent +- Update win32/zlib.def with exported symbols from zlib.h +- Correct spelling errors in zlib.h [Willem, Sobrado] +- Allow Z_BLOCK for deflate() to force a new block +- Allow negative bits in inflatePrime() to delete existing bit buffer +- Add Z_TREES flush option to inflate() to return at end of trees +- Add inflateMark() to return current state information for random access +- Add Makefile for NintendoDS to contrib [Costa] +- Add -w in configure compile tests to avoid spurious warnings [Beucler] +- Fix typos in zlib.h comments for deflateSetDictionary() +- Fix EOF detection in transparent gzread() [Maier] + +Changes in 1.2.3.3 (2 October 2006) +- Make --shared the default for configure, add a --static option +- Add compile option to permit invalid distance-too-far streams +- Add inflateUndermine() function which is required to enable above +- Remove use of "this" variable name for C++ compatibility [Marquess] +- Add testing of shared library in make test, if shared library built +- Use ftello() and fseeko() if available instead of ftell() and fseek() +- Provide two versions of all functions that use the z_off_t type for + binary compatibility -- a normal version and a 64-bit offset version, + per the Large File Support Extension when _LARGEFILE64_SOURCE is + defined; use the 64-bit versions by default when _FILE_OFFSET_BITS + is defined to be 64 +- Add a --uname= option to configure to perhaps help with cross-compiling + +Changes in 1.2.3.2 (3 September 2006) +- Turn off silly Borland warnings [Hay] +- Use off64_t and define _LARGEFILE64_SOURCE when present +- Fix missing dependency on inffixed.h in Makefile.in +- Rig configure --shared to build both shared and static [Teredesai, Truta] +- Remove zconf.in.h and instead create a new zlibdefs.h file +- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] +- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] + +Changes in 1.2.3.1 (16 August 2006) +- Add watcom directory with OpenWatcom make files [Daniel] +- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] +- Update make_vms.com [Zinser] +- Use -fPIC for shared build in configure [Teredesai, Nicholson] +- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck] +- Add some FAQ entries about the contrib directory +- Update the MVS question in the FAQ +- Avoid extraneous reads after EOF in gzio.c [Brown] +- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] +- Add comments to zlib.h about gzerror() usage [Brown] +- Set extra flags in gzip header in gzopen() like deflate() does +- Make configure options more compatible with double-dash conventions + [Weigelt] +- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] +- Fix uninstall target in Makefile.in [Truta] +- Add pkgconfig support [Weigelt] +- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] +- Replace set_data_type() with a more accurate detect_data_type() in + trees.c, according to the txtvsbin.txt document [Truta] +- Swap the order of #include <stdio.h> and #include "zlib.h" in + gzio.c, example.c and minigzip.c [Truta] +- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, + Truta] (where?) +- Fix target "clean" from win32/Makefile.bor [Truta] +- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] +- Update zlib www home address in win32/DLL_FAQ.txt [Truta] +- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] +- Enable browse info in the "Debug" and "ASM Debug" configurations in + the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] +- Add pkgconfig support [Weigelt] +- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, + for use in win32/zlib1.rc [Polushin, Rowe, Truta] +- Add a document that explains the new text detection scheme to + doc/txtvsbin.txt [Truta] +- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] +- Move algorithm.txt into doc/ [Truta] +- Synchronize FAQ with website +- Fix compressBound(), was low for some pathological cases [Fearnley] +- Take into account wrapper variations in deflateBound() +- Set examples/zpipe.c input and output to binary mode for Windows +- Update examples/zlib_how.html with new zpipe.c (also web site) +- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems + that gcc became pickier in 4.0) +- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain + un-versioned, the patch adds versioning only for symbols introduced in + zlib-1.2.0 or later. It also declares as local those symbols which are + not designed to be exported." [Levin] +- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure +- Do not initialize global static by default in trees.c, add a response + NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] +- Don't use strerror() in gzio.c under WinCE [Yakimov] +- Don't use errno.h in zutil.h under WinCE [Yakimov] +- Move arguments for AR to its usage to allow replacing ar [Marot] +- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] +- Improve inflateInit() and inflateInit2() documentation +- Fix structure size comment in inflate.h +- Change configure help option from --h* to --help [Santos] + +Changes in 1.2.3 (18 July 2005) +- Apply security vulnerability fixes to contrib/infback9 as well +- Clean up some text files (carriage returns, trailing space) +- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant] + +Changes in 1.2.2.4 (11 July 2005) +- Add inflatePrime() function for starting inflation at bit boundary +- Avoid some Visual C warnings in deflate.c +- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit + compile +- Fix some spelling errors in comments [Betts] +- Correct inflateInit2() error return documentation in zlib.h +- Add zran.c example of compressed data random access to examples + directory, shows use of inflatePrime() +- Fix cast for assignments to strm->state in inflate.c and infback.c +- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] +- Move declarations of gf2 functions to right place in crc32.c [Oberhumer] +- Add cast in trees.c t avoid a warning [Oberhumer] +- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer] +- Update make_vms.com [Zinser] +- Initialize state->write in inflateReset() since copied in inflate_fast() +- Be more strict on incomplete code sets in inflate_table() and increase + ENOUGH and MAXD -- this repairs a possible security vulnerability for + invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for + discovering the vulnerability and providing test cases +- Add ia64 support to configure for HP-UX [Smith] +- Add error return to gzread() for format or i/o error [Levin] +- Use malloc.h for OS/2 [Necasek] + +Changes in 1.2.2.3 (27 May 2005) +- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile +- Typecast fread() return values in gzio.c [Vollant] +- Remove trailing space in minigzip.c outmode (VC++ can't deal with it) +- Fix crc check bug in gzread() after gzungetc() [Heiner] +- Add the deflateTune() function to adjust internal compression parameters +- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack) +- Remove an incorrect assertion in examples/zpipe.c +- Add C++ wrapper in infback9.h [Donais] +- Fix bug in inflateCopy() when decoding fixed codes +- Note in zlib.h how much deflateSetDictionary() actually uses +- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used) +- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer] +- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer] +- Add gzdirect() function to indicate transparent reads +- Update contrib/minizip [Vollant] +- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer] +- Add casts in crc32.c to avoid warnings [Oberhumer] +- Add contrib/masmx64 [Vollant] +- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant] + +Changes in 1.2.2.2 (30 December 2004) +- Replace structure assignments in deflate.c and inflate.c with zmemcpy to + avoid implicit memcpy calls (portability for no-library compilation) +- Increase sprintf() buffer size in gzdopen() to allow for large numbers +- Add INFLATE_STRICT to check distances against zlib header +- Improve WinCE errno handling and comments [Chang] +- Remove comment about no gzip header processing in FAQ +- Add Z_FIXED strategy option to deflateInit2() to force fixed trees +- Add updated make_vms.com [Coghlan], update README +- Create a new "examples" directory, move gzappend.c there, add zpipe.c, + fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html +- Add FAQ entry and comments in deflate.c on uninitialized memory access +- Add Solaris 9 make options in configure [Gilbert] +- Allow strerror() usage in gzio.c for STDC +- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer] +- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant] +- Use z_off_t for adler32_combine() and crc32_combine() lengths +- Make adler32() much faster for small len +- Use OS_CODE in deflate() default gzip header + +Changes in 1.2.2.1 (31 October 2004) +- Allow inflateSetDictionary() call for raw inflate +- Fix inflate header crc check bug for file names and comments +- Add deflateSetHeader() and gz_header structure for custom gzip headers +- Add inflateGetheader() to retrieve gzip headers +- Add crc32_combine() and adler32_combine() functions +- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list +- Use zstreamp consistently in zlib.h (inflate_back functions) +- Remove GUNZIP condition from definition of inflate_mode in inflate.h + and in contrib/inflate86/inffast.S [Truta, Anderson] +- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson] +- Update projects/README.projects and projects/visualc6 [Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta] +- Deprecate Z_ASCII; use Z_TEXT instead [Truta] +- Use a new algorithm for setting strm->data_type in trees.c [Truta] +- Do not define an exit() prototype in zutil.c unless DEBUG defined +- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta] +- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate() +- Fix Darwin build version identification [Peterson] + +Changes in 1.2.2 (3 October 2004) +- Update zlib.h comments on gzip in-memory processing +- Set adler to 1 in inflateReset() to support Java test suite [Walles] +- Add contrib/dotzlib [Ravn] +- Update win32/DLL_FAQ.txt [Truta] +- Update contrib/minizip [Vollant] +- Move contrib/visual-basic.txt to old/ [Truta] +- Fix assembler builds in projects/visualc6/ [Truta] + +Changes in 1.2.1.2 (9 September 2004) +- Update INDEX file +- Fix trees.c to update strm->data_type (no one ever noticed!) +- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] +- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) +- Add limited multitasking protection to DYNAMIC_CRC_TABLE +- Add NO_vsnprintf for VMS in zutil.h [Mozilla] +- Don't declare strerror() under VMS [Mozilla] +- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize +- Update contrib/ada [Anisimkov] +- Update contrib/minizip [Vollant] +- Fix configure to not hardcode directories for Darwin [Peterson] +- Fix gzio.c to not return error on empty files [Brown] +- Fix indentation; update version in contrib/delphi/ZLib.pas and + contrib/pascal/zlibpas.pas [Truta] +- Update mkasm.bat in contrib/masmx86 [Truta] +- Update contrib/untgz [Truta] +- Add projects/README.projects [Truta] +- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] +- Remove an unnecessary assignment to curr in inftrees.c [Truta] +- Add OS/2 to exe builds in configure [Poltorak] +- Remove err dummy parameter in zlib.h [Kientzle] + +Changes in 1.2.1.1 (9 January 2004) +- Update email address in README +- Several FAQ updates +- Fix a big fat bug in inftrees.c that prevented decoding valid + dynamic blocks with only literals and no distance codes -- + Thanks to "Hot Emu" for the bug report and sample file +- Add a note to puff.c on no distance codes case + +Changes in 1.2.1 (17 November 2003) +- Remove a tab in contrib/gzappend/gzappend.c +- Update some interfaces in contrib for new zlib functions +- Update zlib version number in some contrib entries +- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta] +- Support shared libraries on Hurd and KFreeBSD [Brown] +- Fix error in NO_DIVIDE option of adler32.c + +Changes in 1.2.0.8 (4 November 2003) +- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas +- Add experimental NO_DIVIDE #define in adler32.c + - Possibly faster on some processors (let me know if it is) +- Correct Z_BLOCK to not return on first inflate call if no wrap +- Fix strm->data_type on inflate() return to correctly indicate EOB +- Add deflatePrime() function for appending in the middle of a byte +- Add contrib/gzappend for an example of appending to a stream +- Update win32/DLL_FAQ.txt [Truta] +- Delete Turbo C comment in README [Truta] +- Improve some indentation in zconf.h [Truta] +- Fix infinite loop on bad input in configure script [Church] +- Fix gzeof() for concatenated gzip files [Johnson] +- Add example to contrib/visual-basic.txt [Michael B.] +- Add -p to mkdir's in Makefile.in [vda] +- Fix configure to properly detect presence or lack of printf functions +- Add AS400 support [Monnerat] +- Add a little Cygwin support [Wilson] + +Changes in 1.2.0.7 (21 September 2003) +- Correct some debug formats in contrib/infback9 +- Cast a type in a debug statement in trees.c +- Change search and replace delimiter in configure from % to # [Beebe] +- Update contrib/untgz to 0.2 with various fixes [Truta] +- Add build support for Amiga [Nikl] +- Remove some directories in old that have been updated to 1.2 +- Add dylib building for Mac OS X in configure and Makefile.in +- Remove old distribution stuff from Makefile +- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X +- Update links in README + +Changes in 1.2.0.6 (13 September 2003) +- Minor FAQ updates +- Update contrib/minizip to 1.00 [Vollant] +- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta] +- Update POSTINC comment for 68060 [Nikl] +- Add contrib/infback9 with deflate64 decoding (unsupported) +- For MVS define NO_vsnprintf and undefine FAR [van Burik] +- Add pragma for fdopen on MVS [van Burik] + +Changes in 1.2.0.5 (8 September 2003) +- Add OF to inflateBackEnd() declaration in zlib.h +- Remember start when using gzdopen in the middle of a file +- Use internal off_t counters in gz* functions to properly handle seeks +- Perform more rigorous check for distance-too-far in inffast.c +- Add Z_BLOCK flush option to return from inflate at block boundary +- Set strm->data_type on return from inflate + - Indicate bits unused, if at block boundary, and if in last block +- Replace size_t with ptrdiff_t in crc32.c, and check for correct size +- Add condition so old NO_DEFLATE define still works for compatibility +- FAQ update regarding the Windows DLL [Truta] +- INDEX update: add qnx entry, remove aix entry [Truta] +- Install zlib.3 into mandir [Wilson] +- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta] +- Adapt the zlib interface to the new DLL convention guidelines [Truta] +- Introduce ZLIB_WINAPI macro to allow the export of functions using + the WINAPI calling convention, for Visual Basic [Vollant, Truta] +- Update msdos and win32 scripts and makefiles [Truta] +- Export symbols by name, not by ordinal, in win32/zlib.def [Truta] +- Add contrib/ada [Anisimkov] +- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta] +- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant] +- Add contrib/masm686 [Truta] +- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm + [Truta, Vollant] +- Update contrib/delphi; rename to contrib/pascal; add example [Truta] +- Remove contrib/delphi2; add a new contrib/delphi [Truta] +- Avoid inclusion of the nonstandard <memory.h> in contrib/iostream, + and fix some method prototypes [Truta] +- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip + [Truta] +- Avoid the use of backslash (\) in contrib/minizip [Vollant] +- Fix file time handling in contrib/untgz; update makefiles [Truta] +- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines + [Vollant] +- Remove contrib/vstudio/vc15_16 [Vollant] +- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta] +- Update README.contrib [Truta] +- Invert the assignment order of match_head and s->prev[...] in + INSERT_STRING [Truta] +- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings + [Truta] +- Compare function pointers with 0, not with NULL or Z_NULL [Truta] +- Fix prototype of syncsearch in inflate.c [Truta] +- Introduce ASMINF macro to be enabled when using an ASM implementation + of inflate_fast [Truta] +- Change NO_DEFLATE to NO_GZCOMPRESS [Truta] +- Modify test_gzio in example.c to take a single file name as a + parameter [Truta] +- Exit the example.c program if gzopen fails [Truta] +- Add type casts around strlen in example.c [Truta] +- Remove casting to sizeof in minigzip.c; give a proper type + to the variable compared with SUFFIX_LEN [Truta] +- Update definitions of STDC and STDC99 in zconf.h [Truta] +- Synchronize zconf.h with the new Windows DLL interface [Truta] +- Use SYS16BIT instead of __32BIT__ to distinguish between + 16- and 32-bit platforms [Truta] +- Use far memory allocators in small 16-bit memory models for + Turbo C [Truta] +- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in + zlibCompileFlags [Truta] +- Cygwin has vsnprintf [Wilson] +- In Windows16, OS_CODE is 0, as in MSDOS [Truta] +- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson] + +Changes in 1.2.0.4 (10 August 2003) +- Minor FAQ updates +- Be more strict when checking inflateInit2's windowBits parameter +- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well +- Add gzip wrapper option to deflateInit2 using windowBits +- Add updated QNX rule in configure and qnx directory [Bonnefoy] +- Make inflate distance-too-far checks more rigorous +- Clean up FAR usage in inflate +- Add casting to sizeof() in gzio.c and minigzip.c + +Changes in 1.2.0.3 (19 July 2003) +- Fix silly error in gzungetc() implementation [Vollant] +- Update contrib/minizip and contrib/vstudio [Vollant] +- Fix printf format in example.c +- Correct cdecl support in zconf.in.h [Anisimkov] +- Minor FAQ updates + +Changes in 1.2.0.2 (13 July 2003) +- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons +- Attempt to avoid warnings in crc32.c for pointer-int conversion +- Add AIX to configure, remove aix directory [Bakker] +- Add some casts to minigzip.c +- Improve checking after insecure sprintf() or vsprintf() calls +- Remove #elif's from crc32.c +- Change leave label to inf_leave in inflate.c and infback.c to avoid + library conflicts +- Remove inflate gzip decoding by default--only enable gzip decoding by + special request for stricter backward compatibility +- Add zlibCompileFlags() function to return compilation information +- More typecasting in deflate.c to avoid warnings +- Remove leading underscore from _Capital #defines [Truta] +- Fix configure to link shared library when testing +- Add some Windows CE target adjustments [Mai] +- Remove #define ZLIB_DLL in zconf.h [Vollant] +- Add zlib.3 [Rodgers] +- Update RFC URL in deflate.c and algorithm.txt [Mai] +- Add zlib_dll_FAQ.txt to contrib [Truta] +- Add UL to some constants [Truta] +- Update minizip and vstudio [Vollant] +- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h +- Expand use of NO_DUMMY_DECL to avoid all dummy structures +- Added iostream3 to contrib [Schwardt] +- Replace rewind() with fseek() for WinCE [Truta] +- Improve setting of zlib format compression level flags + - Report 0 for huffman and rle strategies and for level == 0 or 1 + - Report 2 only for level == 6 +- Only deal with 64K limit when necessary at compile time [Truta] +- Allow TOO_FAR check to be turned off at compile time [Truta] +- Add gzclearerr() function [Souza] +- Add gzungetc() function + +Changes in 1.2.0.1 (17 March 2003) +- Add Z_RLE strategy for run-length encoding [Truta] + - When Z_RLE requested, restrict matches to distance one + - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE +- Correct FASTEST compilation to allow level == 0 +- Clean up what gets compiled for FASTEST +- Incorporate changes to zconf.in.h [Vollant] + - Refine detection of Turbo C need for dummy returns + - Refine ZLIB_DLL compilation + - Include additional header file on VMS for off_t typedef +- Try to use _vsnprintf where it supplants vsprintf [Vollant] +- Add some casts in inffast.c +- Enhance comments in zlib.h on what happens if gzprintf() tries to + write more than 4095 bytes before compression +- Remove unused state from inflateBackEnd() +- Remove exit(0) from minigzip.c, example.c +- Get rid of all those darn tabs +- Add "check" target to Makefile.in that does the same thing as "test" +- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in +- Update contrib/inflate86 [Anderson] +- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant] +- Add msdos and win32 directories with makefiles [Truta] +- More additions and improvements to the FAQ + +Changes in 1.2.0 (9 March 2003) +- New and improved inflate code + - About 20% faster + - Does not allocate 32K window unless and until needed + - Automatically detects and decompresses gzip streams + - Raw inflate no longer needs an extra dummy byte at end + - Added inflateBack functions using a callback interface--even faster + than inflate, useful for file utilities (gzip, zip) + - Added inflateCopy() function to record state for random access on + externally generated deflate streams (e.g. in gzip files) + - More readable code (I hope) +- New and improved crc32() + - About 50% faster, thanks to suggestions from Rodney Brown +- Add deflateBound() and compressBound() functions +- Fix memory leak in deflateInit2() +- Permit setting dictionary for raw deflate (for parallel deflate) +- Fix const declaration for gzwrite() +- Check for some malloc() failures in gzio.c +- Fix bug in gzopen() on single-byte file 0x1f +- Fix bug in gzread() on concatenated file with 0x1f at end of buffer + and next buffer doesn't start with 0x8b +- Fix uncompress() to return Z_DATA_ERROR on truncated input +- Free memory at end of example.c +- Remove MAX #define in trees.c (conflicted with some libraries) +- Fix static const's in deflate.c, gzio.c, and zutil.[ch] +- Declare malloc() and free() in gzio.c if STDC not defined +- Use malloc() instead of calloc() in zutil.c if int big enough +- Define STDC for AIX +- Add aix/ with approach for compiling shared library on AIX +- Add HP-UX support for shared libraries in configure +- Add OpenUNIX support for shared libraries in configure +- Use $cc instead of gcc to build shared library +- Make prefix directory if needed when installing +- Correct Macintosh avoidance of typedef Byte in zconf.h +- Correct Turbo C memory allocation when under Linux +- Use libz.a instead of -lz in Makefile (assure use of compiled library) +- Update configure to check for snprintf or vsnprintf functions and their + return value, warn during make if using an insecure function +- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that + is lost when library is used--resolution is to build new zconf.h +- Documentation improvements (in zlib.h): + - Document raw deflate and inflate + - Update RFCs URL + - Point out that zlib and gzip formats are different + - Note that Z_BUF_ERROR is not fatal + - Document string limit for gzprintf() and possible buffer overflow + - Note requirement on avail_out when flushing + - Note permitted values of flush parameter of inflate() +- Add some FAQs (and even answers) to the FAQ +- Add contrib/inflate86/ for x86 faster inflate +- Add contrib/blast/ for PKWare Data Compression Library decompression +- Add contrib/puff/ simple inflate for deflate format description + +Changes in 1.1.4 (11 March 2002) +- ZFREE was repeated on same allocation on some error conditions + This creates a security problem described in + http://www.zlib.org/advisory-2002-03-11.txt +- Returned incorrect error (Z_MEM_ERROR) on some invalid data +- Avoid accesses before window for invalid distances with inflate window + less than 32K +- force windowBits > 8 to avoid a bug in the encoder for a window size + of 256 bytes. (A complete fix will be available in 1.1.5) + +Changes in 1.1.3 (9 July 1998) +- fix "an inflate input buffer bug that shows up on rare but persistent + occasions" (Mark) +- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) +- fix gzseek(..., SEEK_SET) in write mode +- fix crc check after a gzeek (Frank Faubert) +- fix miniunzip when the last entry in a zip file is itself a zip file + (J Lillge) +- add contrib/asm586 and contrib/asm686 (Brian Raiter) + See http://www.muppetlabs.com/~breadbox/software/assembly.html +- add support for Delphi 3 in contrib/delphi (Bob Dellaca) +- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) +- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) +- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) +- added a FAQ file + +- Support gzdopen on Mac with Metrowerks (Jason Linhart) +- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) +- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) +- avoid some warnings with Borland C (Tom Tanner) +- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant) +- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant) +- allow several arguments to configure (Tim Mooney, Frodo Looijaard) +- use libdir and includedir in Makefile.in (Tim Mooney) +- support shared libraries on OSF1 V4 (Tim Mooney) +- remove so_locations in "make clean" (Tim Mooney) +- fix maketree.c compilation error (Glenn, Mark) +- Python interface to zlib now in Python 1.5 (Jeremy Hylton) +- new Makefile.riscos (Rich Walker) +- initialize static descriptors in trees.c for embedded targets (Nick Smith) +- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith) +- add the OS/2 files in Makefile.in too (Andrew Zabolotny) +- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane) +- fix maketree.c to allow clean compilation of inffixed.h (Mark) +- fix parameter check in deflateCopy (Gunther Nikl) +- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler) +- Many portability patches by Christian Spieler: + . zutil.c, zutil.h: added "const" for zmem* + . Make_vms.com: fixed some typos + . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists + . msdos/Makefile.msc: remove "default rtl link library" info from obj files + . msdos/Makefile.*: use model-dependent name for the built zlib library + . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc: + new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT) +- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane) +- replace __far with _far for better portability (Christian Spieler, Tom Lane) +- fix test for errno.h in configure (Tim Newsham) + +Changes in 1.1.2 (19 March 98) +- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) + See http://www.winimage.com/zLibDll/unzip.html +- preinitialize the inflate tables for fixed codes, to make the code + completely thread safe (Mark) +- some simplifications and slight speed-up to the inflate code (Mark) +- fix gzeof on non-compressed files (Allan Schrum) +- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) +- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) +- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) +- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) +- do not wrap extern "C" around system includes (Tom Lane) +- mention zlib binding for TCL in README (Andreas Kupries) +- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) +- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) +- allow "configure --prefix $HOME" (Tim Mooney) +- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) +- move Makefile.sas to amiga/Makefile.sas + +Changes in 1.1.1 (27 Feb 98) +- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) +- remove block truncation heuristic which had very marginal effect for zlib + (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the + compression ratio on some files. This also allows inlining _tr_tally for + matches in deflate_slow +- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) + +Changes in 1.1.0 (24 Feb 98) +- do not return STREAM_END prematurely in inflate (John Bowler) +- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) +- compile with -DFASTEST to get compression code optimized for speed only +- in minigzip, try mmap'ing the input file first (Miguel Albrecht) +- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain + on Sun but significant on HP) + +- add a pointer to experimental unzip library in README (Gilles Vollant) +- initialize variable gcc in configure (Chris Herborth) + +Changes in 1.0.9 (17 Feb 1998) +- added gzputs and gzgets functions +- do not clear eof flag in gzseek (Mark Diekhans) +- fix gzseek for files in transparent mode (Mark Diekhans) +- do not assume that vsprintf returns the number of bytes written (Jens Krinke) +- replace EXPORT with ZEXPORT to avoid conflict with other programs +- added compress2 in zconf.h, zlib.def, zlib.dnt +- new asm code from Gilles Vollant in contrib/asm386 +- simplify the inflate code (Mark): + . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() + . ZALLOC the length list in inflate_trees_fixed() instead of using stack + . ZALLOC the value area for huft_build() instead of using stack + . Simplify Z_FINISH check in inflate() + +- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 +- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) +- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with + the declaration of FAR (Gilles Vollant) +- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) +- read_buf buf parameter of type Bytef* instead of charf* +- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) +- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) +- fix check for presence of directories in "make install" (Ian Willis) + +Changes in 1.0.8 (27 Jan 1998) +- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) +- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) +- added compress2() to allow setting the compression level +- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) +- use constant arrays for the static trees in trees.c instead of computing + them at run time (thanks to Ken Raeburn for this suggestion). To create + trees.h, compile with GEN_TREES_H and run "make test" +- check return code of example in "make test" and display result +- pass minigzip command line options to file_compress +- simplifying code of inflateSync to avoid gcc 2.8 bug + +- support CC="gcc -Wall" in configure -s (QingLong) +- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) +- fix test for shared library support to avoid compiler warnings +- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) +- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) +- do not use fdopen for Metrowerks on Mac (Brad Pettit)) +- add checks for gzputc and gzputc in example.c +- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) +- use const for the CRC table (Ken Raeburn) +- fixed "make uninstall" for shared libraries +- use Tracev instead of Trace in infblock.c +- in example.c use correct compressed length for test_sync +- suppress +vnocompatwarnings in configure for HPUX (not always supported) + +Changes in 1.0.7 (20 Jan 1998) +- fix gzseek which was broken in write mode +- return error for gzseek to negative absolute position +- fix configure for Linux (Chun-Chung Chen) +- increase stack space for MSC (Tim Wegner) +- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) +- define EXPORTVA for gzprintf (Gilles Vollant) +- added man page zlib.3 (Rick Rodgers) +- for contrib/untgz, fix makedir() and improve Makefile + +- check gzseek in write mode in example.c +- allocate extra buffer for seeks only if gzseek is actually called +- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) +- add inflateSyncPoint in zconf.h +- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def + +Changes in 1.0.6 (19 Jan 1998) +- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and + gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) +- Fix a deflate bug occurring only with compression level 0 (thanks to + Andy Buckler for finding this one) +- In minigzip, pass transparently also the first byte for .Z files +- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() +- check Z_FINISH in inflate (thanks to Marc Schluper) +- Implement deflateCopy (thanks to Adam Costello) +- make static libraries by default in configure, add --shared option +- move MSDOS or Windows specific files to directory msdos +- suppress the notion of partial flush to simplify the interface + (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) +- suppress history buffer provided by application to simplify the interface + (this feature was not implemented anyway in 1.0.4) +- next_in and avail_in must be initialized before calling inflateInit or + inflateInit2 +- add EXPORT in all exported functions (for Windows DLL) +- added Makefile.nt (thanks to Stephen Williams) +- added the unsupported "contrib" directory: + contrib/asm386/ by Gilles Vollant <info@winimage.com> + 386 asm code replacing longest_match() + contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu> + A C++ I/O streams interface to the zlib gz* functions + contrib/iostream2/ by Tyge Løvset <Tyge.Lovset@cmr.no> + Another C++ I/O streams interface + contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <paag@tid.es> + A very simple tar.gz file extractor using zlib + contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl> + How to use compress(), uncompress() and the gz* functions from VB +- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression + level) in minigzip (thanks to Tom Lane) + +- use const for rommable constants in deflate +- added test for gzseek and gztell in example.c +- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) +- add undocumented function zError to convert error code to string + (for Tim Smithers) +- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code +- Use default memcpy for Symantec MSDOS compiler +- Add EXPORT keyword for check_func (needed for Windows DLL) +- add current directory to LD_LIBRARY_PATH for "make test" +- create also a link for libz.so.1 +- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) +- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) +- added -soname for Linux in configure (Chun-Chung Chen, +- assign numbers to the exported functions in zlib.def (for Windows DLL) +- add advice in zlib.h for best usage of deflateSetDictionary +- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) +- allow compilation with ANSI keywords only enabled for TurboC in large model +- avoid "versionString"[0] (Borland bug) +- add NEED_DUMMY_RETURN for Borland +- use variable z_verbose for tracing in debug mode (L. Peter Deutsch) +- allow compilation with CC +- defined STDC for OS/2 (David Charlap) +- limit external names to 8 chars for MVS (Thomas Lund) +- in minigzip.c, use static buffers only for 16-bit systems +- fix suffix check for "minigzip -d foo.gz" +- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) +- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) +- added makelcc.bat for lcc-win32 (Tom St Denis) +- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) +- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion +- check for unistd.h in configure (for off_t) +- remove useless check parameter in inflate_blocks_free +- avoid useless assignment of s->check to itself in inflate_blocks_new +- do not flush twice in gzclose (thanks to Ken Raeburn) +- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h +- use NO_ERRNO_H instead of enumeration of operating systems with errno.h +- work around buggy fclose on pipes for HP/UX +- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) +- fix configure if CC is already equal to gcc + +Changes in 1.0.5 (3 Jan 98) +- Fix inflate to terminate gracefully when fed corrupted or invalid data +- Use const for rommable constants in inflate +- Eliminate memory leaks on error conditions in inflate +- Removed some vestigial code in inflate +- Update web address in README + +Changes in 1.0.4 (24 Jul 96) +- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF + bit, so the decompressor could decompress all the correct data but went + on to attempt decompressing extra garbage data. This affected minigzip too +- zlibVersion and gzerror return const char* (needed for DLL) +- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) +- use z_error only for DEBUG (avoid problem with DLLs) + +Changes in 1.0.3 (2 Jul 96) +- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS + small and medium models; this makes the library incompatible with previous + versions for these models. (No effect in large model or on other systems.) +- return OK instead of BUF_ERROR if previous deflate call returned with + avail_out as zero but there is nothing to do +- added memcmp for non STDC compilers +- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) +- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) +- better check for 16-bit mode MSC (avoids problem with Symantec) + +Changes in 1.0.2 (23 May 96) +- added Windows DLL support +- added a function zlibVersion (for the DLL support) +- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) +- Bytef is define's instead of typedef'd only for Borland C +- avoid reading uninitialized memory in example.c +- mention in README that the zlib format is now RFC1950 +- updated Makefile.dj2 +- added algorithm.doc + +Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] +- fix array overlay in deflate.c which sometimes caused bad compressed data +- fix inflate bug with empty stored block +- fix MSDOS medium model which was broken in 0.99 +- fix deflateParams() which could generate bad compressed data +- Bytef is define'd instead of typedef'ed (work around Borland bug) +- added an INDEX file +- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), + Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) +- speed up adler32 for modern machines without auto-increment +- added -ansi for IRIX in configure +- static_init_done in trees.c is an int +- define unlink as delete for VMS +- fix configure for QNX +- add configure branch for SCO and HPUX +- avoid many warnings (unused variables, dead assignments, etc...) +- no fdopen for BeOS +- fix the Watcom fix for 32 bit mode (define FAR as empty) +- removed redefinition of Byte for MKWERKS +- work around an MWKERKS bug (incorrect merge of all .h files) + +Changes in 0.99 (27 Jan 96) +- allow preset dictionary shared between compressor and decompressor +- allow compression level 0 (no compression) +- add deflateParams in zlib.h: allow dynamic change of compression level + and compression strategy +- test large buffers and deflateParams in example.c +- add optional "configure" to build zlib as a shared library +- suppress Makefile.qnx, use configure instead +- fixed deflate for 64-bit systems (detected on Cray) +- fixed inflate_blocks for 64-bit systems (detected on Alpha) +- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) +- always return Z_BUF_ERROR when deflate() has nothing to do +- deflateInit and inflateInit are now macros to allow version checking +- prefix all global functions and types with z_ with -DZ_PREFIX +- make falloc completely reentrant (inftrees.c) +- fixed very unlikely race condition in ct_static_init +- free in reverse order of allocation to help memory manager +- use zlib-1.0/* instead of zlib/* inside the tar.gz +- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith + -Wconversion -Wstrict-prototypes -Wmissing-prototypes" +- allow gzread on concatenated .gz files +- deflateEnd now returns Z_DATA_ERROR if it was premature +- deflate is finally (?) fully deterministic (no matches beyond end of input) +- Document Z_SYNC_FLUSH +- add uninstall in Makefile +- Check for __cpluplus in zlib.h +- Better test in ct_align for partial flush +- avoid harmless warnings for Borland C++ +- initialize hash_head in deflate.c +- avoid warning on fdopen (gzio.c) for HP cc -Aa +- include stdlib.h for STDC compilers +- include errno.h for Cray +- ignore error if ranlib doesn't exist +- call ranlib twice for NeXTSTEP +- use exec_prefix instead of prefix for libz.a +- renamed ct_* as _tr_* to avoid conflict with applications +- clear z->msg in inflateInit2 before any error return +- initialize opaque in example.c, gzio.c, deflate.c and inflate.c +- fixed typo in zconf.h (_GNUC__ => __GNUC__) +- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) +- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) +- in fcalloc, normalize pointer if size > 65520 bytes +- don't use special fcalloc for 32 bit Borland C++ +- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc. +- use Z_BINARY instead of BINARY +- document that gzclose after gzdopen will close the file +- allow "a" as mode in gzopen +- fix error checking in gzread +- allow skipping .gz extra-field on pipes +- added reference to Perl interface in README +- put the crc table in FAR data (I dislike more and more the medium model :) +- added get_crc_table +- added a dimension to all arrays (Borland C can't count) +- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast +- guard against multiple inclusion of *.h (for precompiled header on Mac) +- Watcom C pretends to be Microsoft C small model even in 32 bit mode +- don't use unsized arrays to avoid silly warnings by Visual C++: + warning C4746: 'inflate_mask' : unsized array treated as '__far' + (what's wrong with far data in far model?) +- define enum out of inflate_blocks_state to allow compilation with C++ + +Changes in 0.95 (16 Aug 95) +- fix MSDOS small and medium model (now easier to adapt to any compiler) +- inlined send_bits +- fix the final (:-) bug for deflate with flush (output was correct but + not completely flushed in rare occasions) +- default window size is same for compression and decompression + (it's now sufficient to set MAX_WBITS in zconf.h) +- voidp -> voidpf and voidnp -> voidp (for consistency with other + typedefs and because voidnp was not near in large model) + +Changes in 0.94 (13 Aug 95) +- support MSDOS medium model +- fix deflate with flush (could sometimes generate bad output) +- fix deflateReset (zlib header was incorrectly suppressed) +- added support for VMS +- allow a compression level in gzopen() +- gzflush now calls fflush +- For deflate with flush, flush even if no more input is provided +- rename libgz.a as libz.a +- avoid complex expression in infcodes.c triggering Turbo C bug +- work around a problem with gcc on Alpha (in INSERT_STRING) +- don't use inline functions (problem with some gcc versions) +- allow renaming of Byte, uInt, etc... with #define +- avoid warning about (unused) pointer before start of array in deflate.c +- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c +- avoid reserved word 'new' in trees.c + +Changes in 0.93 (25 June 95) +- temporarily disable inline functions +- make deflate deterministic +- give enough lookahead for PARTIAL_FLUSH +- Set binary mode for stdin/stdout in minigzip.c for OS/2 +- don't even use signed char in inflate (not portable enough) +- fix inflate memory leak for segmented architectures + +Changes in 0.92 (3 May 95) +- don't assume that char is signed (problem on SGI) +- Clear bit buffer when starting a stored block +- no memcpy on Pyramid +- suppressed inftest.c +- optimized fill_window, put longest_match inline for gcc +- optimized inflate on stored blocks +- untabify all sources to simplify patches + +Changes in 0.91 (2 May 95) +- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h +- Document the memory requirements in zconf.h +- added "make install" +- fix sync search logic in inflateSync +- deflate(Z_FULL_FLUSH) now works even if output buffer too short +- after inflateSync, don't scare people with just "lo world" +- added support for DJGPP + +Changes in 0.9 (1 May 95) +- don't assume that zalloc clears the allocated memory (the TurboC bug + was Mark's bug after all :) +- let again gzread copy uncompressed data unchanged (was working in 0.71) +- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented +- added a test of inflateSync in example.c +- moved MAX_WBITS to zconf.h because users might want to change that +- document explicitly that zalloc(64K) on MSDOS must return a normalized + pointer (zero offset) +- added Makefiles for Microsoft C, Turbo C, Borland C++ +- faster crc32() + +Changes in 0.8 (29 April 95) +- added fast inflate (inffast.c) +- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this + is incompatible with previous versions of zlib which returned Z_OK +- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) + (actually that was not a compiler bug, see 0.81 above) +- gzread no longer reads one extra byte in certain cases +- In gzio destroy(), don't reference a freed structure +- avoid many warnings for MSDOS +- avoid the ERROR symbol which is used by MS Windows + +Changes in 0.71 (14 April 95) +- Fixed more MSDOS compilation problems :( There is still a bug with + TurboC large model + +Changes in 0.7 (14 April 95) +- Added full inflate support +- Simplified the crc32() interface. The pre- and post-conditioning + (one's complement) is now done inside crc32(). WARNING: this is + incompatible with previous versions; see zlib.h for the new usage + +Changes in 0.61 (12 April 95) +- workaround for a bug in TurboC. example and minigzip now work on MSDOS + +Changes in 0.6 (11 April 95) +- added minigzip.c +- added gzdopen to reopen a file descriptor as gzFile +- added transparent reading of non-gziped files in gzread +- fixed bug in gzread (don't read crc as data) +- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose) +- don't allocate big arrays in the stack (for MSDOS) +- fix some MSDOS compilation problems + +Changes in 0.5: +- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but + not yet Z_FULL_FLUSH +- support decompression but only in a single step (forced Z_FINISH) +- added opaque object for zalloc and zfree +- added deflateReset and inflateReset +- added a variable zlib_version for consistency checking +- renamed the 'filter' parameter of deflateInit2 as 'strategy' + Added Z_FILTERED and Z_HUFFMAN_ONLY constants + +Changes in 0.4: +- avoid "zip" everywhere, use zlib instead of ziplib +- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush + if compression method == 8 +- added adler32 and crc32 +- renamed deflateOptions as deflateInit2, call one or the other but not both +- added the method parameter for deflateInit2 +- added inflateInit2 +- simplified considerably deflateInit and inflateInit by not supporting + user-provided history buffer. This is supported only in deflateInit2 + and inflateInit2 + +Changes in 0.3: +- prefix all macro names with Z_ +- use Z_FINISH instead of deflateEnd to finish compression +- added Z_HUFFMAN_ONLY +- added gzerror() diff --git a/src/Common/zlib/README b/src/Common/zlib/README index e02fc5aa..c5f91754 100644 --- a/src/Common/zlib/README +++ b/src/Common/zlib/README @@ -1,8 +1,8 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.3 is a general purpose data compression library. All the code is +zlib 1.3.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). @@ -29,11 +29,11 @@ PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at https://marknelson.us/posts/1997/01/01/zlib-engine.html . -The changes made in version 1.3 are documented in the file ChangeLog. +The changes made in version 1.3.1 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . zlib is available in Java using the java.util.zip package. Follow the API Documentation link at: https://docs.oracle.com/search/?q=java.util.zip . @@ -81,11 +81,11 @@ Acknowledgments: people who reported problems and suggested various improvements in zlib; they are too numerous to cite here. Copyright notice: - (C) 1995-2023 Jean-loup Gailly and Mark Adler + (C) 1995-2024 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. diff --git a/src/Common/zlib/deflate.c b/src/Common/zlib/deflate.c index bd011751..012ea814 100644 --- a/src/Common/zlib/deflate.c +++ b/src/Common/zlib/deflate.c @@ -1,7 +1,7 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* * ALGORITHM @@ -50,11 +50,11 @@ /* @(#) $Id$ */ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.3 Copyright 1995-2023 Jean-loup Gailly and Mark Adler "; + " deflate 1.3.1 Copyright 1995-2024 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot include such an acknowledgment, I would appreciate that you keep this copyright string in the executable of your product. @@ -491,22 +491,28 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, * Therefore its average symbol length is assured to be less than 31. So * the compressed data for a dynamic block also cannot overwrite the * symbols from which it is being constructed. */ - s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4); + s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS); s->pending_buf_size = (ulg)s->lit_bufsize * 4; if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s->pending_buf == Z_NULL) { s->status = FINISH_STATE; strm->msg = ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } +#ifdef LIT_MEM + s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1)); + s->l_buf = s->pending_buf + (s->lit_bufsize << 2); + s->sym_end = s->lit_bufsize - 1; +#else s->sym_buf = s->pending_buf + s->lit_bufsize; s->sym_end = (s->lit_bufsize - 1) * 3; +#endif /* We avoid equality with lit_bufsize*3 because of wraparound at 64K * on 16 bit machines and because stored blocks are restricted to * 64K-1 bytes. */ @@ -718,13 +724,19 @@ int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) { deflate_state *s; int put; if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; +#ifdef LIT_MEM + if (bits < 0 || bits > 16 || + (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3)) + return Z_BUF_ERROR; +#else if (bits < 0 || bits > 16 || s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) return Z_BUF_ERROR; +#endif do { put = Buf_size - s->bi_valid; if (put > bits) put = bits; s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid); @@ -1292,25 +1304,30 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) { ds->strm = dest; ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); - ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4); + ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, LIT_BUFS); if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || ds->pending_buf == Z_NULL) { deflateEnd (dest); return Z_MEM_ERROR; } /* following zmemcpy do not work for 16-bit MSDOS */ zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); - zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + zmemcpy(ds->pending_buf, ss->pending_buf, ds->lit_bufsize * LIT_BUFS); ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); +#ifdef LIT_MEM + ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1)); + ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2); +#else ds->sym_buf = ds->pending_buf + ds->lit_bufsize; +#endif ds->l_desc.dyn_tree = ds->dyn_ltree; ds->d_desc.dyn_tree = ds->dyn_dtree; ds->bl_desc.dyn_tree = ds->bl_tree; @@ -1537,17 +1554,25 @@ local uInt longest_match(deflate_state *s, IPos cur_match) { /* =========================================================================== * Check that the match at match_start is indeed a match. */ local void check_match(deflate_state *s, IPos start, IPos match, int length) { /* check that the match is indeed a match */ - if (zmemcmp(s->window + match, - s->window + start, length) != EQUAL) { - fprintf(stderr, " start %u, match %u, length %d\n", - start, match, length); + Bytef *back = s->window + (int)match, *here = s->window + start; + IPos len = length; + if (match == (IPos)-1) { + /* match starts one byte before the current window -- just compare the + subsequent length-1 bytes */ + back++; + here++; + len--; + } + if (zmemcmp(back, here, len) != EQUAL) { + fprintf(stderr, " start %u, match %d, length %d\n", + start, (int)match, length); do { - fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); - } while (--length != 0); + fprintf(stderr, "(%02x %02x)", *back++, *here++); + } while (--len != 0); z_error("invalid match"); } if (z_verbose > 1) { fprintf(stderr,"\\[%d,%d]", start - match, length); do { putc(s->window[start++], stderr); } while (--length != 0); diff --git a/src/Common/zlib/deflate.h b/src/Common/zlib/deflate.h index 86967914..300c6ada 100644 --- a/src/Common/zlib/deflate.h +++ b/src/Common/zlib/deflate.h @@ -1,7 +1,7 @@ /* deflate.h -- internal compression state - * Copyright (C) 1995-2018 Jean-loup Gailly + * Copyright (C) 1995-2024 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is @@ -21,10 +21,14 @@ should be left enabled. */ #ifndef NO_GZIP # define GZIP #endif +/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at + the cost of a larger memory footprint */ +/* #define LIT_MEM */ + /* =========================================================================== * Internal compression state. */ #define LENGTH_CODES 29 @@ -215,11 +219,18 @@ typedef struct internal_state { uch depth[2*L_CODES+1]; /* Depth of each subtree used as tie breaker for trees of equal frequency */ +#ifdef LIT_MEM +# define LIT_BUFS 5 + ushf *d_buf; /* buffer for distances */ + uchf *l_buf; /* buffer for literals/lengths */ +#else +# define LIT_BUFS 4 uchf *sym_buf; /* buffer for distances and literals/lengths */ +#endif uInt lit_bufsize; /* Size of match buffer for literals/lengths. There are 4 reasons for * limiting lit_bufsize to 64K: * - frequencies can be kept in 16 bit counters @@ -237,11 +248,11 @@ typedef struct internal_state { * fast adaptation but have of course the overhead of transmitting * trees more frequently. * - I can't count above 4 */ - uInt sym_next; /* running index in sym_buf */ + uInt sym_next; /* running index in symbol buffer */ uInt sym_end; /* symbol table full when sym_next reaches this */ ulg opt_len; /* bit length of current block with optimal trees */ ulg static_len; /* bit length of current block with static trees */ uInt matches; /* number of string matches in current block */ @@ -316,10 +327,29 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, #else extern const uch ZLIB_INTERNAL _length_code[]; extern const uch ZLIB_INTERNAL _dist_code[]; #endif +#ifdef LIT_MEM +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->sym_next] = 0; \ + s->l_buf[s->sym_next++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (uch)(length); \ + ush dist = (ush)(distance); \ + s->d_buf[s->sym_next] = dist; \ + s->l_buf[s->sym_next++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +#else # define _tr_tally_lit(s, c, flush) \ { uch cc = (c); \ s->sym_buf[s->sym_next++] = 0; \ s->sym_buf[s->sym_next++] = 0; \ s->sym_buf[s->sym_next++] = cc; \ @@ -335,10 +365,11 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, dist--; \ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ s->dyn_dtree[d_code(dist)].Freq++; \ flush = (s->sym_next == s->sym_end); \ } +#endif #else # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) # define _tr_tally_dist(s, distance, length, flush) \ flush = _tr_tally(s, distance, length) #endif diff --git a/src/Common/zlib/gzguts.h b/src/Common/zlib/gzguts.h index f9375047..eba72085 100644 --- a/src/Common/zlib/gzguts.h +++ b/src/Common/zlib/gzguts.h @@ -1,7 +1,7 @@ /* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004-2019 Mark Adler + * Copyright (C) 2004-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #ifdef _LARGEFILE64_SOURCE # ifndef _LARGEFILE_SOURCE @@ -208,11 +208,7 @@ char ZLIB_INTERNAL *gz_strwinerror(DWORD error); #endif /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t value -- needed when comparing unsigned to z_off64_t, which is signed (possible z_off64_t types off_t, off64_t, and long are all signed) */ -#ifdef INT_MAX -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) -#else unsigned ZLIB_INTERNAL gz_intmax(void); -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) -#endif +#define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) diff --git a/src/Common/zlib/gzlib.c b/src/Common/zlib/gzlib.c index 29fc4486..983153cc 100644 --- a/src/Common/zlib/gzlib.c +++ b/src/Common/zlib/gzlib.c @@ -1,7 +1,7 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004-2019 Mark Adler + * Copyright (C) 2004-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "gzguts.h" @@ -561,22 +561,22 @@ void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) { strcat(state->msg, ": "); strcat(state->msg, msg); #endif } -#ifndef INT_MAX /* portably return maximum value for an int (when limits.h presumed not available) -- we need to do this to cover cases where 2's complement not used, since C standard permits 1's complement and sign-bit representations, otherwise we could just use ((unsigned)-1) >> 1 */ unsigned ZLIB_INTERNAL gz_intmax(void) { - unsigned p, q; - - p = 1; +#ifdef INT_MAX + return INT_MAX; +#else + unsigned p = 1, q; do { q = p; p <<= 1; p++; } while (p > q); return q >> 1; -} #endif +} diff --git a/src/Common/zlib/inflate.c b/src/Common/zlib/inflate.c index b0757a9b..94ecff01 100644 --- a/src/Common/zlib/inflate.c +++ b/src/Common/zlib/inflate.c @@ -1385,11 +1385,11 @@ int ZEXPORT inflateSync(z_streamp strm) { if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; /* if first time, start search in bit buffer */ if (state->mode != SYNC) { state->mode = SYNC; - state->hold <<= state->bits & 7; + state->hold >>= state->bits & 7; state->bits -= state->bits & 7; len = 0; while (state->bits >= 8) { buf[len++] = (unsigned char)(state->hold); state->hold >>= 8; diff --git a/src/Common/zlib/inftrees.c b/src/Common/zlib/inftrees.c index 8a208c2d..98cfe164 100644 --- a/src/Common/zlib/inftrees.c +++ b/src/Common/zlib/inftrees.c @@ -1,17 +1,17 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2023 Mark Adler + * Copyright (C) 1995-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zutil.h" #include "inftrees.h" #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.3 Copyright 1995-2023 Mark Adler "; + " inflate 1.3.1 Copyright 1995-2024 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot include such an acknowledgment, I would appreciate that you keep this copyright string in the executable of your product. @@ -55,11 +55,11 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, static const unsigned short lbase[31] = { /* Length codes 257..285 base */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 203, 77}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0}; static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ diff --git a/src/Common/zlib/inftrees.h b/src/Common/zlib/inftrees.h index a10712d8..396f74b5 100644 --- a/src/Common/zlib/inftrees.h +++ b/src/Common/zlib/inftrees.h @@ -39,12 +39,12 @@ typedef struct { 1444, which is the sum of 852 for literal/length codes and 592 for distance codes. These values were found by exhaustive searches using the program examples/enough.c found in the zlib distribution. The arguments to that program are the number of symbols, the initial root table size, and the maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns returns 852, and "enough 30 6 15" for distance codes returns 592. - The initial root table size (9 or 6) is found in the fifth argument of the + returns 852, and "enough 30 6 15" for distance codes returns 592. The + initial root table size (9 or 6) is found in the fifth argument of the inflate_table() calls in inflate.c and infback.c. If the root table size is changed, then these maximum sizes would be need to be recalculated and updated. */ #define ENOUGH_LENS 852 #define ENOUGH_DISTS 592 diff --git a/src/Common/zlib/trees.c b/src/Common/zlib/trees.c index 8dbdc40b..6a523ef3 100644 --- a/src/Common/zlib/trees.c +++ b/src/Common/zlib/trees.c @@ -1,7 +1,7 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2021 Jean-loup Gailly + * Copyright (C) 1995-2024 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ /* @@ -897,18 +897,23 @@ void ZLIB_INTERNAL _tr_align(deflate_state *s) { */ local void compress_block(deflate_state *s, const ct_data *ltree, const ct_data *dtree) { unsigned dist; /* distance of matched string */ int lc; /* match length or unmatched char (if dist == 0) */ - unsigned sx = 0; /* running index in sym_buf */ + unsigned sx = 0; /* running index in symbol buffers */ unsigned code; /* the code to send */ int extra; /* number of extra bits to send */ if (s->sym_next != 0) do { +#ifdef LIT_MEM + dist = s->d_buf[sx]; + lc = s->l_buf[sx++]; +#else dist = s->sym_buf[sx++] & 0xff; dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; lc = s->sym_buf[sx++]; +#endif if (dist == 0) { send_code(s, lc, ltree); /* send a literal byte */ Tracecv(isgraph(lc), (stderr," '%c' ", lc)); } else { /* Here, lc is the match length - MIN_MATCH */ @@ -929,12 +934,16 @@ local void compress_block(deflate_state *s, const ct_data *ltree, dist -= (unsigned)base_dist[code]; send_bits(s, dist, extra); /* send the extra distance bits */ } } /* literal or match pair ? */ - /* Check that the overlay between pending_buf and sym_buf is ok: */ + /* Check for no overlay of pending_buf on needed symbols */ +#ifdef LIT_MEM + Assert(s->pending < 2 * (s->lit_bufsize + sx), "pendingBuf overflow"); +#else Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); +#endif } while (sx < s->sym_next); send_code(s, END_BLOCK, ltree); } @@ -1080,13 +1089,18 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, /* =========================================================================== * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) { +#ifdef LIT_MEM + s->d_buf[s->sym_next] = (ush)dist; + s->l_buf[s->sym_next++] = (uch)lc; +#else s->sym_buf[s->sym_next++] = (uch)dist; s->sym_buf[s->sym_next++] = (uch)(dist >> 8); s->sym_buf[s->sym_next++] = (uch)lc; +#endif if (dist == 0) { /* lc is the unmatched char */ s->dyn_ltree[lc].Freq++; } else { s->matches++; diff --git a/src/Common/zlib/zconf.h b/src/Common/zlib/zconf.h index fb76ffe3..62adc8d8 100644 --- a/src/Common/zlib/zconf.h +++ b/src/Common/zlib/zconf.h @@ -1,7 +1,7 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ @@ -298,18 +298,10 @@ # else # define OF(args) () # endif #endif -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, * just define FAR to be empty. diff --git a/src/Common/zlib/zlib.h b/src/Common/zlib/zlib.h index 6b7244f9..8d4b932e 100644 --- a/src/Common/zlib/zlib.h +++ b/src/Common/zlib/zlib.h @@ -1,9 +1,9 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.3, August 18th, 2023 + version 1.3.1, January 22nd, 2024 - Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. @@ -35,15 +35,15 @@ #ifdef __cplusplus extern "C" { #endif -#define ZLIB_VERSION "1.3" -#define ZLIB_VERNUM 0x1300 +#define ZLIB_VERSION "1.3.1" +#define ZLIB_VERNUM 0x1310 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 3 -#define ZLIB_VER_REVISION 0 +#define ZLIB_VER_REVISION 1 #define ZLIB_VER_SUBREVISION 0 /* The 'zlib' compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. @@ -934,14 +934,14 @@ ZEXTERN int ZEXPORT inflateSync(z_streamp strm); pattern are full flush points. inflateSync returns Z_OK if a possible full flush point has been found, Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. + In the success case, the application may save the current value of total_in + which indicates where valid compressed data was found. In the error case, + the application may repeatedly call inflateSync, providing more input each + time, until success or end of the input data. */ ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, z_streamp source); /* @@ -1756,18 +1756,18 @@ ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. + len2. len2 must be non-negative. */ /* ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); Return the operator corresponding to length len2, to be used with - crc32_combine_op(). + crc32_combine_op(). len2 must be non-negative. */ ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); /* Give the same result as crc32_combine(), using op in place of len2. op is diff --git a/src/Common/zlib/zutil.h b/src/Common/zlib/zutil.h index 902a304c..48dd7feb 100644 --- a/src/Common/zlib/zutil.h +++ b/src/Common/zlib/zutil.h @@ -1,7 +1,7 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is @@ -54,11 +54,11 @@ typedef unsigned long ulg; #endif extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] +#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)] #define ERR_RETURN(strm,err) \ return (strm->msg = ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ @@ -135,21 +135,12 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # if defined(M_I86) && !defined(Z_SOLO) # include <malloc.h> # endif #endif -#if defined(MACOS) || defined(TARGET_OS_MAC) +#if defined(MACOS) # define OS_CODE 7 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include <unix.h> /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif #endif #ifdef __acorn # define OS_CODE 13 #endif @@ -168,22 +159,10 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #ifdef __APPLE__ # define OS_CODE 19 #endif -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#endif - #if defined(__BORLANDC__) && !defined(MSDOS) #pragma warn -8004 #pragma warn -8008 #pragma warn -8066 #endif diff --git a/src/Core/Core.h b/src/Core/Core.h index 65ea5bee..b2573cd4 100644 --- a/src/Core/Core.h +++ b/src/Core/Core.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -80,13 +80,17 @@ namespace VeraCrypt int m_newPim; shared_ptr <KeyfileList> m_newKeyfiles; shared_ptr <Pkcs5Kdf> m_newPkcs5Kdf; int m_wipeCount; bool m_emvSupportEnabled; - ChangePasswordThreadRoutine(shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount, bool emvSupportEnabled) : m_volumePath(volumePath), m_preserveTimestamps(preserveTimestamps), m_password(password), m_pim(pim), m_kdf(kdf), m_keyfiles(keyfiles), m_newPassword(newPassword), m_newPim(newPim), m_newKeyfiles(newKeyfiles), m_newPkcs5Kdf(newPkcs5Kdf), m_wipeCount(wipeCount), m_emvSupportEnabled(emvSupportEnabled) {} + bool m_masterKeyVulnerable; + ChangePasswordThreadRoutine(shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount, bool emvSupportEnabled) : m_volumePath(volumePath), m_preserveTimestamps(preserveTimestamps), m_password(password), m_pim(pim), m_kdf(kdf), m_keyfiles(keyfiles), m_newPassword(newPassword), m_newPim(newPim), m_newKeyfiles(newKeyfiles), m_newPkcs5Kdf(newPkcs5Kdf), m_wipeCount(wipeCount), m_emvSupportEnabled(emvSupportEnabled), m_masterKeyVulnerable(false) {} virtual ~ChangePasswordThreadRoutine() { } - virtual void ExecutionCode(void) { Core->ChangePassword(m_volumePath, m_preserveTimestamps, m_password, m_pim, m_kdf, m_keyfiles, m_newPassword, m_newPim, m_newKeyfiles, m_emvSupportEnabled, m_newPkcs5Kdf, m_wipeCount); } + virtual void ExecutionCode(void) { + shared_ptr <Volume> openVolume = Core->ChangePassword(m_volumePath, m_preserveTimestamps, m_password, m_pim, m_kdf, m_keyfiles, m_newPassword, m_newPim, m_newKeyfiles, m_emvSupportEnabled, m_newPkcs5Kdf, m_wipeCount); + m_masterKeyVulnerable = openVolume->IsMasterKeyVulnerable(); + } }; class OpenVolumeThreadRoutine : public WaitThreadRoutine { public: diff --git a/src/Core/CoreBase.cpp b/src/Core/CoreBase.cpp index c1016726..d2dbd6d7 100644 --- a/src/Core/CoreBase.cpp +++ b/src/Core/CoreBase.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -21,10 +21,13 @@ namespace VeraCrypt CoreBase::CoreBase () : DeviceChangeInProgress (false) #if defined(TC_LINUX ) || defined (TC_FREEBSD) , UseDummySudoPassword (false) #endif +#if defined(TC_UNIX) + ,AllowInsecureMount (false) +#endif { } CoreBase::~CoreBase () { @@ -75,14 +78,15 @@ namespace VeraCrypt backupHeader = true; } } - void CoreBase::ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount) const + shared_ptr <Volume> CoreBase::ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount) const { shared_ptr <Volume> volume = OpenVolume (volumePath, preserveTimestamps, password, pim, kdf, keyfiles, emvSupportEnabled); ChangePassword (volume, newPassword, newPim, newKeyfiles, emvSupportEnabled, newPkcs5Kdf, wipeCount); + return volume; } void CoreBase::CoalesceSlotNumberAndMountPoint (MountOptions &options) const { if (options.SlotNumber < GetFirstSlotNumber()) @@ -142,11 +146,11 @@ namespace VeraCrypt SecureBuffer bootSectorBuffer (sectorSize); outerVolume->ReadSectors (bootSectorBuffer, 0); int fatType; - byte *bootSector = bootSectorBuffer.Ptr(); + uint8 *bootSector = bootSectorBuffer.Ptr(); if (memcmp (bootSector + 54, "FAT12", 5) == 0) fatType = 12; else if (memcmp (bootSector + 54, "FAT16", 5) == 0) fatType = 16; diff --git a/src/Core/CoreBase.h b/src/Core/CoreBase.h index 03aa922a..e4ff0a94 100644 --- a/src/Core/CoreBase.h +++ b/src/Core/CoreBase.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -32,11 +32,11 @@ namespace VeraCrypt { public: virtual ~CoreBase (); virtual void ChangePassword (shared_ptr <Volume> openVolume, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf = shared_ptr <Pkcs5Kdf> (), int wipeCount = PRAND_HEADER_WIPE_PASSES) const; - virtual void ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf = shared_ptr <Pkcs5Kdf> (), int wipeCount = PRAND_HEADER_WIPE_PASSES) const; + virtual shared_ptr <Volume> ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf = shared_ptr <Pkcs5Kdf> (), int wipeCount = PRAND_HEADER_WIPE_PASSES) const; virtual void CheckFilesystem (shared_ptr <VolumeInfo> mountedVolume, bool repair = false) const = 0; virtual void CoalesceSlotNumberAndMountPoint (MountOptions &options) const; virtual void CreateKeyfile (const FilePath &keyfilePath) const; virtual void DismountFilesystem (const DirectoryPath &mountPoint, bool force) const = 0; virtual shared_ptr <VolumeInfo> DismountVolume (shared_ptr <VolumeInfo> mountedVolume, bool ignoreOpenFiles = false, bool syncVolumeInfo = false) = 0; @@ -75,26 +75,37 @@ namespace VeraCrypt virtual void SetAdminPasswordCallback (shared_ptr <GetStringFunctor> functor) { } virtual void SetApplicationExecutablePath (const FilePath &path) { ApplicationExecutablePath = path; } virtual void SetFileOwner (const FilesystemPath &path, const UserId &owner) const = 0; virtual DirectoryPath SlotNumberToMountPoint (VolumeSlotNumber slotNumber) const = 0; virtual void WipePasswordCache () const = 0; -#if defined(TC_LINUX ) || defined (TC_FREEBSD) virtual void ForceUseDummySudoPassword (bool useDummySudoPassword) { UseDummySudoPassword = useDummySudoPassword;} virtual bool GetUseDummySudoPassword () const { return UseDummySudoPassword;} + +#if defined(TC_UNIX) + virtual bool IsProtectedSystemDirectory (const DirectoryPath &directory) const = 0; + virtual bool IsDirectoryOnUserPath(const DirectoryPath &directory) const = 0; + virtual void SetAllowInsecureMount (bool allowInsecureMount) { AllowInsecureMount = allowInsecureMount; } + virtual bool GetAllowInsecureMount () const { return AllowInsecureMount; } #endif + virtual void SetUserEnvPATH (const string &path) { UserEnvPATH = path; } + virtual string GetUserEnvPATH () const { return UserEnvPATH; } + Event VolumeDismountedEvent; Event VolumeMountedEvent; Event WarningEvent; protected: CoreBase (); bool DeviceChangeInProgress; FilePath ApplicationExecutablePath; -#if defined(TC_LINUX ) || defined (TC_FREEBSD) + string UserEnvPATH; bool UseDummySudoPassword; + +#if defined(TC_UNIX) + bool AllowInsecureMount; #endif private: CoreBase (const CoreBase &); CoreBase &operator= (const CoreBase &); diff --git a/src/Core/CoreException.cpp b/src/Core/CoreException.cpp index 9284d714..a8123917 100644 --- a/src/Core/CoreException.cpp +++ b/src/Core/CoreException.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/CoreException.h b/src/Core/CoreException.h index 8eab1b8e..b2e6b0a1 100644 --- a/src/Core/CoreException.h +++ b/src/Core/CoreException.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/FatFormatter.cpp b/src/Core/FatFormatter.cpp index fa327837..0d29c33d 100644 --- a/src/Core/FatFormatter.cpp +++ b/src/Core/FatFormatter.cpp @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Common/Tcdefs.h" @@ -147,11 +147,11 @@ namespace VeraCrypt ft->sectors = (uint16) ft->num_sectors; ft->total_sect = 0; } } - static void PutBoot (fatparams * ft, byte *boot, uint32 volumeId) + static void PutBoot (fatparams * ft, uint8 *boot, uint32 volumeId) { int cnt = 0; boot[cnt++] = 0xeb; /* boot jump */ boot[cnt++] = (ft->size_fat == 32)? 0x58: 0x3c; @@ -242,11 +242,11 @@ namespace VeraCrypt boot[cnt++] = 0xaa; /* boot sig */ } /* FAT32 FSInfo */ - static void PutFSInfo (byte *sector, fatparams *ft) + static void PutFSInfo (uint8 *sector, fatparams *ft) { memset (sector, 0, ft->sector_size); sector[3] = 0x41; /* LeadSig */ sector[2] = 0x61; sector[1] = 0x52; @@ -292,20 +292,20 @@ namespace VeraCrypt /* Write the data area */ sector.Zero(); uint32 volumeId; - RandomNumberGenerator::GetDataFast (BufferPtr ((byte *) &volumeId, sizeof (volumeId))); + RandomNumberGenerator::GetDataFast (BufferPtr ((uint8 *) &volumeId, sizeof (volumeId))); - PutBoot (ft, (byte *) sector, volumeId); + PutBoot (ft, (uint8 *) sector, volumeId); writeSector (sector); ++sectorNumber; /* fat32 boot area */ if (ft->size_fat == 32) { /* fsinfo */ - PutFSInfo((byte *) sector, ft); + PutFSInfo((uint8 *) sector, ft); writeSector (sector); ++sectorNumber; /* reserved */ while (sectorNumber < 6) { @@ -315,14 +315,14 @@ namespace VeraCrypt writeSector (sector); ++sectorNumber; } /* bootsector backup */ sector.Zero(); - PutBoot (ft, (byte *) sector, volumeId); + PutBoot (ft, (uint8 *) sector, volumeId); writeSector (sector); ++sectorNumber; - PutFSInfo((byte *) sector, ft); + PutFSInfo((uint8 *) sector, ft); writeSector (sector); ++sectorNumber; } /* reserved */ while (sectorNumber < (uint32)ft->reserved) @@ -338,33 +338,33 @@ namespace VeraCrypt { sector.Zero(); if (n == 0) { - byte fat_sig[12]; + uint8 fat_sig[12]; if (ft->size_fat == 32) { - fat_sig[0] = (byte) ft->media; + fat_sig[0] = (uint8) ft->media; fat_sig[1] = fat_sig[2] = 0xff; fat_sig[3] = 0x0f; fat_sig[4] = fat_sig[5] = fat_sig[6] = 0xff; fat_sig[7] = 0x0f; fat_sig[8] = fat_sig[9] = fat_sig[10] = 0xff; fat_sig[11] = 0x0f; memcpy (sector, fat_sig, 12); } else if (ft->size_fat == 16) { - fat_sig[0] = (byte) ft->media; + fat_sig[0] = (uint8) ft->media; fat_sig[1] = 0xff; fat_sig[2] = 0xff; fat_sig[3] = 0xff; memcpy (sector, fat_sig, 4); } else if (ft->size_fat == 12) { - fat_sig[0] = (byte) ft->media; + fat_sig[0] = (uint8) ft->media; fat_sig[1] = 0xff; fat_sig[2] = 0xff; fat_sig[3] = 0x00; memcpy (sector, fat_sig, 4); } diff --git a/src/Core/FatFormatter.h b/src/Core/FatFormatter.h index 17f4dd39..1a7de26d 100644 --- a/src/Core/FatFormatter.h +++ b/src/Core/FatFormatter.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/HostDevice.cpp b/src/Core/HostDevice.cpp index f48d84d7..4b9f8f2f 100644 --- a/src/Core/HostDevice.cpp +++ b/src/Core/HostDevice.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/HostDevice.h b/src/Core/HostDevice.h index 48adf32a..93779281 100644 --- a/src/Core/HostDevice.h +++ b/src/Core/HostDevice.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/MountOptions.cpp b/src/Core/MountOptions.cpp index 2f28c089..6228d3cf 100644 --- a/src/Core/MountOptions.cpp +++ b/src/Core/MountOptions.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/MountOptions.h b/src/Core/MountOptions.h index 3dcfa599..449ccbae 100644 --- a/src/Core/MountOptions.h +++ b/src/Core/MountOptions.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/RandomNumberGenerator.cpp b/src/Core/RandomNumberGenerator.cpp index 6b401901..781d951e 100644 --- a/src/Core/RandomNumberGenerator.cpp +++ b/src/Core/RandomNumberGenerator.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -112,11 +112,11 @@ namespace VeraCrypt if (!allowAnyLength && (buffer.Size() > PoolSize)) throw ParameterIncorrect (SRC_POS); ScopeLock lock (AccessMutex); size_t bufferLen = buffer.Size(), loopLen; - byte* pbBuffer = buffer.Get(); + uint8* pbBuffer = buffer.Get(); // Initialize JitterEntropy RNG for this call if (0 == jent_entropy_init ()) { JitterRngCtx = jent_entropy_collector_alloc (1, 0); @@ -255,29 +255,41 @@ namespace VeraCrypt } void RandomNumberGenerator::Test () { shared_ptr <Hash> origPoolHash = PoolHash; - PoolHash.reset (new Blake2s()); + #ifndef WOLFCRYPT_BACKEND + PoolHash.reset (new Blake2s()); + #else + PoolHash.reset (new Sha256()); + #endif Pool.Zero(); Buffer buffer (1); for (size_t i = 0; i < PoolSize * 10; ++i) { - buffer[0] = (byte) i; + buffer[0] = (uint8) i; AddToPool (buffer); } + #ifndef WOLFCRYPT_BACKEND if (Crc32::ProcessBuffer (Pool) != 0x9c743238) - throw TestFailed (SRC_POS); + #else + if (Crc32::ProcessBuffer (Pool) != 0xac95ac1a) + #endif + throw TestFailed (SRC_POS); buffer.Allocate (PoolSize); buffer.CopyFrom (PeekPool()); AddToPool (buffer); - if (Crc32::ProcessBuffer (Pool) != 0xd2d09c8d) - throw TestFailed (SRC_POS); + #ifndef WOLFCRYPT_BACKEND + if (Crc32::ProcessBuffer (Pool) != 0xd2d09c8d) + #else + if (Crc32::ProcessBuffer (Pool) != 0xb79f3c12) + #endif + throw TestFailed (SRC_POS); PoolHash = origPoolHash; } Mutex RandomNumberGenerator::AccessMutex; diff --git a/src/Core/RandomNumberGenerator.h b/src/Core/RandomNumberGenerator.h index 333a8e36..5fd769a7 100644 --- a/src/Core/RandomNumberGenerator.h +++ b/src/Core/RandomNumberGenerator.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/CoreService.cpp b/src/Core/Unix/CoreService.cpp index e543652a..dc2f4e6b 100644 --- a/src/Core/Unix/CoreService.cpp +++ b/src/Core/Unix/CoreService.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -55,11 +55,11 @@ namespace VeraCrypt throw_sys_if (dup2 (f, STDERR_FILENO) == -1); // Wait for sync code while (true) { - byte b; + uint8 b; throw_sys_if (read (STDIN_FILENO, &b, 1) != 1); if (b != 0x00) continue; throw_sys_if (read (STDIN_FILENO, &b, 1) != 1); @@ -97,10 +97,15 @@ namespace VeraCrypt while (true) { shared_ptr <CoreServiceRequest> request = Serializable::DeserializeNew <CoreServiceRequest> (inputStream); + // Update Core properties based on the received request + Core->SetUserEnvPATH (request->UserEnvPATH); + Core->ForceUseDummySudoPassword(request->UseDummySudoPassword); + Core->SetAllowInsecureMount(request->AllowInsecureMount); + try { // ExitRequest if (dynamic_cast <ExitRequest*> (request.get()) != nullptr) { @@ -281,64 +286,66 @@ namespace VeraCrypt unique_ptr <T> CoreService::SendRequest (CoreServiceRequest &request) { static Mutex mutex; ScopeLock lock (mutex); + // Copy Core properties to the request so that they can be transferred to the elevated process + request.ApplicationExecutablePath = Core->GetApplicationExecutablePath(); + request.UserEnvPATH = Core->GetUserEnvPATH(); + request.UseDummySudoPassword = Core->GetUseDummySudoPassword(); + request.AllowInsecureMount = Core->GetAllowInsecureMount(); + if (request.RequiresElevation()) { request.ElevateUserPrivileges = true; request.FastElevation = !ElevatedServiceAvailable; - request.ApplicationExecutablePath = Core->GetApplicationExecutablePath(); - + while (!ElevatedServiceAvailable) { // Test if the user has an active "sudo" session. - // This is only done under Linux / FreeBSD by executing the command 'sudo -n uptime'. - // In case a "sudo" session is active, the result of the command contains the string 'load average'. - // Otherwise, the result contains "sudo: a password is required". - // This may not work on all OSX versions because of a bug in sudo in its version 1.7.10, - // therefore we keep the old behaviour of sending a 'dummy' password under OSX. - // See : https://superuser.com/questions/902826/why-does-sudo-n-on-mac-os-x-always-return-0 - // - // If for some reason we are getting empty output from pipe, we revert to old behavior - // We also use the old way if the user is forcing the use of dummy password for sudo - -#if defined(TC_LINUX ) || defined (TC_FREEBSD) bool authCheckDone = false; if (!Core->GetUseDummySudoPassword ()) - { - std::vector<char> buffer(128, 0); - std::string result; - - FILE* pipe = popen("sudo -n uptime 2>&1 | grep 'load average' | wc -l", "r"); // We redirect stderr to stdout (2>&1) to be able to catch the result of the command + { + // We are using -n to avoid prompting the user for a password. + // We are redirecting stderr to stdout and discarding both to avoid any output. + // This approach also works on newer macOS versions (12.0 and later). + std::string errorMsg; + + string sudoAbsolutePath = Process::FindSystemBinary("sudo", errorMsg); + if (sudoAbsolutePath.empty()) + throw SystemException(SRC_POS, errorMsg); + + std::string popenCommand = sudoAbsolutePath + " -n true > /dev/null 2>&1"; // We redirect stderr to stdout (2>&1) to be able to catch the result of the command + FILE* pipe = popen(popenCommand.c_str(), "r"); if (pipe) { - while (!feof(pipe)) - { - if (fgets(buffer.data(), 128, pipe) != nullptr) - result += buffer.data(); - } - - fflush(pipe); - pclose(pipe); + // We only care about the exit code + char buf[128]; + while (!feof(pipe)) + { + if (fgets(buf, sizeof(buf), pipe) == NULL) + break; + } + int status = pclose(pipe); pipe = NULL; - if (!result.empty() && strlen(result.c_str()) != 0) - { - authCheckDone = true; - if (result[0] == '0') // no line found with "load average" text, rerquest admin password - (*AdminPasswordCallback) (request.AdminPassword); + authCheckDone = true; + + // If exit code != 0, user does NOT have an active session => request password + if (status != 0) + { + (*AdminPasswordCallback)(request.AdminPassword); } } if (authCheckDone) { // Set to false to force the 'WarningEvent' to be raised in case of and elevation exception. request.FastElevation = false; } } -#endif + try { request.Serialize (ServiceInputStream); unique_ptr <T> response (GetResponse <T>()); ElevatedServiceAvailable = true; @@ -351,13 +358,12 @@ namespace VeraCrypt ExceptionEventArgs args (e); Core->WarningEvent.Raise (args); } request.FastElevation = false; -#if defined(TC_LINUX ) || defined (TC_FREEBSD) + if(!authCheckDone) -#endif (*AdminPasswordCallback) (request.AdminPassword); } } } @@ -403,19 +409,30 @@ namespace VeraCrypt { try { try { + // Throw exception if sudo is not found in secure locations + std::string errorMsg; + string sudoPath = Process::FindSystemBinary("sudo", errorMsg); + if (sudoPath.empty()) + throw SystemException(SRC_POS, errorMsg); + + string appPath = request.ApplicationExecutablePath; + // if appPath is empty or not absolute, use FindSystemBinary to get the full path of veracrpyt executable + if (appPath.empty() || appPath[0] != '/') + { + appPath = Process::FindSystemBinary("veracrypt", errorMsg); + if (appPath.empty()) + throw SystemException(SRC_POS, errorMsg); + } + throw_sys_if (dup2 (inPipe->GetReadFD(), STDIN_FILENO) == -1); throw_sys_if (dup2 (outPipe->GetWriteFD(), STDOUT_FILENO) == -1); throw_sys_if (dup2 (errPipe.GetWriteFD(), STDERR_FILENO) == -1); - string appPath = request.ApplicationExecutablePath; - if (appPath.empty()) - appPath = "veracrypt"; - - const char *args[] = { "sudo", "-S", "-p", "", appPath.c_str(), TC_CORE_SERVICE_CMDLINE_OPTION, nullptr }; + const char *args[] = { sudoPath.c_str(), "-S", "-p", "", appPath.c_str(), TC_CORE_SERVICE_CMDLINE_OPTION, nullptr }; execvp (args[0], ((char* const*) args)); throw SystemException (SRC_POS, args[0]); } catch (Exception &) { @@ -541,11 +558,11 @@ namespace VeraCrypt unique_ptr <Serializable> deserializedObject; Exception *deserializedException = nullptr; try { - shared_ptr <Stream> stream (new MemoryStream (ConstBufferPtr ((byte *) &errOutput[0], errOutput.size()))); + shared_ptr <Stream> stream (new MemoryStream (ConstBufferPtr ((uint8 *) &errOutput[0], errOutput.size()))); deserializedObject.reset (Serializable::DeserializeNew (stream)); deserializedException = dynamic_cast <Exception*> (deserializedObject.get()); } catch (...) { } @@ -573,11 +590,11 @@ namespace VeraCrypt ServiceInputStream = shared_ptr <Stream> (new FileStream (inPipe->GetWriteFD())); ServiceOutputStream = shared_ptr <Stream> (new FileStream (outPipe->GetReadFD())); // Send sync code - byte sync[] = { 0, 0x11, 0x22 }; + uint8 sync[] = { 0, 0x11, 0x22 }; ServiceInputStream->Write (ConstBufferPtr (sync, array_capacity (sync))); AdminInputPipe = move_ptr(inPipe); AdminOutputPipe = move_ptr(outPipe); } diff --git a/src/Core/Unix/CoreService.h b/src/Core/Unix/CoreService.h index dfb8b350..5c43f0ed 100644 --- a/src/Core/Unix/CoreService.h +++ b/src/Core/Unix/CoreService.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/CoreServiceProxy.h b/src/Core/Unix/CoreServiceProxy.h index d57d8163..896df3e6 100644 --- a/src/Core/Unix/CoreServiceProxy.h +++ b/src/Core/Unix/CoreServiceProxy.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/CoreServiceRequest.cpp b/src/Core/Unix/CoreServiceRequest.cpp index 98101ba4..14e2ec28 100644 --- a/src/Core/Unix/CoreServiceRequest.cpp +++ b/src/Core/Unix/CoreServiceRequest.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -21,20 +21,26 @@ namespace VeraCrypt Serializer sr (stream); sr.Deserialize ("AdminPassword", AdminPassword); ApplicationExecutablePath = sr.DeserializeWString ("ApplicationExecutablePath"); sr.Deserialize ("ElevateUserPrivileges", ElevateUserPrivileges); sr.Deserialize ("FastElevation", FastElevation); + sr.Deserialize ("UserEnvPATH", UserEnvPATH); + sr.Deserialize ("UseDummySudoPassword", UseDummySudoPassword); + sr.Deserialize ("AllowInsecureMount", AllowInsecureMount); } void CoreServiceRequest::Serialize (shared_ptr <Stream> stream) const { Serializable::Serialize (stream); Serializer sr (stream); sr.Serialize ("AdminPassword", AdminPassword); sr.Serialize ("ApplicationExecutablePath", wstring (ApplicationExecutablePath)); sr.Serialize ("ElevateUserPrivileges", ElevateUserPrivileges); sr.Serialize ("FastElevation", FastElevation); + sr.Serialize ("UserEnvPATH", UserEnvPATH); + sr.Serialize ("UseDummySudoPassword", UseDummySudoPassword); + sr.Serialize ("AllowInsecureMount", AllowInsecureMount); } // CheckFilesystemRequest void CheckFilesystemRequest::Deserialize (shared_ptr <Stream> stream) { diff --git a/src/Core/Unix/CoreServiceRequest.h b/src/Core/Unix/CoreServiceRequest.h index 5b12cc11..77778ca2 100644 --- a/src/Core/Unix/CoreServiceRequest.h +++ b/src/Core/Unix/CoreServiceRequest.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -18,19 +18,22 @@ namespace VeraCrypt { struct CoreServiceRequest : public Serializable { - CoreServiceRequest () : ElevateUserPrivileges (false), FastElevation (false) { } + CoreServiceRequest () : ElevateUserPrivileges (false), FastElevation (false), UseDummySudoPassword (false), AllowInsecureMount (false) { } TC_SERIALIZABLE (CoreServiceRequest); virtual bool RequiresElevation () const { return false; } string AdminPassword; FilePath ApplicationExecutablePath; bool ElevateUserPrivileges; bool FastElevation; + string UserEnvPATH; + bool UseDummySudoPassword; + bool AllowInsecureMount; }; struct CheckFilesystemRequest : CoreServiceRequest { CheckFilesystemRequest () { } diff --git a/src/Core/Unix/CoreServiceResponse.cpp b/src/Core/Unix/CoreServiceResponse.cpp index b53b8a30..1eb0af3f 100644 --- a/src/Core/Unix/CoreServiceResponse.cpp +++ b/src/Core/Unix/CoreServiceResponse.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/CoreServiceResponse.h b/src/Core/Unix/CoreServiceResponse.h index 1f4c675e..91a2483b 100644 --- a/src/Core/Unix/CoreServiceResponse.h +++ b/src/Core/Unix/CoreServiceResponse.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp index 258979b9..1f2d3125 100644 --- a/src/Core/Unix/CoreUnix.cpp +++ b/src/Core/Unix/CoreUnix.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -27,10 +27,45 @@ namespace VeraCrypt #ifdef TC_LINUX static string GetTmpUser (); static bool SamePath (const string& path1, const string& path2); #endif + // Struct to hold terminal emulator information + struct TerminalInfo { + const char* name; + const char** args; + const char** dependency_path; + }; + + // Popular terminal emulators data and arguments + static const char* xterm_args[] = {"-T", "fsck", "-e", NULL}; + + static const char* gnome_args[] = {"--title", "fsck", "--", "sh", "-c", NULL}; + static const char* gnome_deps[] = {"dbus-launch", NULL}; + + static const char* konsole_args[] = {"--hold", "-p", "tabtitle=fsck", "-e", "sh", "-c", NULL}; + static const char* xfce4_args[] = {"--title=fsck", "-x", "sh", "-c", NULL}; + static const char* mate_args[] = {"--title", "fsck", "--", "sh", "-c", NULL}; + static const char* lxterminal_args[] = {"--title=fsck", "-e", "sh", "-c", NULL}; + static const char* terminator_args[] = {"-T", "fsck", "-x", "sh", "-c", NULL}; + static const char* urxvt_args[] = {"-title", "fsck", "-e", "sh", "-c", NULL}; + static const char* st_args[] = {"-t", "fsck", "-e", "sh", "-c", NULL}; + + // List of popular terminal emulators + static const TerminalInfo TERMINALS[] = { + {"xterm", xterm_args, NULL}, + {"gnome-terminal", gnome_args, gnome_deps}, + {"konsole", konsole_args, NULL}, + {"xfce4-terminal", xfce4_args, NULL}, + {"mate-terminal", mate_args, NULL}, + {"lxterminal", lxterminal_args, NULL}, + {"terminator", terminator_args, NULL}, + {"urxvt", urxvt_args, NULL}, + {"st", st_args, NULL}, + {NULL, NULL, NULL} + }; + CoreUnix::CoreUnix () { signal (SIGPIPE, SIG_IGN); char *loc = setlocale (LC_ALL, ""); @@ -45,70 +80,71 @@ namespace VeraCrypt void CoreUnix::CheckFilesystem (shared_ptr <VolumeInfo> mountedVolume, bool repair) const { if (!mountedVolume->MountPoint.IsEmpty()) DismountFilesystem (mountedVolume->MountPoint, false); - list <string> args; - - args.push_back ("-T"); - args.push_back ("fsck"); + // Find system fsck first + std::string errorMsg; + std::string fsckPath = Process::FindSystemBinary("fsck", errorMsg); + if (fsckPath.empty()) { + throw SystemException(SRC_POS, errorMsg); + } - args.push_back ("-e"); + list <string> args; - string xargs = "fsck "; + string xargs = fsckPath + " "; // Use absolute fsck path #ifdef TC_LINUX if (!repair) xargs += "-n "; else xargs += "-r "; #endif xargs += string (mountedVolume->VirtualDevice) + "; echo '[Done]'; read W"; - args.push_back (xargs); + // Try each terminal + for (const TerminalInfo* term = TERMINALS; term->name != NULL; ++term) { + errno = 0; + std::string termPath = Process::FindSystemBinary(term->name, errorMsg); + if (termPath.length() > 0) { + // check dependencies + if (term->dependency_path) { + bool depFound = true; + for (const char** dep = term->dependency_path; *dep != NULL; ++dep) { + string depPath = Process::FindSystemBinary(*dep, errorMsg); + if (depPath.empty()) { + depFound = false; + break; + } + } - try - { - Process::Execute ("xterm", args, 1000); - } catch (TimeOut&) { } -#ifdef TC_LINUX - catch (SystemException&) - { - // xterm not available. Try with KDE konsole if it exists - struct stat sb; - if (stat("/usr/bin/konsole", &sb) == 0) - { - args.clear (); - args.push_back ("-p"); - args.push_back ("tabtitle=fsck"); - args.push_back ("-e"); - args.push_back ("sh"); - args.push_back ("-c"); - args.push_back (xargs); - try - { - Process::Execute ("konsole", args, 1000); - } catch (TimeOut&) { } - } - else if (stat("/usr/bin/gnome-terminal", &sb) == 0 && stat("/usr/bin/dbus-launch", &sb) == 0) - { - args.clear (); - args.push_back ("--title"); - args.push_back ("fsck"); - args.push_back ("--"); - args.push_back ("sh"); - args.push_back ("-c"); - args.push_back (xargs); - try - { - Process::Execute ("gnome-terminal", args, 1000); - } catch (TimeOut&) { } + if (!depFound) { + continue; // dependency not found, skip + } + } + + // Build args + std::list<std::string> args; + for (const char** arg = term->args; *arg != NULL; ++arg) { + args.push_back(*arg); + } + args.push_back(xargs); + + try { + Process::Execute (termPath, args, 1000); + return; + } + catch (TimeOut&) { + return; + } + catch (SystemException&) { + // Continue to next terminal + } } - else - throw TerminalNotFound(); } -#endif + + throw TerminalNotFound(); } void CoreUnix::DismountFilesystem (const DirectoryPath &mountPoint, bool force) const { list <string> args; @@ -239,11 +275,11 @@ namespace VeraCrypt Buffer bootSector (device.GetDeviceSectorSize()); device.SeekAt (0); device.ReadCompleteBuffer (bootSector); - byte *b = bootSector.Ptr(); + uint8 *b = bootSector.Ptr(); return memcmp (b + 3, "NTFS", 4) != 0 && memcmp (b + 54, "FAT", 3) != 0 && memcmp (b + 82, "FAT32", 5) != 0 && memcmp (b + 3, "EXFAT", 5) != 0; @@ -301,21 +337,49 @@ namespace VeraCrypt { if (string (mf.MountPoint).find (GetFuseMountDirPrefix()) == string::npos) continue; shared_ptr <VolumeInfo> mountedVol; - try + // Introduce a retry mechanism with a timeout for control file access + // This workaround is limited to FUSE-T mounted volume under macOS for + // which md.Device starts with "fuse-t:" +#ifdef VC_MACOSX_FUSET + bool isFuseT = wstring(mf.Device).find(L"fuse-t:") == 0; + int controlFileRetries = 10; // 10 retries with 500ms sleep each, total 5 seconds + while (!mountedVol && (controlFileRetries-- > 0)) +#endif { - shared_ptr <File> controlFile (new File); - controlFile->Open (string (mf.MountPoint) + FuseService::GetControlPath()); + try + { + shared_ptr <File> controlFile (new File); + controlFile->Open (string (mf.MountPoint) + FuseService::GetControlPath()); - shared_ptr <Stream> controlFileStream (new FileStream (controlFile)); - mountedVol = Serializable::DeserializeNew <VolumeInfo> (controlFileStream); + shared_ptr <Stream> controlFileStream (new FileStream (controlFile)); + mountedVol = Serializable::DeserializeNew <VolumeInfo> (controlFileStream); + } + catch (const std::exception& e) + { +#ifdef VC_MACOSX_FUSET + // if exception starts with "VeraCrypt::Serializer::ValidateName", then + // serialization is not ready yet and we need to wait before retrying + // this happens when FUSE-T is used under macOS and if it is the first time + // the volume is mounted + if (isFuseT && string (e.what()).find ("VeraCrypt::Serializer::ValidateName") != string::npos) + { + Thread::Sleep(500); // Wait before retrying + } + else + { + break; // Control file not found or other error + } +#endif + } } - catch (...) + + if (!mountedVol) { - continue; + continue; // Skip to the next mounted filesystem } if (!volumePath.IsEmpty() && wstring (mountedVol->Path).compare (volumePath) != 0) continue; @@ -530,10 +594,21 @@ namespace VeraCrypt CoalesceSlotNumberAndMountPoint (options); if (IsVolumeMounted (*options.Path)) throw VolumeAlreadyMounted (SRC_POS); + if (options.MountPoint && !options.MountPoint->IsEmpty()) + { + // Reject if the mount point is a system directory + if (IsProtectedSystemDirectory(*options.MountPoint)) + throw MountPointBlocked (SRC_POS); + + // Reject if the mount point is in the user's PATH and the user has not explicitly allowed insecure mount points + if (!GetAllowInsecureMount() && IsDirectoryOnUserPath(*options.MountPoint)) + throw MountPointNotAllowed (SRC_POS); + } + Cipher::EnableHwSupport (!options.NoHardwareCrypto); shared_ptr <Volume> volume; while (true) @@ -762,6 +837,102 @@ namespace VeraCrypt stringstream s; s << GetDefaultMountPointPrefix() << slotNumber; return s.str(); } + + bool CoreUnix::IsProtectedSystemDirectory (const DirectoryPath &directory) const + { + static const char* systemDirs[] = { + "/usr", + "/bin", + "/sbin", + "/lib", +#ifdef TC_LINUX + "/lib32", + "/lib64", + "/libx32", +#endif + "/etc", + "/boot", + "/root", + "/proc", + "/sys", + "/dev", + NULL + }; + + // Resolve any symlinks in the path + string path(directory); + char* resolvedPathCStr = realpath(path.c_str(), NULL); + if (resolvedPathCStr) + { + path = resolvedPathCStr; + free(resolvedPathCStr); // Free the allocated memory + } + + // reject of the path is the root directory "/" + if (path == "/") + return true; + + // Check if resolved path matches any system directory + for (int i = 0; systemDirs[i] != NULL; ++i) + { + if (path == systemDirs[i] || path.find(string(systemDirs[i]) + "/") == 0) + return true; + } + + return false; + } + + bool CoreUnix::IsDirectoryOnUserPath(const DirectoryPath &directory) const + { + // Obtain the PATH environment variable + const char* pathEnv = UserEnvPATH.c_str(); + if (!pathEnv[0]) + return false; + + // Resolve the given directory + string dirPath(directory); + char* resolvedDir = realpath(dirPath.c_str(), NULL); + if (resolvedDir) + { + dirPath = resolvedDir; + free(resolvedDir); + } + + // Split PATH and compare each entry + stringstream ss(pathEnv); + string token; + while (getline(ss, token, ':')) + { + // remove any trailing slashes from the token + while (!token.empty() && token.back() == '/') + token.pop_back(); + + if (token.empty()) + continue; + + // check if the directory is the same as the entry or a subdirectory + if (dirPath == token || dirPath.find(token + "/") == 0) + return true; + + // handle the case where the PATH entry is a symlink + char* resolvedEntry = realpath(token.c_str(), NULL); + if (!resolvedEntry) + continue; // skip to the next entry since the path does not exist + + string entryPath(resolvedEntry); + free(resolvedEntry); + + // remove any trailing slashes from the token + while (!entryPath.empty() && entryPath.back() == '/') + entryPath.pop_back(); + + // perform check again if the resolved path is different from the original (symlink) + if (dirPath == entryPath || dirPath.find(entryPath + "/") == 0) + return true; + } + + return false; + } } diff --git a/src/Core/Unix/CoreUnix.h b/src/Core/Unix/CoreUnix.h index 586d4df3..ae26bf0a 100644 --- a/src/Core/Unix/CoreUnix.h +++ b/src/Core/Unix/CoreUnix.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -46,10 +46,12 @@ namespace VeraCrypt virtual VolumeSlotNumber MountPointToSlotNumber (const DirectoryPath &mountPoint) const; virtual shared_ptr <VolumeInfo> MountVolume (MountOptions &options); virtual void SetFileOwner (const FilesystemPath &path, const UserId &owner) const; virtual DirectoryPath SlotNumberToMountPoint (VolumeSlotNumber slotNumber) const; virtual void WipePasswordCache () const { throw NotApplicable (SRC_POS); } + virtual bool IsProtectedSystemDirectory (const DirectoryPath &directory) const; + virtual bool IsDirectoryOnUserPath(const DirectoryPath &directory) const; protected: virtual DevicePath AttachFileToLoopDevice (const FilePath &filePath, bool readOnly) const { throw NotApplicable (SRC_POS); } virtual void DetachLoopDevice (const DevicePath &devicePath) const { throw NotApplicable (SRC_POS); } virtual void DismountNativeVolume (shared_ptr <VolumeInfo> mountedVolume) const { throw NotApplicable (SRC_POS); } diff --git a/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp b/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp index 01463c35..8f5b8048 100644 --- a/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp +++ b/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -44,11 +44,11 @@ namespace VeraCrypt } args.push_back ("-f"); args.push_back (filePath); - string dev = StringConverter::Trim (Process::Execute ("mdconfig", args)); + string dev = StringConverter::Trim (Process::Execute ("/sbin/mdconfig", args)); if (dev.find ("/") == string::npos) dev = string ("/dev/") + dev; return dev; @@ -63,11 +63,11 @@ namespace VeraCrypt for (int t = 0; true; t++) { try { - Process::Execute ("mdconfig", args); + Process::Execute ("/sbin/mdconfig", args); break; } catch (ExecutedProcessFailed&) { if (t > 5) @@ -81,11 +81,11 @@ namespace VeraCrypt { HostDeviceList devices; #ifdef TC_MACOSX const string busType = "rdisk"; #else - foreach (const string &busType, StringConverter::Split ("ad da")) + foreach (const string &busType, StringConverter::Split ("ad da vtbd")) #endif { for (int devNumber = 0; devNumber < 64; devNumber++) { stringstream devPath; @@ -183,14 +183,55 @@ namespace VeraCrypt return mountedFilesystems; } void CoreFreeBSD::MountFilesystem (const DevicePath &devicePath, const DirectoryPath &mountPoint, const string &filesystemType, bool readOnly, const string &systemMountOptions) const { + std::string chosenFilesystem = "msdos"; + std::string modifiedMountOptions = systemMountOptions; + + if (filesystemType.empty() && modifiedMountOptions.find("mountprog") == string::npos) { + // No filesystem type specified through CLI, attempt to identify with blkid + // as mount is unable to probe filesystem type on BSD + // Make sure we don't override user defined mountprog + std::vector<char> buffer(128,0); + std::string cmd = "blkid -o value -s TYPE " + static_cast<std::string>(devicePath) + " 2>/dev/null"; + std::string result; + + FILE* pipe = popen(cmd.c_str(), "r"); + if (pipe) { + while (!feof(pipe)) { + if (fgets(buffer.data(), 128, pipe) != nullptr) + result += buffer.data(); + } + fflush(pipe); + pclose(pipe); + pipe = nullptr; + } + + if (result.find("ext") == 0 || StringConverter::ToLower(filesystemType).find("ext") == 0) { + chosenFilesystem = "ext2fs"; + } + else if (result.find("exfat") == 0 || StringConverter::ToLower(filesystemType) == "exfat") { + chosenFilesystem = "exfat"; + modifiedMountOptions += string(!systemMountOptions.empty() ? "," : "") + + "mountprog=/usr/local/sbin/mount.exfat"; + } + else if (result.find("ntfs") == 0 || StringConverter::ToLower(filesystemType) == "ntfs") { + chosenFilesystem = "ntfs"; + modifiedMountOptions += string(!systemMountOptions.empty() ? "," : "") + + "mountprog=/usr/local/bin/ntfs-3g"; + } + else if (!filesystemType.empty()) { + // Filesystem is specified but is none of the above, then supply as is + chosenFilesystem = filesystemType; + } + } else + chosenFilesystem = filesystemType; + try { - // Try to mount FAT by default as mount is unable to probe filesystem type on BSD - CoreUnix::MountFilesystem (devicePath, mountPoint, filesystemType.empty() ? "msdos" : filesystemType, readOnly, systemMountOptions); + CoreUnix::MountFilesystem (devicePath, mountPoint, chosenFilesystem, readOnly, modifiedMountOptions); } catch (ExecutedProcessFailed&) { if (!filesystemType.empty()) throw; diff --git a/src/Core/Unix/FreeBSD/CoreFreeBSD.h b/src/Core/Unix/FreeBSD/CoreFreeBSD.h index 453f6440..5510aa2c 100644 --- a/src/Core/Unix/FreeBSD/CoreFreeBSD.h +++ b/src/Core/Unix/FreeBSD/CoreFreeBSD.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/FreeBSD/System.h b/src/Core/Unix/FreeBSD/System.h index b5e28f31..63f68aae 100644 --- a/src/Core/Unix/FreeBSD/System.h +++ b/src/Core/Unix/FreeBSD/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index e1da6dff..77ec874a 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -20,10 +20,13 @@ #include <sys/wait.h> #include "CoreLinux.h" #include "Platform/SystemInfo.h" #include "Platform/TextReader.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "Driver/Fuse/FuseService.h" #include "Core/Unix/CoreServiceProxy.h" namespace VeraCrypt { @@ -300,12 +303,17 @@ namespace VeraCrypt CoreUnix::MountFilesystem (devicePath, mountPoint, filesystemType, readOnly, systemMountOptions); } void CoreLinux::MountVolumeNative (shared_ptr <Volume> volume, MountOptions &options, const DirectoryPath &auxMountPoint) const { - bool xts = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeXTS)); - bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik)) + bool xts = (typeid (*volume->GetEncryptionMode()) == + #ifdef WOLFCRYPT_BACKEND + typeid (EncryptionModeWolfCryptXTS)); + #else + typeid (EncryptionModeXTS)); + #endif + bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (CamelliaKuznyechik)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikTwofish)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikAES)) || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikSerpentCamellia)); @@ -376,11 +384,11 @@ namespace VeraCrypt dmCreateArgs << string (volumePath) << ' ' << startSector; else dmCreateArgs << nativeDevPath << " 0"; SecureBuffer dmCreateArgsBuf (dmCreateArgs.str().size()); - dmCreateArgsBuf.CopyFrom (ConstBufferPtr ((byte *) dmCreateArgs.str().c_str(), dmCreateArgs.str().size())); + dmCreateArgsBuf.CopyFrom (ConstBufferPtr ((uint8 *) dmCreateArgs.str().c_str(), dmCreateArgs.str().size())); // Keys const SecureBuffer &cipherKey = cipher.GetKey(); secondaryKeyOffset -= cipherKey.Size(); ConstBufferPtr secondaryKey = volume->GetEncryptionMode()->GetKey().GetRange (xts ? secondaryKeyOffset : 0, xts ? cipherKey.Size() : 16); diff --git a/src/Core/Unix/Linux/CoreLinux.h b/src/Core/Unix/Linux/CoreLinux.h index 9af801ec..b851fc27 100644 --- a/src/Core/Unix/Linux/CoreLinux.h +++ b/src/Core/Unix/Linux/CoreLinux.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/Linux/System.h b/src/Core/Unix/Linux/System.h index 0ec1daf0..c98bfd0a 100644 --- a/src/Core/Unix/Linux/System.h +++ b/src/Core/Unix/Linux/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.cpp b/src/Core/Unix/MacOSX/CoreMacOSX.cpp index b596e6e8..df8a40e2 100644 --- a/src/Core/Unix/MacOSX/CoreMacOSX.cpp +++ b/src/Core/Unix/MacOSX/CoreMacOSX.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -45,11 +45,11 @@ namespace VeraCrypt if (ignoreOpenFiles) args.push_back ("-force"); try { - Process::Execute ("hdiutil", args); + Process::Execute ("/usr/bin/hdiutil", args); } catch (ExecutedProcessFailed &e) { if (!ignoreOpenFiles) { @@ -82,11 +82,11 @@ namespace VeraCrypt for (int t = 0; true; t++) { try { - Process::Execute ("umount", args); + Process::Execute ("/sbin/umount", args); break; } catch (ExecutedProcessFailed&) { if (t > 10) @@ -105,16 +105,23 @@ namespace VeraCrypt } void CoreMacOSX::CheckFilesystem (shared_ptr <VolumeInfo> mountedVolume, bool repair) const { list <string> args; - args.push_back ("/Applications/Utilities/Disk Utility.app"); - Process::Execute ("open", args); + struct stat sb; + + if (stat("/Applications/Utilities/Disk Utility.app", &sb) == 0) + args.push_back ("/Applications/Utilities/Disk Utility.app"); + else + args.push_back ("/System/Applications/Utilities/Disk Utility.app"); + + Process::Execute ("/usr/bin/open", args); } void CoreMacOSX::MountAuxVolumeImage (const DirectoryPath &auxMountPoint, const MountOptions &options) const { +#ifndef VC_MACOSX_FUSET // Check FUSE version char fuseVersionString[MAXHOSTNAMELEN + 1] = { 0 }; size_t fuseVersionStringLength = MAXHOSTNAMELEN; int status; @@ -145,11 +152,11 @@ namespace VeraCrypt uint32 fuseVersionMajor = StringConverter::ToUInt32 (fuseVersion[0]); uint32 fuseVersionMinor = StringConverter::ToUInt32 (fuseVersion[1]); if (fuseVersionMajor < 2 || (fuseVersionMajor == 2 && fuseVersionMinor < 5)) throw HigherFuseVersionRequired (SRC_POS); - +#endif // Mount volume image string volImage = string (auxMountPoint) + FuseService::GetVolumeImagePath(); list <string> args; args.push_back ("attach"); @@ -181,11 +188,11 @@ namespace VeraCrypt while (true) { try { - xml = Process::Execute ("hdiutil", args); + xml = Process::Execute ("/usr/bin/hdiutil", args); break; } catch (ExecutedProcessFailed &e) { if (e.GetErrorOutput().find ("noautofsck") != string::npos) @@ -224,11 +231,11 @@ namespace VeraCrypt list <string> args; args.push_back ("detach"); args.push_back (volImage); args.push_back ("-force"); - Process::Execute ("hdiutil", args); + Process::Execute ("/usr/bin/hdiutil", args); } catch (ExecutedProcessFailed&) { } throw; } } diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.h b/src/Core/Unix/MacOSX/CoreMacOSX.h index d2c70a87..da905708 100644 --- a/src/Core/Unix/MacOSX/CoreMacOSX.h +++ b/src/Core/Unix/MacOSX/CoreMacOSX.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/MacOSX/System.h b/src/Core/Unix/MacOSX/System.h index d187877f..af286829 100644 --- a/src/Core/Unix/MacOSX/System.h +++ b/src/Core/Unix/MacOSX/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/MountedFilesystem.h b/src/Core/Unix/MountedFilesystem.h index 3f6bd3e2..de9bc138 100644 --- a/src/Core/Unix/MountedFilesystem.h +++ b/src/Core/Unix/MountedFilesystem.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp b/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp index 3064103b..161d4a79 100644 --- a/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp +++ b/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp @@ -5,11 +5,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -73,11 +73,11 @@ namespace VeraCrypt freePath << "vnd" << freeVnd; args.push_back (freePath.str()); args.push_back (filePath); - Process::Execute ("vnconfig", args); + Process::Execute ("/sbin/vnconfig", args); return "/dev/" + freePath.str() + "c"; } void CoreOpenBSD::DetachLoopDevice (const DevicePath &devicePath) const @@ -88,11 +88,11 @@ namespace VeraCrypt for (int t = 0; true; t++) { try { - Process::Execute ("vnconfig", args); + Process::Execute ("/sbin/vnconfig", args); break; } catch (ExecutedProcessFailed&) { if (t > 5) diff --git a/src/Core/Unix/OpenBSD/CoreOpenBSD.h b/src/Core/Unix/OpenBSD/CoreOpenBSD.h index 3f6c48b5..32129534 100644 --- a/src/Core/Unix/OpenBSD/CoreOpenBSD.h +++ b/src/Core/Unix/OpenBSD/CoreOpenBSD.h @@ -5,11 +5,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/OpenBSD/System.h b/src/Core/Unix/OpenBSD/System.h index 90b24b2a..9c155a40 100644 --- a/src/Core/Unix/OpenBSD/System.h +++ b/src/Core/Unix/OpenBSD/System.h @@ -5,11 +5,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/Solaris/CoreSolaris.cpp b/src/Core/Unix/Solaris/CoreSolaris.cpp index 15a79c49..c436be8f 100644 --- a/src/Core/Unix/Solaris/CoreSolaris.cpp +++ b/src/Core/Unix/Solaris/CoreSolaris.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -33,11 +33,11 @@ namespace VeraCrypt { list <string> args; args.push_back ("-a"); args.push_back (filePath); - return StringConverter::Trim (Process::Execute ("lofiadm", args)); + return StringConverter::Trim (Process::Execute ("/usr/sbin/lofiadm", args)); } void CoreSolaris::DetachLoopDevice (const DevicePath &devicePath) const { list <string> args; @@ -46,11 +46,11 @@ namespace VeraCrypt for (int t = 0; true; t++) { try { - Process::Execute ("lofiadm", args); + Process::Execute ("/usr/sbin/lofiadm", args); break; } catch (ExecutedProcessFailed&) { if (t > 5) diff --git a/src/Core/Unix/Solaris/CoreSolaris.h b/src/Core/Unix/Solaris/CoreSolaris.h index d36f03f9..6a55583a 100644 --- a/src/Core/Unix/Solaris/CoreSolaris.h +++ b/src/Core/Unix/Solaris/CoreSolaris.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/Solaris/System.h b/src/Core/Unix/Solaris/System.h index 73513467..7ee71da4 100644 --- a/src/Core/Unix/Solaris/System.h +++ b/src/Core/Unix/Solaris/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/Unix/System.h b/src/Core/Unix/System.h index 7225dae2..b6a6f092 100644 --- a/src/Core/Unix/System.h +++ b/src/Core/Unix/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Core/VolumeCreator.cpp b/src/Core/VolumeCreator.cpp index 5f19a66d..a60b12ba 100644 --- a/src/Core/VolumeCreator.cpp +++ b/src/Core/VolumeCreator.cpp @@ -2,18 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Volume/EncryptionTest.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "Core.h" #ifdef TC_UNIX #include <sys/types.h> #include <sys/stat.h> @@ -358,12 +361,17 @@ namespace VeraCrypt VolumeFile->Write (headerBuffer); } // Data area keys options->EA->SetKey (MasterKey.GetRange (0, options->EA->GetKeySize())); - shared_ptr <EncryptionMode> mode (new EncryptionModeXTS ()); - mode->SetKey (MasterKey.GetRange (options->EA->GetKeySize(), options->EA->GetKeySize())); + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> mode (new EncryptionModeWolfCryptXTS ()); + options->EA->SetKeyXTS (MasterKey.GetRange (options->EA->GetKeySize(), options->EA->GetKeySize())); + #else + shared_ptr <EncryptionMode> mode (new EncryptionModeXTS ()); + #endif + mode->SetKey (MasterKey.GetRange (options->EA->GetKeySize(), options->EA->GetKeySize())); options->EA->SetMode (mode); Options = options; AbortRequested = false; diff --git a/src/Core/VolumeCreator.h b/src/Core/VolumeCreator.h index 781354b9..a25a9667 100644 --- a/src/Core/VolumeCreator.h +++ b/src/Core/VolumeCreator.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Crypto/Aes.h b/src/Crypto/Aes.h index e12c6fc8..dcadfc2b 100644 --- a/src/Crypto/Aes.h +++ b/src/Crypto/Aes.h @@ -33,10 +33,15 @@ #ifndef _AES_H #define _AES_H #include "Common/Tcdefs.h" +#ifdef WOLFCRYPT_BACKEND + #include <wolfssl/options.h> + #include <wolfssl/wolfcrypt/aes.h> +#endif + #ifndef EXIT_SUCCESS #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 #endif #define INT_RETURN int @@ -91,15 +96,23 @@ typedef union } aes_inf; typedef struct { uint_32t ks[KS_LENGTH]; aes_inf inf; +#ifdef WOLFCRYPT_BACKEND + XtsAes wc_enc_xts; + Aes wc_enc_aes; +#endif } aes_encrypt_ctx; typedef struct { uint_32t ks[KS_LENGTH]; aes_inf inf; +#ifdef WOLFCRYPT_BACKEND + XtsAes wc_dec_xts; + Aes wc_dec_aes; +#endif } aes_decrypt_ctx; /* This routine must be called before first use if non-static */ /* tables are being used */ @@ -124,11 +137,11 @@ AES_RETURN aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1]); #if defined(AES_VAR) AES_RETURN aes_encrypt_key(const unsigned char *key, int key_len, aes_encrypt_ctx cx[1]); #endif -AES_RETURN aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]); +AES_RETURN VC_CDECL aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]); #endif #if defined( AES_DECRYPT ) @@ -146,12 +159,19 @@ AES_RETURN aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1]); #if defined(AES_VAR) AES_RETURN aes_decrypt_key(const unsigned char *key, int key_len, aes_decrypt_ctx cx[1]); #endif -AES_RETURN aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]); +AES_RETURN VC_CDECL aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]); + +#endif +#ifdef WOLFCRYPT_BACKEND +AES_RETURN xts_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1]); +AES_RETURN xts_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1]); +AES_RETURN xts_encrypt(const unsigned char *in, unsigned char *out, word64 length, word64 sector, const aes_encrypt_ctx cx[1]); +AES_RETURN xts_decrypt(const unsigned char *in, unsigned char *out, word64 length, word64 sector, const aes_decrypt_ctx cx[1]); #endif #if defined(AES_MODES) /* Multiple calls to the following subroutines for multiple block */ diff --git a/src/Crypto/Aes_hw_armv8.c b/src/Crypto/Aes_hw_armv8.c new file mode 100644 index 00000000..b67ed1a5 --- /dev/null +++ b/src/Crypto/Aes_hw_armv8.c @@ -0,0 +1,316 @@ +/* +* AES using ARMv8 +* Contributed by Jeffrey Walton +* +* Further changes +* (C) 2017,2018 Jack Lloyd +* +* Botan is released under the Simplified BSD License (see license.txt) +*/ + +/* Modified and adapted for VeraCrypt */ + +#include "Common/Tcdefs.h" +#include "Aes_hw_cpu.h" +#if !defined(_UEFI) +#include <memory.h> +#include <stdlib.h> +#endif +#include "cpu.h" +#include "misc.h" + +#if CRYPTOPP_ARM_AES_AVAILABLE + +#include <arm_neon.h> + +// Single block encryption operations +VC_INLINE void aes_enc_block(uint8x16_t* B, uint8x16_t K) +{ + *B = vaesmcq_u8(vaeseq_u8(*B, K)); +} + +VC_INLINE void aes_enc_block_last(uint8x16_t* B, uint8x16_t K, uint8x16_t K2) +{ + *B = veorq_u8(vaeseq_u8(*B, K), K2); +} + +// 4-block parallel encryption operations +VC_INLINE void aes_enc_4_blocks(uint8x16_t* B0, uint8x16_t* B1, + uint8x16_t* B2, uint8x16_t* B3, uint8x16_t K) +{ + *B0 = vaesmcq_u8(vaeseq_u8(*B0, K)); + *B1 = vaesmcq_u8(vaeseq_u8(*B1, K)); + *B2 = vaesmcq_u8(vaeseq_u8(*B2, K)); + *B3 = vaesmcq_u8(vaeseq_u8(*B3, K)); +} + +VC_INLINE void aes_enc_4_blocks_last(uint8x16_t* B0, uint8x16_t* B1, + uint8x16_t* B2, uint8x16_t* B3, + uint8x16_t K, uint8x16_t K2) +{ + *B0 = veorq_u8(vaeseq_u8(*B0, K), K2); + *B1 = veorq_u8(vaeseq_u8(*B1, K), K2); + *B2 = veorq_u8(vaeseq_u8(*B2, K), K2); + *B3 = veorq_u8(vaeseq_u8(*B3, K), K2); +} + +// Single block decryption operations +VC_INLINE void aes_dec_block(uint8x16_t* B, uint8x16_t K) +{ + *B = vaesimcq_u8(vaesdq_u8(*B, K)); +} + +VC_INLINE void aes_dec_block_last(uint8x16_t* B, uint8x16_t K, uint8x16_t K2) +{ + *B = veorq_u8(vaesdq_u8(*B, K), K2); +} + +// 4-block parallel decryption operations +VC_INLINE void aes_dec_4_blocks(uint8x16_t* B0, uint8x16_t* B1, + uint8x16_t* B2, uint8x16_t* B3, uint8x16_t K) +{ + *B0 = vaesimcq_u8(vaesdq_u8(*B0, K)); + *B1 = vaesimcq_u8(vaesdq_u8(*B1, K)); + *B2 = vaesimcq_u8(vaesdq_u8(*B2, K)); + *B3 = vaesimcq_u8(vaesdq_u8(*B3, K)); +} + +VC_INLINE void aes_dec_4_blocks_last(uint8x16_t* B0, uint8x16_t* B1, + uint8x16_t* B2, uint8x16_t* B3, + uint8x16_t K, uint8x16_t K2) +{ + *B0 = veorq_u8(vaesdq_u8(*B0, K), K2); + *B1 = veorq_u8(vaesdq_u8(*B1, K), K2); + *B2 = veorq_u8(vaesdq_u8(*B2, K), K2); + *B3 = veorq_u8(vaesdq_u8(*B3, K), K2); +} + +VC_INLINE void aes256_hw_encrypt_blocks(uint8 buffer[], size_t blocks, const uint8* ks) +{ + const uint8x16_t K0 = vld1q_u8(ks + 0 * 16); + const uint8x16_t K1 = vld1q_u8(ks + 1 * 16); + const uint8x16_t K2 = vld1q_u8(ks + 2 * 16); + const uint8x16_t K3 = vld1q_u8(ks + 3 * 16); + const uint8x16_t K4 = vld1q_u8(ks + 4 * 16); + const uint8x16_t K5 = vld1q_u8(ks + 5 * 16); + const uint8x16_t K6 = vld1q_u8(ks + 6 * 16); + const uint8x16_t K7 = vld1q_u8(ks + 7 * 16); + const uint8x16_t K8 = vld1q_u8(ks + 8 * 16); + const uint8x16_t K9 = vld1q_u8(ks + 9 * 16); + const uint8x16_t K10 = vld1q_u8(ks + 10 * 16); + const uint8x16_t K11 = vld1q_u8(ks + 11 * 16); + const uint8x16_t K12 = vld1q_u8(ks + 12 * 16); + const uint8x16_t K13 = vld1q_u8(ks + 13 * 16); + const uint8x16_t K14 = vld1q_u8(ks + 14 * 16); + + while(blocks >= 4) { + uint8x16_t B0 = vld1q_u8(buffer); + uint8x16_t B1 = vld1q_u8(buffer + 16); + uint8x16_t B2 = vld1q_u8(buffer + 32); + uint8x16_t B3 = vld1q_u8(buffer + 48); + + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K0); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K1); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K2); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K3); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K4); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K5); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K6); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K7); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K8); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K9); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K10); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K11); + aes_enc_4_blocks(&B0, &B1, &B2, &B3, K12); + aes_enc_4_blocks_last(&B0, &B1, &B2, &B3, K13, K14); + + vst1q_u8(buffer, B0); + vst1q_u8(buffer + 16, B1); + vst1q_u8(buffer + 32, B2); + vst1q_u8(buffer + 48, B3); + + buffer += 16 * 4; + blocks -= 4; + } + + for(size_t i = 0; i != blocks; ++i) { + uint8x16_t B = vld1q_u8(buffer + 16 * i); + aes_enc_block(&B, K0); + aes_enc_block(&B, K1); + aes_enc_block(&B, K2); + aes_enc_block(&B, K3); + aes_enc_block(&B, K4); + aes_enc_block(&B, K5); + aes_enc_block(&B, K6); + aes_enc_block(&B, K7); + aes_enc_block(&B, K8); + aes_enc_block(&B, K9); + aes_enc_block(&B, K10); + aes_enc_block(&B, K11); + aes_enc_block(&B, K12); + aes_enc_block_last(&B, K13, K14); + vst1q_u8(buffer + 16 * i, B); + } +} + +VC_INLINE void aes256_hw_encrypt_block(uint8 buffer[], const uint8* ks) +{ + const uint8x16_t K0 = vld1q_u8(ks + 0 * 16); + const uint8x16_t K1 = vld1q_u8(ks + 1 * 16); + const uint8x16_t K2 = vld1q_u8(ks + 2 * 16); + const uint8x16_t K3 = vld1q_u8(ks + 3 * 16); + const uint8x16_t K4 = vld1q_u8(ks + 4 * 16); + const uint8x16_t K5 = vld1q_u8(ks + 5 * 16); + const uint8x16_t K6 = vld1q_u8(ks + 6 * 16); + const uint8x16_t K7 = vld1q_u8(ks + 7 * 16); + const uint8x16_t K8 = vld1q_u8(ks + 8 * 16); + const uint8x16_t K9 = vld1q_u8(ks + 9 * 16); + const uint8x16_t K10 = vld1q_u8(ks + 10 * 16); + const uint8x16_t K11 = vld1q_u8(ks + 11 * 16); + const uint8x16_t K12 = vld1q_u8(ks + 12 * 16); + const uint8x16_t K13 = vld1q_u8(ks + 13 * 16); + const uint8x16_t K14 = vld1q_u8(ks + 14 * 16); + + uint8x16_t B = vld1q_u8(buffer); + aes_enc_block(&B, K0); + aes_enc_block(&B, K1); + aes_enc_block(&B, K2); + aes_enc_block(&B, K3); + aes_enc_block(&B, K4); + aes_enc_block(&B, K5); + aes_enc_block(&B, K6); + aes_enc_block(&B, K7); + aes_enc_block(&B, K8); + aes_enc_block(&B, K9); + aes_enc_block(&B, K10); + aes_enc_block(&B, K11); + aes_enc_block(&B, K12); + aes_enc_block_last(&B, K13, K14); + vst1q_u8(buffer, B); +} + +VC_INLINE void aes256_hw_decrypt_blocks(uint8 buffer[], size_t blocks, const uint8* ks) +{ + const uint8x16_t K0 = vld1q_u8(ks + 0 * 16); + const uint8x16_t K1 = vld1q_u8(ks + 1 * 16); + const uint8x16_t K2 = vld1q_u8(ks + 2 * 16); + const uint8x16_t K3 = vld1q_u8(ks + 3 * 16); + const uint8x16_t K4 = vld1q_u8(ks + 4 * 16); + const uint8x16_t K5 = vld1q_u8(ks + 5 * 16); + const uint8x16_t K6 = vld1q_u8(ks + 6 * 16); + const uint8x16_t K7 = vld1q_u8(ks + 7 * 16); + const uint8x16_t K8 = vld1q_u8(ks + 8 * 16); + const uint8x16_t K9 = vld1q_u8(ks + 9 * 16); + const uint8x16_t K10 = vld1q_u8(ks + 10 * 16); + const uint8x16_t K11 = vld1q_u8(ks + 11 * 16); + const uint8x16_t K12 = vld1q_u8(ks + 12 * 16); + const uint8x16_t K13 = vld1q_u8(ks + 13 * 16); + const uint8x16_t K14 = vld1q_u8(ks + 14 * 16); + + while(blocks >= 4) { + uint8x16_t B0 = vld1q_u8(buffer); + uint8x16_t B1 = vld1q_u8(buffer + 16); + uint8x16_t B2 = vld1q_u8(buffer + 32); + uint8x16_t B3 = vld1q_u8(buffer + 48); + + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K0); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K1); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K2); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K3); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K4); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K5); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K6); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K7); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K8); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K9); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K10); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K11); + aes_dec_4_blocks(&B0, &B1, &B2, &B3, K12); + aes_dec_4_blocks_last(&B0, &B1, &B2, &B3, K13, K14); + + vst1q_u8(buffer, B0); + vst1q_u8(buffer + 16, B1); + vst1q_u8(buffer + 32, B2); + vst1q_u8(buffer + 48, B3); + + buffer += 16 * 4; + blocks -= 4; + } + + for(size_t i = 0; i != blocks; ++i) { + uint8x16_t B = vld1q_u8(buffer + 16 * i); + aes_dec_block(&B, K0); + aes_dec_block(&B, K1); + aes_dec_block(&B, K2); + aes_dec_block(&B, K3); + aes_dec_block(&B, K4); + aes_dec_block(&B, K5); + aes_dec_block(&B, K6); + aes_dec_block(&B, K7); + aes_dec_block(&B, K8); + aes_dec_block(&B, K9); + aes_dec_block(&B, K10); + aes_dec_block(&B, K11); + aes_dec_block(&B, K12); + aes_dec_block_last(&B, K13, K14); + vst1q_u8(buffer + 16 * i, B); + } +} + +VC_INLINE void aes256_hw_decrypt_block(uint8 buffer[], const uint8* ks) +{ + const uint8x16_t K0 = vld1q_u8(ks + 0 * 16); + const uint8x16_t K1 = vld1q_u8(ks + 1 * 16); + const uint8x16_t K2 = vld1q_u8(ks + 2 * 16); + const uint8x16_t K3 = vld1q_u8(ks + 3 * 16); + const uint8x16_t K4 = vld1q_u8(ks + 4 * 16); + const uint8x16_t K5 = vld1q_u8(ks + 5 * 16); + const uint8x16_t K6 = vld1q_u8(ks + 6 * 16); + const uint8x16_t K7 = vld1q_u8(ks + 7 * 16); + const uint8x16_t K8 = vld1q_u8(ks + 8 * 16); + const uint8x16_t K9 = vld1q_u8(ks + 9 * 16); + const uint8x16_t K10 = vld1q_u8(ks + 10 * 16); + const uint8x16_t K11 = vld1q_u8(ks + 11 * 16); + const uint8x16_t K12 = vld1q_u8(ks + 12 * 16); + const uint8x16_t K13 = vld1q_u8(ks + 13 * 16); + const uint8x16_t K14 = vld1q_u8(ks + 14 * 16); + + uint8x16_t B = vld1q_u8(buffer); + aes_dec_block(&B, K0); + aes_dec_block(&B, K1); + aes_dec_block(&B, K2); + aes_dec_block(&B, K3); + aes_dec_block(&B, K4); + aes_dec_block(&B, K5); + aes_dec_block(&B, K6); + aes_dec_block(&B, K7); + aes_dec_block(&B, K8); + aes_dec_block(&B, K9); + aes_dec_block(&B, K10); + aes_dec_block(&B, K11); + aes_dec_block(&B, K12); + aes_dec_block_last(&B, K13, K14); + vst1q_u8(buffer, B); +} + +void aes_hw_cpu_decrypt (const uint8 *ks, uint8 *data) +{ + aes256_hw_decrypt_block(data, ks); +} + +void aes_hw_cpu_decrypt_32_blocks (const uint8 *ks, uint8 *data) +{ + aes256_hw_decrypt_blocks(data, 32, ks); +} + +void aes_hw_cpu_encrypt (const uint8 *ks, uint8 *data) +{ + aes256_hw_encrypt_block(data, ks); +} + +void aes_hw_cpu_encrypt_32_blocks (const uint8 *ks, uint8 *data) +{ + aes256_hw_encrypt_blocks(data, 32, ks); +} + +#endif diff --git a/src/Crypto/Aes_hw_cpu.h b/src/Crypto/Aes_hw_cpu.h index b294e2ee..d9dda1af 100644 --- a/src/Crypto/Aes_hw_cpu.h +++ b/src/Crypto/Aes_hw_cpu.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -19,17 +19,17 @@ extern "C" { #endif #if defined (TC_WINDOWS_BOOT) -byte is_aes_hw_cpu_supported (); -#endif +uint8 is_aes_hw_cpu_supported (); void aes_hw_cpu_enable_sse (); -void aes_hw_cpu_decrypt (const byte *ks, byte *data); -void aes_hw_cpu_decrypt_32_blocks (const byte *ks, byte *data); -void aes_hw_cpu_encrypt (const byte *ks, byte *data); -void aes_hw_cpu_encrypt_32_blocks (const byte *ks, byte *data); +#endif +void aes_hw_cpu_decrypt (const uint8 *ks, uint8 *data); +void VC_CDECL aes_hw_cpu_decrypt_32_blocks (const uint8 *ks, uint8 *data); +void aes_hw_cpu_encrypt (const uint8 *ks, uint8 *data); +void VC_CDECL aes_hw_cpu_encrypt_32_blocks (const uint8 *ks, uint8 *data); #if defined(__cplusplus) } #endif diff --git a/src/Crypto/Aescrypt.c b/src/Crypto/Aescrypt.c index 46175981..7348e2cf 100644 --- a/src/Crypto/Aescrypt.c +++ b/src/Crypto/Aescrypt.c @@ -92,11 +92,11 @@ extern "C" #define fwd_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ one_table(x,ups,t_use(f,l),fwd_var,rf1,c)) #else #define fwd_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ no_table(x,t_use(s,box),fwd_var,rf1,c)) #endif -AES_RETURN aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]) +AES_RETURN VC_CDECL aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]) { uint_32t locals(b0, b1); const uint_32t *kp; #if defined( dec_fmvars ) dec_fmvars; /* declare variables for fwd_mcol() if needed */ #endif @@ -229,11 +229,11 @@ AES_RETURN aes_encrypt(const unsigned char *in, unsigned char *out, const aes_en #else #define key_ofs 1 #define rnd_key(n) (kp - n * N_COLS) #endif -AES_RETURN aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]) +AES_RETURN VC_CDECL aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]) { uint_32t locals(b0, b1); #if defined( dec_imvars ) dec_imvars; /* declare variables for inv_mcol() if needed */ #endif const uint_32t *kp; diff --git a/src/Crypto/Camellia.c b/src/Crypto/Camellia.c index f4fde8aa..3fd49023 100644 --- a/src/Crypto/Camellia.c +++ b/src/Crypto/Camellia.c @@ -9,14 +9,14 @@ * * Copyright (c) 2006,2007 * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. * * SuperCop integration: - * Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi> + * Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi> * * VeraCrypt integration: - * Copyright © 2017 Mounir IDRASSI <mounir.idrassi@idrix.fr> + * Copyright © 2017 Mounir IDRASSI <mounir.idrassi@idrix.fr> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright @@ -49,16 +49,16 @@ #ifndef _WIN32 extern int IsAesHwCpuSupported (); #endif -void camellia_encrypt_asm(const byte *ctx, void *dst, const void *src); -void camellia_decrypt_asm(const byte *ctx, void *dst, const void *src); -void camellia_enc_blk2(const byte *ctx, byte *dst, const byte *src); -void camellia_dec_blk2(const byte *ctx, byte *dst, const byte *src); -void camellia_ecb_enc_16way(const byte *ctx, byte *dst, const byte *src); -void camellia_ecb_dec_16way(const byte *ctx, byte *dst, const byte *src); +void camellia_encrypt_asm(const uint8 *ctx, void *dst, const void *src); +void camellia_decrypt_asm(const uint8 *ctx, void *dst, const void *src); +void camellia_enc_blk2(const uint8 *ctx, uint8 *dst, const uint8 *src); +void camellia_dec_blk2(const uint8 *ctx, uint8 *dst, const uint8 *src); +void camellia_ecb_enc_16way(const uint8 *ctx, uint8 *dst, const uint8 *src); +void camellia_ecb_dec_16way(const uint8 *ctx, uint8 *dst, const uint8 *src); /* key constants */ #define CAMELLIA_SIGMA1L (0xA09E667FL) #define CAMELLIA_SIGMA1R (0x3BCC908BL) @@ -1091,29 +1091,29 @@ void camellia_encrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, void camellia_decrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks) { camellia_decrypt_asm (ks, outBlock, inBlock); } -void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte* out_blk, uint32 blockCount) +void camellia_encrypt_blocks(unsigned __int8 *instance, const uint8* in_blk, uint8* out_blk, uint32 blockCount) { #if !defined (_UEFI) if ((blockCount >= 16) && IsCpuIntel() && IsAesHwCpuSupported () && HasSAVX()) /* on AMD cpu, AVX is too slow */ { #if defined (TC_WINDOWS_DRIVER) XSTATE_SAVE SaveState; - if (NT_SUCCESS (KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState))) + if (NT_SUCCESS (KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState))) { #endif while (blockCount >= 16) { camellia_ecb_enc_16way (instance, out_blk, in_blk); out_blk += 16 * 16; in_blk += 16 * 16; blockCount -= 16; } #if defined (TC_WINDOWS_DRIVER) - KeRestoreExtendedProcessorStateVC(&SaveState); + KeRestoreExtendedProcessorState(&SaveState); } #endif } #endif @@ -1127,29 +1127,29 @@ void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte if (blockCount) camellia_encrypt (in_blk, out_blk, instance); } -void camellia_decrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte* out_blk, uint32 blockCount) +void camellia_decrypt_blocks(unsigned __int8 *instance, const uint8* in_blk, uint8* out_blk, uint32 blockCount) { #if !defined (_UEFI) if ((blockCount >= 16) && IsCpuIntel() && IsAesHwCpuSupported () && HasSAVX()) /* on AMD cpu, AVX is too slow */ { #if defined (TC_WINDOWS_DRIVER) XSTATE_SAVE SaveState; - if (NT_SUCCESS (KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState))) + if (NT_SUCCESS (KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState))) { #endif while (blockCount >= 16) { camellia_ecb_dec_16way (instance, out_blk, in_blk); out_blk += 16 * 16; in_blk += 16 * 16; blockCount -= 16; } #if defined (TC_WINDOWS_DRIVER) - KeRestoreExtendedProcessorStateVC(&SaveState); + KeRestoreExtendedProcessorState(&SaveState); } #endif } #endif diff --git a/src/Crypto/Camellia.h b/src/Crypto/Camellia.h index a1cb832e..63c97476 100644 --- a/src/Crypto/Camellia.h +++ b/src/Crypto/Camellia.h @@ -16,12 +16,12 @@ extern "C" void camellia_set_key(const unsigned __int8 userKey[], unsigned __int8 *ks); void camellia_encrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks); void camellia_decrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks); #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) -void camellia_encrypt_blocks(unsigned __int8 *ks, const byte* in_blk, byte* out_blk, uint32 blockCount); -void camellia_decrypt_blocks(unsigned __int8 *ks, const byte* in_blk, byte* out_blk, uint32 blockCount); +void camellia_encrypt_blocks(unsigned __int8 *ks, const uint8* in_blk, uint8* out_blk, uint32 blockCount); +void camellia_decrypt_blocks(unsigned __int8 *ks, const uint8* in_blk, uint8* out_blk, uint32 blockCount); #endif #ifdef __cplusplus } #endif diff --git a/src/Crypto/Crypto.vcproj b/src/Crypto/Crypto.vcproj deleted file mode 100644 index 15c5c4fb..00000000 --- a/src/Crypto/Crypto.vcproj +++ /dev/null @@ -1,587 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="Crypto" - ProjectGUID="{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}" - RootNamespace="Crypto" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(ProjectDir)\..\Common"" - PreprocessorDefinitions="WIN32;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - BasicRuntimeChecks="0" - RuntimeLibrary="1" - BufferSecurityCheck="false" - UsePrecompiledHeader="0" - WarningLevel="4" - DebugInformationFormat="3" - DisableSpecificWarnings="4100;4127;4201" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/Crypto.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(ProjectDir)\..\Common"" - PreprocessorDefinitions="WIN32;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - BasicRuntimeChecks="0" - RuntimeLibrary="1" - BufferSecurityCheck="false" - UsePrecompiledHeader="0" - WarningLevel="4" - DebugInformationFormat="3" - DisableSpecificWarnings="4100;4127;4201" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/Crypto.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(ProjectDir)\..\Common"" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - DisableSpecificWarnings="4100;4127;4201" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/Crypto.lib" - AdditionalLibraryDirectories="$(TargetDir)" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(ProjectDir)\..\Common"" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - DisableSpecificWarnings="4100;4127;4201" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/Crypto.lib" - AdditionalLibraryDirectories="$(TargetDir)" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\Aes_hw_cpu.asm" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\$(InputName).obj" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\$(InputName).obj" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\Aes_x64.asm" - > - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCCustomBuildTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCCustomBuildTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\Aes_x86.asm" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\$(InputName).obj" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\$(InputName).obj" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\Aeskey.c" - > - </File> - <File - RelativePath=".\Aestab.c" - > - </File> - <File - RelativePath=".\Camellia.c" - > - </File> - <File - RelativePath=".\cpu.c" - > - </File> - <File - RelativePath=".\Gost89_x64.asm" - > - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCCustomBuildTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCCustomBuildTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="echo $(InputFileName) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\$(InputName).obj" -l "$(TargetDir)\$(InputName).lst" "$(InputPath)"
" - Outputs="$(TargetDir)\$(InputName).obj" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\GostCipher.c" - > - </File> - <File - RelativePath=".\kuznyechik.c" - > - </File> - <File - RelativePath=".\Rmd160.c" - > - </File> - <File - RelativePath=".\Serpent.c" - > - </File> - <File - RelativePath=".\Sha2.c" - > - </File> - <File - RelativePath=".\Streebog.c" - > - </File> - <File - RelativePath=".\Twofish.c" - > - </File> - <File - RelativePath=".\Whirlpool.c" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\Aes.h" - > - </File> - <File - RelativePath=".\Aes_hw_cpu.h" - > - </File> - <File - RelativePath=".\Aesopt.h" - > - </File> - <File - RelativePath=".\Aestab.h" - > - </File> - <File - RelativePath=".\Camellia.h" - > - </File> - <File - RelativePath=".\config.h" - > - </File> - <File - RelativePath=".\cpu.h" - > - </File> - <File - RelativePath=".\GostCipher.h" - > - </File> - <File - RelativePath=".\kuznyechik.h" - > - </File> - <File - RelativePath=".\misc.h" - > - </File> - <File - RelativePath=".\Rmd160.h" - > - </File> - <File - RelativePath=".\Serpent.h" - > - </File> - <File - RelativePath=".\Sha2.h" - > - </File> - <File - RelativePath=".\Streebog.h" - > - </File> - <File - RelativePath=".\Twofish.h" - > - </File> - <File - RelativePath=".\Whirlpool.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/Crypto/Crypto.vcxproj b/src/Crypto/Crypto.vcxproj index 97a472f7..cad50c06 100644 --- a/src/Crypto/Crypto.vcxproj +++ b/src/Crypto/Crypto.vcxproj @@ -1,83 +1,90 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}</ProjectGuid> <RootNamespace>Crypto</RootNamespace> <Keyword>Win32Proj</Keyword> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <ProjectName>Crypto</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> @@ -92,14 +99,12 @@ </ClCompile> <Lib> <OutputFile>$(OutDir)Crypto.lib</OutputFile> </Lib> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - </Midl> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <Midl /> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> @@ -114,11 +119,14 @@ </ClCompile> <Lib> <OutputFile>$(OutDir)Crypto.lib</OutputFile> </Lib> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> <ClCompile> <Optimization>MaxSpeed</Optimization> <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -128,20 +136,19 @@ <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Lib> <OutputFile>$(OutDir)Crypto.lib</OutputFile> <AdditionalLibraryDirectories>$(TargetDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Lib> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - </Midl> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <Midl /> <ClCompile> <Optimization>MaxSpeed</Optimization> <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -151,80 +158,110 @@ <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Lib> <OutputFile>$(OutDir)Crypto.lib</OutputFile> <AdditionalLibraryDirectories>$(TargetDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Lib> </ItemDefinitionGroup> <ItemGroup> <CustomBuild Include="Aes_hw_cpu.asm"> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" </Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" </Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" </Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" +</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="Aes_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" </Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" +</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" </Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" +</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="Aes_x86.asm"> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" </Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" </Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" </Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" +</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> </CustomBuild> </ItemGroup> <ItemGroup> + <ClCompile Include="Aescrypt.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="Aeskey.c" /> <ClCompile Include="Aestab.c" /> + <ClCompile Include="Aes_hw_armv8.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="blake2s.c" /> <ClCompile Include="blake2s_SSE2.c" /> <ClCompile Include="blake2s_SSE41.c" /> <ClCompile Include="blake2s_SSSE3.c" /> <ClCompile Include="Camellia.c" /> <ClCompile Include="chacha-xmm.c" /> <ClCompile Include="chacha256.c" /> <ClCompile Include="chachaRng.c" /> <ClCompile Include="cpu.c" /> <ClCompile Include="jitterentropy-base.c"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization> <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Disabled</Optimization> </ClCompile> <ClCompile Include="kuznyechik.c" /> - <ClCompile Include="kuznyechik_simd.c" /> - <ClCompile Include="rdrand.c" /> + <ClCompile Include="kuznyechik_simd.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="rdrand.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="SerpentFast.c" /> <ClCompile Include="SerpentFast_simd.cpp" /> <ClCompile Include="Sha2.c" /> + <ClCompile Include="sha256_armv8.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="Sha2Intel.c" /> <ClCompile Include="Streebog.c" /> <ClCompile Include="t1ha2.c" /> <ClCompile Include="t1ha2_selfcheck.c" /> <ClCompile Include="t1ha_selfcheck.c" /> <ClCompile Include="Twofish.c" /> @@ -233,13 +270,10 @@ <ItemGroup> <ClInclude Include="Aes.h" /> <ClInclude Include="Aes_hw_cpu.h" /> <ClInclude Include="Aesopt.h" /> <ClInclude Include="Aestab.h" /> - <ClInclude Include="blake2s-load-sse2.h" /> - <ClInclude Include="blake2s-load-sse41.h" /> - <ClInclude Include="blake2s-round.h" /> <ClInclude Include="Camellia.h" /> <ClInclude Include="chacha256.h" /> <ClInclude Include="chachaRng.h" /> <ClInclude Include="chacha_u1.h" /> <ClInclude Include="chacha_u4.h" /> @@ -259,159 +293,193 @@ <ClInclude Include="t1ha_selfcheck.h" /> <ClInclude Include="Twofish.h" /> <ClInclude Include="Whirlpool.h" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - </ItemGroup> - <ItemGroup> <CustomBuild Include="Twofish_x64.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <ItemGroup> <CustomBuild Include="Camellia_aesni_x64.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="Camellia_x64.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <ItemGroup> <CustomBuild Include="sha256-x86-nayuki.S"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> </CustomBuild> <CustomBuild Include="sha256_avx1_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="sha256_avx2_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="sha256_sse4_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="sha512-x86-nayuki.S"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> </CustomBuild> <CustomBuild Include="sha512-x64-nayuki.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="sha512_avx1_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="sha512_avx2_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="sha512_sse4_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <ItemGroup> <CustomBuild Include="rdrand_ml.asm"> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="rdseed_ml.asm"> <FileType>Document</FileType> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" </Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/src/Crypto/Crypto.vcxproj.filters b/src/Crypto/Crypto.vcxproj.filters index 5d149bdd..099c3ce4 100644 --- a/src/Crypto/Crypto.vcxproj.filters +++ b/src/Crypto/Crypto.vcxproj.filters @@ -85,10 +85,22 @@ <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="blake2s_SSSE3.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="Sha2Intel.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Aescrypt.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Aes_hw_armv8.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="sha256_armv8.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="Aes.h"> <Filter>Header Files</Filter> </ClInclude> @@ -162,19 +174,10 @@ <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="t1ha_selfcheck.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="blake2s-load-sse2.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="blake2s-load-sse41.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="blake2s-round.h"> - <Filter>Header Files</Filter> - </ClInclude> </ItemGroup> <ItemGroup> <CustomBuild Include="Aes_hw_cpu.asm"> <Filter>Source Files</Filter> </CustomBuild> diff --git a/src/Crypto/Crypto.vcxproj.user b/src/Crypto/Crypto.vcxproj.user index ace9a86a..88a55094 100644 --- a/src/Crypto/Crypto.vcxproj.user +++ b/src/Crypto/Crypto.vcxproj.user @@ -1,3 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> </Project>
\ No newline at end of file diff --git a/src/Crypto/Crypto_vs2019.vcxproj b/src/Crypto/Crypto_vs2019.vcxproj deleted file mode 100644 index ccd512b9..00000000 --- a/src/Crypto/Crypto_vs2019.vcxproj +++ /dev/null @@ -1,599 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|ARM64"> - <Configuration>Debug</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|ARM64"> - <Configuration>Release</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}</ProjectGuid> - <RootNamespace>Crypto</RootNamespace> - <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> - <ProjectName>Crypto</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</IntDir> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>Default</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>false</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)Crypto.lib</OutputFile> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>Default</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>false</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)Crypto.lib</OutputFile> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <Midl /> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>Default</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>false</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)Crypto.lib</OutputFile> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)Crypto.lib</OutputFile> - <AdditionalLibraryDirectories>$(TargetDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - </Midl> - <ClCompile> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)Crypto.lib</OutputFile> - <AdditionalLibraryDirectories>$(TargetDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <Midl /> - <ClCompile> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ProjectDir)\..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4100;4127;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)Crypto.lib</OutputFile> - <AdditionalLibraryDirectories>$(TargetDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - </Lib> - </ItemDefinitionGroup> - <ItemGroup> - <CustomBuild Include="Aes_hw_cpu.asm"> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="Aes_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="Aes_x86.asm"> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox --prefix _ -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <ClCompile Include="Aescrypt.c"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="Aeskey.c" /> - <ClCompile Include="Aestab.c" /> - <ClCompile Include="blake2s.c" /> - <ClCompile Include="blake2s_SSE2.c" /> - <ClCompile Include="blake2s_SSE41.c" /> - <ClCompile Include="blake2s_SSSE3.c" /> - <ClCompile Include="Camellia.c" /> - <ClCompile Include="chacha-xmm.c" /> - <ClCompile Include="chacha256.c" /> - <ClCompile Include="chachaRng.c" /> - <ClCompile Include="cpu.c" /> - <ClCompile Include="jitterentropy-base.c"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Disabled</Optimization> - </ClCompile> - <ClCompile Include="kuznyechik.c" /> - <ClCompile Include="kuznyechik_simd.c"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="rdrand.c"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="SerpentFast.c" /> - <ClCompile Include="SerpentFast_simd.cpp" /> - <ClCompile Include="Sha2.c" /> - <ClCompile Include="Streebog.c" /> - <ClCompile Include="t1ha2.c" /> - <ClCompile Include="t1ha2_selfcheck.c" /> - <ClCompile Include="t1ha_selfcheck.c" /> - <ClCompile Include="Twofish.c" /> - <ClCompile Include="Whirlpool.c" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="Aes.h" /> - <ClInclude Include="Aes_hw_cpu.h" /> - <ClInclude Include="Aesopt.h" /> - <ClInclude Include="Aestab.h" /> - <ClInclude Include="Camellia.h" /> - <ClInclude Include="chacha256.h" /> - <ClInclude Include="chachaRng.h" /> - <ClInclude Include="chacha_u1.h" /> - <ClInclude Include="chacha_u4.h" /> - <ClInclude Include="config.h" /> - <ClInclude Include="cpu.h" /> - <ClInclude Include="jitterentropy-base-user.h" /> - <ClInclude Include="jitterentropy.h" /> - <ClInclude Include="kuznyechik.h" /> - <ClInclude Include="misc.h" /> - <ClInclude Include="rdrand.h" /> - <ClInclude Include="SerpentFast.h" /> - <ClInclude Include="SerpentFast_sbox.h" /> - <ClInclude Include="Sha2.h" /> - <ClInclude Include="Streebog.h" /> - <ClInclude Include="t1ha.h" /> - <ClInclude Include="t1ha_bits.h" /> - <ClInclude Include="t1ha_selfcheck.h" /> - <ClInclude Include="Twofish.h" /> - <ClInclude Include="Whirlpool.h" /> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="Twofish_x64.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="Camellia_aesni_x64.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="Camellia_x64.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="sha256-x86-nayuki.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - </CustomBuild> - <CustomBuild Include="sha256_avx1_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="sha256_avx2_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="sha256_sse4_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="sha512-x86-nayuki.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - </CustomBuild> - <CustomBuild Include="sha512-x64-nayuki.S"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="sha512_avx1_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="sha512_avx2_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="sha512_sse4_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="rdrand_ml.asm"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - <CustomBuild Include="rdseed_ml.asm"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/src/Crypto/Crypto_vs2019.vcxproj.user b/src/Crypto/Crypto_vs2019.vcxproj.user deleted file mode 100644 index 88a55094..00000000 --- a/src/Crypto/Crypto_vs2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup /> -</Project>
\ No newline at end of file diff --git a/src/Crypto/Sha2.c b/src/Crypto/Sha2.c index 31cba7f5..27e61c3d 100644 --- a/src/Crypto/Sha2.c +++ b/src/Crypto/Sha2.c @@ -25,11 +25,11 @@ extern "C" void sha512_sse4(const void* M, uint_64t D[8], uint_64t l); void sha512_avx(const void* M, void* D, uint_64t l); #endif #if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX)) - void sha512_compress_nayuki(uint_64t state[8], const uint_8t block[128]); + void VC_CDECL sha512_compress_nayuki(uint_64t state[8], const uint_8t block[128]); #endif #if defined(__cplusplus) } #endif @@ -304,14 +304,21 @@ extern "C" #if CRYPTOPP_BOOL_X64 void sha256_sse4(void *input_data, uint_32t digest[8], uint_64t num_blks); void sha256_rorx(void *input_data, uint_32t digest[8], uint_64t num_blks); void sha256_avx(void *input_data, uint_32t digest[8], uint_64t num_blks); +#if CRYPTOPP_SHANI_AVAILABLE + void sha256_intel(void *input_data, uint_32t digest[8], uint_64t num_blks); +#endif #endif #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 - void sha256_compress_nayuki(uint_32t state[8], const uint_8t block[64]); + void VC_CDECL sha256_compress_nayuki(uint_32t state[8], const uint_8t block[64]); +#endif + +#if CRYPTOPP_ARM_SHA2_AVAILABLE + void sha256_compress_digest_armv8(const void* input_data, uint_32t digest[8], uint_64t num_blks); #endif #if defined(__cplusplus) } #endif @@ -445,11 +452,11 @@ static void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(uint_32t *state, const uint_ AS2( mov [Wt(i)], WORD_REG(bx)) #endif #if defined(__GNUC__) #if CRYPTOPP_BOOL_X64 - CRYPTOPP_ALIGN_DATA(16) byte workspace[LOCALS_SIZE] ; + CRYPTOPP_ALIGN_DATA(16) uint8 workspace[LOCALS_SIZE] ; #endif __asm__ __volatile__ ( #if CRYPTOPP_BOOL_X64 "lea %4, %%r8;" @@ -715,10 +722,17 @@ void StdSha256Transform(sha256_ctx* ctx, void* mp, uint_64t num_blks) } #ifndef NO_OPTIMIZED_VERSIONS #if CRYPTOPP_BOOL_X64 +#if CRYPTOPP_SHANI_AVAILABLE +void IntelSha256Transform(sha256_ctx* ctx, void* mp, uint_64t num_blks) +{ + sha256_intel(mp, ctx->hash, num_blks); +} +#endif + void Avx2Sha256Transform(sha256_ctx* ctx, void* mp, uint_64t num_blks) { if (num_blks > 1) sha256_rorx(mp, ctx->hash, num_blks); else @@ -745,10 +759,17 @@ void SSE2Sha256Transform(sha256_ctx* ctx, void* mp, uint_64t num_blks) { X86_SHA256_HashBlocks(ctx->hash, (const uint_32t*)mp, (size_t)(num_blks * 64)); } #endif +#if CRYPTOPP_ARM_SHA2_AVAILABLE +void ArmSha256Transform(sha256_ctx* ctx, void* mp, uint_64t num_blks) +{ + sha256_compress_digest_armv8(mp, ctx->hash, num_blks); +} +#endif + #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 void Sha256AsmTransform(sha256_ctx* ctx, void* mp, uint_64t num_blks) { uint_64t i; for (i = 0; i < num_blks; i++) @@ -773,10 +794,15 @@ void sha256_begin(sha256_ctx* ctx) if (!sha256transfunc) { #ifndef NO_OPTIMIZED_VERSIONS #if CRYPTOPP_BOOL_X64 +#if CRYPTOPP_SHANI_AVAILABLE + if (HasSHA256()) + sha256transfunc = IntelSha256Transform; + else +#endif if (g_isIntel && HasSAVX2() && HasSBMI2()) sha256transfunc = Avx2Sha256Transform; else if (g_isIntel && HasSAVX()) sha256transfunc = AvxSha256Transform; else if (HasSSE41()) @@ -788,10 +814,16 @@ void sha256_begin(sha256_ctx* ctx) if (HasSSE2 ()) sha256transfunc = SSE2Sha256Transform; else #endif +#if CRYPTOPP_ARM_SHA2_AVAILABLE + if (HasSHA256()) + sha256transfunc = ArmSha256Transform; + else +#endif + #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 sha256transfunc = Sha256AsmTransform; #else sha256transfunc = StdSha256Transform; #endif diff --git a/src/Crypto/Sha2.h b/src/Crypto/Sha2.h index 7e90abff..42d067fa 100644 --- a/src/Crypto/Sha2.h +++ b/src/Crypto/Sha2.h @@ -1,7 +1,7 @@ /* - * Copyright (c) 2013-2017 IDRIX + * Copyright (c) 2013-2025 IDRIX * Governed by the Apache License 2.0 the full text of which is contained * in the file License.txt included in VeraCrypt binary and source * code distribution packages. */ @@ -10,10 +10,17 @@ #include "Common/Tcdefs.h" #include "Common/Endian.h" #include "Crypto/config.h" +#ifdef WOLFCRYPT_BACKEND + #include <wolfssl/options.h> + #include <wolfssl/wolfcrypt/sha256.h> + #include <wolfssl/wolfcrypt/sha512.h> + #include <wolfssl/wolfcrypt/hash.h> +#endif + #if defined(__cplusplus) extern "C" { #endif #define SHA256_DIGEST_SIZE 32 @@ -26,10 +33,14 @@ extern "C" { #define SHA2_ALIGN CRYPTOPP_ALIGN_DATA(32) #else #define SHA2_ALIGN CRYPTOPP_ALIGN_DATA(16) #endif +#ifdef WOLFCRYPT_BACKEND +typedef struct wc_Sha512 sha512_ctx; +typedef struct wc_Sha256 sha256_ctx; +#else typedef struct { uint_64t count[2]; SHA2_ALIGN uint_64t hash[8]; SHA2_ALIGN uint_64t wbuf[16]; } sha512_ctx; @@ -37,10 +48,11 @@ typedef struct typedef struct { uint_32t count[2]; SHA2_ALIGN uint_32t hash[8]; SHA2_ALIGN uint_32t wbuf[16]; } sha256_ctx; +#endif void sha512_begin(sha512_ctx* ctx); void sha512_hash(const unsigned char * source, uint_64t sourceLen, sha512_ctx *ctx); void sha512_end(unsigned char * result, sha512_ctx* ctx); diff --git a/src/Crypto/Sha2Intel.c b/src/Crypto/Sha2Intel.c new file mode 100644 index 00000000..943115bf --- /dev/null +++ b/src/Crypto/Sha2Intel.c @@ -0,0 +1,278 @@ +/* +* Support for SHA-256 x86 instrinsic +* Based on public domain code by Sean Gulley +* (https://github.com/mitls/hacl-star/tree/master/experimental/hash) +* +* Botan is released under the Simplified BSD License (see license.txt) +*/ + +/* November 10th 2024: Modified for VeraCrypt */ + +#include "Sha2.h" +#include "Common/Endian.h" +#include "cpu.h" +#include "misc.h" + +#if defined(_UEFI) || defined(CRYPTOPP_DISABLE_ASM) +#define NO_OPTIMIZED_VERSIONS +#endif + +#ifndef NO_OPTIMIZED_VERSIONS + +#if CRYPTOPP_SHANI_AVAILABLE + +#ifndef _MSC_VER +#include <signal.h> +#include <setjmp.h> + +typedef void (*SigHandler)(int); + +static jmp_buf s_jmpNoSHA; +static void SigIllHandlerSHA(int p) +{ + longjmp(s_jmpNoSHA, 1); +} +#endif + +int TrySHA256() +{ + volatile int result = 0; +#ifdef _MSC_VER + __try +#else + SigHandler oldHandler = signal(SIGILL, SigIllHandlerSHA); + if (oldHandler == SIG_ERR) + return 0; + if (setjmp(s_jmpNoSHA)) + result = 0; + else +#endif + { + // Known input message block + __m128i msg0 = _mm_setr_epi32(0x12345678, 0x9ABCDEF0, 0x87654321, 0x0FEDCBA9); + __m128i msg1 = _mm_setr_epi32(0x11111111, 0x22222222, 0x33333333, 0x44444444); + + // SHA256 message schedule update + __m128i tmp = _mm_sha256msg1_epu32(msg0, msg1); + + // Verify result - these values were pre-computed for the given input +#ifdef _MSC_VER + if (tmp.m128i_u32[0] == 0xD8131B44 && + tmp.m128i_u32[1] == 0x9DE6E22B && + tmp.m128i_u32[2] == 0xA86D643A && + tmp.m128i_u32[3] == 0x74320FED) +#else + if (((uint32_t*)(&tmp))[0] == 0xD8131B44 && + ((uint32_t*)(&tmp))[1] == 0x9DE6E22B && + ((uint32_t*)(&tmp))[2] == 0xA86D643A && + ((uint32_t*)(&tmp))[3] == 0x74320FED) +#endif + result = 1; + } +#ifdef _MSC_VER + __except (EXCEPTION_EXECUTE_HANDLER) + { + // ignore error if SHA instructions not supported + } +#else + signal(SIGILL, oldHandler); +#endif + + return result; +} + +// +void sha256_intel(void *mp, uint_32t state[8], uint_64t num_blks) +{ + // Constants table - align for better performance + CRYPTOPP_ALIGN_DATA(64) + static const uint_32t K[64] = { + 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, + 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, + 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, + 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, + 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, + 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, + 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, + 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2, + }; + + const __m128i* K_mm = (const __m128i*)K; + const __m128i* input_mm = (const __m128i*)mp; + + // Create byte shuffle mask for big-endian to little-endian conversion + const __m128i MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b, 0x0405060700010203); + + // Load initial values + __m128i STATE0 = _mm_loadu_si128((__m128i*)&state[0]); + __m128i STATE1 = _mm_loadu_si128((__m128i*)&state[4]); + + // Adjust byte ordering + STATE0 = _mm_shuffle_epi32(STATE0, 0xB1); // CDAB + STATE1 = _mm_shuffle_epi32(STATE1, 0x1B); // EFGH + + __m128i TMP = _mm_alignr_epi8(STATE0, STATE1, 8); // ABEF + STATE1 = _mm_blend_epi16(STATE1, STATE0, 0xF0); // CDGH + STATE0 = TMP; + + while(num_blks > 0) { + // Save current state + const __m128i ABEF_SAVE = STATE0; + const __m128i CDGH_SAVE = STATE1; + + __m128i MSG; + + __m128i TMSG0 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm), MASK); + __m128i TMSG1 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm + 1), MASK); + __m128i TMSG2 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm + 2), MASK); + __m128i TMSG3 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm + 3), MASK); + + // Rounds 0-3 + MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + // Rounds 4-7 + MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 1)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG0 = _mm_sha256msg1_epu32(TMSG0, TMSG1); + + // Rounds 8-11 + MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 2)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG1 = _mm_sha256msg1_epu32(TMSG1, TMSG2); + + // Rounds 12-15 + MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 3)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG0 = _mm_add_epi32(TMSG0, _mm_alignr_epi8(TMSG3, TMSG2, 4)); + TMSG0 = _mm_sha256msg2_epu32(TMSG0, TMSG3); + TMSG2 = _mm_sha256msg1_epu32(TMSG2, TMSG3); + + // Rounds 16-19 + MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm + 4)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG1 = _mm_add_epi32(TMSG1, _mm_alignr_epi8(TMSG0, TMSG3, 4)); + TMSG1 = _mm_sha256msg2_epu32(TMSG1, TMSG0); + TMSG3 = _mm_sha256msg1_epu32(TMSG3, TMSG0); + + // Rounds 20-23 + MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 5)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG2 = _mm_add_epi32(TMSG2, _mm_alignr_epi8(TMSG1, TMSG0, 4)); + TMSG2 = _mm_sha256msg2_epu32(TMSG2, TMSG1); + TMSG0 = _mm_sha256msg1_epu32(TMSG0, TMSG1); + + // Rounds 24-27 + MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 6)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG3 = _mm_add_epi32(TMSG3, _mm_alignr_epi8(TMSG2, TMSG1, 4)); + TMSG3 = _mm_sha256msg2_epu32(TMSG3, TMSG2); + TMSG1 = _mm_sha256msg1_epu32(TMSG1, TMSG2); + + // Rounds 28-31 + MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 7)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG0 = _mm_add_epi32(TMSG0, _mm_alignr_epi8(TMSG3, TMSG2, 4)); + TMSG0 = _mm_sha256msg2_epu32(TMSG0, TMSG3); + TMSG2 = _mm_sha256msg1_epu32(TMSG2, TMSG3); + + // Rounds 32-35 + MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm + 8)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG1 = _mm_add_epi32(TMSG1, _mm_alignr_epi8(TMSG0, TMSG3, 4)); + TMSG1 = _mm_sha256msg2_epu32(TMSG1, TMSG0); + TMSG3 = _mm_sha256msg1_epu32(TMSG3, TMSG0); + + // Rounds 36-39 + MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 9)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG2 = _mm_add_epi32(TMSG2, _mm_alignr_epi8(TMSG1, TMSG0, 4)); + TMSG2 = _mm_sha256msg2_epu32(TMSG2, TMSG1); + TMSG0 = _mm_sha256msg1_epu32(TMSG0, TMSG1); + + // Rounds 40-43 + MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 10)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG3 = _mm_add_epi32(TMSG3, _mm_alignr_epi8(TMSG2, TMSG1, 4)); + TMSG3 = _mm_sha256msg2_epu32(TMSG3, TMSG2); + TMSG1 = _mm_sha256msg1_epu32(TMSG1, TMSG2); + + // Rounds 44-47 + MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 11)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG0 = _mm_add_epi32(TMSG0, _mm_alignr_epi8(TMSG3, TMSG2, 4)); + TMSG0 = _mm_sha256msg2_epu32(TMSG0, TMSG3); + TMSG2 = _mm_sha256msg1_epu32(TMSG2, TMSG3); + + // Rounds 48-51 + MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm + 12)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG1 = _mm_add_epi32(TMSG1, _mm_alignr_epi8(TMSG0, TMSG3, 4)); + TMSG1 = _mm_sha256msg2_epu32(TMSG1, TMSG0); + TMSG3 = _mm_sha256msg1_epu32(TMSG3, TMSG0); + + // Rounds 52-55 + MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 13)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG2 = _mm_add_epi32(TMSG2, _mm_alignr_epi8(TMSG1, TMSG0, 4)); + TMSG2 = _mm_sha256msg2_epu32(TMSG2, TMSG1); + + // Rounds 56-59 + MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 14)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + TMSG3 = _mm_add_epi32(TMSG3, _mm_alignr_epi8(TMSG2, TMSG1, 4)); + TMSG3 = _mm_sha256msg2_epu32(TMSG3, TMSG2); + + // Rounds 60-63 + MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 15)); + STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); + STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); + + // Add values back to state + STATE0 = _mm_add_epi32(STATE0, ABEF_SAVE); + STATE1 = _mm_add_epi32(STATE1, CDGH_SAVE); + + input_mm += 4; + num_blks--; + } + + // Shuffle state back to correct order + STATE0 = _mm_shuffle_epi32(STATE0, 0x1B); // FEBA + STATE1 = _mm_shuffle_epi32(STATE1, 0xB1); // DCHG + + // Save state + _mm_storeu_si128((__m128i*)&state[0], _mm_blend_epi16(STATE0, STATE1, 0xF0)); // DCBA + _mm_storeu_si128((__m128i*)&state[4], _mm_alignr_epi8(STATE1, STATE0, 8)); // HGFE +} + +#endif +#endif diff --git a/src/Crypto/Sha2Small.c b/src/Crypto/Sha2Small.c index 08318833..572dd612 100644 --- a/src/Crypto/Sha2Small.c +++ b/src/Crypto/Sha2Small.c @@ -18,11 +18,11 @@ #include "Sha2Small.h" #pragma optimize ("tl", on) typedef unsigned __int32 uint32; -typedef unsigned __int8 byte; +typedef unsigned __int8 uint8; #include <stdlib.h> #pragma intrinsic(_lrotr) #define RORc(x,n) _lrotr(x,n) diff --git a/src/Crypto/Sources b/src/Crypto/Sources index 9542d4b6..bd990382 100644 --- a/src/Crypto/Sources +++ b/src/Crypto/Sources @@ -37,10 +37,11 @@ SOURCES = \ jitterentropy-base.c \ rdrand.c \ SerpentFast.c \ SerpentFast_simd.cpp \ Sha2.c \ + Sha2Intel.c \ t1ha_selfcheck.c \ t1ha2.c \ t1ha2_selfcheck.c \ Twofish.c \ Twofish_$(TC_ARCH).S \ diff --git a/src/Crypto/Streebog.c b/src/Crypto/Streebog.c index 84991021..d223eef8 100644 --- a/src/Crypto/Streebog.c +++ b/src/Crypto/Streebog.c @@ -2251,11 +2251,11 @@ stage3(STREEBOG_CTX *CTX) g((CTX->h), buffer0, (const unsigned char *) (CTX->Sigma)); memcpy((CTX->hash), (CTX->h), 8 * sizeof(unsigned long long)); } -void STREEBOG_add(STREEBOG_CTX *CTX, const byte *data, size_t len) +void STREEBOG_add(STREEBOG_CTX *CTX, const uint8 *data, size_t len) { size_t chunksize; while (len > 63 && CTX->bufsize == 0) { @@ -2284,11 +2284,11 @@ void STREEBOG_add(STREEBOG_CTX *CTX, const byte *data, size_t len) CTX->bufsize = 0; } } } -void STREEBOG_finalize(STREEBOG_CTX *CTX, byte *digest) +void STREEBOG_finalize(STREEBOG_CTX *CTX, uint8 *digest) { stage3(CTX); CTX->bufsize = 0; diff --git a/src/Crypto/Streebog.h b/src/Crypto/Streebog.h index d5691e70..29571d73 100644 --- a/src/Crypto/Streebog.h +++ b/src/Crypto/Streebog.h @@ -29,12 +29,12 @@ typedef STREEBOG_ALIGN(16) struct _STREEBOG_CTX unsigned int digest_size; } STREEBOG_CTX; void STREEBOG_init(STREEBOG_CTX *ctx); void STREEBOG_init256(STREEBOG_CTX *ctx); -void STREEBOG_add(STREEBOG_CTX *ctx, const byte *msg, size_t len); -void STREEBOG_finalize(STREEBOG_CTX *ctx, byte *out); +void STREEBOG_add(STREEBOG_CTX *ctx, const uint8 *msg, size_t len); +void STREEBOG_finalize(STREEBOG_CTX *ctx, uint8 *out); #ifdef __cplusplus } #endif diff --git a/src/Crypto/Twofish.c b/src/Crypto/Twofish.c index ad93b66f..ff46bc99 100644 --- a/src/Crypto/Twofish.c +++ b/src/Crypto/Twofish.c @@ -55,29 +55,29 @@ #endif #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) /* these are 64-bit assembly implementation taken from https://github.com/jkivilin/supercop-blockciphers - Copyright © 2011-2013 Jussi Kivilinna <jussi.kivilinna@iki.fi> + Copyright © 2011-2013 Jussi Kivilinna <jussi.kivilinna@iki.fi> */ #if defined(__cplusplus) extern "C" { #endif -void twofish_enc_blk(TwofishInstance *ks, byte *dst, const byte *src); -void twofish_dec_blk(TwofishInstance *ks, byte *dst, const byte *src); -void twofish_enc_blk2(TwofishInstance *ks, byte *dst, const byte *src); -void twofish_dec_blk2(TwofishInstance *ks, byte *dst, const byte *src); -void twofish_enc_blk3(TwofishInstance *ks, byte *dst, const byte *src); -void twofish_dec_blk3(TwofishInstance *ks, byte *dst, const byte *src); +void twofish_enc_blk(TwofishInstance *ks, uint8 *dst, const uint8 *src); +void twofish_dec_blk(TwofishInstance *ks, uint8 *dst, const uint8 *src); +void twofish_enc_blk2(TwofishInstance *ks, uint8 *dst, const uint8 *src); +void twofish_dec_blk2(TwofishInstance *ks, uint8 *dst, const uint8 *src); +void twofish_enc_blk3(TwofishInstance *ks, uint8 *dst, const uint8 *src); +void twofish_dec_blk3(TwofishInstance *ks, uint8 *dst, const uint8 *src); #if defined(__cplusplus) } #endif -void twofish_encrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount) +void twofish_encrypt_blocks(TwofishInstance *instance, const uint8* in_blk, uint8* out_blk, uint32 blockCount) { while (blockCount >= 3) { twofish_enc_blk3 (instance, out_blk, in_blk); out_blk += 3 * 16; @@ -94,11 +94,11 @@ void twofish_encrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* twofish_enc_blk (instance, out_blk, in_blk); } } -void twofish_decrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount) +void twofish_decrypt_blocks(TwofishInstance *instance, const uint8* in_blk, uint8* out_blk, uint32 blockCount) { while (blockCount >= 3) { twofish_dec_blk3 (instance, out_blk, in_blk); out_blk += 3 * 16; @@ -118,11 +118,11 @@ void twofish_decrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* #endif -static const byte Q[2][256] = { +static const uint8 Q[2][256] = { { 0xa9, 0x67, 0xb3, 0xe8, 0x04, 0xfd, 0xa3, 0x76, 0x9a, 0x92, 0x80, 0x78, 0xe4, 0xdd, 0xd1, 0x38, 0x0d, 0xc6, 0x35, 0x98, 0x18, 0xf7, 0xec, 0x6c, 0x43, 0x75, 0x37, 0x26, 0xfa, 0x13, 0x94, 0x48, 0xf2, 0xd0, 0x8b, 0x30, 0x84, 0x54, 0xdf, 0x23, 0x19, 0x5b, 0x3d, 0x59, 0xf3, 0xae, 0xa2, 0x82, 0x63, 0x01, 0x83, 0x2e, 0xd9, 0x51, 0x9b, 0x7c, 0xa6, 0xeb, 0xa5, 0xbe, 0x16, 0x0c, 0xe3, 0x61, @@ -602,15 +602,15 @@ static const uint32 RS[8][256] = { void twofish_set_key(TwofishInstance *instance, const u4byte in_key[]) { union { - byte S8[16]; + uint8 S8[16]; uint32 S32[4]; } us; unsigned int i; - const byte* key = (const byte*) in_key; + const uint8* key = (const uint8*) in_key; us.S32[0] = RS[0][key[0]] ^ RS[1][key[1]] ^ RS[2][key[2]] ^ RS[3][key[3]] ^ RS[4][key[4]] ^ RS[5][key[5]] ^ RS[6][key[6]] ^ RS[7][key[7]]; us.S32[1] = RS[0][key[8]] ^ RS[1][key[9]] ^ RS[2][key[10]] ^ RS[3][key[11]] ^ RS[4][key[12]] ^ RS[5][key[13]] ^ RS[6][key[14]] ^ RS[7][key[15]]; us.S32[2] = RS[0][key[16]] ^ RS[1][key[17]] ^ RS[2][key[18]] ^ RS[3][key[19]] ^ RS[4][key[20]] ^ RS[5][key[21]] ^ RS[6][key[22]] ^ RS[7][key[23]]; us.S32[3] = RS[0][key[24]] ^ RS[1][key[25]] ^ RS[2][key[26]] ^ RS[3][key[27]] ^ RS[4][key[28]] ^ RS[5][key[29]] ^ RS[6][key[30]] ^ RS[7][key[31]]; diff --git a/src/Crypto/Twofish.h b/src/Crypto/Twofish.h index e74826eb..3b530cbd 100644 --- a/src/Crypto/Twofish.h +++ b/src/Crypto/Twofish.h @@ -53,14 +53,14 @@ typedef struct #define TWOFISH_KS sizeof(TwofishInstance) /* in_key must be 32-bytes long */ void twofish_set_key(TwofishInstance *instance, const u4byte in_key[]); #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) -void twofish_encrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount); -void twofish_decrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount); -#define twofish_encrypt(instance,in_blk,out_blk) twofish_encrypt_blocks(instance, (const byte*) in_blk, (byte*) out_blk, 1) -#define twofish_decrypt(instance,in_blk,out_blk) twofish_decrypt_blocks(instance, (const byte*) in_blk, (byte*) out_blk, 1) +void twofish_encrypt_blocks(TwofishInstance *instance, const uint8* in_blk, uint8* out_blk, uint32 blockCount); +void twofish_decrypt_blocks(TwofishInstance *instance, const uint8* in_blk, uint8* out_blk, uint32 blockCount); +#define twofish_encrypt(instance,in_blk,out_blk) twofish_encrypt_blocks(instance, (const uint8*) in_blk, (uint8*) out_blk, 1) +#define twofish_decrypt(instance,in_blk,out_blk) twofish_decrypt_blocks(instance, (const uint8*) in_blk, (uint8*) out_blk, 1) #else void twofish_encrypt(TwofishInstance *instance, const u4byte in_blk[4], u4byte out_blk[4]); void twofish_decrypt(TwofishInstance *instance, const u4byte in_blk[4], u4byte out_blk[4]); #endif diff --git a/src/Crypto/Whirlpool.c b/src/Crypto/Whirlpool.c index 98ba318d..140c7c6f 100644 --- a/src/Crypto/Whirlpool.c +++ b/src/Crypto/Whirlpool.c @@ -892,11 +892,11 @@ static uint64 HashMultipleBlocks(WHIRLPOOL_CTX * const ctx, const uint64 *input, do { #if BYTE_ORDER == BIG_ENDIAN WhirlpoolTransform(ctx->state, input); #else - CorrectEndianess(dataBuf, input, 64); + CorrectEndianness(dataBuf, input, 64); WhirlpoolTransform(ctx->state, dataBuf); #endif input += 8; length -= 64; } @@ -934,11 +934,11 @@ void WHIRLPOOL_add(const unsigned char * input, if (ctx->countHi < oldCountHi) return; else { uint64* dataBuf = ctx->data; - byte* data = (byte *)dataBuf; + uint8* data = (uint8 *)dataBuf; num = oldCountLo & 63; if (num != 0) // process left over data { if (num+len >= 64) @@ -955,32 +955,39 @@ void WHIRLPOOL_add(const unsigned char * input, return; } } // now process the input data in blocks of 64 bytes and save the leftovers to ctx->data - if (len >= 64) - { - if (input == data) - { - HashMultipleBlocks(ctx, dataBuf, 64); - return; - } - else if (IsAligned16(input)) - { - uint64 leftOver = HashMultipleBlocks(ctx, (uint64 *)input, len); - input += (len - leftOver); - len = leftOver; - } - else - do - { // copy input first if it's not aligned correctly - memcpy(data, input, 64); - HashMultipleBlocks(ctx, dataBuf, 64); - input+=64; - len-=64; - } while (len >= 64); - } + if (len >= 64) + { + if (input == data) + { + HashMultipleBlocks(ctx, dataBuf, 64); + return; + } + else + { +#ifndef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS + if (IsAligned16(input)) +#endif + { + uint64 leftOver = HashMultipleBlocks(ctx, (uint64*)input, len); + input += (len - leftOver); + len = leftOver; + } +#ifndef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS + else + do + { // copy input first if it's not aligned correctly + memcpy(data, input, 64); + HashMultipleBlocks(ctx, dataBuf, 64); + input += 64; + len -= 64; + } while (len >= 64); +#endif + } + } if (len && data != input) memcpy(data, input, (size_t) len); } } @@ -994,11 +1001,11 @@ void WHIRLPOOL_finalize(WHIRLPOOL_CTX * const ctx, unsigned char * result) { unsigned int num = ctx->countLo & 63; uint64* dataBuf = ctx->data; uint64* stateBuf = ctx->state; - byte* data = (byte *)dataBuf; + uint8* data = (uint8 *)dataBuf; data[num++] = 0x80; if (num <= 32) memset(data+num, 0, 32-num); else @@ -1006,19 +1013,19 @@ void WHIRLPOOL_finalize(WHIRLPOOL_CTX * const ctx, memset(data+num, 0, 64-num); HashMultipleBlocks(ctx, dataBuf, 64); memset(data, 0, 32); } #if BYTE_ORDER == LITTLE_ENDIAN - CorrectEndianess(dataBuf, dataBuf, 32); + CorrectEndianness(dataBuf, dataBuf, 32); #endif dataBuf[4] = 0; dataBuf[5] = 0; dataBuf[6] = (ctx->countLo >> (8*sizeof(uint64)-3)) + (ctx->countHi << 3); dataBuf[7] = ctx->countLo << 3; WhirlpoolTransform(stateBuf, dataBuf); #if BYTE_ORDER == LITTLE_ENDIAN - CorrectEndianess(stateBuf, stateBuf, 64); + CorrectEndianness(stateBuf, stateBuf, 64); #endif memcpy(result, stateBuf, 64); } diff --git a/src/Crypto/chacha-xmm.c b/src/Crypto/chacha-xmm.c index 478de594..980c2c81 100644 --- a/src/Crypto/chacha-xmm.c +++ b/src/Crypto/chacha-xmm.c @@ -41,11 +41,10 @@ __inline __m128i _mm_set1_epi64x(int64 a) #pragma warning(default:4799) #endif #endif #endif -#define uint8 byte #define U32V(v) (v) #define ROTL32(x,n) rotl32(x, n) #define U32TO8_LITTLE(p, v) (((uint32*)(p))[0] = (v)) #define U8TO32_LITTLE(v) *((uint32*)(v)) @@ -80,49 +79,10 @@ static void salsa20_wordtobyte(uint8 output[64],const uint32 input[16], unsigned } for (i = 0;i < 16;++i) x[i] = PLUS(x[i],input[i]); for (i = 0;i < 16;++i) U32TO8_LITTLE(output + 4 * i,x[i]); } -void chacha_ECRYPT_init(void) -{ - return; -} - -static const char sigma[17] = "expand 32-byte k"; -static const char tau[17] = "expand 16-byte k"; - -void chacha_ECRYPT_keysetup(uint32* input,const uint8 *k,uint32 kbits,uint32 ivbits) -{ - const char *constants; - - input[4] = U8TO32_LITTLE(k + 0); - input[5] = U8TO32_LITTLE(k + 4); - input[6] = U8TO32_LITTLE(k + 8); - input[7] = U8TO32_LITTLE(k + 12); - if (kbits == 256) { /* recommended */ - k += 16; - constants = sigma; - } else { /* kbits == 128 */ - constants = tau; - } - input[8] = U8TO32_LITTLE(k + 0); - input[9] = U8TO32_LITTLE(k + 4); - input[10] = U8TO32_LITTLE(k + 8); - input[11] = U8TO32_LITTLE(k + 12); - input[0] = U8TO32_LITTLE(constants + 0); - input[1] = U8TO32_LITTLE(constants + 4); - input[2] = U8TO32_LITTLE(constants + 8); - input[3] = U8TO32_LITTLE(constants + 12); -} - -void chacha_ECRYPT_ivsetup(uint32* input,const uint8 *iv) -{ - input[12] = 0; - input[13] = 0; - input[14] = U8TO32_LITTLE(iv + 0); - input[15] = U8TO32_LITTLE(iv + 4); -} void chacha_ECRYPT_encrypt_bytes(size_t bytes, uint32* x, const uint8* m, uint8* out, uint8* output, unsigned int r) { unsigned int i; diff --git a/src/Crypto/chacha256.c b/src/Crypto/chacha256.c index f32e607b..685f7886 100644 --- a/src/Crypto/chacha256.c +++ b/src/Crypto/chacha256.c @@ -18,11 +18,11 @@ and released into public domain. void chacha_ECRYPT_encrypt_bytes(size_t bytes, uint32* x, const unsigned char* m, unsigned char* out, unsigned char* output, unsigned int r); #endif static VC_INLINE void xor_block_512(const unsigned char* in, const unsigned char* prev, unsigned char* out) { -#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64))) +#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG))) if (HasSSE2()) { __m128i b1 = _mm_loadu_si128((const __m128i*) in); __m128i p1 = _mm_loadu_si128((const __m128i*) prev); __m128i b2 = _mm_loadu_si128((const __m128i*) (in + 16)); @@ -159,11 +159,11 @@ static VC_INLINE void do_encrypt(const unsigned char* in, size_t len, unsigned c len -= i; } if (len) pos = 0; -#if CRYPTOPP_SSSE3_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64))) +#if CRYPTOPP_SSSE3_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG))) if (HasSSSE3()) { size_t fullblocks = len - len % 64; if (fullblocks) { diff --git a/src/Crypto/config.h b/src/Crypto/config.h index 867c13dd..841d6ead 100644 --- a/src/Crypto/config.h +++ b/src/Crypto/config.h @@ -27,10 +27,15 @@ #elif defined(__clang__ ) && defined(__apple_build_version__) && !defined(_DCSPKG_ANALYZE) #define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #define CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER 1 #endif +#if defined(_MSC_VER) && !defined(__clang__) +# undef CRYPTOPP_LLVM_CLANG_VERSION +# define CRYPTOPP_MSC_VERSION (_MSC_VER) +#endif + // Clang due to "Inline assembly operands don't work with .intel_syntax", http://llvm.org/bugs/show_bug.cgi?id=24232 // TODO: supply the upper version when LLVM fixes it. We set it to 20.0 for compilation purposes. #if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && CRYPTOPP_LLVM_CLANG_VERSION <= 200000) || (defined(CRYPTOPP_APPLE_CLANG_VERSION) && CRYPTOPP_APPLE_CLANG_VERSION <= 200000) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER) #define CRYPTOPP_DISABLE_INTEL_ASM 1 #endif @@ -49,11 +54,11 @@ #if defined(_MSC_VER) && (_MSC_VER > 1200) #define CRYPTOPP_MSVC6PP_OR_LATER #endif #ifndef CRYPTOPP_ALIGN_DATA - #if defined(_MSC_VER) + #if defined(_MSC_VER) && !defined(TC_WINDOWS_BOOT) #define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x)) #elif defined(__GNUC__) #define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x))) #else #define CRYPTOPP_ALIGN_DATA(x) @@ -190,10 +195,68 @@ #define CRYPTOPP_BOOL_X64 1 #else #define CRYPTOPP_BOOL_X64 0 #endif +#if !defined(CRYPTOPP_DISABLE_SHANI) && \ + (CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X64) && \ + defined(CRYPTOPP_BOOL_SSE41_INTRINSICS_AVAILABLE) && \ + (defined(__SHA__) || (_MSC_VER >= 1900) || (__SUNPRO_CC >= 0x5160) || \ + (CRYPTOPP_GCC_VERSION >= 40900) || (__INTEL_COMPILER >= 1600) || \ + (CRYPTOPP_LLVM_CLANG_VERSION >= 30400) || (CRYPTOPP_APPLE_CLANG_VERSION >= 50100)) + #define CRYPTOPP_SHANI_AVAILABLE 1 +#else + #define CRYPTOPP_SHANI_AVAILABLE 0 +#endif + +#if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) + #define CRYPTOPP_BOOL_ARMV8 1 + #define CRYPTOPP_BOOL_ARM64 1 +#else + #define CRYPTOPP_BOOL_ARMV8 0 + #define CRYPTOPP_BOOL_ARM64 0 +#endif + +// ARMv8 and ASIMD. -march=armv8-a or above must be present +// Requires GCC 4.8, Clang 3.3 or Visual Studio 2017 +// Do not use APPLE_CLANG_VERSION; use __ARM_FEATURE_XXX instead. +#if !defined(CRYPTOPP_ARM_ASIMD_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ARM_ASIMD) +# if defined(__aarch32__) || defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) +# if defined(__ARM_NEON) || defined(__ARM_ASIMD) || defined(__ARM_FEATURE_NEON) || defined(__ARM_FEATURE_ASIMD) || \ + (CRYPTOPP_GCC_VERSION >= 40800) || (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || \ + (CRYPTOPP_APPLE_CLANG_VERSION >= 40000) || (CRYPTOPP_MSC_VERSION >= 1916) +# define CRYPTOPP_ARM_NEON_AVAILABLE 1 +# define CRYPTOPP_ARM_ASIMD_AVAILABLE 1 +# endif // Compilers +# endif // Platforms +#endif + +// ARMv8 and AES. -march=armv8-a+crypto or above must be present +// Requires GCC 4.8, Clang 3.3 or Visual Studio 2017 +#if !defined(CRYPTOPP_ARM_AES_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ARM_AES) +# if defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM64) +# if defined(__ARM_FEATURE_CRYPTO) || (CRYPTOPP_GCC_VERSION >= 40800) || \ + (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || (CRYPTOPP_APPLE_CLANG_VERSION >= 40300) || \ + (CRYPTOPP_MSC_VERSION >= 1916) +# define CRYPTOPP_ARM_AES_AVAILABLE 1 +# endif // Compilers +# endif // Platforms +#endif + +// ARMv8 and SHA-1, SHA-256. -march=armv8-a+crypto or above must be present +// Requires GCC 4.8, Clang 3.3 or Visual Studio 2017 +#if !defined(CRYPTOPP_ARM_SHA_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ARM_SHA) +# if defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM64) +# if defined(__ARM_FEATURE_CRYPTO) || (CRYPTOPP_GCC_VERSION >= 40800) || \ + (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || (CRYPTOPP_APPLE_CLANG_VERSION >= 40300) || \ + (CRYPTOPP_MSC_VERSION >= 1916) +# define CRYPTOPP_ARM_SHA1_AVAILABLE 1 +# define CRYPTOPP_ARM_SHA2_AVAILABLE 1 +# endif // Compilers +# endif // Platforms +#endif + // Undo the ASM and Intrinsic related defines due to X32. #if CRYPTOPP_BOOL_X32 # undef CRYPTOPP_BOOL_X64 # undef CRYPTOPP_X64_ASM_AVAILABLE # undef CRYPTOPP_X64_MASM_AVAILABLE @@ -207,10 +270,10 @@ // this version of the macro is fastest on Pentium 3 and Pentium 4 with MSVC 6 SP5 w/ Processor Pack #define GETBYTE(x, y) (unsigned int)((unsigned char)((x)>>(8*(y)))) // these may be faster on other CPUs/compilers // #define GETBYTE(x, y) (unsigned int)(((x)>>(8*(y)))&255) -// #define GETBYTE(x, y) (((byte *)&(x))[y]) +// #define GETBYTE(x, y) (((uint8 *)&(x))[y]) -#define CRYPTOPP_GET_BYTE_AS_BYTE(x, y) ((byte)((x)>>(8*(y)))) +#define CRYPTOPP_GET_BYTE_AS_BYTE(x, y) ((uint8)((x)>>(8*(y)))) #endif diff --git a/src/Crypto/cpu.c b/src/Crypto/cpu.c index effde6ba..a5b5bb19 100644 --- a/src/Crypto/cpu.c +++ b/src/Crypto/cpu.c @@ -15,10 +15,14 @@ #include <setjmp.h> #endif #ifdef CRYPTOPP_CPUID_AVAILABLE +#if defined(__GNUC__) || defined(__clang__) + #include <cpuid.h> // for __get_cpuid and __get_cpuid_count +#endif + #if _MSC_VER >= 1400 && CRYPTOPP_BOOL_X64 int CpuId(uint32 input, uint32 output[4]) { __cpuid((int *)output, input); @@ -134,15 +138,10 @@ static int TrySSE2() { #if CRYPTOPP_BOOL_X64 return 1; #elif defined(CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY) && !defined(_UEFI) volatile int result = 1; -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; - if (NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState))) - { -#endif __try { #if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE AS2(por xmm0, xmm0) // executing SSE2 instruction #elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE @@ -152,16 +151,10 @@ static int TrySSE2() } __except (EXCEPTION_EXECUTE_HANDLER) { result = 0; } -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); - } - else - return 0; -#endif return result; #elif !defined(_UEFI) // longjmp and clobber warnings. Volatile is required. // http://github.com/weidai11/cryptopp/issues/24 // http://stackoverflow.com/q/7721854 @@ -205,10 +198,11 @@ static uint64 xgetbv() volatile int g_x86DetectionDone = 0; volatile int g_hasISSE = 0, g_hasSSE2 = 0, g_hasSSSE3 = 0, g_hasMMX = 0, g_hasAESNI = 0, g_hasCLMUL = 0, g_isP4 = 0; volatile int g_hasAVX = 0, g_hasAVX2 = 0, g_hasBMI2 = 0, g_hasSSE42 = 0, g_hasSSE41 = 0, g_isIntel = 0, g_isAMD = 0; volatile int g_hasRDRAND = 0, g_hasRDSEED = 0; +volatile int g_hasSHA256 = 0; volatile uint32 g_cacheLineSize = CRYPTOPP_L1_CACHE_LINE_SIZE; VC_INLINE int IsIntel(const uint32 output[4]) { // This is the "GenuineIntel" string @@ -286,28 +280,51 @@ static int Detect_MS_HyperV_AES () CpuId(0x40000000, cpuid); memcpy (HvProductName, &cpuid[1], 12); HvProductName[12] = 0; if (_stricmp(HvProductName, "Microsoft Hv") == 0) { -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KFLOATING_SAVE floatingPointState; - if (NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState))) - { -#endif hasAesNI = TryAESNI (); - -#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64) - KeRestoreFloatingPointState (&floatingPointState); - } -#endif } return hasAesNI; } #endif +#if defined(__SHA__) || defined(__INTEL_COMPILER) || CRYPTOPP_SHANI_AVAILABLE +extern int TrySHA256(); +#endif + +static BOOL CheckSHA256Support() { +#if CRYPTOPP_BOOL_X64 && CRYPTOPP_SHANI_AVAILABLE +#if defined(_MSC_VER) // Windows with MSVC + int cpuInfo[4] = { 0 }; + __cpuidex(cpuInfo, 7, 0); + return (cpuInfo[1] & (1 << 29)) != 0? TRUE : FALSE; + +#elif defined(__GNUC__) || defined(__clang__) // Linux, FreeBSD, macOS with GCC/Clang + unsigned int eax = 0, ebx = 0, ecx = 0, edx = 0; + // First check if CPUID leaf 7 is supported + if (__get_cpuid(0, &eax, &ebx, &ecx, &edx)) { + if (eax >= 7) { + // Now check SHA-256 support in leaf 7, sub-leaf 0 + if (__get_cpuid_count(7, 0, &eax, &ebx, &ecx, &edx)) { + return (ebx & (1 << 29)) != 0? TRUE : FALSE; + } + } + } + return FALSE; + +#else + #error "Unsupported compiler" +#endif +#else + return FALSE; +#endif +} + + void DetectX86Features() { uint32 cpuid[4] = {0}, cpuid1[4] = {0}, cpuid2[4] = {0}; if (!CpuId(0, cpuid)) return; @@ -332,20 +349,28 @@ void DetectX86Features() g_hasSSSE3 = g_hasSSE2 && (cpuid1[2] & (1<<9)); #ifndef CRYPTOPP_DISABLE_AESNI g_hasAESNI = g_hasSSE2 && (cpuid1[2] & (1<<25)); #endif g_hasCLMUL = g_hasSSE2 && (cpuid1[2] & (1<<1)); + g_hasSHA256 = CheckSHA256Support(); #if !defined (_UEFI) && ((defined(__AES__) && defined(__PCLMUL__)) || defined(__INTEL_COMPILER) || CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE) // Hypervisor = bit 31 of ECX of CPUID leaf 0x1 // reference: http://artemonsecurity.com/vmde.pdf if (!g_hasAESNI && (cpuid1[2] & (1<<31))) { g_hasAESNI = Detect_MS_HyperV_AES (); } #endif +#if defined(__SHA__) || defined(__INTEL_COMPILER) || CRYPTOPP_SHANI_AVAILABLE + if (!g_hasSHA256) + { + g_hasSHA256 = TrySHA256(); + } +#endif + if ((cpuid1[3] & (1 << 25)) != 0) g_hasISSE = 1; else { CpuId(0x080000000, cpuid2); @@ -437,9 +462,79 @@ void DisableCPUExtendedFeatures () g_hasSSE42 = 0; g_hasSSE41 = 0; g_hasSSSE3 = 0; g_hasAESNI = 0; g_hasCLMUL = 0; + g_hasSHA256 = 0; +} + +#endif + +#if CRYPTOPP_BOOL_ARMV8 +#if defined(__linux__) && defined(__aarch64__) +#include <sys/auxv.h> +#ifndef HWCAP_AES +# define HWCAP_AES (1 << 3) +#endif +#ifndef HWCAP_SHA2 +# define HWCAP_SHA2 (1 << 6) +#endif +#endif + +volatile int g_hasAESARM = 0; +volatile int g_hasSHA256ARM = 0; + +inline int CPU_QueryAES() +{ +#if defined(CRYPTOPP_ARM_AES_AVAILABLE) +#if defined(__linux__) && defined(__aarch64__) + if ((getauxval(AT_HWCAP) & HWCAP_AES) != 0) + return 1; +#elif defined(__APPLE__) && defined(__aarch64__) + // Apple Sillcon (M1) and later + return 1; +#elif defined(_WIN32) && defined(_M_ARM64) +#ifdef TC_WINDOWS_DRIVER + if (ExIsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0) + return 1; +#else + if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0) + return 1; +#endif +#endif + return 0; +#else + return 0; +#endif } +inline int CPU_QuerySHA2() +{ +#if defined(CRYPTOPP_ARM_SHA2_AVAILABLE) +#if defined(__linux__) && defined(__aarch64__) + if ((getauxval(AT_HWCAP) & HWCAP_SHA2) != 0) + return 1; +#elif defined(__APPLE__) && defined(__aarch64__) + // Apple Sillcon (M1) and later + return 1; +#elif defined(_WIN32) && defined(_M_ARM64) +#ifdef TC_WINDOWS_DRIVER + if (ExIsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0) + return 1; +#else + if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0) + return 1; +#endif +#endif + return 0; +#else + return 0; #endif +} + +void DetectArmFeatures() +{ + g_hasAESARM = CPU_QueryAES(); + g_hasSHA256ARM = CPU_QuerySHA2(); +} +#endif
\ No newline at end of file diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h index a9806b92..cb34ad1f 100644 --- a/src/Crypto/cpu.h +++ b/src/Crypto/cpu.h @@ -205,18 +205,34 @@ extern __m128i _mm_aesdeclast_si128(__m128i v, __m128i rkey); #else #include <wmmintrin.h> #endif #endif +#if CRYPTOPP_SHANI_AVAILABLE +#if defined(TC_WINDOWS_DRIVER) || defined (_UEFI) +#if defined(__cplusplus) +extern "C" { +#endif +extern __m128i __cdecl _mm_sha256msg1_epu32(__m128i, __m128i); +extern __m128i __cdecl _mm_sha256msg2_epu32(__m128i, __m128i); +extern __m128i __cdecl _mm_sha256rnds2_epu32(__m128i, __m128i, __m128i); +#if defined(__cplusplus) +} +#endif +#else +#include <immintrin.h> +#endif +#endif + #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 #if defined(__cplusplus) extern "C" { #endif #define CRYPTOPP_CPUID_AVAILABLE -#ifndef CRYPTOPP_DISABLE_AESNI +#if !defined(CRYPTOPP_DISABLE_AESNI) && !defined(WOLFCRYPT_BACKEND) #define TC_AES_HW_CPU #endif // these should not be used directly extern volatile int g_x86DetectionDone; @@ -232,10 +248,11 @@ extern volatile int g_hasSSSE3; extern volatile int g_hasAESNI; extern volatile int g_hasCLMUL; extern volatile int g_isP4; extern volatile int g_hasRDRAND; extern volatile int g_hasRDSEED; +extern volatile int g_hasSHA256; extern volatile int g_isIntel; extern volatile int g_isAMD; extern volatile uint32 g_cacheLineSize; void DetectX86Features(); // must be called at the start of the program/driver int CpuId(uint32 input, uint32 output[4]); @@ -260,18 +277,39 @@ void DisableCPUExtendedFeatures (); #define HasAESNI() g_hasAESNI #define HasCLMUL() g_hasCLMUL #define IsP4() g_isP4 #define HasRDRAND() g_hasRDRAND #define HasRDSEED() g_hasRDSEED +#define HasSHA256() g_hasSHA256 #define IsCpuIntel() g_isIntel #define IsCpuAMD() g_isAMD #define GetCacheLineSize() g_cacheLineSize #if defined(__cplusplus) } #endif +#elif CRYPTOPP_BOOL_ARMV8 +#if defined(__cplusplus) +extern "C" { +#endif + +#if !defined(CRYPTOPP_DISABLE_AESNI) && !defined(WOLFCRYPT_BACKEND) +#define TC_AES_HW_CPU +#endif + +extern volatile int g_hasAESARM; +extern volatile int g_hasSHA256ARM; +void DetectArmFeatures(); + +#define HasAESNI() g_hasAESARM +#define HasSHA256() g_hasSHA256ARM + +#if defined(__cplusplus) +} +#endif + #else #define HasSSE2() 0 #define HasISSE() 0 diff --git a/src/Crypto/kuznyechik.c b/src/Crypto/kuznyechik.c index 65685d09..1ba38abe 100644 --- a/src/Crypto/kuznyechik.c +++ b/src/Crypto/kuznyechik.c @@ -10,31 +10,31 @@ and released into public domain. #ifdef _MSC_VER #define inline __forceinline #endif #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE -void kuznyechik_set_key_simd(const byte* key, kuznyechik_kds *kds); -void kuznyechik_encrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds); -void kuznyechik_encrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds); -void kuznyechik_decrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds); -void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds); +void kuznyechik_set_key_simd(const uint8* key, kuznyechik_kds *kds); +void kuznyechik_encrypt_block_simd(uint8* out, const uint8* in, kuznyechik_kds* kds); +void kuznyechik_encrypt_blocks_simd(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds); +void kuznyechik_decrypt_block_simd(uint8* out, const uint8* in, kuznyechik_kds* kds); +void kuznyechik_decrypt_blocks_simd(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds); #endif //#define CPPCRYPTO_DEBUG - static const byte S[256] = { + static const uint8 S[256] = { 252, 238, 221, 17, 207, 110, 49, 22, 251, 196, 250, 218, 35, 197, 4, 77, 233, 119, 240, 219, 147, 46, 153, 186, 23, 54, 241, 187, 20, 205, 95, 193, 249, 24, 101, 90, 226, 92, 239, 33, 129, 28, 60, 66, 139, 1, 142, 79, 5, 132, 2, 174, 227, 106, 143, 160, 6, 11, 237, 152, 127, 212, 211, 31, 235, 52, 44, 81, 234, 200, 72, 171, 242, 42, 104, 162, 253, 58, 206, 204, 181, 112, 14, 86, 8, 12, 118, 18, 191, 114, 19, 71, 156, 183, 93, 135, 21, 161, 150, 41, 16, 123, 154, 199, 243, 145, 120, 111, 157, 158, 178, 177, 50, 117, 25, 61, 255, 53, 138, 126, 109, 84, 198, 128, 195, 189, 13, 87, 223, 245, 36, 169, 62, 168, 67, 201, 215, 121, 214, 246, 124, 34, 185, 3, 224, 15, 236, 222, 122, 148, 176, 188, 220, 232, 40, 80, 78, 51, 10, 74, 167, 151, 96, 115, 30, 0, 98, 68, 26, 184, 56, 130, 100, 159, 38, 65, 173, 69, 70, 146, 39, 94, 85, 47, 140, 163, 165, 125, 105, 213, 149, 59, 7, 88, 179, 64, 134, 172, 29, 247, 48, 55, 107, 228, 136, 217, 231, 137, 225, 27, 131, 73, 76, 63, 248, 254, 141, 83, 170, 144, 202, 216, 133, 97, 32, 113, 103, 164, 45, 43, 9, 91, 203, 155, 37, 208, 190, 229, 108, 82, 89, 166, 116, 210, 230, 244, 180, 192, 209, 102, 175, 194, 57, 75, 99, 182 }; - static const byte IS[256] = { + static const uint8 IS[256] = { 165, 45, 50, 143, 14, 48, 56, 192, 84, 230, 158, 57, 85, 126, 82, 145, 100, 3, 87, 90, 28, 96, 7, 24, 33, 114, 168, 209, 41, 198, 164, 63, 224, 39, 141, 12, 130, 234, 174, 180, 154, 99, 73, 229, 66, 228, 21, 183, 200, 6, 112, 157, 65, 117, 25, 201, 170, 252, 77, 191, 42, 115, 132, 213, 195, 175, 43, 134, 167, 177, 178, 91, 70, 211, 159, 253, 212, 15, 156, 47, 155, 67, 239, 217, 121, 182, 83, 127, 193, 240, 35, 231, 37, 94, 181, 30, 162, 223, 166, 254, 172, 34, 249, 226, 74, 188, 53, 202, 238, 120, 5, 107, 81, 225, 89, 163, 242, 113, 86, 17, 106, 137, 148, 101, 140, 187, 119, 60, 123, 40, 171, 210, 49, 222, 196, 95, 204, 207, 118, 44, 184, 216, 46, 54, 219, 105, 179, 20, 149, 190, 98, 161, 59, 22, 102, 233, 92, 108, 109, 173, @@ -2142,34 +2142,34 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku {LL(0xe0804785482c49b7), LL(0x19eab9b4539de969)}, {LL(0xeb0e9f31deb66c05), LL(0x1a95f6106399808e)}, {LL(0x5374d75dacc0ce6b), LL(0x1b0172cd7324a7d3)}, {LL(0xfdd1ec9a314126a2), LL(0x1c6b689b03915283)}, {LL(0x45aba4f6433784cc), LL(0x1dffec46132c75de)}, {LL(0x4e257c42d5ada17e), LL(0x1e80a3e223281c39)}, {LL(0xf65f342ea7db0310), LL(0x1f14273f33953b64)}, {LL(0x619b141e58d8a75e), LL(0x20a8ed9c45c16af1)} }; #define LS(x1,x2,t1,t2) { \ - t1 = T[0][(byte)(x1)][0] ^ T[1][(byte)(x1 >> 8)][0] ^ T[2][(byte)(x1 >> 16)][0] ^ T[3][(byte)(x1 >> 24)][0] ^ T[4][(byte)(x1 >> 32)][0] ^ T[5][(byte)(x1 >> 40)][0] ^ \ - T[6][(byte)(x1 >> 48)][0] ^ T[7][(byte)(x1 >> 56)][0] ^ T[8][(byte)(x2)][0] ^ T[9][(byte)(x2 >> 8)][0] ^ T[10][(byte)(x2 >> 16)][0] ^ T[11][(byte)(x2 >> 24)][0] ^ \ - T[12][(byte)(x2 >> 32)][0] ^ T[13][(byte)(x2 >> 40)][0] ^ T[14][(byte)(x2 >> 48)][0] ^ T[15][(byte)(x2 >> 56)][0]; \ - t2 = T[0][(byte)(x1)][1] ^ T[1][(byte)(x1 >> 8)][1] ^ T[2][(byte)(x1 >> 16)][1] ^ T[3][(byte)(x1 >> 24)][1] ^ T[4][(byte)(x1 >> 32)][1] ^ T[5][(byte)(x1 >> 40)][1] ^ \ - T[6][(byte)(x1 >> 48)][1] ^ T[7][(byte)(x1 >> 56)][1] ^ T[8][(byte)(x2)][1] ^ T[9][(byte)(x2 >> 8)][1] ^ T[10][(byte)(x2 >> 16)][1] ^ T[11][(byte)(x2 >> 24)][1] ^ \ - T[12][(byte)(x2 >> 32)][1] ^ T[13][(byte)(x2 >> 40)][1] ^ T[14][(byte)(x2 >> 48)][1] ^ T[15][(byte)(x2 >> 56)][1]; \ + t1 = T[0][(uint8)(x1)][0] ^ T[1][(uint8)(x1 >> 8)][0] ^ T[2][(uint8)(x1 >> 16)][0] ^ T[3][(uint8)(x1 >> 24)][0] ^ T[4][(uint8)(x1 >> 32)][0] ^ T[5][(uint8)(x1 >> 40)][0] ^ \ + T[6][(uint8)(x1 >> 48)][0] ^ T[7][(uint8)(x1 >> 56)][0] ^ T[8][(uint8)(x2)][0] ^ T[9][(uint8)(x2 >> 8)][0] ^ T[10][(uint8)(x2 >> 16)][0] ^ T[11][(uint8)(x2 >> 24)][0] ^ \ + T[12][(uint8)(x2 >> 32)][0] ^ T[13][(uint8)(x2 >> 40)][0] ^ T[14][(uint8)(x2 >> 48)][0] ^ T[15][(uint8)(x2 >> 56)][0]; \ + t2 = T[0][(uint8)(x1)][1] ^ T[1][(uint8)(x1 >> 8)][1] ^ T[2][(uint8)(x1 >> 16)][1] ^ T[3][(uint8)(x1 >> 24)][1] ^ T[4][(uint8)(x1 >> 32)][1] ^ T[5][(uint8)(x1 >> 40)][1] ^ \ + T[6][(uint8)(x1 >> 48)][1] ^ T[7][(uint8)(x1 >> 56)][1] ^ T[8][(uint8)(x2)][1] ^ T[9][(uint8)(x2 >> 8)][1] ^ T[10][(uint8)(x2 >> 16)][1] ^ T[11][(uint8)(x2 >> 24)][1] ^ \ + T[12][(uint8)(x2 >> 32)][1] ^ T[13][(uint8)(x2 >> 40)][1] ^ T[14][(uint8)(x2 >> 48)][1] ^ T[15][(uint8)(x2 >> 56)][1]; \ } #define ILS(x1,x2,t1,t2) { \ - t1 = IT[0][(byte)(x1)][0] ^ IT[1][(byte)(x1 >> 8)][0] ^ IT[2][(byte)(x1 >> 16)][0] ^ IT[3][(byte)(x1 >> 24)][0] ^ IT[4][(byte)(x1 >> 32)][0] ^ IT[5][(byte)(x1 >> 40)][0] ^ \ - IT[6][(byte)(x1 >> 48)][0] ^ IT[7][(byte)(x1 >> 56)][0] ^ IT[8][(byte)(x2)][0] ^ IT[9][(byte)(x2 >> 8)][0] ^ IT[10][(byte)(x2 >> 16)][0] ^ IT[11][(byte)(x2 >> 24)][0] ^ \ - IT[12][(byte)(x2 >> 32)][0] ^ IT[13][(byte)(x2 >> 40)][0] ^ IT[14][(byte)(x2 >> 48)][0] ^ IT[15][(byte)(x2 >> 56)][0]; \ - t2 = IT[0][(byte)(x1)][1] ^ IT[1][(byte)(x1 >> 8)][1] ^ IT[2][(byte)(x1 >> 16)][1] ^ IT[3][(byte)(x1 >> 24)][1] ^ IT[4][(byte)(x1 >> 32)][1] ^ IT[5][(byte)(x1 >> 40)][1] ^ \ - IT[6][(byte)(x1 >> 48)][1] ^ IT[7][(byte)(x1 >> 56)][1] ^ IT[8][(byte)(x2)][1] ^ IT[9][(byte)(x2 >> 8)][1] ^ IT[10][(byte)(x2 >> 16)][1] ^ IT[11][(byte)(x2 >> 24)][1] ^ \ - IT[12][(byte)(x2 >> 32)][1] ^ IT[13][(byte)(x2 >> 40)][1] ^ IT[14][(byte)(x2 >> 48)][1] ^ IT[15][(byte)(x2 >> 56)][1]; \ + t1 = IT[0][(uint8)(x1)][0] ^ IT[1][(uint8)(x1 >> 8)][0] ^ IT[2][(uint8)(x1 >> 16)][0] ^ IT[3][(uint8)(x1 >> 24)][0] ^ IT[4][(uint8)(x1 >> 32)][0] ^ IT[5][(uint8)(x1 >> 40)][0] ^ \ + IT[6][(uint8)(x1 >> 48)][0] ^ IT[7][(uint8)(x1 >> 56)][0] ^ IT[8][(uint8)(x2)][0] ^ IT[9][(uint8)(x2 >> 8)][0] ^ IT[10][(uint8)(x2 >> 16)][0] ^ IT[11][(uint8)(x2 >> 24)][0] ^ \ + IT[12][(uint8)(x2 >> 32)][0] ^ IT[13][(uint8)(x2 >> 40)][0] ^ IT[14][(uint8)(x2 >> 48)][0] ^ IT[15][(uint8)(x2 >> 56)][0]; \ + t2 = IT[0][(uint8)(x1)][1] ^ IT[1][(uint8)(x1 >> 8)][1] ^ IT[2][(uint8)(x1 >> 16)][1] ^ IT[3][(uint8)(x1 >> 24)][1] ^ IT[4][(uint8)(x1 >> 32)][1] ^ IT[5][(uint8)(x1 >> 40)][1] ^ \ + IT[6][(uint8)(x1 >> 48)][1] ^ IT[7][(uint8)(x1 >> 56)][1] ^ IT[8][(uint8)(x2)][1] ^ IT[9][(uint8)(x2 >> 8)][1] ^ IT[10][(uint8)(x2 >> 16)][1] ^ IT[11][(uint8)(x2 >> 24)][1] ^ \ + IT[12][(uint8)(x2 >> 32)][1] ^ IT[13][(uint8)(x2 >> 40)][1] ^ IT[14][(uint8)(x2 >> 48)][1] ^ IT[15][(uint8)(x2 >> 56)][1]; \ } #define ILSS(x1,x2,t1,t2) { \ - t1 = IT[0][S[(byte)(x1)]][0] ^ IT[1][S[(byte)(x1 >> 8)]][0] ^ IT[2][S[(byte)(x1 >> 16)]][0] ^ IT[3][S[(byte)(x1 >> 24)]][0] ^ IT[4][S[(byte)(x1 >> 32)]][0] ^ IT[5][S[(byte)(x1 >> 40)]][0] ^ \ - IT[6][S[(byte)(x1 >> 48)]][0] ^ IT[7][S[(byte)(x1 >> 56)]][0] ^ IT[8][S[(byte)(x2)]][0] ^ IT[9][S[(byte)(x2 >> 8)]][0] ^ IT[10][S[(byte)(x2 >> 16)]][0] ^ IT[11][S[(byte)(x2 >> 24)]][0] ^ \ - IT[12][S[(byte)(x2 >> 32)]][0] ^ IT[13][S[(byte)(x2 >> 40)]][0] ^ IT[14][S[(byte)(x2 >> 48)]][0] ^ IT[15][S[(byte)(x2 >> 56)]][0]; \ - t2 = IT[0][S[(byte)(x1)]][1] ^ IT[1][S[(byte)(x1 >> 8)]][1] ^ IT[2][S[(byte)(x1 >> 16)]][1] ^ IT[3][S[(byte)(x1 >> 24)]][1] ^ IT[4][S[(byte)(x1 >> 32)]][1] ^ IT[5][S[(byte)(x1 >> 40)]][1] ^ \ - IT[6][S[(byte)(x1 >> 48)]][1] ^ IT[7][S[(byte)(x1 >> 56)]][1] ^ IT[8][S[(byte)(x2)]][1] ^ IT[9][S[(byte)(x2 >> 8)]][1] ^ IT[10][S[(byte)(x2 >> 16)]][1] ^ IT[11][S[(byte)(x2 >> 24)]][1] ^ \ - IT[12][S[(byte)(x2 >> 32)]][1] ^ IT[13][S[(byte)(x2 >> 40)]][1] ^ IT[14][S[(byte)(x2 >> 48)]][1] ^ IT[15][S[(byte)(x2 >> 56)]][1]; \ + t1 = IT[0][S[(uint8)(x1)]][0] ^ IT[1][S[(uint8)(x1 >> 8)]][0] ^ IT[2][S[(uint8)(x1 >> 16)]][0] ^ IT[3][S[(uint8)(x1 >> 24)]][0] ^ IT[4][S[(uint8)(x1 >> 32)]][0] ^ IT[5][S[(uint8)(x1 >> 40)]][0] ^ \ + IT[6][S[(uint8)(x1 >> 48)]][0] ^ IT[7][S[(uint8)(x1 >> 56)]][0] ^ IT[8][S[(uint8)(x2)]][0] ^ IT[9][S[(uint8)(x2 >> 8)]][0] ^ IT[10][S[(uint8)(x2 >> 16)]][0] ^ IT[11][S[(uint8)(x2 >> 24)]][0] ^ \ + IT[12][S[(uint8)(x2 >> 32)]][0] ^ IT[13][S[(uint8)(x2 >> 40)]][0] ^ IT[14][S[(uint8)(x2 >> 48)]][0] ^ IT[15][S[(uint8)(x2 >> 56)]][0]; \ + t2 = IT[0][S[(uint8)(x1)]][1] ^ IT[1][S[(uint8)(x1 >> 8)]][1] ^ IT[2][S[(uint8)(x1 >> 16)]][1] ^ IT[3][S[(uint8)(x1 >> 24)]][1] ^ IT[4][S[(uint8)(x1 >> 32)]][1] ^ IT[5][S[(uint8)(x1 >> 40)]][1] ^ \ + IT[6][S[(uint8)(x1 >> 48)]][1] ^ IT[7][S[(uint8)(x1 >> 56)]][1] ^ IT[8][S[(uint8)(x2)]][1] ^ IT[9][S[(uint8)(x2 >> 8)]][1] ^ IT[10][S[(uint8)(x2 >> 16)]][1] ^ IT[11][S[(uint8)(x2 >> 24)]][1] ^ \ + IT[12][S[(uint8)(x2 >> 32)]][1] ^ IT[13][S[(uint8)(x2 >> 40)]][1] ^ IT[14][S[(uint8)(x2 >> 48)]][1] ^ IT[15][S[(uint8)(x2 >> 56)]][1]; \ } #define ISI(val) { \ (val)[0] = IS[(val)[0]]; \ (val)[1] = IS[(val)[1]]; \ @@ -2197,13 +2197,13 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku F(k00, k01, k10, k11, i + ist, t00, t01, t10, t11); \ F(t00, t01, t10, t11, i + 1 + ist, k00, k01, k10, k11); \ } \ } - void kuznyechik_set_key(const byte* key, kuznyechik_kds* kds) + void kuznyechik_set_key(const uint8* key, kuznyechik_kds* kds) { -#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64))) +#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG))) if(HasSSE2()) { kuznyechik_set_key_simd (key, kds); } else @@ -2256,13 +2256,13 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku printf("key[%d]: { 0x%016I64X, 0x%016I64X }\n", i, kds->rke[2*i], kds->rke[2*i+1]); #endif } - void kuznyechik_encrypt_block(byte* out, const byte* in, kuznyechik_kds* kds) + void kuznyechik_encrypt_block(uint8* out, const uint8* in, kuznyechik_kds* kds) { -#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64))) +#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG))) if(HasSSE2()) { kuznyechik_encrypt_block_simd (out, in, kds); } else @@ -2303,11 +2303,11 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku *(uint64*)out = t1; *(((uint64*)out) + 1) = t2; } } - void kuznyechik_encrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds) + void kuznyechik_encrypt_blocks(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds) { #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (DEBUG) || !defined (TC_WINDOWS_DRIVER)) if(HasSSE2()) { kuznyechik_encrypt_blocks_simd (out, in, blocks, kds); @@ -2323,13 +2323,13 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku blocks--; } } } - void kuznyechik_decrypt_block(byte* out, const byte* in, kuznyechik_kds* kds) + void kuznyechik_decrypt_block(uint8* out, const uint8* in, kuznyechik_kds* kds) { -#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64))) +#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG))) if(HasSSE2()) { kuznyechik_decrypt_block_simd (out, in, kds); } else @@ -2364,20 +2364,20 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku x1 ^= kds->rkd[4]; x2 ^= kds->rkd[5]; ILS(x1, x2, t1, t2); t1 ^= kds->rkd[2]; t2 ^= kds->rkd[3]; - ISI((byte*)&t1); - ISI((byte*)&t2); + ISI((uint8*)&t1); + ISI((uint8*)&t2); t1 ^= kds->rkd[0]; t2 ^= kds->rkd[1]; *(uint64*)out = t1; *(((uint64*)out) + 1) = t2; } } - void kuznyechik_decrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds) + void kuznyechik_decrypt_blocks(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds) { #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (DEBUG) || !defined (TC_WINDOWS_DRIVER)) if(HasSSE2()) { kuznyechik_decrypt_blocks_simd (out, in, blocks, kds); diff --git a/src/Crypto/kuznyechik.h b/src/Crypto/kuznyechik.h index f0b45b64..05dc6e0e 100644 --- a/src/Crypto/kuznyechik.h +++ b/src/Crypto/kuznyechik.h @@ -20,15 +20,15 @@ typedef struct _kuznyechik_kds uint64 rkd[20]; } kuznyechik_kds; #define KUZNYECHIK_KS (sizeof(kuznyechik_kds)) -void kuznyechik_encrypt_block(byte* out, const byte* in, kuznyechik_kds* kds); -void kuznyechik_encrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds); -void kuznyechik_decrypt_block(byte* out, const byte* in, kuznyechik_kds* kds); -void kuznyechik_decrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds); -void kuznyechik_set_key(const byte* key, kuznyechik_kds *kds); +void kuznyechik_encrypt_block(uint8* out, const uint8* in, kuznyechik_kds* kds); +void kuznyechik_encrypt_blocks(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds); +void kuznyechik_decrypt_block(uint8* out, const uint8* in, kuznyechik_kds* kds); +void kuznyechik_decrypt_blocks(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds); +void kuznyechik_set_key(const uint8* key, kuznyechik_kds *kds); #ifdef __cplusplus } #endif diff --git a/src/Crypto/kuznyechik_simd.c b/src/Crypto/kuznyechik_simd.c index 1c505db1..a7391908 100644 --- a/src/Crypto/kuznyechik_simd.c +++ b/src/Crypto/kuznyechik_simd.c @@ -9167,11 +9167,11 @@ VC_INLINE void scheduleDecryptionRoundKeysForGost15( data3_ = _mm_xor_si128(data3_, temporary11_); \ data4_ = _mm_xor_si128(data4_, temporary11_); \ applyLSTransformation_4(data1_, data2_, data3_,data4_); \ } -void kuznyechik_encrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds) +void kuznyechik_encrypt_block_simd(uint8* out, const uint8* in, kuznyechik_kds* kds) { const uint_64t *roundKeys_ = (const uint_64t *) kds->rke; __m128i data_; __m128i temporary1_, temporary2_; __m128i addresses1_, addresses2_; @@ -9198,11 +9198,11 @@ void kuznyechik_encrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kd temporary1_ = _mm_loadu_si128((const __m128i *) &roundKeys_[2 * round_]); data_ = _mm_xor_si128(data_, temporary1_); _mm_storeu_si128((__m128i*) out, data_); } -void kuznyechik_encrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds) +void kuznyechik_encrypt_blocks_simd(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds) { const uint_64t *roundKeys_ = (const uint_64t *) kds->rke; __m128i data1_, data2_, data3_, data4_; __m128i temporary11_, temporary12_; __m128i addresses11_, addresses12_; @@ -9345,11 +9345,11 @@ void kuznyechik_encrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku data2_ = _mm_xor_si128(data2_, cache11_); \ data3_ = _mm_xor_si128(data3_, cache11_); \ data4_ = _mm_xor_si128(data4_, cache11_); \ } -void kuznyechik_decrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds) +void kuznyechik_decrypt_block_simd(uint8* out, const uint8* in, kuznyechik_kds* kds) { const uint_64t *roundKeys_ = kds->rkd; __m128i data_; #ifndef UNROLL_LOOPS int round_; @@ -9381,11 +9381,11 @@ void kuznyechik_decrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kd cache1_ = _mm_loadu_si128((const __m128i *) &roundKeys_[0]); data_ = _mm_xor_si128(data_, cache1_); _mm_storeu_si128((__m128i*) out, data_); } -void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds) +void kuznyechik_decrypt_blocks_simd(uint8* out, const uint8* in, size_t blocks, kuznyechik_kds* kds) { const uint_64t *roundKeys_ = kds->rkd; __m128i data1_, data2_,data3_,data4_; #ifndef UNROLL_LOOPS int round_; @@ -9506,11 +9506,11 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku } else if (blocks) kuznyechik_decrypt_block_simd (out, in, kds); } -void kuznyechik_set_key_simd(const byte* key, kuznyechik_kds *kds) +void kuznyechik_set_key_simd(const uint8* key, kuznyechik_kds *kds) { scheduleEncryptionRoundKeysForGost15 (kds->rke, key); scheduleDecryptionRoundKeysForGost15 (kds->rkd, key); } diff --git a/src/Crypto/misc.h b/src/Crypto/misc.h index 47d0288a..25313d1d 100644 --- a/src/Crypto/misc.h +++ b/src/Crypto/misc.h @@ -149,11 +149,11 @@ VC_INLINE uint64 ByteReverseWord64(uint64 value) value = ((value & LL(0xFFFF0000FFFF0000)) >> 16) | ((value & LL(0x0000FFFF0000FFFF)) << 16); return rotl64(value, 32U); #endif } -VC_INLINE void CorrectEndianess(uint64 *out, const uint64 *in, size_t byteCount) +VC_INLINE void CorrectEndianness(uint64 *out, const uint64 *in, size_t byteCount) { size_t i, count = byteCount/sizeof(uint64); for (i=0; i<count; i++) out[i] = ByteReverseWord64(in[i]); diff --git a/src/Crypto/rdrand.c b/src/Crypto/rdrand.c index afed7cd1..52f7f98e 100644 --- a/src/Crypto/rdrand.c +++ b/src/Crypto/rdrand.c @@ -4,12 +4,12 @@ #include "chacha256.h" #include "cpu.h" #include "misc.h" -void CRYPTOPP_FASTCALL MASM_RDRAND_GenerateBlock(byte*, size_t); -void CRYPTOPP_FASTCALL MASM_RDSEED_GenerateBlock(byte*, size_t); +void CRYPTOPP_FASTCALL MASM_RDRAND_GenerateBlock(uint8*, size_t); +void CRYPTOPP_FASTCALL MASM_RDSEED_GenerateBlock(uint8*, size_t); int RDRAND_getBytes(unsigned char* buf, size_t bufLen) { if (!buf || !HasRDRAND()) return 0; diff --git a/src/Crypto/sha256_armv8.c b/src/Crypto/sha256_armv8.c new file mode 100644 index 00000000..1599350a --- /dev/null +++ b/src/Crypto/sha256_armv8.c @@ -0,0 +1,184 @@ +/* +* SHA-256 using CPU instructions in ARMv8 +* +* Contributed by Jeffrey Walton. Based on public domain code by +* Johannes Schneiders, Skip Hovsmith and Barry O'Rourke. +* +* Further changes (C) 2020 Jack Lloyd +* +* Botan is released under the Simplified BSD License (see license.txt) +*/ + +/* Modified and adapted for VeraCrypt */ + +#include "Common/Tcdefs.h" +#if !defined(_UEFI) +#include <memory.h> +#include <stdlib.h> +#endif +#include "cpu.h" +#include "misc.h" + +#if CRYPTOPP_ARM_SHA2_AVAILABLE + +#include <arm_neon.h> + +CRYPTOPP_ALIGN_DATA(64) static const uint32 K[] = { + 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, + 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, + 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, + 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, + 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, + 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, + 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, + 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2, +}; + +void sha256_compress_digest_armv8(void* input_data, uint32 digest[8], uint64 num_blks) { + + + // Load initial values + uint32x4_t STATE0 = vld1q_u32(&digest[0]); + uint32x4_t STATE1 = vld1q_u32(&digest[4]); + + // Intermediate void* cast due to https://llvm.org/bugs/show_bug.cgi?id=20670 + const uint32* input32 = (const uint32*)(const void*)input_data; + + while (num_blks > 0) { + // Save current state + const uint32x4_t ABCD_SAVE = STATE0; + const uint32x4_t EFGH_SAVE = STATE1; + + uint32x4_t MSG0 = vld1q_u32(input32 + 0); + uint32x4_t MSG1 = vld1q_u32(input32 + 4); + uint32x4_t MSG2 = vld1q_u32(input32 + 8); + uint32x4_t MSG3 = vld1q_u32(input32 + 12); + + MSG0 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSG0))); + MSG1 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSG1))); + MSG2 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSG2))); + MSG3 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSG3))); + + uint32x4_t MSG_K, TSTATE; + + // Rounds 0-3 + MSG_K = vaddq_u32(MSG0, vld1q_u32(&K[4 * 0])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG0 = vsha256su1q_u32(vsha256su0q_u32(MSG0, MSG1), MSG2, MSG3); + + // Rounds 4-7 + MSG_K = vaddq_u32(MSG1, vld1q_u32(&K[4 * 1])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG1 = vsha256su1q_u32(vsha256su0q_u32(MSG1, MSG2), MSG3, MSG0); + + // Rounds 8-11 + MSG_K = vaddq_u32(MSG2, vld1q_u32(&K[4 * 2])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG2 = vsha256su1q_u32(vsha256su0q_u32(MSG2, MSG3), MSG0, MSG1); + + // Rounds 12-15 + MSG_K = vaddq_u32(MSG3, vld1q_u32(&K[4 * 3])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG3 = vsha256su1q_u32(vsha256su0q_u32(MSG3, MSG0), MSG1, MSG2); + + // Rounds 16-19 + MSG_K = vaddq_u32(MSG0, vld1q_u32(&K[4 * 4])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG0 = vsha256su1q_u32(vsha256su0q_u32(MSG0, MSG1), MSG2, MSG3); + + // Rounds 20-23 + MSG_K = vaddq_u32(MSG1, vld1q_u32(&K[4 * 5])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG1 = vsha256su1q_u32(vsha256su0q_u32(MSG1, MSG2), MSG3, MSG0); + + // Rounds 24-27 + MSG_K = vaddq_u32(MSG2, vld1q_u32(&K[4 * 6])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG2 = vsha256su1q_u32(vsha256su0q_u32(MSG2, MSG3), MSG0, MSG1); + + // Rounds 28-31 + MSG_K = vaddq_u32(MSG3, vld1q_u32(&K[4 * 7])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG3 = vsha256su1q_u32(vsha256su0q_u32(MSG3, MSG0), MSG1, MSG2); + + // Rounds 32-35 + MSG_K = vaddq_u32(MSG0, vld1q_u32(&K[4 * 8])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG0 = vsha256su1q_u32(vsha256su0q_u32(MSG0, MSG1), MSG2, MSG3); + + // Rounds 36-39 + MSG_K = vaddq_u32(MSG1, vld1q_u32(&K[4 * 9])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG1 = vsha256su1q_u32(vsha256su0q_u32(MSG1, MSG2), MSG3, MSG0); + + // Rounds 40-43 + MSG_K = vaddq_u32(MSG2, vld1q_u32(&K[4 * 10])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG2 = vsha256su1q_u32(vsha256su0q_u32(MSG2, MSG3), MSG0, MSG1); + + // Rounds 44-47 + MSG_K = vaddq_u32(MSG3, vld1q_u32(&K[4 * 11])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + MSG3 = vsha256su1q_u32(vsha256su0q_u32(MSG3, MSG0), MSG1, MSG2); + + // Rounds 48-51 + MSG_K = vaddq_u32(MSG0, vld1q_u32(&K[4 * 12])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + + // Rounds 52-55 + MSG_K = vaddq_u32(MSG1, vld1q_u32(&K[4 * 13])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + + // Rounds 56-59 + MSG_K = vaddq_u32(MSG2, vld1q_u32(&K[4 * 14])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + + // Rounds 60-63 + MSG_K = vaddq_u32(MSG3, vld1q_u32(&K[4 * 15])); + TSTATE = vsha256hq_u32(STATE0, STATE1, MSG_K); + STATE1 = vsha256h2q_u32(STATE1, STATE0, MSG_K); + STATE0 = TSTATE; + + // Add back to state + STATE0 = vaddq_u32(STATE0, ABCD_SAVE); + STATE1 = vaddq_u32(STATE1, EFGH_SAVE); + + input32 += 64 / 4; + num_blks--; + } + + // Save state + vst1q_u32(&digest[0], STATE0); + vst1q_u32(&digest[4], STATE1); +} +#endif diff --git a/src/Crypto/t1ha.h b/src/Crypto/t1ha.h index 97615b51..c32d07b5 100644 --- a/src/Crypto/t1ha.h +++ b/src/Crypto/t1ha.h @@ -181,11 +181,11 @@ extern "C" { #define T1HA_ALIGN_PREFIX CRYPTOPP_ALIGN_DATA(32) #define T1HA_ALIGN_SUFFIX #ifdef _MSC_VER -#define uint8_t byte +#define uint8_t uint8 #define uint16_t uint16 #define uint32_t uint32 #define uint64_t uint64 #endif diff --git a/src/Crypto/wolfCrypt.c b/src/Crypto/wolfCrypt.c new file mode 100644 index 00000000..da0fbe2f --- /dev/null +++ b/src/Crypto/wolfCrypt.c @@ -0,0 +1,243 @@ +/* See src/Crypto/wolfCrypt.md */ + +#include "Aes.h" +#include "Sha2.h" +#include "../Common/Crypto.h" +#include <wolfssl/wolfcrypt/hmac.h> + + +AES_RETURN aes_init() +{ +#if defined( AES_ERR_CHK ) + return EXIT_SUCCESS; +#else + return; +#endif +} + +AES_RETURN aes_encrypt_key(const unsigned char *key, int key_len, aes_encrypt_ctx cx[1]) +{ + int ret = 0; + + ret = wc_AesInit(&cx->wc_enc_aes, NULL, INVALID_DEVID); + + if (key_len == 128 || key_len == 192 || key_len == 256) + key_len = key_len/8; + + if (ret == 0) { + ret = wc_AesSetKey(&cx->wc_enc_aes, key, key_len, NULL, AES_ENCRYPTION); + } + +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif +} + +AES_RETURN aes_decrypt_key(const unsigned char *key, int key_len, aes_decrypt_ctx cx[1]) +{ + int ret = 0; + + ret = wc_AesInit(&cx->wc_dec_aes, NULL, INVALID_DEVID); + + if (key_len == 128 || key_len == 192 || key_len == 256) + key_len = key_len/8; + + if (ret == 0) { + ret = wc_AesSetKey(&cx->wc_dec_aes, key, key_len, NULL, AES_DECRYPTION); + } + +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif +} + +AES_RETURN aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1]) +{ + return aes_encrypt_key(key, 128, cx); +} + +AES_RETURN aes_encrypt_key192(const unsigned char *key, aes_encrypt_ctx cx[1]) +{ + return aes_encrypt_key(key, 192, cx); +} + +AES_RETURN aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1]) +{ + return aes_encrypt_key(key, 256, cx); +} + +AES_RETURN aes_decrypt_key128(const unsigned char *key, aes_decrypt_ctx cx[1]) +{ + return aes_decrypt_key(key, 128, cx); +} + +AES_RETURN aes_decrypt_key192(const unsigned char *key, aes_decrypt_ctx cx[1]) +{ + return aes_decrypt_key(key, 192, cx); +} + +AES_RETURN aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1]) +{ + return aes_decrypt_key(key, 256, cx); +} + +AES_RETURN aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]) +{ + int ret = wc_AesEncryptDirect(&cx->wc_enc_aes, out, in); +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif + +} + +AES_RETURN aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]) +{ + int ret = wc_AesDecryptDirect(&cx->wc_dec_aes, out, in); +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif + +} + +AES_RETURN xts_encrypt_key(const unsigned char *key, int key_len, aes_encrypt_ctx cx[1]) +{ + int ret = 0; + + cx->wc_enc_xts.aes = cx->wc_enc_aes; + + ret = wc_AesInit(&cx->wc_enc_xts.tweak, NULL, INVALID_DEVID); + + if (key_len == 128 || key_len == 192 || key_len == 256) + key_len = key_len/8; + + if (ret == 0) { + ret = wc_AesSetKey(&cx->wc_enc_xts.tweak, key, key_len, NULL, AES_ENCRYPTION); + } +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif +} + +AES_RETURN xts_decrypt_key(const unsigned char *key, int key_len, aes_decrypt_ctx cx[1]) +{ + int ret = 0; + + cx->wc_dec_xts.aes = cx->wc_dec_aes; + + ret = wc_AesInit(&cx->wc_dec_xts.tweak, NULL, INVALID_DEVID); + + if (key_len == 128 || key_len == 192 || key_len == 256) + key_len = key_len/8; + + if (ret == 0) { + ret = wc_AesSetKey(&cx->wc_dec_xts.tweak, key, key_len, NULL, AES_ENCRYPTION); + } + +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif +} + +AES_RETURN xts_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1]) +{ + return xts_encrypt_key(key, 256, cx); +} + +AES_RETURN xts_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1]) +{ + return xts_decrypt_key(key, 256, cx); +} + +AES_RETURN xts_encrypt(const unsigned char *in, unsigned char *out, word64 length, word64 sector, const aes_encrypt_ctx cx[1]) +{ + int ret = wc_AesXtsEncryptConsecutiveSectors(&cx->wc_enc_xts, out, in, length, sector, ENCRYPTION_DATA_UNIT_SIZE); + +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif + +} + +AES_RETURN xts_decrypt(const unsigned char *in, unsigned char *out, word64 length, word64 sector, const aes_decrypt_ctx cx[1]) +{ + int ret = wc_AesXtsDecryptConsecutiveSectors(&cx->wc_dec_xts, out, in, length, sector, ENCRYPTION_DATA_UNIT_SIZE); + +#if defined( AES_ERR_CHK ) + return ret ? EXIT_FAILURE : EXIT_SUCCESS; +#else + return; +#endif +} + + +void sha256_begin(sha256_ctx* ctx) +{ + wc_InitSha256(ctx); +} + +void sha256_hash(const unsigned char * source, uint_32t sourceLen, sha256_ctx *ctx) +{ + wc_Sha256Update(ctx, source, sourceLen); +} + +void sha256_end(unsigned char * result, sha256_ctx* ctx) +{ + wc_Sha256Final(ctx, result); +} + +void sha256(unsigned char * result, const unsigned char* source, uint_32t sourceLen) +{ + wc_Sha256 sha256; + wc_InitSha256(&sha256); + wc_Sha256Update(&sha256, source, sourceLen); + wc_Sha256Final(&sha256, result); + wc_Sha256Free(&sha256); +} + +void sha512_begin(sha512_ctx* ctx) +{ + wc_InitSha512(ctx); +} + +void sha512_hash(const unsigned char * source, uint_64t sourceLen, sha512_ctx *ctx) +{ + wc_Sha512Update(ctx, source, sourceLen); +} + +void sha512_end(unsigned char * result, sha512_ctx* ctx) +{ + wc_Sha512Final(ctx, result); +} + +void sha512(unsigned char * result, const unsigned char* source, uint_64t sourceLen) +{ + wc_Sha512 sha512; + wc_InitSha512(&sha512); + wc_Sha512Update(&sha512, source, sourceLen); + wc_Sha512Final(&sha512, result); + wc_Sha512Free(&sha512); +} + +void derive_key_sha512 (unsigned char *pwd, int pwd_len, unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen) { + (void) iterations; + wc_HKDF(WC_SHA512, (uint8*)pwd, (word32)pwd_len, (uint8*)salt, (word32)salt_len, NULL, 0, (uint8*)dk, (word32)dklen); +} + +void derive_key_sha256 (unsigned char *pwd, int pwd_len, unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen) { + (void) iterations; + wc_HKDF(WC_SHA256, (uint8*)pwd, (word32)pwd_len, (uint8*)salt, (word32)salt_len, NULL, 0, (uint8*)dk, (word32)dklen); +} diff --git a/src/Crypto/wolfCrypt.md b/src/Crypto/wolfCrypt.md new file mode 100644 index 00000000..32ccf242 --- /dev/null +++ b/src/Crypto/wolfCrypt.md @@ -0,0 +1,25 @@ +# wolfSSL as crypto provider for VeraCrypt + +[wolfCrypt](https://www.wolfssl.com/products/wolfcrypt/) is wolfSSL's cutting edge crypto engine and a +potential FIPS solution for users of VeraCrypt. Follow the steps below to setup VeraCrypt with wolfCrypt. + +## Building wolfSSL + +Clone wolfSSL and build it as shown below. + +``` +git clone https://github.com/wolfssl/wolfssl && cd wolfssl +./autogen.sh +./configure --enable-xts CFLAGS="-DNO_OLD_WC_NAMES" +make +sudo make install +``` + +## Building VeraCrypt with wolfSSL + +Build VeraCrypt with the `WOLFCRYPT` command line option. + +``` +make WXSTATIC=1 wxbuild && make WXSTATIC=1 clean && make WXSTATIC=1 WOLFCRYPT=1 && make WXSTATIC=1 WOLFCRYPT=1 package +``` + diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c index 49d62126..f8f06b37 100644 --- a/src/Driver/DriveFilter.c +++ b/src/Driver/DriveFilter.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -33,11 +33,11 @@ static BOOL DeviceFilterActive = FALSE; BOOL BootArgsValid = FALSE; BootArguments BootArgs; -byte* BootSecRegionData = NULL; +uint8* BootSecRegionData = NULL; uint32 BootSecRegionSize = 0; uint32 BootPkcs5 = 0; static uint64 BootLoaderArgsPtr; static BOOL BootDriveSignatureValid = FALSE; @@ -45,17 +45,17 @@ static BOOL BootDriveSignatureValid = FALSE; static KMUTEX MountMutex; static volatile BOOL BootDriveFound = FALSE; static DriveFilterExtension *BootDriveFilterExtension = NULL; static LARGE_INTEGER BootDriveLength; -static byte BootLoaderFingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; +static uint8 BootLoaderFingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]; static BOOL CrashDumpEnabled = FALSE; static BOOL HibernationEnabled = FALSE; static BOOL LegacyHibernationDriverFilterActive = FALSE; -static byte *HibernationWriteBuffer = NULL; +static uint8 *HibernationWriteBuffer = NULL; static MDL *HibernationWriteBufferMdl = NULL; static uint32 HibernationPreventionCount = 0; static BootEncryptionSetupRequest SetupRequest; @@ -80,12 +80,12 @@ static uint64 BootArgsRegionsEFI[] = { EFI_BOOTARGS_REGIONS_EFI }; NTSTATUS LoadBootArguments (BOOL bIsEfi) { NTSTATUS status = STATUS_UNSUCCESSFUL; PHYSICAL_ADDRESS bootArgsAddr; - byte *mappedBootArgs; - byte *mappedCryptoInfo = NULL; + uint8 *mappedBootArgs; + uint8 *mappedCryptoInfo = NULL; uint16 bootLoaderArgsIndex; uint64* BootArgsRegionsPtr = bIsEfi? BootArgsRegionsEFI : BootArgsRegionsDefault; size_t BootArgsRegionsCount = bIsEfi? sizeof(BootArgsRegionsEFI)/ sizeof(BootArgsRegionsEFI[0]) : sizeof(BootArgsRegionsDefault)/ sizeof(BootArgsRegionsDefault[0]); KeInitializeMutex (&MountMutex, 0); @@ -107,11 +107,11 @@ NTSTATUS LoadBootArguments (BOOL bIsEfi) Dump ("BootArguments found at 0x%x\n", bootArgsAddr.LowPart); DumpMem (mappedBootArgs, sizeof (BootArguments)); if (bootArguments->BootLoaderVersion == VERSION_NUM - && bootArguments->BootArgumentsCrc32 != GetCrc32 ((byte *) bootArguments, (int) ((byte *) &bootArguments->BootArgumentsCrc32 - (byte *) bootArguments))) + && bootArguments->BootArgumentsCrc32 != GetCrc32 ((uint8 *) bootArguments, (int) ((uint8 *) &bootArguments->BootArgumentsCrc32 - (uint8 *) bootArguments))) { Dump ("BootArguments CRC incorrect\n"); burn (mappedBootArgs, sizeof (BootArguments)); MmUnmapIoSpace (mappedBootArgs, sizeof (BootArguments)); mappedBootArgs = NULL; @@ -164,17 +164,17 @@ NTSTATUS LoadBootArguments (BOOL bIsEfi) // SecRegion data? if(BootArgs.CryptoInfoLength > (sizeof(BOOT_CRYPTO_HEADER) + sizeof(SECREGION_BOOT_PARAMS)) ) { uint32 crc; PHYSICAL_ADDRESS SecRegionAddress; SECREGION_BOOT_PARAMS* SecRegionParams = (SECREGION_BOOT_PARAMS*) (mappedCryptoInfo + sizeof(BOOT_CRYPTO_HEADER) + 2); - byte *secRegionData = NULL; + uint8 *secRegionData = NULL; SecRegionAddress.QuadPart = SecRegionParams->Ptr; Dump ("SecRegion memory 0x%x %d\n", SecRegionAddress.LowPart, SecRegionParams->Size); // SecRegion correct? if( (SecRegionParams->Ptr != 0) && (SecRegionParams->Size > 0)) { - crc = GetCrc32((byte*)SecRegionParams, 12); + crc = GetCrc32((uint8*)SecRegionParams, 12); if(crc == SecRegionParams->Crc) { Dump ("SecRegion crc ok\n"); secRegionData = MmMapIoSpace (SecRegionAddress, SecRegionParams->Size, MmCached); if(secRegionData) { BootSecRegionData = TCalloc (SecRegionParams->Size); @@ -285,11 +285,11 @@ err: } static void DismountDrive (DriveFilterExtension *Extension, BOOL stopIoQueue) { - Dump ("Dismounting drive\n"); + Dump ("Unmounting drive\n"); ASSERT (Extension->DriveMounted); if (stopIoQueue && EncryptedIoQueueIsRunning (&Extension->Queue)) EncryptedIoQueueStop (&Extension->Queue); @@ -299,11 +299,11 @@ static void DismountDrive (DriveFilterExtension *Extension, BOOL stopIoQueue) crypto_close ((PCRYPTO_INFO) Extension->HeaderCryptoInfo); Extension->HeaderCryptoInfo = NULL; Extension->DriveMounted = FALSE; - Dump ("Drive dismount done!\n"); + Dump ("Drive unmount done!\n"); } static void InvalidateVolumeKeys (EXTENSION *Extension) { Dump ("Invalidating volume encryption keys\n"); @@ -327,11 +327,11 @@ static void InvalidateDriveFilterKeys (DriveFilterExtension *Extension) crypto_eraseKeys ((PCRYPTO_INFO) Extension->HeaderCryptoInfo); Dump ("Drive filter encryption keys invalidated!\n"); } -static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte* ioBuffer /* ioBuffer must be at least 512 bytes long */) +static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, uint8* ioBuffer /* ioBuffer must be at least 512 bytes long */) { NTSTATUS status; LARGE_INTEGER offset; WHIRLPOOL_CTX whirlpool; sha512_ctx sha2; @@ -357,19 +357,15 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte* offset.QuadPart = 0; status = TCReadDevice (LowerDeviceObject, ioBuffer, offset, TC_SECTOR_SIZE_BIOS); if (NT_SUCCESS (status)) { +#ifndef _M_ARM64 NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; -#ifdef _WIN64 XSTATE_SAVE SaveState; if (IsCpuIntel() && HasSAVX()) - saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState); -#else - KFLOATING_SAVE floatingPointState; - if (HasISSE() || (HasSSSE3() && HasMMX())) - saveStatus = KeSaveFloatingPointState (&floatingPointState); + saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState); #endif WHIRLPOOL_add (ioBuffer, TC_BOOT_SECTOR_PIM_VALUE_OFFSET, &whirlpool); WHIRLPOOL_add (ioBuffer + TC_BOOT_SECTOR_USER_MESSAGE_OFFSET + TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH, (TC_BOOT_SECTOR_USER_CONFIG_OFFSET - (TC_BOOT_SECTOR_USER_MESSAGE_OFFSET + TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH)), &whirlpool); sha512_hash (ioBuffer, TC_BOOT_SECTOR_PIM_VALUE_OFFSET, &sha2); @@ -401,41 +397,39 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte* { WHIRLPOOL_finalize (&whirlpool, BootLoaderFingerprint); sha512_end (&BootLoaderFingerprint [WHIRLPOOL_DIGESTSIZE], &sha2); } - if (NT_SUCCESS (saveStatus)) -#ifdef _WIN64 - KeRestoreExtendedProcessorStateVC(&SaveState); -#else - KeRestoreFloatingPointState (&floatingPointState); +#ifndef _M_ARM64 + if (NT_SUCCESS(saveStatus)) + KeRestoreExtendedProcessorState(&SaveState); #endif } else { Dump ("TCReadDevice error %x during ComputeBootLoaderFingerprint call\n", status); } } -static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, uint32 *headerSaltCrc32) +static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, __unaligned uint32 *headerSaltCrc32) { BOOL hiddenVolume = (BootArgs.HiddenSystemPartitionStart != 0); int64 hiddenHeaderOffset = BootArgs.HiddenSystemPartitionStart + TC_HIDDEN_VOLUME_HEADER_OFFSET; NTSTATUS status; LARGE_INTEGER offset; - char *header; + unsigned char *header; int pkcs5_prf = 0, pim = 0; PARTITION_INFORMATION_EX pi; BOOL bIsGPT = FALSE; Dump ("MountDrive pdo=%p\n", Extension->Pdo); ASSERT (KeGetCurrentIrql() == PASSIVE_LEVEL); // Check disk MBR id and GPT ID if BootSecRegion is available to detect boot drive if (BootSecRegionData != NULL && BootSecRegionSize >= 1024) { - byte mbr[TC_SECTOR_SIZE_BIOS]; + uint8 mbr[TC_SECTOR_SIZE_BIOS]; DCS_DISK_ENTRY_LIST* DeList = (DCS_DISK_ENTRY_LIST*)(BootSecRegionData + 512); offset.QuadPart = 0; status = TCReadDevice (Extension->LowerDeviceObject, mbr, offset, TC_SECTOR_SIZE_BIOS); if (NT_SUCCESS (status) && DeList->DE[DE_IDX_DISKID].DiskId.MbrID != *(uint32 *) (mbr + 0x1b8)) @@ -457,11 +451,11 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, Extension->Queue.SecRegionSize = BootSecRegionSize; } else { // Check boot drive signature first (header CRC search could fail if a user restored the header to a non-boot drive) if (BootDriveSignatureValid) { - byte mbr[TC_SECTOR_SIZE_BIOS]; + uint8 mbr[TC_SECTOR_SIZE_BIOS]; offset.QuadPart = 0; status = TCReadDevice (Extension->LowerDeviceObject, mbr, offset, TC_SECTOR_SIZE_BIOS); if (NT_SUCCESS (status) && BootArgs.BootDriveSignature != *(uint32 *) (mbr + 0x1b8)) @@ -520,14 +514,20 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, pim = (int) (BootArgs.Flags >> 16); if (ReadVolumeHeader (!hiddenVolume, header, password, pkcs5_prf, pim, &Extension->Queue.CryptoInfo, Extension->HeaderCryptoInfo) == 0) { - // Header decrypted + // Header decrypted status = STATUS_SUCCESS; Dump ("Header decrypted\n"); + if (Extension->HeaderCryptoInfo->bVulnerableMasterKey) + { + // The volume header master key is vulnerable + Dump ("The volume header master key is vulnerable\n"); + } + // calculate Fingerprint ComputeBootLoaderFingerprint (Extension->LowerDeviceObject, header); if (Extension->Queue.CryptoInfo->hiddenVolume) { @@ -583,11 +583,11 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, DCS_DISK_ENTRY_LIST* DeList = (DCS_DISK_ENTRY_LIST*)(BootSecRegionData + 512); uint32 crc; uint32 crcSaved; crcSaved = DeList->CRC32; DeList->CRC32 = 0; - crc = GetCrc32((byte*)DeList, 512); + crc = GetCrc32((uint8*)DeList, 512); if(crc == crcSaved){ if(DeList->DE[DE_IDX_PWDCACHE].Type == DE_PwdCache) { uint64 sector = 0; DCS_DEP_PWD_CACHE* pwdCache = (DCS_DEP_PWD_CACHE*)(BootSecRegionData + DeList->DE[DE_IDX_PWDCACHE].Sectors.Offset); DecryptDataUnits((unsigned char*)pwdCache, (UINT64_STRUCT*)§or, 1, Extension->Queue.CryptoInfo); @@ -642,35 +642,26 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, } else Extension->Queue.MaxReadAheadOffset = BootDriveLength; /* encrypt keys */ -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { VcProtectKeys (Extension->HeaderCryptoInfo, VcGetEncryptionID (Extension->HeaderCryptoInfo)); VcProtectKeys (Extension->Queue.CryptoInfo, VcGetEncryptionID (Extension->Queue.CryptoInfo)); } -#endif status = EncryptedIoQueueStart (&Extension->Queue); if (!NT_SUCCESS (status)) TC_BUG_CHECK (status); - if (IsOSAtLeast (WIN_VISTA)) + CrashDumpEnabled = TRUE; + HibernationEnabled = TRUE; + if (IsRamEncryptionEnabled()) { - CrashDumpEnabled = TRUE; - HibernationEnabled = TRUE; -#ifdef _WIN64 - if (IsRamEncryptionEnabled()) - { - HibernationEnabled = FALSE; - } -#endif + HibernationEnabled = FALSE; } - else if (!LegacyHibernationDriverFilterActive) - StartLegacyHibernationDriverFilter(); // Hidden system hibernation is not supported if an extra boot partition is present as the system is not allowed to update the boot partition if (IsHiddenSystemRunning() && (BootArgs.Flags & TC_BOOT_ARGS_FLAG_EXTRA_BOOT_PARTITION)) { CrashDumpEnabled = FALSE; @@ -694,11 +685,11 @@ ret: static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) { NTSTATUS status = STATUS_SUCCESS; LARGE_INTEGER offset; - byte *header; + uint8 *header; header = TCalloc (TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE); if (!header) return STATUS_INSUFFICIENT_RESOURCES; @@ -725,21 +716,19 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) } else { uint32 headerCrc32; uint64 encryptedAreaLength = Extension->Queue.EncryptedAreaEnd + 1 - Extension->Queue.EncryptedAreaStart; - byte *fieldPos = header + TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH; + uint8 *fieldPos = header + TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH; PCRYPTO_INFO pCryptoInfo = Extension->HeaderCryptoInfo; -#ifdef _WIN64 CRYPTO_INFO tmpCI; if (IsRamEncryptionEnabled()) { memcpy (&tmpCI, pCryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (pCryptoInfo)); pCryptoInfo = &tmpCI; } -#endif DecryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); if (GetHeaderField32 (header, TC_HEADER_OFFSET_MAGIC) != 0x56455241) { @@ -753,16 +742,14 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) headerCrc32 = GetCrc32 (header + TC_HEADER_OFFSET_MAGIC, TC_HEADER_OFFSET_HEADER_CRC - TC_HEADER_OFFSET_MAGIC); fieldPos = header + TC_HEADER_OFFSET_HEADER_CRC; mputLong (fieldPos, headerCrc32); EncryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { burn (&tmpCI, sizeof (CRYPTO_INFO)); } -#endif } status = TCWriteDevice (Extension->LowerDeviceObject, header, offset, TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE); if (!NT_SUCCESS (status)) { @@ -858,10 +845,11 @@ static void CheckDeviceTypeAndMount (DriveFilterExtension *filterExtension) } static VOID MountDriveWorkItemRoutine (PDEVICE_OBJECT deviceObject, DriveFilterExtension *filterExtension) { + UNREFERENCED_PARAMETER(deviceObject); CheckDeviceTypeAndMount (filterExtension); KeSetEvent (&filterExtension->MountWorkItemCompletedEvent, IO_NO_INCREMENT, FALSE); } @@ -975,10 +963,11 @@ static NTSTATUS DispatchPnp (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFilterE static NTSTATUS DispatchPower (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFilterExtension *Extension, PIO_STACK_LOCATION irpSp) { NTSTATUS status; + UNREFERENCED_PARAMETER(DeviceObject); Dump ("IRP_MJ_POWER minor=%d type=%d shutdown=%d\n", (int) irpSp->MinorFunction, (int) irpSp->Parameters.Power.Type, (int) irpSp->Parameters.Power.ShutdownType); if (SetupInProgress && irpSp->MinorFunction == IRP_MN_SET_POWER && irpSp->Parameters.Power.ShutdownType == PowerActionHibernate) @@ -987,20 +976,17 @@ static NTSTATUS DispatchPower (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFilte } // Dismount the system drive on shutdown on Windows 7 and later if (DriverShuttingDown && EraseKeysOnShutdown - && IsOSAtLeast (WIN_7) && Extension->BootDrive && Extension->DriveMounted && irpSp->MinorFunction == IRP_MN_SET_POWER && irpSp->Parameters.Power.Type == DevicePowerState) { DismountDrive (Extension, TRUE); -#ifdef _WIN64 ClearSecurityParameters (); -#endif } PoStartNextPowerIrp (Irp); status = IoAcquireRemoveLock (&Extension->Queue.RemoveLock, Irp); @@ -1016,20 +1002,20 @@ static NTSTATUS DispatchPower (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFilte static NTSTATUS DispatchControl (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFilterExtension *Extension, PIO_STACK_LOCATION irpSp) { BOOL bBlockTrim = BlockSystemTrimCommand || IsHiddenSystemRunning(); NTSTATUS status = IoAcquireRemoveLock (&Extension->Queue.RemoveLock, Irp); + UNREFERENCED_PARAMETER(DeviceObject); if (!NT_SUCCESS (status)) return TCCompleteIrp (Irp, status, 0); switch (irpSp->Parameters.DeviceIoControl.IoControlCode) { case IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES: Dump ("DriverFilter-DispatchControl: IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES\n"); if (bBlockTrim) { - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); DWORD inputLength = irpSp->Parameters.DeviceIoControl.InputBufferLength; if (inputLength >= sizeof (DEVICE_MANAGE_DATA_SET_ATTRIBUTES)) { PDEVICE_MANAGE_DATA_SET_ATTRIBUTES pInputAttrs = (PDEVICE_MANAGE_DATA_SET_ATTRIBUTES) Irp->AssociatedIrp.SystemBuffer; DEVICE_DATA_MANAGEMENT_SET_ACTION action = pInputAttrs->Action; @@ -1101,11 +1087,11 @@ NTSTATUS DriveFilterDispatchIrp (PDEVICE_OBJECT DeviceObject, PIRP Irp) IoReleaseRemoveLock (&Extension->Queue.RemoveLock, Irp); return status; } -void EmergencyClearAllKeys (PIRP irp, PIO_STACK_LOCATION irpSp) +void EmergencyClearAllKeys (PIRP irp) { irp->IoStatus.Information = 0; if (!IoIsSystemThread (PsGetCurrentThread()) && !UserCanAccessDriveDevice()) { @@ -1128,22 +1114,20 @@ void EmergencyClearAllKeys (PIRP irp, PIO_STACK_LOCATION irpSp) } if (BootDriveFound && BootDriveFilterExtension && BootDriveFilterExtension->DriveMounted) InvalidateDriveFilterKeys (BootDriveFilterExtension); -#ifdef _WIN64 ClearSecurityParameters(); -#endif irp->IoStatus.Status = STATUS_SUCCESS; } } -void ReopenBootVolumeHeader (PIRP irp, PIO_STACK_LOCATION irpSp) +void ReopenBootVolumeHeader (PIRP irp) { LARGE_INTEGER offset; - char *header; + unsigned char *header; ReopenBootVolumeHeaderRequest *request = (ReopenBootVolumeHeaderRequest *) irp->AssociatedIrp.SystemBuffer; irp->IoStatus.Information = 0; if (!IoIsSystemThread (PsGetCurrentThread()) && !UserCanAccessDriveDevice()) @@ -1184,26 +1168,24 @@ void ReopenBootVolumeHeader (PIRP irp, PIO_STACK_LOCATION irpSp) { Dump ("TCReadDevice error %x\n", irp->IoStatus.Status); goto ret; } -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { VcUnprotectKeys (BootDriveFilterExtension->HeaderCryptoInfo, VcGetEncryptionID (BootDriveFilterExtension->HeaderCryptoInfo)); } -#endif if (ReadVolumeHeader (!BootDriveFilterExtension->HiddenSystem, header, &request->VolumePassword, request->pkcs5_prf, request->pim, NULL, BootDriveFilterExtension->HeaderCryptoInfo) == 0) { Dump ("Header reopened\n"); -#ifdef _WIN64 + if (IsRamEncryptionEnabled()) { VcProtectKeys (BootDriveFilterExtension->HeaderCryptoInfo, VcGetEncryptionID(BootDriveFilterExtension->HeaderCryptoInfo)); } -#endif + ComputeBootLoaderFingerprint (BootDriveFilterExtension->LowerDeviceObject, header); BootDriveFilterExtension->Queue.CryptoInfo->pkcs5 = BootDriveFilterExtension->HeaderCryptoInfo->pkcs5; BootDriveFilterExtension->Queue.CryptoInfo->noIterations = BootDriveFilterExtension->HeaderCryptoInfo->noIterations; BootDriveFilterExtension->Queue.CryptoInfo->volumePim = BootDriveFilterExtension->HeaderCryptoInfo->volumePim; @@ -1231,41 +1213,27 @@ wipe: typedef NTSTATUS (*HiberDriverWriteFunctionA) (ULONG arg0, PLARGE_INTEGER writeOffset, PMDL dataMdl, PVOID arg3); typedef NTSTATUS (*HiberDriverWriteFunctionB) (PLARGE_INTEGER writeOffset, PMDL dataMdl); typedef struct { -#ifdef _WIN64 - byte FieldPad1[64]; - HiberDriverWriteFunctionB WriteFunctionB; - byte FieldPad2[56]; -#else - byte FieldPad1[48]; + uint8 FieldPad1[64]; HiberDriverWriteFunctionB WriteFunctionB; - byte FieldPad2[32]; -#endif + uint8 FieldPad2[56]; HiberDriverWriteFunctionA WriteFunctionA; - byte FieldPad3[24]; + uint8 FieldPad3[24]; LARGE_INTEGER PartitionStartOffset; } HiberDriverContext; typedef NTSTATUS (*HiberDriverEntry) (PVOID arg0, HiberDriverContext *hiberDriverContext); typedef struct { LIST_ENTRY ModuleList; -#ifdef _WIN64 - byte FieldPad1[32]; -#else - byte FieldPad1[16]; -#endif + uint8 FieldPad1[32]; PVOID ModuleBaseAddress; HiberDriverEntry ModuleEntryAddress; -#ifdef _WIN64 - byte FieldPad2[24]; -#else - byte FieldPad2[12]; -#endif + uint8 FieldPad2[24]; UNICODE_STRING ModuleName; } ModuleTableItem; #define TC_MAX_HIBER_FILTER_COUNT 3 @@ -1450,10 +1418,12 @@ static NTSTATUS HiberDriverEntryFilter2 (PVOID arg0, HiberDriverContext *hiberDr static VOID LoadImageNotifyRoutine (PUNICODE_STRING fullImageName, HANDLE processId, PIMAGE_INFO imageInfo) { ModuleTableItem *moduleItem; LIST_ENTRY *listEntry; KIRQL origIrql; + UNREFERENCED_PARAMETER(fullImageName); + UNREFERENCED_PARAMETER(processId); if (!imageInfo || !imageInfo->SystemModeImage || !imageInfo->ImageBase || !TCDriverObject->DriverSection) return; moduleItem = *(ModuleTableItem **) TCDriverObject->DriverSection; @@ -1504,88 +1474,33 @@ static VOID LoadImageNotifyRoutine (PUNICODE_STRING fullImageName, HANDLE proces KeLowerIrql (origIrql); } -void StartLegacyHibernationDriverFilter () -{ - PHYSICAL_ADDRESS highestAcceptableWriteBufferAddr; - NTSTATUS status; - - ASSERT (KeGetCurrentIrql() == PASSIVE_LEVEL); - ASSERT (!IsOSAtLeast (WIN_VISTA)); - - if (!TCDriverObject->DriverSection || !*(ModuleTableItem **) TCDriverObject->DriverSection) - goto err; - - // All buffers required for hibernation must be allocated here -#ifdef _WIN64 - highestAcceptableWriteBufferAddr.QuadPart = 0x7FFffffFFFFULL; -#else - highestAcceptableWriteBufferAddr.QuadPart = 0xffffFFFFULL; -#endif - - HibernationWriteBuffer = MmAllocateContiguousMemory (TC_HIBERNATION_WRITE_BUFFER_SIZE, highestAcceptableWriteBufferAddr); - if (!HibernationWriteBuffer) - goto err; - - HibernationWriteBufferMdl = IoAllocateMdl (HibernationWriteBuffer, TC_HIBERNATION_WRITE_BUFFER_SIZE, FALSE, FALSE, NULL); - if (!HibernationWriteBufferMdl) - goto err; - - MmBuildMdlForNonPagedPool (HibernationWriteBufferMdl); - - status = PsSetLoadImageNotifyRoutine (LoadImageNotifyRoutine); - if (!NT_SUCCESS (status)) - goto err; - - LegacyHibernationDriverFilterActive = TRUE; - CrashDumpEnabled = FALSE; - HibernationEnabled = TRUE; - return; - -err: - LegacyHibernationDriverFilterActive = FALSE; - CrashDumpEnabled = FALSE; - HibernationEnabled = FALSE; - - if (HibernationWriteBufferMdl) - { - IoFreeMdl (HibernationWriteBufferMdl); - HibernationWriteBufferMdl = NULL; - } - - if (HibernationWriteBuffer) - { - MmFreeContiguousMemory (HibernationWriteBuffer); - HibernationWriteBuffer = NULL; - } -} - - static VOID SetupThreadProc (PVOID threadArg) { DriveFilterExtension *Extension = BootDriveFilterExtension; LARGE_INTEGER offset; UINT64_STRUCT dataUnit; ULONG setupBlockSize = TC_ENCRYPTION_SETUP_IO_BLOCK_SIZE; BOOL headerUpdateRequired = FALSE; int64 bytesWrittenSinceHeaderUpdate = 0; - byte *buffer = NULL; - byte *wipeBuffer = NULL; - byte wipeRandChars[TC_WIPE_RAND_CHAR_COUNT]; - byte wipeRandCharsUpdate[TC_WIPE_RAND_CHAR_COUNT]; + uint8 *buffer = NULL; + uint8 *wipeBuffer = NULL; + uint8 wipeRandChars[TC_WIPE_RAND_CHAR_COUNT]; + uint8 wipeRandCharsUpdate[TC_WIPE_RAND_CHAR_COUNT]; KIRQL irql; NTSTATUS status; // generate real random values for wipeRandChars and // wipeRandCharsUpdate instead of relying on uninitialized stack memory ChaCha20RngCtx rngCtx; - byte pbSeed[CHACHA20RNG_KEYSZ + CHACHA20RNG_IVSZ]; + uint8 pbSeed[CHACHA20RNG_KEYSZ + CHACHA20RNG_IVSZ]; + UNREFERENCED_PARAMETER(threadArg); GetDriverRandomSeed (pbSeed, sizeof (pbSeed)); ChaCha20RngInit (&rngCtx, pbSeed, GetDriverRandomSeed, 0); ChaCha20RngGetBytes (&rngCtx, wipeRandChars, TC_WIPE_RAND_CHAR_COUNT); @@ -1755,11 +1670,11 @@ static VOID SetupThreadProc (PVOID threadArg) { EncryptDataUnits (buffer, &dataUnit, setupBlockSize / ENCRYPTION_DATA_UNIT_SIZE, Extension->Queue.CryptoInfo); if (SetupRequest.WipeAlgorithm != TC_WIPE_NONE) { - byte wipePass; + uint8 wipePass; int wipePassCount = GetWipePassCount (SetupRequest.WipeAlgorithm); if (wipePassCount <= 0) { SetupResult = STATUS_INVALID_PARAMETER; goto err; @@ -1943,11 +1858,11 @@ NTSTATUS StartBootEncryptionSetup (PDEVICE_OBJECT DeviceObject, PIRP irp, PIO_ST return status; } -void GetBootDriveVolumeProperties (PIRP irp, PIO_STACK_LOCATION irpSp) +void GetBootDriveVolumeProperties (PIRP irp) { if (ValidateIOBufferSize (irp, sizeof (VOLUME_PROPERTIES_STRUCT), ValidateOutput)) { DriveFilterExtension *Extension = BootDriveFilterExtension; VOLUME_PROPERTIES_STRUCT *prop = (VOLUME_PROPERTIES_STRUCT *) irp->AssociatedIrp.SystemBuffer; @@ -1981,11 +1896,11 @@ void GetBootDriveVolumeProperties (PIRP irp, PIO_STACK_LOCATION irpSp) } } } -void GetBootEncryptionStatus (PIRP irp, PIO_STACK_LOCATION irpSp) +void GetBootEncryptionStatus (PIRP irp) { /* IMPORTANT: Do NOT add any potentially time-consuming operations to this function. */ if (ValidateIOBufferSize (irp, sizeof (BootEncryptionStatus), ValidateOutput)) { @@ -2015,10 +1930,11 @@ void GetBootEncryptionStatus (PIRP irp, PIO_STACK_LOCATION irpSp) bootEncStatus->BootDriveLength = BootDriveLength; bootEncStatus->ConfiguredEncryptedAreaStart = Extension->ConfiguredEncryptedAreaStart; bootEncStatus->ConfiguredEncryptedAreaEnd = Extension->ConfiguredEncryptedAreaEnd; bootEncStatus->EncryptedAreaStart = Extension->Queue.EncryptedAreaStart; + bootEncStatus->MasterKeyVulnerable = Extension->HeaderCryptoInfo->bVulnerableMasterKey; if (SetupInProgress) { KIRQL irql; KeAcquireSpinLock (&SetupStatusSpinLock, &irql); @@ -2042,11 +1958,11 @@ void GetBootEncryptionStatus (PIRP irp, PIO_STACK_LOCATION irpSp) irp->IoStatus.Status = STATUS_SUCCESS; } } -void GetBootLoaderVersion (PIRP irp, PIO_STACK_LOCATION irpSp) +void GetBootLoaderVersion (PIRP irp) { if (ValidateIOBufferSize (irp, sizeof (uint16), ValidateOutput)) { if (BootArgsValid) { @@ -2060,21 +1976,21 @@ void GetBootLoaderVersion (PIRP irp, PIO_STACK_LOCATION irpSp) irp->IoStatus.Information = 0; } } } -void GetBootLoaderFingerprint (PIRP irp, PIO_STACK_LOCATION irpSp) +void GetBootLoaderFingerprint (PIRP irp) { if (ValidateIOBufferSize (irp, sizeof (BootLoaderFingerprintRequest), ValidateOutput)) { irp->IoStatus.Information = 0; if (BootArgsValid && BootDriveFound && BootDriveFilterExtension && BootDriveFilterExtension->DriveMounted && BootDriveFilterExtension->HeaderCryptoInfo) { BootLoaderFingerprintRequest *bootLoaderFingerprint = (BootLoaderFingerprintRequest *) irp->AssociatedIrp.SystemBuffer; /* compute the fingerprint again and check if it is the same as the one retrieved during boot */ - char *header = TCalloc (TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE); + unsigned char *header = TCalloc (TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE); if (!header) { irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES; } else @@ -2102,11 +2018,11 @@ void GetBootLoaderFingerprint (PIRP irp, PIO_STACK_LOCATION irpSp) irp->IoStatus.Status = STATUS_INVALID_PARAMETER; } } } -void GetBootEncryptionAlgorithmName (PIRP irp, PIO_STACK_LOCATION irpSp) +void GetBootEncryptionAlgorithmName (PIRP irp) { if (ValidateIOBufferSize (irp, sizeof (GetBootEncryptionAlgorithmNameRequest), ValidateOutput)) { if (BootDriveFilterExtension && BootDriveFilterExtension->DriveMounted) { @@ -2184,20 +2100,21 @@ NTSTATUS AbortBootEncryptionSetup () } static VOID DecoySystemWipeThreadProc (PVOID threadArg) { + UNREFERENCED_PARAMETER(threadArg); DriveFilterExtension *Extension = BootDriveFilterExtension; LARGE_INTEGER offset; UINT64_STRUCT dataUnit; ULONG wipeBlockSize = TC_ENCRYPTION_SETUP_IO_BLOCK_SIZE; CRYPTO_INFO *wipeCryptoInfo = NULL; - byte *wipeBuffer = NULL; - byte *wipeRandBuffer = NULL; - byte wipeRandChars[TC_WIPE_RAND_CHAR_COUNT]; + uint8 *wipeBuffer = NULL; + uint8 *wipeRandBuffer = NULL; + uint8 wipeRandChars[TC_WIPE_RAND_CHAR_COUNT]; int wipePass, wipePassCount; int ea = Extension->Queue.CryptoInfo->ea; KIRQL irql; NTSTATUS status; @@ -2238,14 +2155,12 @@ static VOID DecoySystemWipeThreadProc (PVOID threadArg) { DecoySystemWipeResult = STATUS_INVALID_PARAMETER; goto err; } -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (wipeCryptoInfo, VcGetEncryptionID (wipeCryptoInfo)); -#endif EncryptDataUnits (wipeRandBuffer, &dataUnit, wipeBlockSize / ENCRYPTION_DATA_UNIT_SIZE, wipeCryptoInfo); memcpy (wipeRandChars, wipeRandBuffer, sizeof (wipeRandChars)); burn (WipeDecoyRequest.WipeKey, sizeof (WipeDecoyRequest.WipeKey)); @@ -2367,11 +2282,11 @@ BOOL IsDecoySystemWipeInProgress() { return DecoySystemWipeInProgress; } -void GetDecoySystemWipeStatus (PIRP irp, PIO_STACK_LOCATION irpSp) +void GetDecoySystemWipeStatus (PIRP irp) { if (ValidateIOBufferSize (irp, sizeof (DecoySystemWipeStatus), ValidateOutput)) { DecoySystemWipeStatus *wipeStatus = (DecoySystemWipeStatus *) irp->AssociatedIrp.SystemBuffer; diff --git a/src/Driver/DriveFilter.h b/src/Driver/DriveFilter.h index b164fa5b..60ec9a05 100644 --- a/src/Driver/DriveFilter.h +++ b/src/Driver/DriveFilter.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -57,32 +57,31 @@ extern PKTHREAD EncryptionSetupThread; extern PKTHREAD DecoySystemWipeThread; NTSTATUS AbortBootEncryptionSetup (); NTSTATUS DriveFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo); NTSTATUS DriveFilterDispatchIrp (PDEVICE_OBJECT DeviceObject, PIRP Irp); -void GetBootDriveVolumeProperties (PIRP irp, PIO_STACK_LOCATION irpSp); -void GetBootEncryptionAlgorithmName (PIRP irp, PIO_STACK_LOCATION irpSp); -void GetBootEncryptionStatus (PIRP irp, PIO_STACK_LOCATION irpSp); -void GetBootLoaderVersion (PIRP irp, PIO_STACK_LOCATION irpSp); -void GetBootLoaderFingerprint (PIRP irp, PIO_STACK_LOCATION irpSp); +void GetBootDriveVolumeProperties (PIRP irp); +void GetBootEncryptionAlgorithmName (PIRP irp); +void GetBootEncryptionStatus (PIRP irp); +void GetBootLoaderVersion (PIRP irp); +void GetBootLoaderFingerprint (PIRP irp); NTSTATUS GetSetupResult (); DriveFilterExtension *GetBootDriveFilterExtension (); CRYPTO_INFO *GetSystemDriveCryptoInfo (); BOOL IsBootDriveMounted (); BOOL IsBootEncryptionSetupInProgress (); BOOL IsHiddenSystemRunning (); NTSTATUS LoadBootArguments (BOOL bIsEfi); static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension); NTSTATUS StartBootEncryptionSetup (PDEVICE_OBJECT DeviceObject, PIRP irp, PIO_STACK_LOCATION irpSp); -void EmergencyClearAllKeys (PIRP irp, PIO_STACK_LOCATION irpSp); -void ReopenBootVolumeHeader (PIRP irp, PIO_STACK_LOCATION irpSp); +void EmergencyClearAllKeys (PIRP irp); +void ReopenBootVolumeHeader (PIRP irp); NTSTATUS StartDecoySystemWipe (PDEVICE_OBJECT DeviceObject, PIRP irp, PIO_STACK_LOCATION irpSp); -void StartLegacyHibernationDriverFilter (); NTSTATUS AbortDecoySystemWipe (); BOOL IsDecoySystemWipeInProgress(); NTSTATUS GetDecoySystemWipeResult(); -void GetDecoySystemWipeStatus (PIRP irp, PIO_STACK_LOCATION irpSp); +void GetDecoySystemWipeStatus (PIRP irp); uint64 GetBootDriveLength (); NTSTATUS WriteBootDriveSector (PIRP irp, PIO_STACK_LOCATION irpSp); #define TC_ENCRYPTION_SETUP_IO_BLOCK_SIZE (1536 * 1024) #define TC_ENCRYPTION_SETUP_HEADER_UPDATE_THRESHOLD (64 * 1024 * 1024) diff --git a/src/Driver/Driver.rc b/src/Driver/Driver.rc index 2d9ce398..928ce1c3 100644 --- a/src/Driver/Driver.rc +++ b/src/Driver/Driver.rc @@ -25,12 +25,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -43,15 +43,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Driver" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "veracrypt.sys" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 diff --git a/src/Driver/Driver.vcproj b/src/Driver/Driver.vcproj deleted file mode 100644 index 4c474c36..00000000 --- a/src/Driver/Driver.vcproj +++ /dev/null @@ -1,398 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="Driver" - ProjectGUID="{EF5EF444-18D0-40D7-8DFA-775EC4448602}" - RootNamespace="Driver" - Keyword="MakeFileProj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="0" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="echo ------ Building veracrypt.sys: Debug x86 ------
cmd.exe /c BuildDriver.cmd -build -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"
if errorlevel 1 exit %errorlevel%
echo.
echo ------ Building veracrypt.sys: Debug x64 ------
BuildDriver.cmd -build -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - ReBuildCommandLine="echo ------ Rebuilding veracrypt.sys: Debug x86 ------
cmd.exe /c BuildDriver.cmd -rebuild -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"
if errorlevel 1 exit %errorlevel%
echo.
echo ------ Rebuilding veracrypt.sys: Debug x64 ------
BuildDriver.cmd -rebuild -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - CleanCommandLine="echo ------ Cleaning veracrypt.sys: Debug x86 ------
cmd.exe /c BuildDriver.cmd -clean -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"
if errorlevel 1 exit %errorlevel%
echo.
echo ------ Cleaning veracrypt.sys: Debug x64 ------
BuildDriver.cmd -clean -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - Output="" - PreprocessorDefinitions="DEBUG;_DEBUG;TC_WINDOWS_DRIVER" - IncludeSearchPath=""$(ProjectDir)";"$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(WINDDK_ROOT)\inc\ddk";"$(WINDDK_ROOT)\inc\api"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="0" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="echo ------ Building veracrypt.sys: Release x86 ------
cmd.exe /c BuildDriver.cmd -build -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"
if errorlevel 1 exit %errorlevel%
echo.
echo ------ Building veracrypt.sys: Release x64 ------
BuildDriver.cmd -build -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - ReBuildCommandLine="echo ------ Rebuilding veracrypt.sys: Release x86 ------
cmd.exe /c BuildDriver.cmd -rebuild -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"
if errorlevel 1 exit %errorlevel%
echo.
echo ------ Rebuilding veracrypt.sys: Release x64 ------
BuildDriver.cmd -rebuild -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - CleanCommandLine="echo ------ Cleaning veracrypt.sys: Release x86 ------
cmd.exe /c BuildDriver.cmd -clean -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"
if errorlevel 1 exit %errorlevel%
echo.
echo ------ Cleaning veracrypt.sys: Release x64 ------
BuildDriver.cmd -clean -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - Output="" - PreprocessorDefinitions="TC_WINDOWS_DRIVER" - IncludeSearchPath=""$(ProjectDir)";"$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(WINDDK_ROOT)\inc\ddk";"$(WINDDK_ROOT)\inc\api"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - <Configuration - Name="Release x86|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="0" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="BuildDriver.cmd -build -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - ReBuildCommandLine="BuildDriver.cmd -rebuild -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - CleanCommandLine="BuildDriver.cmd -clean -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - Output="" - PreprocessorDefinitions="TC_WINDOWS_DRIVER" - IncludeSearchPath=""$(ProjectDir)";"$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(WINDDK_ROOT)\inc\ddk";"$(WINDDK_ROOT)\inc\api"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - <Configuration - Name="Debug x86|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="0" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL:
) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL: )

BuildDriver.cmd -build -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - ReBuildCommandLine="if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL:
) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL: )

BuildDriver.cmd -rebuild -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - CleanCommandLine="BuildDriver.cmd -clean -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - Output="$(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe" - PreprocessorDefinitions="DEBUG;_DEBUG;TC_WINDOWS_DRIVER" - IncludeSearchPath=""$(ProjectDir)";"$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(WINDDK_ROOT)\inc\ddk";"$(WINDDK_ROOT)\inc\api"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - <Configuration - Name="Release x64|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="0" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="BuildDriver.cmd -build -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - ReBuildCommandLine="BuildDriver.cmd -rebuild -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - CleanCommandLine="BuildDriver.cmd -clean -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - Output="" - PreprocessorDefinitions="TC_WINDOWS_DRIVER" - IncludeSearchPath=""$(ProjectDir)";"$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(WINDDK_ROOT)\inc\ddk";"$(WINDDK_ROOT)\inc\api"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - <Configuration - Name="Debug x64|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="0" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - > - <Tool - Name="VCNMakeTool" - BuildCommandLine="if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL:
) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL: )

BuildDriver.cmd -build -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - ReBuildCommandLine="if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL:
) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL: )

BuildDriver.cmd -rebuild -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - CleanCommandLine="BuildDriver.cmd -clean -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"" - Output="$(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe" - PreprocessorDefinitions="DEBUG;_DEBUG;TC_WINDOWS_DRIVER" - IncludeSearchPath=""$(ProjectDir)";"$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(WINDDK_ROOT)\inc\ddk";"$(WINDDK_ROOT)\inc\api"" - ForcedIncludes="" - AssemblySearchPath="" - ForcedUsingAssemblies="" - CompileAsManaged="" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\DriveFilter.c" - > - </File> - <File - RelativePath=".\DumpFilter.c" - > - </File> - <File - RelativePath=".\EncryptedIoQueue.c" - > - </File> - <File - RelativePath=".\Ntdriver.c" - > - </File> - <File - RelativePath=".\Ntvol.c" - > - </File> - <File - RelativePath=".\VolumeFilter.c" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\Cache.c" - > - </File> - <File - RelativePath="..\Common\Crc.c" - > - </File> - <File - RelativePath="..\Common\Crypto.c" - > - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.c" - > - </File> - <File - RelativePath="..\Common\Endian.c" - > - </File> - <File - RelativePath="..\Common\GfMul.c" - > - </File> - <File - RelativePath="..\Common\Pkcs5.c" - > - </File> - <File - RelativePath="..\Common\Tests.c" - > - </File> - <File - RelativePath="..\Common\Volumes.c" - > - </File> - <File - RelativePath="..\Common\Wipe.c" - > - </File> - <File - RelativePath="..\Common\Xts.c" - > - </File> - </Filter> - <Filter - Name="Crypto" - > - <File - RelativePath="..\Crypto\Aes_hw_cpu.asm" - > - </File> - <File - RelativePath="..\Crypto\Aes_x64.asm" - > - </File> - <File - RelativePath="..\Crypto\Aes_x86.asm" - > - </File> - <File - RelativePath="..\Crypto\Aeskey.c" - > - </File> - <File - RelativePath="..\Crypto\Aestab.c" - > - </File> - <File - RelativePath="..\Crypto\Rmd160.c" - > - </File> - <File - RelativePath="..\Crypto\Serpent.c" - > - </File> - <File - RelativePath="..\Crypto\Sha2.c" - > - </File> - <File - RelativePath="..\Crypto\Twofish.c" - > - </File> - <File - RelativePath="..\Crypto\Whirlpool.c" - > - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\Common\Apidrvr.h" - > - </File> - <File - RelativePath="..\Common\Cache.h" - > - </File> - <File - RelativePath="..\Common\Common.h" - > - </File> - <File - RelativePath=".\DriveFilter.h" - > - </File> - <File - RelativePath=".\DumpFilter.h" - > - </File> - <File - RelativePath=".\EncryptedIoQueue.h" - > - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.h" - > - </File> - <File - RelativePath="..\Common\GfMul.h" - > - </File> - <File - RelativePath=".\Ntdriver.h" - > - </File> - <File - RelativePath=".\Ntvol.h" - > - </File> - <File - RelativePath=".\resource.h" - > - </File> - <File - RelativePath="..\Common\Tcdefs.h" - > - </File> - <File - RelativePath=".\VolumeFilter.h" - > - </File> - <File - RelativePath="..\Common\Volumes.h" - > - </File> - <File - RelativePath="..\Common\Wipe.h" - > - </File> - <File - RelativePath="..\Common\Xts.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - <File - RelativePath=".\Driver.rc" - > - </File> - </Filter> - <Filter - Name="Build Files" - > - <File - RelativePath=".\BuildDriver.cmd" - > - </File> - <File - RelativePath=".\Makefile" - > - </File> - <File - RelativePath=".\Sources" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\Makefile" - > - </File> - <File - RelativePath="..\Common\Sources" - > - </File> - </Filter> - <Filter - Name="Crypto" - > - <File - RelativePath="..\Crypto\Makefile" - > - </File> - <File - RelativePath="..\Crypto\Makefile.inc" - > - </File> - <File - RelativePath="..\Crypto\Sources" - > - </File> - </Filter> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/Driver/Driver.vcxproj b/src/Driver/Driver.vcxproj index 7c92f05b..17fbfa43 100644 --- a/src/Driver/Driver.vcxproj +++ b/src/Driver/Driver.vcxproj @@ -1,221 +1,218 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug x64|Win32"> - <Configuration>Debug x64</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug x86|Win32"> - <Configuration>Debug x86</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release x64|Win32"> - <Configuration>Release x64</Configuration> - <Platform>Win32</Platform> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release x86|Win32"> - <Configuration>Release x86</Configuration> - <Platform>Win32</Platform> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> - <ProjectGuid>{EF5EF444-18D0-40D7-8DFA-775EC4448602}</ProjectGuid> - <RootNamespace>Driver</RootNamespace> - <Keyword>MakeFileProj</Keyword> + <ProjectGuid>{B5F6C878-6C9E-48A7-91E3-7137A7B85896}</ProjectGuid> + <TemplateGuid>{1bc93793-694f-48fe-9372-81e2b05556fd}</TemplateGuid> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion> + <Configuration>Debug</Configuration> + <Platform Condition="'$(Platform)' == ''">x64</Platform> + <RootNamespace>veracrypt</RootNamespace> + <ProjectName>Driver</ProjectName> + <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'" Label="Configuration"> - <ConfigurationType>Makefile</ConfigurationType> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="Configuration"> - <ConfigurationType>Makefile</ConfigurationType> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'" Label="Configuration"> - <ConfigurationType>Makefile</ConfigurationType> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + <DriverType>WDM</DriverType> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <_NT_TARGET_VERSION>0xA000006</_NT_TARGET_VERSION> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'" Label="Configuration"> - <ConfigurationType>Makefile</ConfigurationType> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + <DriverType>WDM</DriverType> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <_NT_TARGET_VERSION>0xA000006</_NT_TARGET_VERSION> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Makefile</ConfigurationType> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + <DriverType>WDM</DriverType> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <_NT_TARGET_VERSION>0xA000006</_NT_TARGET_VERSION> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Makefile</ConfigurationType> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + <DriverType>WDM</DriverType> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <_NT_TARGET_VERSION>0xA000006</_NT_TARGET_VERSION> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <ImportGroup Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo ------ Building veracrypt.sys: Debug x86 ------ -cmd.exe /c BuildDriver.cmd -build -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)" -if errorlevel 1 exit %errorlevel% -echo. -echo ------ Building veracrypt.sys: Debug x64 ------ -BuildDriver.cmd -build -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeBuildCommandLine> - <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo ------ Rebuilding veracrypt.sys: Debug x86 ------ -cmd.exe /c BuildDriver.cmd -rebuild -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)" -if errorlevel 1 exit %errorlevel% -echo. -echo ------ Rebuilding veracrypt.sys: Debug x64 ------ -BuildDriver.cmd -rebuild -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeReBuildCommandLine> - <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo ------ Cleaning veracrypt.sys: Debug x86 ------ -cmd.exe /c BuildDriver.cmd -clean -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)" -if errorlevel 1 exit %errorlevel% -echo. -echo ------ Cleaning veracrypt.sys: Debug x64 ------ -BuildDriver.cmd -clean -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeCleanCommandLine> - <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> - <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">DEBUG;_DEBUG;TC_WINDOWS_DRIVER;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> - <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir);$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(WINDDK_ROOT)\inc\ddk;$(WINDDK_ROOT)\inc\api;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> - <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> - <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> - <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo ------ Building veracrypt.sys: Release x86 ------ -cmd.exe /c BuildDriver.cmd -build -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)" -if errorlevel 1 exit %errorlevel% -echo. -echo ------ Building veracrypt.sys: Release x64 ------ -BuildDriver.cmd -build -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeBuildCommandLine> - <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo ------ Rebuilding veracrypt.sys: Release x86 ------ -cmd.exe /c BuildDriver.cmd -rebuild -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)" -if errorlevel 1 exit %errorlevel% -echo. -echo ------ Rebuilding veracrypt.sys: Release x64 ------ -BuildDriver.cmd -rebuild -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeReBuildCommandLine> - <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo ------ Cleaning veracrypt.sys: Release x86 ------ -cmd.exe /c BuildDriver.cmd -clean -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)" -if errorlevel 1 exit %errorlevel% -echo. -echo ------ Cleaning veracrypt.sys: Release x64 ------ -BuildDriver.cmd -clean -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeCleanCommandLine> - <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TC_WINDOWS_DRIVER;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> - <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir);$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(WINDDK_ROOT)\inc\ddk;$(WINDDK_ROOT)\inc\api;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> - <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> - <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> - <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">$(Configuration)\</IntDir> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">BuildDriver.cmd -build -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeBuildCommandLine> - <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">BuildDriver.cmd -rebuild -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeReBuildCommandLine> - <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">BuildDriver.cmd -clean -release -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeCleanCommandLine> - <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'" /> - <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">TC_WINDOWS_DRIVER;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> - <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">$(ProjectDir);$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(WINDDK_ROOT)\inc\ddk;$(WINDDK_ROOT)\inc\api;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> - <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> - <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> - <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release x86|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">$(Configuration)\</IntDir> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL: -) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL: ) - -BuildDriver.cmd -build -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeBuildCommandLine> - <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL: -) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe >NUL: ) - -BuildDriver.cmd -rebuild -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeReBuildCommandLine> - <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">BuildDriver.cmd -clean -debug -x86 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeCleanCommandLine> - <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">$(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe</NMakeOutput> - <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">DEBUG;_DEBUG;TC_WINDOWS_DRIVER;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> - <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">$(ProjectDir);$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(WINDDK_ROOT)\inc\ddk;$(WINDDK_ROOT)\inc\api;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> - <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> - <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> - <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug x86|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(Configuration)\</IntDir> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">BuildDriver.cmd -build -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeBuildCommandLine> - <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">BuildDriver.cmd -rebuild -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeReBuildCommandLine> - <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">BuildDriver.cmd -clean -release -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeCleanCommandLine> - <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" /> - <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">TC_WINDOWS_DRIVER;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> - <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(ProjectDir);$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(WINDDK_ROOT)\inc\ddk;$(WINDDK_ROOT)\inc\api;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> - <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> - <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> - <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(Configuration)\</IntDir> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL: -) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL: ) - -BuildDriver.cmd -build -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeBuildCommandLine> - <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL: -) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe >NUL: ) - -BuildDriver.cmd -rebuild -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeReBuildCommandLine> - <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">BuildDriver.cmd -clean -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Crypto" "$(ProjectDir)"</NMakeCleanCommandLine> - <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe</NMakeOutput> - <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">DEBUG;_DEBUG;TC_WINDOWS_DRIVER;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> - <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(ProjectDir);$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(WINDDK_ROOT)\inc\ddk;$(WINDDK_ROOT)\inc\api;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> - <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> - <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> - <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> + <PropertyGroup /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> + <TargetName>veracrypt</TargetName> + <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> + <TargetName>veracrypt</TargetName> + <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir> + <EnableInf2cat>false</EnableInf2cat> </PropertyGroup> - <ItemDefinitionGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> + <TargetName>veracrypt</TargetName> + <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> + <TargetName>veracrypt</TargetName> + <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir> + <EnableInf2cat>false</EnableInf2cat> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + <ClCompile> + <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Inf> + <CatalogFileName>veracrypt.cat</CatalogFileName> + </Inf> + <Inf> + <ProviderName> + </ProviderName> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> + </Inf> + <Link> + <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy $(OutDir)veracrypt.sys "$(SolutionDir)Debug\Setup Files\veracrypt-x64.sys" +copy $(OutDir)veracrypt.pdb "$(SolutionDir)Debug\Setup Files\veracrypt-x64.pdb" +copy $(OutDir)vc143.pdb "$(SolutionDir)Debug\Setup Files\vc143-x64.pdb" +copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + <ClCompile> + <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Inf> + <CatalogFileName>veracrypt.cat</CatalogFileName> + </Inf> + <Inf> + <ProviderName> + </ProviderName> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> + </Inf> + <Link> + <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy $(OutDir)veracrypt.sys "$(SolutionDir)Release\Setup Files\veracrypt-x64.sys" +copy $(OutDir)veracrypt.pdb "$(SolutionDir)Release\Setup Files\veracrypt-x64.pdb" +copy $(OutDir)vc143.pdb "$(SolutionDir)Release\Setup Files\vc143-x64.pdb" +copy $(OutDir)veracrypt.inf "$(SolutionDir)Release\Setup Files\veracrypt.inf"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + <ClCompile> + <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;_ARM64_;ARM64;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ClCompile> + <Inf> + <CatalogFileName>veracrypt.cat</CatalogFileName> + </Inf> + <Inf> + <ProviderName> + </ProviderName> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> + </Inf> + <Link> + <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy $(OutDir)veracrypt.sys "$(SolutionDir)Release\Setup Files\veracrypt-arm64.sys" +copy $(OutDir)veracrypt.pdb "$(SolutionDir)Release\Setup Files\veracrypt-arm64.pdb" +copy $(OutDir)vc143.pdb "$(SolutionDir)Release\Setup Files\vc143-arm64.pdb" +copy $(OutDir)veracrypt.inf "$(SolutionDir)Release\Setup Files\veracrypt.inf"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + <ClCompile> + <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_NO_CRT_STDIO_INLINE;UNICODE;_UNICODE;DEBUG;_DEBUG;_ARM64_;ARM64;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ClCompile> + <Inf> + <CatalogFileName>veracrypt.cat</CatalogFileName> + </Inf> + <Inf> + <ProviderName> + </ProviderName> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> + </Inf> + <Link> + <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy $(OutDir)veracrypt.sys "$(SolutionDir)Debug\Setup Files\veracrypt-arm64.sys" +copy $(OutDir)veracrypt.pdb "$(SolutionDir\Debug\Setup Files\veracrypt-arm64.pdb" +copy $(OutDir)vc143.pdb "$(SolutionDir)Debug\Setup Files\vc143-arm64.pdb" +copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf"</Command> + </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\Crypto\blake2s.c" /> - <ClCompile Include="..\Crypto\blake2s_SSE2.c" /> - <ClCompile Include="..\Crypto\blake2s_SSE41.c" /> - <ClCompile Include="..\Crypto\blake2s_SSSE3.c" /> - <ClCompile Include="..\Crypto\Camellia.c" /> - <ClCompile Include="..\Crypto\chacha-xmm.c" /> - <ClCompile Include="..\Crypto\chacha256.c" /> - <ClCompile Include="..\Crypto\chachaRng.c" /> - <ClCompile Include="..\Crypto\jitterentropy-base.c" /> - <ClCompile Include="..\Crypto\rdrand.c" /> - <ClCompile Include="..\Crypto\SerpentFast.c" /> - <ClCompile Include="..\Crypto\SerpentFast_simd.cpp" /> - <ClCompile Include="..\Crypto\Streebog.c" /> - <ClCompile Include="..\Crypto\t1ha2.c" /> - <ClCompile Include="..\Crypto\t1ha2_selfcheck.c" /> - <ClCompile Include="..\Crypto\t1ha_selfcheck.c" /> - <ClCompile Include="DriveFilter.c" /> - <ClCompile Include="DumpFilter.c" /> - <ClCompile Include="EncryptedIoQueue.c" /> - <ClCompile Include="Ntdriver.c" /> - <ClCompile Include="Ntvol.c" /> - <ClCompile Include="VolumeFilter.c" /> + <Inf Include="veracrypt.inf" /> + </ItemGroup> + <ItemGroup> + <FilesToPackage Include="$(TargetPath)" /> + </ItemGroup> + <ItemGroup> <ClCompile Include="..\Common\Cache.c" /> <ClCompile Include="..\Common\Crc.c" /> <ClCompile Include="..\Common\Crypto.c" /> <ClCompile Include="..\Common\EncryptionThreadPool.c" /> <ClCompile Include="..\Common\Endian.c" /> @@ -223,87 +220,398 @@ BuildDriver.cmd -rebuild -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Cry <ClCompile Include="..\Common\Pkcs5.c" /> <ClCompile Include="..\Common\Tests.c" /> <ClCompile Include="..\Common\Volumes.c" /> <ClCompile Include="..\Common\Wipe.c" /> <ClCompile Include="..\Common\Xts.c" /> + <ClCompile Include="..\Crypto\Aescrypt.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\Crypto\Aeskey.c" /> <ClCompile Include="..\Crypto\Aestab.c" /> + <ClCompile Include="..\Crypto\Aes_hw_armv8.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\Crypto\blake2s.c" /> + <ClCompile Include="..\Crypto\blake2s_SSE2.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\Crypto\blake2s_SSE41.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\Crypto\blake2s_SSSE3.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\Crypto\Camellia.c" /> + <ClCompile Include="..\Crypto\chacha-xmm.c" /> + <ClCompile Include="..\Crypto\chacha256.c" /> + <ClCompile Include="..\Crypto\chachaRng.c" /> + <ClCompile Include="..\Crypto\cpu.c" /> + <ClCompile Include="..\Crypto\jitterentropy-base.c" /> + <ClCompile Include="..\Crypto\kuznyechik.c" /> + <ClCompile Include="..\Crypto\kuznyechik_simd.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\Crypto\rdrand.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\Crypto\SerpentFast.c" /> + <ClCompile Include="..\Crypto\SerpentFast_simd.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\Crypto\Sha2.c" /> + <ClCompile Include="..\Crypto\sha256_armv8.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\Crypto\Sha2Intel.c" /> + <ClCompile Include="..\Crypto\Streebog.c" /> + <ClCompile Include="..\Crypto\t1ha2.c" /> + <ClCompile Include="..\Crypto\t1ha2_selfcheck.c" /> + <ClCompile Include="..\Crypto\t1ha_selfcheck.c" /> <ClCompile Include="..\Crypto\Twofish.c" /> <ClCompile Include="..\Crypto\Whirlpool.c" /> + <ClCompile Include="..\Driver\DriveFilter.c" /> + <ClCompile Include="..\Driver\DumpFilter.c" /> + <ClCompile Include="..\Driver\EncryptedIoQueue.c" /> + <ClCompile Include="..\Driver\Ntdriver.c" /> + <ClCompile Include="..\Driver\Ntvol.c" /> + <ClCompile Include="..\Driver\VolumeFilter.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Common\Tcdefs.h" /> + <ClInclude Include="..\Crypto\Aes.h" /> + <ClInclude Include="..\Crypto\Aesopt.h" /> + <ClInclude Include="..\Crypto\AesSmall.h" /> + <ClInclude Include="..\Crypto\Aestab.h" /> + <ClInclude Include="..\Crypto\Aes_hw_cpu.h" /> + <ClInclude Include="..\Crypto\Camellia.h" /> + <ClInclude Include="..\Crypto\chacha256.h" /> + <ClInclude Include="..\Crypto\chachaRng.h" /> + <ClInclude Include="..\Crypto\chacha_u1.h" /> + <ClInclude Include="..\Crypto\chacha_u4.h" /> + <ClInclude Include="..\Crypto\config.h" /> + <ClInclude Include="..\Crypto\cpu.h" /> + <ClInclude Include="..\Crypto\GostCipher.h" /> + <ClInclude Include="..\Crypto\jitterentropy-base-user.h" /> + <ClInclude Include="..\Crypto\jitterentropy.h" /> + <ClInclude Include="..\Crypto\kuznyechik.h" /> + <ClInclude Include="..\Crypto\misc.h" /> + <ClInclude Include="..\Crypto\rdrand.h" /> + <ClInclude Include="..\Crypto\Rmd160.h" /> + <ClInclude Include="..\Crypto\SerpentFast.h" /> + <ClInclude Include="..\Crypto\SerpentFast_sbox.h" /> + <ClInclude Include="..\Crypto\Sha2.h" /> + <ClInclude Include="..\Crypto\Streebog.h" /> + <ClInclude Include="..\Crypto\t1ha.h" /> + <ClInclude Include="..\Crypto\t1ha_bits.h" /> + <ClInclude Include="..\Crypto\t1ha_selfcheck.h" /> + <ClInclude Include="..\Crypto\Twofish.h" /> + <ClInclude Include="..\Crypto\Whirlpool.h" /> + <ClInclude Include="..\Driver\DriveFilter.h" /> + <ClInclude Include="..\Driver\DumpFilter.h" /> + <ClInclude Include="..\Driver\EncryptedIoQueue.h" /> + <ClInclude Include="..\Driver\Ntdriver.h" /> + <ClInclude Include="..\Driver\Ntvol.h" /> + <ClInclude Include="..\Driver\Resource.h" /> + <ClInclude Include="..\Driver\VolumeFilter.h" /> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\Aes_hw_cpu.asm"> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\Aes_x64.asm"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\Aes_x86.asm"> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" +</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </CustomBuild> </ItemGroup> <ItemGroup> - <None Include="..\Crypto\Aes_hw_cpu.asm" /> - <None Include="..\Crypto\Aes_x64.asm" /> - <None Include="..\Crypto\Aes_x86.asm" /> - <None Include="..\Crypto\Camellia_aesni_x64.S" /> - <None Include="..\Crypto\Camellia_x64.S" /> - <None Include="..\Crypto\rdrand_ml.asm" /> - <None Include="..\Crypto\sha256-x86-nayuki.S"> + <CustomBuild Include="..\Crypto\Twofish_x64.S"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha256_avx1_x64.asm"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\Camellia_aesni_x64.S"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha256_avx2_x64.asm"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\Camellia_x64.S"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha256_sse4_x64.asm"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -p gas -D WINABI -D __YASM__ -f win64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\sha256-x86-nayuki.S"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha512-x64-nayuki.S"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\sha256_avx1_x64.asm"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha512-x86-nayuki.S"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\sha256_avx2_x64.asm"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha512_avx1_x64.asm"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\sha256_sse4_x64.asm"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha512_avx2_x64.asm"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\sha512-x86-nayuki.S"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\sha512_sse4_x64.asm"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\sha512-x64-nayuki.S"> <FileType>Document</FileType> - </None> - <None Include="..\Crypto\Twofish_x64.S" /> - <None Include="BuildDriver.cmd" /> - <None Include="Makefile" /> - <None Include="Sources" /> - <None Include="..\Common\Makefile" /> - <None Include="..\Common\Sources" /> - <None Include="..\Crypto\Makefile" /> - <None Include="..\Crypto\Makefile.inc" /> - <None Include="..\Crypto\Sources" /> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> </ItemGroup> <ItemGroup> - <ClInclude Include="..\Common\Apidrvr.h" /> - <ClInclude Include="..\Common\Cache.h" /> - <ClInclude Include="..\Common\Common.h" /> - <ClInclude Include="..\Crypto\rdrand.h" /> - <ClInclude Include="DriveFilter.h" /> - <ClInclude Include="DumpFilter.h" /> - <ClInclude Include="EncryptedIoQueue.h" /> - <ClInclude Include="..\Common\EncryptionThreadPool.h" /> - <ClInclude Include="..\Common\GfMul.h" /> - <ClInclude Include="Ntdriver.h" /> - <ClInclude Include="Ntvol.h" /> - <ClInclude Include="resource.h" /> - <ClInclude Include="..\Common\Tcdefs.h" /> - <ClInclude Include="VolumeFilter.h" /> - <ClInclude Include="..\Common\Volumes.h" /> - <ClInclude Include="..\Common\Wipe.h" /> - <ClInclude Include="..\Common\Xts.h" /> + <CustomBuild Include="..\Crypto\sha512_avx1_x64.asm"> + <FileType>Document</FileType> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> </ItemGroup> <ItemGroup> - <ResourceCompile Include="Driver.rc" /> + <CustomBuild Include="..\Crypto\sha512_avx2_x64.asm"> + <FileType>Document</FileType> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\sha512_sse4_x64.asm"> + <FileType>Document</FileType> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & yasm.exe -D WINABI -D __YASM__ -f x64 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\rdrand_ml.asm"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\Crypto\rdseed_ml.asm"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" +</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + </CustomBuild> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> + <ResourceCompile Include="..\Driver\Driver.rc" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/Driver/Driver.vcxproj.filters b/src/Driver/Driver.vcxproj.filters index 41d7a8c4..3c427dad 100644 --- a/src/Driver/Driver.vcxproj.filters +++ b/src/Driver/Driver.vcxproj.filters @@ -1,280 +1,343 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="Source Files"> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> - <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - <Filter Include="Source Files\Common"> - <UniqueIdentifier>{d1f5a533-0da8-4ea8-a749-2fd9725c3666}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\Crypto"> - <UniqueIdentifier>{93a4143b-9d2d-4bab-9532-3f00fe0ae55a}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> </Filter> <Filter Include="Header Files"> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> </Filter> <Filter Include="Resource Files"> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> + </Filter> + <Filter Include="Driver Files"> + <UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier> + <Extensions>inf;inv;inx;mof;mc;</Extensions> + </Filter> + <Filter Include="Common"> + <UniqueIdentifier>{a57937a1-39b7-4056-8a0d-91007f1df0dc}</UniqueIdentifier> </Filter> - <Filter Include="Build Files"> - <UniqueIdentifier>{0e1fab74-bfc9-4968-87d7-a46cde3b4fb6}</UniqueIdentifier> + <Filter Include="Crypto"> + <UniqueIdentifier>{4faf760c-3bff-4dcc-b99d-cde043309fcd}</UniqueIdentifier> </Filter> - <Filter Include="Build Files\Common"> - <UniqueIdentifier>{0385fc55-db3b-4dde-aa34-8396d25af075}</UniqueIdentifier> + <Filter Include="Crypto\Source Files"> + <UniqueIdentifier>{724c69a8-c0a8-4c7b-83f3-f303bc8733eb}</UniqueIdentifier> </Filter> - <Filter Include="Build Files\Crypto"> - <UniqueIdentifier>{6d92b0d0-a99e-46f0-a1d0-9297ae3795f5}</UniqueIdentifier> + <Filter Include="Crypto\Header Files"> + <UniqueIdentifier>{1cc3d97e-dee8-429c-88d1-893306f9ec32}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> - <ClCompile Include="DriveFilter.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="DumpFilter.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="EncryptedIoQueue.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="Ntdriver.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="Ntvol.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="VolumeFilter.c"> - <Filter>Source Files</Filter> - </ClCompile> + <Inf Include="veracrypt.inf"> + <Filter>Driver Files</Filter> + </Inf> + </ItemGroup> + <ItemGroup> <ClCompile Include="..\Common\Cache.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Crc.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Crypto.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\EncryptionThreadPool.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Endian.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\GfMul.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Pkcs5.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Tests.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Volumes.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Wipe.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> </ClCompile> <ClCompile Include="..\Common\Xts.c"> - <Filter>Source Files\Common</Filter> + <Filter>Common</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\Aescrypt.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> <ClCompile Include="..\Crypto\Aeskey.c"> - <Filter>Source Files\Crypto</Filter> + <Filter>Crypto\Source Files</Filter> </ClCompile> <ClCompile Include="..\Crypto\Aestab.c"> - <Filter>Source Files\Crypto</Filter> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\Sha2.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\blake2s.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\Twofish.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\blake2s_SSE2.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\Whirlpool.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\blake2s_SSE41.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\blake2s_SSSE3.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> <ClCompile Include="..\Crypto\Camellia.c"> - <Filter>Source Files\Crypto</Filter> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\SerpentFast.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\chacha-xmm.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\SerpentFast_simd.cpp"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\chacha256.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\chachaRng.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\cpu.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\jitterentropy-base.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\kuznyechik.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\kuznyechik_simd.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> <ClCompile Include="..\Crypto\rdrand.c"> - <Filter>Source Files\Crypto</Filter> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\chacha256.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\SerpentFast.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\chachaRng.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\SerpentFast_simd.cpp"> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\chacha-xmm.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\Sha2.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\Sha2Intel.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> <ClCompile Include="..\Crypto\Streebog.c"> - <Filter>Source Files\Crypto</Filter> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\jitterentropy-base.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\t1ha2.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\t1ha2_selfcheck.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> <ClCompile Include="..\Crypto\t1ha_selfcheck.c"> - <Filter>Source Files\Crypto</Filter> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\t1ha2.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\Twofish.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\t1ha2_selfcheck.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Crypto\Whirlpool.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\blake2s.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Driver\DriveFilter.c"> + <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\blake2s_SSE2.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Driver\DumpFilter.c"> + <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\blake2s_SSE41.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Driver\EncryptedIoQueue.c"> + <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\Crypto\blake2s_SSSE3.c"> - <Filter>Source Files\Crypto</Filter> + <ClCompile Include="..\Driver\Ntdriver.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Driver\Ntvol.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Driver\VolumeFilter.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\Aes_hw_armv8.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\sha256_armv8.c"> + <Filter>Crypto\Source Files</Filter> </ClCompile> </ItemGroup> <ItemGroup> - <None Include="..\Crypto\Aes_hw_cpu.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\Aes_x64.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\Aes_x86.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="BuildDriver.cmd"> - <Filter>Build Files</Filter> - </None> - <None Include="Makefile"> - <Filter>Build Files</Filter> - </None> - <None Include="Sources"> - <Filter>Build Files</Filter> - </None> - <None Include="..\Common\Makefile"> - <Filter>Build Files\Common</Filter> - </None> - <None Include="..\Common\Sources"> - <Filter>Build Files\Common</Filter> - </None> - <None Include="..\Crypto\Makefile"> - <Filter>Build Files\Crypto</Filter> - </None> - <None Include="..\Crypto\Makefile.inc"> - <Filter>Build Files\Crypto</Filter> - </None> - <None Include="..\Crypto\Sources"> - <Filter>Build Files\Crypto</Filter> - </None> - <None Include="..\Crypto\Camellia_aesni_x64.S"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\Camellia_x64.S"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\Twofish_x64.S"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha256-x86-nayuki.S"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha512_sse4_x64.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha256_avx1_x64.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha256_avx2_x64.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha256_sse4_x64.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha512-x86-nayuki.S"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha512-x64-nayuki.S"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha512_avx1_x64.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\sha512_avx2_x64.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - <None Include="..\Crypto\rdrand_ml.asm"> - <Filter>Source Files\Crypto</Filter> - </None> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\Common\Apidrvr.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Common\Tcdefs.h"> + <Filter>Common</Filter> </ClInclude> - <ClInclude Include="..\Common\Cache.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\Aes.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\Common.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\Aesopt.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="DriveFilter.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\AesSmall.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="DumpFilter.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\Aestab.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="EncryptedIoQueue.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\Aes_hw_cpu.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\EncryptionThreadPool.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\Camellia.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\GfMul.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\chacha256.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="Ntdriver.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\chachaRng.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="Ntvol.h"> - <Filter>Header Files</Filter> + <ClInclude Include="..\Crypto\chacha_u1.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\chacha_u4.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\config.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\cpu.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\GostCipher.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\jitterentropy-base-user.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\jitterentropy.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\kuznyechik.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\misc.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\rdrand.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\Rmd160.h"> + <Filter>Crypto\Header Files</Filter> </ClInclude> - <ClInclude Include="resource.h"> + <ClInclude Include="..\Crypto\SerpentFast.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\SerpentFast_sbox.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\Sha2.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\Streebog.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\t1ha.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\t1ha_bits.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\t1ha_selfcheck.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\Twofish.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Crypto\Whirlpool.h"> + <Filter>Crypto\Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Driver\DriveFilter.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\Tcdefs.h"> + <ClInclude Include="..\Driver\DumpFilter.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="VolumeFilter.h"> + <ClInclude Include="..\Driver\EncryptedIoQueue.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\Volumes.h"> + <ClInclude Include="..\Driver\Ntdriver.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\Wipe.h"> + <ClInclude Include="..\Driver\Ntvol.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\Xts.h"> + <ClInclude Include="..\Driver\Resource.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Crypto\rdrand.h"> + <ClInclude Include="..\Driver\VolumeFilter.h"> <Filter>Header Files</Filter> </ClInclude> </ItemGroup> <ItemGroup> - <ResourceCompile Include="Driver.rc"> + <CustomBuild Include="..\Crypto\Aes_hw_cpu.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\Aes_x64.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\Aes_x86.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\Twofish_x64.S"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\Camellia_aesni_x64.S"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\Camellia_x64.S"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha256-x86-nayuki.S"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha256_avx1_x64.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha256_avx2_x64.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha256_sse4_x64.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha512-x86-nayuki.S"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha512-x64-nayuki.S"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha512_avx1_x64.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha512_avx2_x64.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\sha512_sse4_x64.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\rdrand_ml.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + <CustomBuild Include="..\Crypto\rdseed_ml.asm"> + <Filter>Crypto\Source Files</Filter> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\Driver\Driver.rc"> <Filter>Resource Files</Filter> </ResourceCompile> </ItemGroup> </Project>
\ No newline at end of file diff --git a/src/Driver/Driver.vcxproj.user b/src/Driver/Driver.vcxproj.user index ace9a86a..f5bd9cdc 100644 --- a/src/Driver/Driver.vcxproj.user +++ b/src/Driver/Driver.vcxproj.user @@ -1,3 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <RemoveDriver>True</RemoveDriver> + <InstallMode>None</InstallMode> + <HardwareIdString /> + <CommandLine /> + <ScriptPath>C:\Program Files (x86)\Windows Kits\10\Testing\Tests\Utilities\DefaultDriverPackageInstallationTask.dll</ScriptPath> + <DbgengRemoteMachineName>VM11</DbgengRemoteMachineName> + <DbgengKernelMachineName>VM11</DbgengKernelMachineName> + <DeployFiles /> + <ScriptName>Microsoft.DriverKit.DefaultDriverPackageInstallationClass.PerformDefaultDriverPackageInstallation</ScriptName> + <ScriptDeviceQuery /> + <SignMode>Off</SignMode> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <SignMode>Off</SignMode> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> + </PropertyGroup> </Project>
\ No newline at end of file diff --git a/src/Driver/DumpFilter.c b/src/Driver/DumpFilter.c index 725a4fe0..4105b116 100644 --- a/src/Driver/DumpFilter.c +++ b/src/Driver/DumpFilter.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -16,11 +16,11 @@ #include "Tests.h" #include "cpu.h" static DriveFilterExtension *BootDriveFilterExtension = NULL; static LARGE_INTEGER DumpPartitionOffset; -static byte *WriteFilterBuffer = NULL; +static uint8 *WriteFilterBuffer = NULL; static SIZE_T WriteFilterBufferSize; NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZATION_DATA filterInitData) { @@ -59,19 +59,10 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT { status = STATUS_CRC_ERROR; goto err; } - // KeSaveFloatingPointState() may generate a bug check during crash dump -#if !defined (_WIN64) - if (filterExtension->DumpType == DumpTypeCrashdump) - { - dumpConfig.HwEncryptionEnabled = FALSE; - // disable also CPU extended features used in optimizations - DisableCPUExtendedFeatures (); - } -#endif EnableHwEncryption (dumpConfig.HwEncryptionEnabled); if (!AutoTestAlgorithms()) { @@ -127,15 +118,11 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT goto err; } WriteFilterBufferSize = ((SIZE_T)filterInitData->MaxPagesPerWrite) * PAGE_SIZE; -#ifdef _WIN64 highestAcceptableWriteBufferAddr.QuadPart = 0x7FFffffFFFFLL; -#else - highestAcceptableWriteBufferAddr.QuadPart = 0xffffFFFFLL; -#endif WriteFilterBuffer = MmAllocateContiguousMemory (WriteFilterBufferSize, highestAcceptableWriteBufferAddr); if (!WriteFilterBuffer) { status = STATUS_INSUFFICIENT_RESOURCES; @@ -156,10 +143,11 @@ err: } static NTSTATUS DumpFilterStart (PFILTER_EXTENSION filterExtension) { + UNREFERENCED_PARAMETER(filterExtension); Dump ("DumpFilterStart type=%d\n", filterExtension->DumpType); if (BootDriveFilterExtension->MagicNumber != TC_BOOT_DRIVE_FILTER_EXTENSION_MAGIC_NUMBER) TC_BUG_CHECK (STATUS_CRC_ERROR); @@ -173,10 +161,11 @@ static NTSTATUS DumpFilterWrite (PFILTER_EXTENSION filterExtension, PLARGE_INTEG uint64 offset = DumpPartitionOffset.QuadPart + diskWriteOffset->QuadPart; uint64 intersectStart; uint32 intersectLength; PVOID writeBuffer; CSHORT origMdlFlags; + UNREFERENCED_PARAMETER(filterExtension); if (BootDriveFilterExtension->MagicNumber != TC_BOOT_DRIVE_FILTER_EXTENSION_MAGIC_NUMBER) TC_BUG_CHECK (STATUS_CRC_ERROR); if (BootDriveFilterExtension->Queue.EncryptedAreaEndUpdatePending) // Hibernation should always abort the setup thread @@ -192,11 +181,11 @@ static NTSTATUS DumpFilterWrite (PFILTER_EXTENSION filterExtension, PLARGE_INTEG TC_BUG_CHECK (STATUS_INVALID_PARAMETER); if ((offset & (ENCRYPTION_DATA_UNIT_SIZE - 1)) != 0) TC_BUG_CHECK (STATUS_INVALID_PARAMETER); - writeBuffer = MmGetSystemAddressForMdlSafe (writeMdl, (HighPagePriority | ExDefaultMdlProtection)); + writeBuffer = MmGetSystemAddressForMdlSafe (writeMdl, (HighPagePriority | MdlMappingNoExecute)); if (!writeBuffer) TC_BUG_CHECK (STATUS_INSUFFICIENT_RESOURCES); memcpy (WriteFilterBuffer, writeBuffer, dataLength); @@ -240,18 +229,20 @@ static NTSTATUS DumpFilterWrite (PFILTER_EXTENSION filterExtension, PLARGE_INTEG } static NTSTATUS DumpFilterFinish (PFILTER_EXTENSION filterExtension) { + UNREFERENCED_PARAMETER(filterExtension); Dump ("DumpFilterFinish type=%d\n", filterExtension->DumpType); return STATUS_SUCCESS; } static NTSTATUS DumpFilterUnload (PFILTER_EXTENSION filterExtension) { + UNREFERENCED_PARAMETER(filterExtension); Dump ("DumpFilterUnload type=%d\n", filterExtension->DumpType); if (WriteFilterBuffer) { memset (WriteFilterBuffer, 0, WriteFilterBufferSize); diff --git a/src/Driver/DumpFilter.h b/src/Driver/DumpFilter.h index c72115a2..88091bd4 100644 --- a/src/Driver/DumpFilter.h +++ b/src/Driver/DumpFilter.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Driver/EncryptedIoQueue.c b/src/Driver/EncryptedIoQueue.c index bdf139a1..c39941e6 100644 --- a/src/Driver/EncryptedIoQueue.c +++ b/src/Driver/EncryptedIoQueue.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -189,11 +189,11 @@ static NTSTATUS CompleteOriginalIrp (EncryptedIoQueueItem *item, NTSTATUS status return status; } -static void AcquireFragmentBuffer (EncryptedIoQueue *queue, byte *buffer) +static void AcquireFragmentBuffer (EncryptedIoQueue *queue, uint8 *buffer) { NTSTATUS status = STATUS_INVALID_PARAMETER; if (buffer == queue->FragmentBufferA) { @@ -207,11 +207,11 @@ static void AcquireFragmentBuffer (EncryptedIoQueue *queue, byte *buffer) if (!NT_SUCCESS (status)) TC_BUG_CHECK (status); } -static void ReleaseFragmentBuffer (EncryptedIoQueue *queue, byte *buffer) +static void ReleaseFragmentBuffer (EncryptedIoQueue *queue, uint8 *buffer) { if (buffer == queue->FragmentBufferA) { KeSetEvent (&queue->FragmentBufferAFreeEvent, IO_DISK_INCREMENT, FALSE); } @@ -223,103 +223,216 @@ static void ReleaseFragmentBuffer (EncryptedIoQueue *queue, byte *buffer) { TC_BUG_CHECK (STATUS_INVALID_PARAMETER); } } -BOOL +BOOL UpdateBuffer( - byte* buffer, - byte* secRegion, - uint64 bufferDiskOffset, - uint32 bufferLength, - BOOL doUpadte - ) + uint8* buffer, + uint8* secRegion, + SIZE_T secRegionSize, + uint64 bufferDiskOffset, + uint32 bufferLength, + BOOL doUpadte +) { uint64 intersectStart; uint32 intersectLength; uint32 i; - DCS_DISK_ENTRY_LIST *DeList = (DCS_DISK_ENTRY_LIST*)(secRegion + 512); + DCS_DISK_ENTRY_LIST *DeList = NULL; BOOL updated = FALSE; - if (secRegion == NULL) return FALSE; + if (secRegion == NULL) + return FALSE; + + // Check if secRegion is large enough to hold the DCS_DISK_ENTRY_LIST structure + // starting at offset 512 + if (secRegionSize < (512 + sizeof(DCS_DISK_ENTRY_LIST))) + return FALSE; + + DeList = (DCS_DISK_ENTRY_LIST*)(secRegion + 512); + + // Ensure Count doesn't exceed the fixed array size + if (DeList->Count > 15) + return FALSE; + for (i = 0; i < DeList->Count; ++i) { if (DeList->DE[i].Type == DE_Sectors) { + uint64 sectorStart = DeList->DE[i].Sectors.Start; + uint64 sectorLength = DeList->DE[i].Sectors.Length; + uint64 sectorOffset = DeList->DE[i].Sectors.Offset; + + // Check that sectorOffset and sectorLength are valid within secRegion + if (sectorOffset > secRegionSize || + sectorLength == 0 || + (sectorOffset + sectorLength) > secRegionSize) + { + // Invalid entry - skip + continue; + } + GetIntersection( bufferDiskOffset, bufferLength, - DeList->DE[i].Sectors.Start, DeList->DE[i].Sectors.Start + DeList->DE[i].Sectors.Length - 1, + sectorStart, sectorStart + sectorLength - 1, &intersectStart, &intersectLength - ); + ); + if (intersectLength != 0) { + uint64 bufferPos = intersectStart - bufferDiskOffset; + uint64 regionPos = sectorOffset + (intersectStart - sectorStart); + + // Check buffer boundaries + if (bufferPos + intersectLength > bufferLength) + continue; // Intersection out of buffer range + + // Check secRegion boundaries + if (regionPos + intersectLength > secRegionSize) + continue; // Intersection out of secRegion range + updated = TRUE; - if(doUpadte && buffer != NULL) { -// Dump("Subst data\n"); + if (doUpadte && buffer != NULL) { memcpy( - buffer + (intersectStart - bufferDiskOffset), - secRegion + DeList->DE[i].Sectors.Offset + (intersectStart - DeList->DE[i].Sectors.Start), + buffer + bufferPos, + secRegion + regionPos, intersectLength - ); - } else { + ); + } + else { + // If no update is needed but intersection found return TRUE; } } } } return updated; } +static VOID CompleteIrpWorkItemRoutine(PDEVICE_OBJECT DeviceObject, PVOID Context) +{ + PCOMPLETE_IRP_WORK_ITEM workItem = (PCOMPLETE_IRP_WORK_ITEM)Context; + EncryptedIoQueueItem* item = (EncryptedIoQueueItem * ) workItem->Item; + EncryptedIoQueue* queue = item->Queue; + KIRQL oldIrql; + UNREFERENCED_PARAMETER(DeviceObject); + + __try + { + // Complete the IRP + TCCompleteDiskIrp(workItem->Irp, workItem->Status, workItem->Information); -static VOID CompletionThreadProc (PVOID threadArg) + item->Status = workItem->Status; + OnItemCompleted(item, FALSE); // Do not free item here; it will be freed below + } + __finally + { + // If no active work items remain, signal the event + if (InterlockedDecrement(&queue->ActiveWorkItems) == 0) + { + KeSetEvent(&queue->NoActiveWorkItemsEvent, IO_DISK_INCREMENT, FALSE); + } + + // Return the work item to the free list + KeAcquireSpinLock(&queue->WorkItemLock, &oldIrql); + InsertTailList(&queue->FreeWorkItemsList, &workItem->ListEntry); + KeReleaseSpinLock(&queue->WorkItemLock, oldIrql); + + // Release the semaphore to signal that a work item is available + KeReleaseSemaphore(&queue->WorkItemSemaphore, IO_DISK_INCREMENT, 1, FALSE); + + // Free the item + ReleasePoolBuffer(queue, item); + } +} + +// Handles the completion of the original IRP. +static VOID HandleCompleteOriginalIrp(EncryptedIoQueue* queue, EncryptedIoRequest* request) { - EncryptedIoQueue *queue = (EncryptedIoQueue *) threadArg; + NTSTATUS status = KeWaitForSingleObject(&queue->WorkItemSemaphore, Executive, KernelMode, FALSE, NULL); + if (queue->ThreadExitRequested) + return; + + if (!NT_SUCCESS(status)) + { + // Handle wait failure: we call the completion routine directly. + // This is not ideal since it can cause deadlock that we are trying to fix but it is better than losing the IRP. + CompleteOriginalIrp(request->Item, STATUS_INSUFFICIENT_RESOURCES, 0); + } + else + { + // Obtain a work item from the free list. + KIRQL oldIrql; + KeAcquireSpinLock(&queue->WorkItemLock, &oldIrql); + PLIST_ENTRY freeEntry = RemoveHeadList(&queue->FreeWorkItemsList); + KeReleaseSpinLock(&queue->WorkItemLock, oldIrql); + + PCOMPLETE_IRP_WORK_ITEM workItem = CONTAINING_RECORD(freeEntry, COMPLETE_IRP_WORK_ITEM, ListEntry); + + // Increment ActiveWorkItems. + InterlockedIncrement(&queue->ActiveWorkItems); + KeResetEvent(&queue->NoActiveWorkItemsEvent); + + // Prepare the work item. + workItem->Irp = request->Item->OriginalIrp; + workItem->Status = request->Item->Status; + workItem->Information = NT_SUCCESS(request->Item->Status) ? request->Item->OriginalLength : 0; + workItem->Item = request->Item; + + // Queue the work item. + IoQueueWorkItem(workItem->WorkItem, CompleteIrpWorkItemRoutine, DelayedWorkQueue, workItem); + } +} + +static VOID CompletionThreadProc(PVOID threadArg) +{ + EncryptedIoQueue* queue = (EncryptedIoQueue*)threadArg; PLIST_ENTRY listEntry; - EncryptedIoRequest *request; + EncryptedIoRequest* request; UINT64_STRUCT dataUnit; if (IsEncryptionThreadPoolRunning()) - KeSetPriorityThread (KeGetCurrentThread(), LOW_REALTIME_PRIORITY); + KeSetPriorityThread(KeGetCurrentThread(), LOW_REALTIME_PRIORITY); while (!queue->ThreadExitRequested) { - if (!NT_SUCCESS (KeWaitForSingleObject (&queue->CompletionThreadQueueNotEmptyEvent, Executive, KernelMode, FALSE, NULL))) + if (!NT_SUCCESS(KeWaitForSingleObject(&queue->CompletionThreadQueueNotEmptyEvent, Executive, KernelMode, FALSE, NULL))) continue; if (queue->ThreadExitRequested) break; - while ((listEntry = ExInterlockedRemoveHeadList (&queue->CompletionThreadQueue, &queue->CompletionThreadQueueLock))) + while ((listEntry = ExInterlockedRemoveHeadList(&queue->CompletionThreadQueue, &queue->CompletionThreadQueueLock))) { - request = CONTAINING_RECORD (listEntry, EncryptedIoRequest, CompletionListEntry); + request = CONTAINING_RECORD(listEntry, EncryptedIoRequest, CompletionListEntry); - if (request->EncryptedLength > 0 && NT_SUCCESS (request->Item->Status)) + if (request->EncryptedLength > 0 && NT_SUCCESS(request->Item->Status)) { - ASSERT (request->EncryptedOffset + request->EncryptedLength <= request->Offset.QuadPart + request->Length); + ASSERT(request->EncryptedOffset + request->EncryptedLength <= request->Offset.QuadPart + request->Length); dataUnit.Value = (request->Offset.QuadPart + request->EncryptedOffset) / ENCRYPTION_DATA_UNIT_SIZE; if (queue->CryptoInfo->bPartitionInInactiveSysEncScope) dataUnit.Value += queue->CryptoInfo->FirstDataUnitNo.Value; else if (queue->RemapEncryptedArea) dataUnit.Value += queue->RemappedAreaDataUnitOffset; - DecryptDataUnits (request->Data + request->EncryptedOffset, &dataUnit, request->EncryptedLength / ENCRYPTION_DATA_UNIT_SIZE, queue->CryptoInfo); + DecryptDataUnits(request->Data + request->EncryptedOffset, &dataUnit, request->EncryptedLength / ENCRYPTION_DATA_UNIT_SIZE, queue->CryptoInfo); } // Dump("Read sector %lld count %d\n", request->Offset.QuadPart >> 9, request->Length >> 9); // Update subst sectors if((queue->SecRegionData != NULL) && (queue->SecRegionSize > 512)) { - UpdateBuffer(request->Data, queue->SecRegionData, request->Offset.QuadPart, request->Length, TRUE); + UpdateBuffer(request->Data, queue->SecRegionData, queue->SecRegionSize, request->Offset.QuadPart, request->Length, TRUE); } if (request->CompleteOriginalIrp) { - CompleteOriginalIrp (request->Item, request->Item->Status, - NT_SUCCESS (request->Item->Status) ? request->Item->OriginalLength : 0); + HandleCompleteOriginalIrp(queue, request); } - ReleasePoolBuffer (queue, request); + ReleasePoolBuffer(queue, request); } } - PsTerminateSystemThread (STATUS_SUCCESS); + PsTerminateSystemThread(STATUS_SUCCESS); } static NTSTATUS TCCachedRead (EncryptedIoQueue *queue, IO_STATUS_BLOCK *ioStatus, PVOID buffer, LARGE_INTEGER offset, ULONG length) { @@ -391,11 +504,11 @@ static VOID IoThreadProc (PVOID threadArg) { if (request->EncryptedLength != request->Length) { // Up to three subfragments may be required to handle a partially remapped fragment int subFragment; - byte *subFragmentData = request->Data; + uint8 *subFragmentData = request->Data; for (subFragment = 0 ; subFragment < 3; ++subFragment) { LARGE_INTEGER subFragmentOffset; ULONG subFragmentLength = 0; @@ -469,12 +582,11 @@ static VOID IoThreadProc (PVOID threadArg) ReleaseFragmentBuffer (queue, request->Data); if (request->CompleteOriginalIrp) { - CompleteOriginalIrp (request->Item, request->Item->Status, - NT_SUCCESS (request->Item->Status) ? request->Item->OriginalLength : 0); + HandleCompleteOriginalIrp(queue, request); } ReleasePoolBuffer (queue, request); } else @@ -613,11 +725,11 @@ static VOID MainThreadProc (PVOID threadArg) && !item->Write && item->OriginalLength > 0 && (item->OriginalLength & (ENCRYPTION_DATA_UNIT_SIZE - 1)) == 0 && (item->OriginalOffset.QuadPart & (ENCRYPTION_DATA_UNIT_SIZE - 1)) != 0) { - byte *buffer; + uint8 *buffer; ULONG alignedLength; LARGE_INTEGER alignedOffset; hResult = ULongAdd(item->OriginalLength, ENCRYPTION_DATA_UNIT_SIZE, &alignedLength); if (hResult != S_OK) { @@ -638,11 +750,11 @@ static VOID MainThreadProc (PVOID threadArg) if (NT_SUCCESS (item->Status)) { UINT64_STRUCT dataUnit; - dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | ExDefaultMdlProtection)); + dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | MdlMappingNoExecute)); if (!dataBuffer) { TCfree (buffer); CompleteOriginalIrp (item, STATUS_INSUFFICIENT_RESOURCES, 0); continue; @@ -657,11 +769,11 @@ static VOID MainThreadProc (PVOID threadArg) DecryptDataUnits (buffer + (intersectStart - alignedOffset.QuadPart), &dataUnit, intersectLength / ENCRYPTION_DATA_UNIT_SIZE, queue->CryptoInfo); } } // Update subst sectors if((queue->SecRegionData != NULL) && (queue->SecRegionSize > 512)) { - UpdateBuffer(buffer, queue->SecRegionData, alignedOffset.QuadPart, alignedLength, TRUE); + UpdateBuffer(buffer, queue->SecRegionData, queue->SecRegionSize, alignedOffset.QuadPart, alignedLength, TRUE); } memcpy (dataBuffer, buffer + (item->OriginalOffset.LowPart & (ENCRYPTION_DATA_UNIT_SIZE - 1)), item->OriginalLength); } @@ -750,19 +862,19 @@ static VOID MainThreadProc (PVOID threadArg) CompleteOriginalIrp (item, STATUS_MEDIA_WRITE_PROTECTED, 0); continue; } else if (item->Write && (queue->SecRegionData != NULL) && (queue->SecRegionSize > 512) - && UpdateBuffer (NULL, queue->SecRegionData, item->OriginalOffset.QuadPart, (uint32)(item->OriginalOffset.QuadPart + item->OriginalLength - 1), FALSE)) + && UpdateBuffer (NULL, queue->SecRegionData, queue->SecRegionSize, item->OriginalOffset.QuadPart, (uint32)(item->OriginalOffset.QuadPart + item->OriginalLength - 1), FALSE)) { // Prevent inappropriately designed software from damaging important data Dump ("Preventing write to the system GPT area\n"); CompleteOriginalIrp (item, STATUS_MEDIA_WRITE_PROTECTED, 0); continue; } - dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | ExDefaultMdlProtection)); + dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | MdlMappingNoExecute)); if (dataBuffer == NULL) { CompleteOriginalIrp (item, STATUS_INSUFFICIENT_RESOURCES, 0); continue; @@ -970,11 +1082,11 @@ NTSTATUS EncryptedIoQueueResumeFromHold (EncryptedIoQueue *queue) NTSTATUS EncryptedIoQueueStart (EncryptedIoQueue *queue) { NTSTATUS status; EncryptedIoQueueBuffer *buffer; - int i, preallocatedIoRequestCount, preallocatedItemCount, fragmentSize; + int i, j, preallocatedIoRequestCount, preallocatedItemCount, fragmentSize; preallocatedIoRequestCount = EncryptionIoRequestCount; preallocatedItemCount = EncryptionItemCount; fragmentSize = EncryptionFragmentSize; @@ -1074,10 +1186,45 @@ retry_preallocated: for (buffer = queue->FirstPoolBuffer; buffer != NULL; buffer = buffer->NextBuffer) { buffer->InUse = FALSE; } + // Initialize the free work item list + InitializeListHead(&queue->FreeWorkItemsList); + KeInitializeSemaphore(&queue->WorkItemSemaphore, EncryptionMaxWorkItems, EncryptionMaxWorkItems); + KeInitializeSpinLock(&queue->WorkItemLock); + + queue->MaxWorkItems = EncryptionMaxWorkItems; + queue->WorkItemPool = (PCOMPLETE_IRP_WORK_ITEM)TCalloc(sizeof(COMPLETE_IRP_WORK_ITEM) * queue->MaxWorkItems); + if (!queue->WorkItemPool) + { + goto noMemory; + } + + // Allocate and initialize work items + for (i = 0; i < (int) queue->MaxWorkItems; ++i) + { + queue->WorkItemPool[i].WorkItem = IoAllocateWorkItem(queue->DeviceObject); + if (!queue->WorkItemPool[i].WorkItem) + { + // Handle allocation failure + // Free previously allocated work items + for (j = 0; j < i; ++j) + { + IoFreeWorkItem(queue->WorkItemPool[j].WorkItem); + } + TCfree(queue->WorkItemPool); + goto noMemory; + } + + // Insert the work item into the free list + ExInterlockedInsertTailList(&queue->FreeWorkItemsList, &queue->WorkItemPool[i].ListEntry, &queue->WorkItemLock); + } + + queue->ActiveWorkItems = 0; + KeInitializeEvent(&queue->NoActiveWorkItemsEvent, NotificationEvent, FALSE); + // Main thread InitializeListHead (&queue->MainThreadQueue); KeInitializeSpinLock (&queue->MainThreadQueueLock); KeInitializeEvent (&queue->MainThreadQueueNotEmptyEvent, SynchronizationEvent, FALSE); @@ -1156,10 +1303,31 @@ NTSTATUS EncryptedIoQueueStop (EncryptedIoQueue *queue) TCStopThread (queue->MainThread, &queue->MainThreadQueueNotEmptyEvent); TCStopThread (queue->IoThread, &queue->IoThreadQueueNotEmptyEvent); TCStopThread (queue->CompletionThread, &queue->CompletionThreadQueueNotEmptyEvent); + // Wait for active work items to complete + KeResetEvent(&queue->NoActiveWorkItemsEvent); + Dump("Queue stopping active work items=%d\n", queue->ActiveWorkItems); + while (InterlockedCompareExchange(&queue->ActiveWorkItems, 0, 0) > 0) + { + KeWaitForSingleObject(&queue->NoActiveWorkItemsEvent, Executive, KernelMode, FALSE, NULL); + // reset the event again in case multiple work items are completing + KeResetEvent(&queue->NoActiveWorkItemsEvent); + } + + // Free pre-allocated work items + for (ULONG i = 0; i < queue->MaxWorkItems; ++i) + { + if (queue->WorkItemPool[i].WorkItem) + { + IoFreeWorkItem(queue->WorkItemPool[i].WorkItem); + queue->WorkItemPool[i].WorkItem = NULL; + } + } + TCfree(queue->WorkItemPool); + TCfree (queue->FragmentBufferA); TCfree (queue->FragmentBufferB); TCfree (queue->ReadAheadBuffer); FreePoolBuffers (queue); diff --git a/src/Driver/EncryptedIoQueue.h b/src/Driver/EncryptedIoQueue.h index 2ab9dc5b..82cc76cd 100644 --- a/src/Driver/EncryptedIoQueue.h +++ b/src/Driver/EncryptedIoQueue.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -24,10 +24,11 @@ #define TC_ENC_IO_QUEUE_PREALLOCATED_ITEM_COUNT 8 #define TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT 16 #define TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_MAX_COUNT 8192 +#define VC_MAX_WORK_ITEMS 1024 typedef struct EncryptedIoQueueBufferStruct { struct EncryptedIoQueueBufferStruct *NextBuffer; @@ -35,10 +36,19 @@ typedef struct EncryptedIoQueueBufferStruct ULONG Size; BOOL InUse; } EncryptedIoQueueBuffer; +typedef struct _COMPLETE_IRP_WORK_ITEM +{ + PIO_WORKITEM WorkItem; + PIRP Irp; + NTSTATUS Status; + ULONG_PTR Information; + void* Item; + LIST_ENTRY ListEntry; // For managing free work items +} COMPLETE_IRP_WORK_ITEM, * PCOMPLETE_IRP_WORK_ITEM; typedef struct { PDEVICE_OBJECT DeviceObject; @@ -81,27 +91,27 @@ typedef struct LIST_ENTRY CompletionThreadQueue; KSPIN_LOCK CompletionThreadQueueLock; KEVENT CompletionThreadQueueNotEmptyEvent; // Fragment buffers - byte *FragmentBufferA; - byte *FragmentBufferB; + uint8 *FragmentBufferA; + uint8 *FragmentBufferB; KEVENT FragmentBufferAFreeEvent; KEVENT FragmentBufferBFreeEvent; // Read-ahead buffer BOOL ReadAheadBufferValid; LARGE_INTEGER LastReadOffset; ULONG LastReadLength; LARGE_INTEGER ReadAheadOffset; ULONG ReadAheadLength; - byte *ReadAheadBuffer; + uint8 *ReadAheadBuffer; LARGE_INTEGER MaxReadAheadOffset; - LONG OutstandingIoCount; + volatile LONG OutstandingIoCount; KEVENT NoOutstandingIoEvent; - LONG IoThreadPendingRequestCount; + volatile LONG IoThreadPendingRequestCount; KEVENT PoolBufferFreeEvent; __int64 TotalBytesRead; __int64 TotalBytesWritten; @@ -117,16 +127,26 @@ typedef struct #ifdef TC_TRACE_IO_QUEUE LARGE_INTEGER LastPerformanceCounter; #endif - byte* SecRegionData; + uint8* SecRegionData; SIZE_T SecRegionSize; volatile BOOL ThreadBlockReadWrite; int FragmentSize; + + // Pre-allocated work items + PCOMPLETE_IRP_WORK_ITEM WorkItemPool; + ULONG MaxWorkItems; + LIST_ENTRY FreeWorkItemsList; + KSEMAPHORE WorkItemSemaphore; + KSPIN_LOCK WorkItemLock; + + volatile LONG ActiveWorkItems; + KEVENT NoActiveWorkItemsEvent; } EncryptedIoQueue; typedef struct { @@ -151,12 +171,12 @@ typedef struct BOOL CompleteOriginalIrp; LARGE_INTEGER Offset; ULONG Length; int64 EncryptedOffset; ULONG EncryptedLength; - byte *Data; - byte *OrigDataBufferFragment; + uint8 *Data; + uint8 *OrigDataBufferFragment; LIST_ENTRY ListEntry; LIST_ENTRY CompletionListEntry; } EncryptedIoRequest; diff --git a/src/Driver/Fuse/Driver.make b/src/Driver/Fuse/Driver.make index b3640115..47f3c2cd 100644 --- a/src/Driver/Fuse/Driver.make +++ b/src/Driver/Fuse/Driver.make @@ -13,8 +13,8 @@ NAME := Driver OBJS := OBJS += FuseService.o -CXXFLAGS += $(shell $(PKG_CONFIG) fuse --cflags) +CXXFLAGS += $(shell $(PKG_CONFIG) $(VC_FUSE_PACKAGE) --cflags) include $(BUILD_INC)/Makefile.inc diff --git a/src/Driver/Fuse/FuseService.cpp b/src/Driver/Fuse/FuseService.cpp index bc3d1023..5fe9f6fe 100644 --- a/src/Driver/Fuse/FuseService.cpp +++ b/src/Driver/Fuse/FuseService.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -221,15 +221,15 @@ namespace VeraCrypt alignedSize += sectorSize - (alignedSize % sectorSize); SecureBuffer alignedBuffer (alignedSize); FuseService::ReadVolumeSectors (alignedBuffer, alignedOffset); - BufferPtr ((byte *) buf, size).CopyFrom (alignedBuffer.GetRange (offset % sectorSize, size)); + BufferPtr ((uint8 *) buf, size).CopyFrom (alignedBuffer.GetRange (offset % sectorSize, size)); } else { - FuseService::ReadVolumeSectors (BufferPtr ((byte *) buf, size), offset); + FuseService::ReadVolumeSectors (BufferPtr ((uint8 *) buf, size), offset); } } catch (MissingVolumeData&) { return 0; @@ -239,11 +239,11 @@ namespace VeraCrypt } if (strcmp (path, FuseService::GetControlPath()) == 0) { shared_ptr <Buffer> infoBuf = FuseService::GetVolumeInfo(); - BufferPtr outBuf ((byte *)buf, size); + BufferPtr outBuf ((uint8 *)buf, size); if (offset >= (off_t) infoBuf->Size()) return 0; if (offset + size > infoBuf->Size()) @@ -291,20 +291,20 @@ namespace VeraCrypt if (!FuseService::CheckAccessRights()) return -EACCES; if (strcmp (path, FuseService::GetVolumeImagePath()) == 0) { - FuseService::WriteVolumeSectors (BufferPtr ((byte *) buf, size), offset); + FuseService::WriteVolumeSectors (BufferPtr ((uint8 *) buf, size), offset); return size; } if (strcmp (path, FuseService::GetControlPath()) == 0) { if (FuseService::AuxDeviceInfoReceived()) return -EACCES; - FuseService::ReceiveAuxDeviceInfo (ConstBufferPtr ((const byte *)buf, size)); + FuseService::ReceiveAuxDeviceInfo (ConstBufferPtr ((const uint8 *)buf, size)); return size; } } #ifdef TC_FREEBSD // FreeBSD apparently retries failed write operations forever, which may lead to a system crash. @@ -582,11 +582,11 @@ namespace VeraCrypt sigaction (SIGINT, &action, nullptr); sigaction (SIGQUIT, &action, nullptr); sigaction (SIGTERM, &action, nullptr); // Wait for the exit of the main service - byte buf[1]; + uint8 buf[1]; if (read (SignalHandlerPipe->GetReadFD(), buf, sizeof (buf))) { } // Errors ignored _exit (0); } diff --git a/src/Driver/Fuse/FuseService.h b/src/Driver/Fuse/FuseService.h index 872cb368..1e4ffc6c 100644 --- a/src/Driver/Fuse/FuseService.h +++ b/src/Driver/Fuse/FuseService.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -36,11 +36,11 @@ namespace VeraCrypt protected: shared_ptr <Volume> MountedVolume; VolumeSlotNumber SlotNumber; }; - friend class ExecFunctor; + friend struct ExecFunctor; public: static bool AuxDeviceInfoReceived () { return !OpenVolumeInfo.VirtualDevice.IsEmpty(); } static bool CheckAccessRights (); static void Dismount (); diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index 988b7317..148f88b8 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "TCdefs.h" @@ -140,24 +140,14 @@ static size_t EncryptionThreadPoolFreeCpuCountLimit = 0; static BOOL SystemFavoriteVolumeDirty = FALSE; static BOOL PagingFileCreationPrevented = FALSE; static BOOL EnableExtendedIoctlSupport = FALSE; static BOOL AllowTrimCommand = FALSE; static BOOL RamEncryptionActivated = FALSE; -static KeSaveExtendedProcessorStateFn KeSaveExtendedProcessorStatePtr = NULL; -static KeRestoreExtendedProcessorStateFn KeRestoreExtendedProcessorStatePtr = NULL; -static ExGetFirmwareEnvironmentVariableFn ExGetFirmwareEnvironmentVariablePtr = NULL; -static KeQueryInterruptTimePreciseFn KeQueryInterruptTimePrecisePtr = NULL; -static KeAreAllApcsDisabledFn KeAreAllApcsDisabledPtr = NULL; -static KeSetSystemGroupAffinityThreadFn KeSetSystemGroupAffinityThreadPtr = NULL; -static KeQueryActiveGroupCountFn KeQueryActiveGroupCountPtr = NULL; -static KeQueryActiveProcessorCountExFn KeQueryActiveProcessorCountExPtr = NULL; int EncryptionIoRequestCount = 0; int EncryptionItemCount = 0; int EncryptionFragmentSize = 0; - -POOL_TYPE ExDefaultNonPagedPoolType = NonPagedPool; -ULONG ExDefaultMdlProtection = 0; +int EncryptionMaxWorkItems = 0; PDEVICE_OBJECT VirtualVolumeDeviceObjects[MAX_MOUNTED_VOLUME_DRIVE_NUMBER + 1]; BOOL AlignValue (ULONG ulValue, ULONG ulAlignment, ULONG *pulResult) { @@ -188,47 +178,33 @@ BOOL IsUefiBoot () NTSTATUS ntStatus = STATUS_NOT_IMPLEMENTED; Dump ("IsUefiBoot BEGIN\n"); ASSERT (KeGetCurrentIrql() == PASSIVE_LEVEL); - if (ExGetFirmwareEnvironmentVariablePtr) - { - ULONG valueLengh = 0; - UNICODE_STRING emptyName; - GUID guid; - RtlInitUnicodeString(&emptyName, L""); - memset (&guid, 0, sizeof(guid)); - Dump ("IsUefiBoot calling ExGetFirmwareEnvironmentVariable\n"); - ntStatus = ExGetFirmwareEnvironmentVariablePtr (&emptyName, &guid, NULL, &valueLengh, NULL); - Dump ("IsUefiBoot ExGetFirmwareEnvironmentVariable returned 0x%08x\n", ntStatus); - } - else - { - Dump ("IsUefiBoot ExGetFirmwareEnvironmentVariable not found on the system\n"); - } - + ULONG valueLengh = 0; + UNICODE_STRING emptyName; + GUID guid; + RtlInitUnicodeString(&emptyName, L""); + memset (&guid, 0, sizeof(guid)); + Dump ("IsUefiBoot calling ExGetFirmwareEnvironmentVariable\n"); + ntStatus = ExGetFirmwareEnvironmentVariable (&emptyName, &guid, NULL, &valueLengh, NULL); + Dump ("IsUefiBoot ExGetFirmwareEnvironmentVariable returned 0x%08x\n", ntStatus); + if (STATUS_NOT_IMPLEMENTED != ntStatus) bStatus = TRUE; Dump ("IsUefiBoot bStatus = %s END\n", bStatus? "TRUE" : "FALSE"); return bStatus; } void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) { LARGE_INTEGER iSeed, iSeed2; - byte digest[WHIRLPOOL_DIGESTSIZE]; + uint8 digest[WHIRLPOOL_DIGESTSIZE]; WHIRLPOOL_CTX tctx; size_t count; -#ifndef _WIN64 - KFLOATING_SAVE floatingPointState; - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - if (HasISSE()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif - while (cbRandSeed) { WHIRLPOOL_init (&tctx); // we hash current content of digest buffer which is uninitialized the first time WHIRLPOOL_add (digest, WHIRLPOOL_DIGESTSIZE, &tctx); @@ -237,21 +213,14 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) KeQuerySystemTime( &iSeed ); WHIRLPOOL_add ((unsigned char *) &(iSeed.QuadPart), sizeof(iSeed.QuadPart), &tctx); iSeed = KeQueryPerformanceCounter (&iSeed2); WHIRLPOOL_add ((unsigned char *) &(iSeed.QuadPart), sizeof(iSeed.QuadPart), &tctx); WHIRLPOOL_add ((unsigned char *) &(iSeed2.QuadPart), sizeof(iSeed2.QuadPart), &tctx); - if (KeQueryInterruptTimePrecisePtr) - { - iSeed.QuadPart = KeQueryInterruptTimePrecisePtr (&iSeed2.QuadPart); - WHIRLPOOL_add ((unsigned char *) &(iSeed.QuadPart), sizeof(iSeed.QuadPart), &tctx); - WHIRLPOOL_add ((unsigned char *) &(iSeed2.QuadPart), sizeof(iSeed2.QuadPart), &tctx); - } - else - { - iSeed.QuadPart = KeQueryInterruptTime (); - WHIRLPOOL_add ((unsigned char *) &(iSeed.QuadPart), sizeof(iSeed.QuadPart), &tctx); - } + + iSeed.QuadPart = KeQueryInterruptTimePrecise ((PULONG64) & iSeed2.QuadPart); + WHIRLPOOL_add ((unsigned char *) &(iSeed.QuadPart), sizeof(iSeed.QuadPart), &tctx); + WHIRLPOOL_add ((unsigned char *) &(iSeed2.QuadPart), sizeof(iSeed2.QuadPart), &tctx); /* use JitterEntropy library to get good quality random bytes based on CPU timing jitter */ if (0 == jent_entropy_init ()) { struct rand_data *ec = jent_entropy_collector_alloc (1, 0); @@ -261,165 +230,115 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) if (rndLen > 0) WHIRLPOOL_add (digest, (unsigned int) rndLen, &tctx); jent_entropy_collector_free (ec); } } - +#ifndef _M_ARM64 // use RDSEED or RDRAND from CPU as source of entropy if enabled if ( IsCpuRngEnabled() && ( (HasRDSEED() && RDSEED_getBytes (digest, sizeof (digest))) || (HasRDRAND() && RDRAND_getBytes (digest, sizeof (digest))) )) { WHIRLPOOL_add (digest, sizeof(digest), &tctx); } +#endif WHIRLPOOL_finalize (&tctx, digest); count = VC_MIN (cbRandSeed, sizeof (digest)); // copy digest value to seed buffer memcpy (pbRandSeed, digest, count); cbRandSeed -= count; pbRandSeed += count; } -#if !defined (_WIN64) - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif - FAST_ERASE64 (digest, sizeof (digest)); FAST_ERASE64 (&iSeed.QuadPart, 8); FAST_ERASE64 (&iSeed2.QuadPart, 8); burn (&tctx, sizeof(tctx)); } -NTSTATUS DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) +NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { PKEY_VALUE_PARTIAL_INFORMATION startKeyValue; LONG version; int i; - Dump ("DriverEntry " TC_APP_NAME " " VERSION_STRING VERSION_STRING_SUFFIX "\n"); - - DetectX86Features (); + Dump("DriverEntry " TC_APP_NAME " " VERSION_STRING VERSION_STRING_SUFFIX "\n"); - PsGetVersion (&OsMajorVersion, &OsMinorVersion, NULL, NULL); - - Dump ("OsMajorVersion=%d OsMinorVersion=%d\n", OsMajorVersion, OsMinorVersion); - - // NX pool support is available starting from Windows 8 - if ((OsMajorVersion > 6) || (OsMajorVersion == 6 && OsMinorVersion >= 2)) - { - ExDefaultNonPagedPoolType = (POOL_TYPE) NonPagedPoolNx; - ExDefaultMdlProtection = MdlMappingNoExecute; - } +#ifndef _M_ARM64 + DetectX86Features(); +#else + DetectArmFeatures(); +#endif - // KeAreAllApcsDisabled is available starting from Windows Server 2003 - if ((OsMajorVersion > 5) || (OsMajorVersion == 5 && OsMinorVersion >= 2)) - { - UNICODE_STRING KeAreAllApcsDisabledFuncName; - RtlInitUnicodeString(&KeAreAllApcsDisabledFuncName, L"KeAreAllApcsDisabled"); + PsGetVersion(&OsMajorVersion, &OsMinorVersion, NULL, NULL); - KeAreAllApcsDisabledPtr = (KeAreAllApcsDisabledFn) MmGetSystemRoutineAddress(&KeAreAllApcsDisabledFuncName); - } - - // KeSaveExtendedProcessorState/KeRestoreExtendedProcessorState are available starting from Windows 7 - // KeQueryActiveGroupCount/KeQueryActiveProcessorCountEx/KeSetSystemGroupAffinityThread are available starting from Windows 7 - if ((OsMajorVersion > 6) || (OsMajorVersion == 6 && OsMinorVersion >= 1)) - { - UNICODE_STRING saveFuncName, restoreFuncName, groupCountFuncName, procCountFuncName, setAffinityFuncName; - RtlInitUnicodeString(&saveFuncName, L"KeSaveExtendedProcessorState"); - RtlInitUnicodeString(&restoreFuncName, L"KeRestoreExtendedProcessorState"); - RtlInitUnicodeString(&groupCountFuncName, L"KeQueryActiveGroupCount"); - RtlInitUnicodeString(&procCountFuncName, L"KeQueryActiveProcessorCountEx"); - RtlInitUnicodeString(&setAffinityFuncName, L"KeSetSystemGroupAffinityThread"); - KeSaveExtendedProcessorStatePtr = (KeSaveExtendedProcessorStateFn) MmGetSystemRoutineAddress(&saveFuncName); - KeRestoreExtendedProcessorStatePtr = (KeRestoreExtendedProcessorStateFn) MmGetSystemRoutineAddress(&restoreFuncName); - KeSetSystemGroupAffinityThreadPtr = (KeSetSystemGroupAffinityThreadFn) MmGetSystemRoutineAddress(&setAffinityFuncName); - KeQueryActiveGroupCountPtr = (KeQueryActiveGroupCountFn) MmGetSystemRoutineAddress(&groupCountFuncName); - KeQueryActiveProcessorCountExPtr = (KeQueryActiveProcessorCountExFn) MmGetSystemRoutineAddress(&procCountFuncName); - } - - // ExGetFirmwareEnvironmentVariable is available starting from Windows 8 - if ((OsMajorVersion > 6) || (OsMajorVersion == 6 && OsMinorVersion >= 2)) - { - UNICODE_STRING funcName; - RtlInitUnicodeString(&funcName, L"ExGetFirmwareEnvironmentVariable"); - ExGetFirmwareEnvironmentVariablePtr = (ExGetFirmwareEnvironmentVariableFn) MmGetSystemRoutineAddress(&funcName); - } - - // KeQueryInterruptTimePrecise is available starting from Windows 8.1 - if ((OsMajorVersion > 6) || (OsMajorVersion == 6 && OsMinorVersion >= 3)) - { - UNICODE_STRING funcName; - RtlInitUnicodeString(&funcName, L"KeQueryInterruptTimePrecise"); - KeQueryInterruptTimePrecisePtr = (KeQueryInterruptTimePreciseFn) MmGetSystemRoutineAddress(&funcName); - } + Dump("OsMajorVersion=%d OsMinorVersion=%d\n", OsMajorVersion, OsMinorVersion); // Load dump filter if the main driver is already loaded - if (NT_SUCCESS (TCDeviceIoControl (NT_ROOT_PREFIX, TC_IOCTL_GET_DRIVER_VERSION, NULL, 0, &version, sizeof (version)))) - return DumpFilterEntry ((PFILTER_EXTENSION) DriverObject, (PFILTER_INITIALIZATION_DATA) RegistryPath); + if (NT_SUCCESS(TCDeviceIoControl(NT_ROOT_PREFIX, TC_IOCTL_GET_DRIVER_VERSION, NULL, 0, &version, sizeof(version)))) + return DumpFilterEntry((PFILTER_EXTENSION)DriverObject, (PFILTER_INITIALIZATION_DATA)RegistryPath); TCDriverObject = DriverObject; - memset (VirtualVolumeDeviceObjects, 0, sizeof (VirtualVolumeDeviceObjects)); + memset(VirtualVolumeDeviceObjects, 0, sizeof(VirtualVolumeDeviceObjects)); - ReadRegistryConfigFlags (TRUE); - EncryptionThreadPoolStart (EncryptionThreadPoolFreeCpuCountLimit); + ReadRegistryConfigFlags(TRUE); + EncryptionThreadPoolStart(EncryptionThreadPoolFreeCpuCountLimit); SelfTestsPassed = AutoTestAlgorithms(); // Enable device class filters and load boot arguments if the driver is set to start at system boot - if (NT_SUCCESS (TCReadRegistryKey (RegistryPath, L"Start", &startKeyValue))) + if (NT_SUCCESS(TCReadRegistryKey(RegistryPath, L"Start", &startKeyValue))) { - if (startKeyValue->Type == REG_DWORD && *((uint32 *) startKeyValue->Data) == SERVICE_BOOT_START) + if (startKeyValue->Type == REG_DWORD && *((uint32*)startKeyValue->Data) == SERVICE_BOOT_START) { if (!SelfTestsPassed) { // in case of system encryption, if self-tests fail, disable all extended CPU // features and try again in order to workaround faulty configurations - DisableCPUExtendedFeatures (); +#ifndef _M_ARM64 + DisableCPUExtendedFeatures(); +#else + EnableHwEncryption(FALSE); +#endif SelfTestsPassed = AutoTestAlgorithms(); // BUG CHECK if the self-tests still fail if (!SelfTestsPassed) - TC_BUG_CHECK (STATUS_INVALID_PARAMETER); + TC_BUG_CHECK(STATUS_INVALID_PARAMETER); } - LoadBootArguments(IsUefiBoot ()); + LoadBootArguments(IsUefiBoot()); VolumeClassFilterRegistered = IsVolumeClassFilterRegistered(); DriverObject->DriverExtension->AddDevice = DriverAddDevice; } - TCfree (startKeyValue); + TCfree(startKeyValue); } -#ifdef _WIN64 - if ((OsMajorVersion > 6) || (OsMajorVersion == 6 && OsMinorVersion >= 1)) + + if (RamEncryptionActivated) { - // we enable RAM encryption only starting from Windows 7 - if (RamEncryptionActivated) - { - if (t1ha_selfcheck__t1ha2() != 0) - TC_BUG_CHECK (STATUS_INVALID_PARAMETER); - if (!InitializeSecurityParameters(GetDriverRandomSeed)) - TC_BUG_CHECK (STATUS_INVALID_PARAMETER); + if (t1ha_selfcheck__t1ha2() != 0) + TC_BUG_CHECK(STATUS_INVALID_PARAMETER); + if (!InitializeSecurityParameters(GetDriverRandomSeed)) + TC_BUG_CHECK(STATUS_INVALID_PARAMETER); - EnableRamEncryption (TRUE); - } + EnableRamEncryption(TRUE); } -#endif for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; ++i) { DriverObject->MajorFunction[i] = TCDispatchQueueIRP; } DriverObject->DriverUnload = TCUnloadDriver; - return TCCreateRootDeviceObject (DriverObject); + return TCCreateRootDeviceObject(DriverObject); } NTSTATUS DriverAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo) { @@ -596,12 +515,13 @@ NTSTATUS TCDispatchQueueIRP (PDEVICE_OBJECT DeviceObject, PIRP Irp) case TC_IOCTL_IS_HIDDEN_SYSTEM_RUNNING: case IOCTL_DISK_CHECK_VERIFY: break; default: - Dump ("%ls (0x%x %d)\n", + Dump ("%ls 0x%.8X (0x%.4X %d)\n", TCTranslateCode (irpSp->Parameters.DeviceIoControl.IoControlCode), + (int) (irpSp->Parameters.DeviceIoControl.IoControlCode), (int) (irpSp->Parameters.DeviceIoControl.IoControlCode >> 16), (int) ((irpSp->Parameters.DeviceIoControl.IoControlCode & 0x1FFF) >> 2)); } } #endif @@ -876,10 +796,11 @@ IOCTL_STORAGE_QUERY_PROPERTY 0x002D1400 */ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension, PIRP Irp) { PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); + UNREFERENCED_PARAMETER(DeviceObject); switch (irpSp->Parameters.DeviceIoControl.IoControlCode) { case IOCTL_MOUNTDEV_QUERY_DEVICE_NAME: @@ -927,11 +848,11 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Irp->IoStatus.Status = STATUS_BUFFER_OVERFLOW; } else { ULONG outLength; - UCHAR volId[128], tmp[] = { 0,0 }; + CHAR volId[128], tmp[] = { 0,0 }; PMOUNTDEV_UNIQUE_ID outputBuffer = (PMOUNTDEV_UNIQUE_ID) Irp->AssociatedIrp.SystemBuffer; RtlStringCbCopyA (volId, sizeof(volId),TC_UNIQUE_ID_PREFIX); tmp[0] = 'A' + (UCHAR) Extension->nDosDriveNo; RtlStringCbCatA (volId, sizeof(volId),tmp); @@ -1017,26 +938,25 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION break; case IOCTL_DISK_GET_DRIVE_GEOMETRY_EX: Dump ("ProcessVolumeDeviceControlIrp (IOCTL_DISK_GET_DRIVE_GEOMETRY_EX)\n"); { - ULONG minOutputSize = IsOSAtLeast (WIN_SERVER_2003)? sizeof (DISK_GEOMETRY_EX) : sizeof (DISK_GEOMETRY) + sizeof (LARGE_INTEGER); + ULONG minOutputSize = sizeof (DISK_GEOMETRY_EX); ULONG fullOutputSize = sizeof (DISK_GEOMETRY) + sizeof (LARGE_INTEGER) + sizeof (DISK_PARTITION_INFO) + sizeof (DISK_DETECTION_INFO); if (ValidateIOBufferSize (Irp, minOutputSize, ValidateOutput)) { - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); BOOL bFullBuffer = (irpSp->Parameters.DeviceIoControl.OutputBufferLength >= fullOutputSize)? TRUE : FALSE; PDISK_GEOMETRY_EX outputBuffer = (PDISK_GEOMETRY_EX) Irp->AssociatedIrp.SystemBuffer; outputBuffer->Geometry.MediaType = Extension->bRemovable ? RemovableMedia : FixedMedia; outputBuffer->Geometry.Cylinders.QuadPart = Extension->NumberOfCylinders; outputBuffer->Geometry.TracksPerCylinder = Extension->TracksPerCylinder; outputBuffer->Geometry.SectorsPerTrack = Extension->SectorsPerTrack; outputBuffer->Geometry.BytesPerSector = Extension->BytesPerSector; - /* add one sector to DiskLength since our partition size is DiskLength and its offset if BytesPerSector */ - outputBuffer->DiskSize.QuadPart = Extension->DiskLength + Extension->BytesPerSector; + // Add 1MB to the disk size to emulate the geometry of a real MBR disk + outputBuffer->DiskSize.QuadPart = Extension->DiskLength + BYTES_PER_MB; if (bFullBuffer) { PDISK_PARTITION_INFO pPartInfo = (PDISK_PARTITION_INFO)(((ULONG_PTR) outputBuffer) + sizeof (DISK_GEOMETRY) + sizeof (LARGE_INTEGER)); PDISK_DETECTION_INFO pDetectInfo = ((PDISK_DETECTION_INFO)((((ULONG_PTR) pPartInfo) + sizeof (DISK_PARTITION_INFO)))); @@ -1303,14 +1223,14 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION outputBuffer->PartitionType = Extension->PartitionType; outputBuffer->BootIndicator = FALSE; outputBuffer->RecognizedPartition = TRUE; outputBuffer->RewritePartition = FALSE; - outputBuffer->StartingOffset.QuadPart = Extension->BytesPerSector; + outputBuffer->StartingOffset.QuadPart = BYTES_PER_MB; // Set offset to 1MB to emulate the partition offset on a real MBR disk outputBuffer->PartitionLength.QuadPart= Extension->DiskLength; outputBuffer->PartitionNumber = 1; - outputBuffer->HiddenSectors = 0; + outputBuffer->HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof (PARTITION_INFORMATION); } break; @@ -1320,27 +1240,26 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION { PPARTITION_INFORMATION_EX outputBuffer = (PPARTITION_INFORMATION_EX) Irp->AssociatedIrp.SystemBuffer; outputBuffer->PartitionStyle = PARTITION_STYLE_MBR; outputBuffer->RewritePartition = FALSE; - outputBuffer->StartingOffset.QuadPart = Extension->BytesPerSector; + outputBuffer->StartingOffset.QuadPart = BYTES_PER_MB; // Set offset to 1MB to emulate the partition offset on a real MBR disk outputBuffer->PartitionLength.QuadPart= Extension->DiskLength; outputBuffer->PartitionNumber = 1; outputBuffer->Mbr.PartitionType = Extension->PartitionType; outputBuffer->Mbr.BootIndicator = FALSE; outputBuffer->Mbr.RecognizedPartition = TRUE; - outputBuffer->Mbr.HiddenSectors = 0; + outputBuffer->Mbr.HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof (PARTITION_INFORMATION_EX); } break; case IOCTL_DISK_GET_DRIVE_LAYOUT: Dump ("ProcessVolumeDeviceControlIrp (IOCTL_DISK_GET_DRIVE_LAYOUT)\n"); if (ValidateIOBufferSize (Irp, sizeof (DRIVE_LAYOUT_INFORMATION), ValidateOutput)) { - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); BOOL bFullBuffer = (irpSp->Parameters.DeviceIoControl.OutputBufferLength >= (sizeof (DRIVE_LAYOUT_INFORMATION) + 3*sizeof(PARTITION_INFORMATION)))? TRUE : FALSE; PDRIVE_LAYOUT_INFORMATION outputBuffer = (PDRIVE_LAYOUT_INFORMATION) Irp->AssociatedIrp.SystemBuffer; outputBuffer->PartitionCount = bFullBuffer? 4 : 1; @@ -1348,14 +1267,14 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION outputBuffer->PartitionEntry->PartitionType = Extension->PartitionType; outputBuffer->PartitionEntry->BootIndicator = FALSE; outputBuffer->PartitionEntry->RecognizedPartition = TRUE; outputBuffer->PartitionEntry->RewritePartition = FALSE; - outputBuffer->PartitionEntry->StartingOffset.QuadPart = Extension->BytesPerSector; + outputBuffer->PartitionEntry->StartingOffset.QuadPart = BYTES_PER_MB; // Set offset to 1MB to emulate the partition offset on a real MBR disk outputBuffer->PartitionEntry->PartitionLength.QuadPart = Extension->DiskLength; outputBuffer->PartitionEntry->PartitionNumber = 1; - outputBuffer->PartitionEntry->HiddenSectors = 0; + outputBuffer->PartitionEntry->HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof (DRIVE_LAYOUT_INFORMATION); if (bFullBuffer) { @@ -1371,11 +1290,10 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Irp->IoStatus.Information = 0; if (EnableExtendedIoctlSupport) { if (ValidateIOBufferSize (Irp, sizeof (DRIVE_LAYOUT_INFORMATION_EX), ValidateOutput)) { - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); BOOL bFullBuffer = (irpSp->Parameters.DeviceIoControl.OutputBufferLength >= (sizeof (DRIVE_LAYOUT_INFORMATION_EX) + 3*sizeof(PARTITION_INFORMATION_EX)))? TRUE : FALSE; PDRIVE_LAYOUT_INFORMATION_EX outputBuffer = (PDRIVE_LAYOUT_INFORMATION_EX) Irp->AssociatedIrp.SystemBuffer; outputBuffer->PartitionCount = bFullBuffer? 4 : 1; @@ -1384,14 +1302,14 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION outputBuffer->PartitionEntry->PartitionStyle = PARTITION_STYLE_MBR; outputBuffer->PartitionEntry->Mbr.BootIndicator = FALSE; outputBuffer->PartitionEntry->Mbr.RecognizedPartition = TRUE; outputBuffer->PartitionEntry->RewritePartition = FALSE; - outputBuffer->PartitionEntry->StartingOffset.QuadPart = Extension->BytesPerSector; + outputBuffer->PartitionEntry->StartingOffset.QuadPart = BYTES_PER_MB; // Set offset to 1MB to emulate the partition offset on a real MBR disk outputBuffer->PartitionEntry->PartitionLength.QuadPart = Extension->DiskLength; outputBuffer->PartitionEntry->PartitionNumber = 1; - outputBuffer->PartitionEntry->Mbr.HiddenSectors = 0; + outputBuffer->PartitionEntry->Mbr.HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; outputBuffer->PartitionEntry->Mbr.PartitionType = Extension->PartitionType; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof (DRIVE_LAYOUT_INFORMATION_EX); if (bFullBuffer) @@ -1526,41 +1444,29 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION break; case IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS: Dump ("ProcessVolumeDeviceControlIrp (IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS)\n"); // Vista's, Windows 8.1 and later filesystem defragmenter fails if IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS does not succeed. - if (!(OsMajorVersion == 6 && OsMinorVersion == 0) - && !(IsOSAtLeast (WIN_8_1) && AllowWindowsDefrag && Extension->bRawDevice) - ) + if (!AllowWindowsDefrag || !Extension->bRawDevice) // We don't support defragmentation for file-hosted volumes { Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; Irp->IoStatus.Information = 0; } - else if (ValidateIOBufferSize (Irp, sizeof (VOLUME_DISK_EXTENTS), ValidateOutput)) + else if (ValidateIOBufferSize(Irp, sizeof(VOLUME_DISK_EXTENTS), ValidateOutput)) { - VOLUME_DISK_EXTENTS *extents = (VOLUME_DISK_EXTENTS *) Irp->AssociatedIrp.SystemBuffer; - + VOLUME_DISK_EXTENTS* extents = (VOLUME_DISK_EXTENTS*)Irp->AssociatedIrp.SystemBuffer; - if (IsOSAtLeast (WIN_8_1)) - { - // Windows 10 filesystem defragmenter works only if we report an extent with a real disk number - // So in the case of a VeraCrypt disk based volume, we use the disk number - // of the underlaying physical disk and we report a single extent - extents->NumberOfDiskExtents = 1; - extents->Extents[0].DiskNumber = Extension->DeviceNumber; - extents->Extents[0].StartingOffset.QuadPart = Extension->BytesPerSector; - extents->Extents[0].ExtentLength.QuadPart = Extension->DiskLength; - } - else - { - // Vista: No extent data can be returned as this is not a physical drive. - memset (extents, 0, sizeof (*extents)); - extents->NumberOfDiskExtents = 0; - } + // Windows 10 filesystem defragmenter works only if we report an extent with a real disk number + // So in the case of a VeraCrypt disk based volume, we use the disk number + // of the underlaying physical disk and we report a single extent + extents->NumberOfDiskExtents = 1; + extents->Extents[0].DiskNumber = Extension->DeviceNumber; + extents->Extents[0].StartingOffset.QuadPart = BYTES_PER_MB; // Set offset to 1MB to emulate the partition offset on a real MBR disk + extents->Extents[0].ExtentLength.QuadPart = Extension->DiskLength; Irp->IoStatus.Status = STATUS_SUCCESS; - Irp->IoStatus.Information = sizeof (*extents); + Irp->IoStatus.Information = sizeof(*extents); } break; case IOCTL_STORAGE_READ_CAPACITY: Dump ("ProcessVolumeDeviceControlIrp (IOCTL_STORAGE_READ_CAPACITY)\n"); @@ -1573,12 +1479,12 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION STORAGE_READ_CAPACITY *capacity = (STORAGE_READ_CAPACITY *) Irp->AssociatedIrp.SystemBuffer; capacity->Version = sizeof (STORAGE_READ_CAPACITY); capacity->Size = sizeof (STORAGE_READ_CAPACITY); capacity->BlockLength = Extension->BytesPerSector; - capacity->NumberOfBlocks.QuadPart = (Extension->DiskLength / Extension->BytesPerSector) + 1; - capacity->DiskLength.QuadPart = Extension->DiskLength + Extension->BytesPerSector; + capacity->DiskLength.QuadPart = Extension->DiskLength + BYTES_PER_MB; // Add 1MB to the disk size to emulate the geometry of a real MBR disk + capacity->NumberOfBlocks.QuadPart = capacity->DiskLength.QuadPart / capacity->BlockLength; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof (STORAGE_READ_CAPACITY); } } @@ -1721,11 +1627,10 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Irp->IoStatus.Information = 0; if (Extension->bRawDevice && Extension->TrimEnabled) { if (ValidateIOBufferSize (Irp, sizeof (DEVICE_MANAGE_DATA_SET_ATTRIBUTES), ValidateInput)) { - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); DWORD inputLength = irpSp->Parameters.DeviceIoControl.InputBufferLength; PDEVICE_MANAGE_DATA_SET_ATTRIBUTES pInputAttrs = (PDEVICE_MANAGE_DATA_SET_ATTRIBUTES) Irp->AssociatedIrp.SystemBuffer; DEVICE_DATA_MANAGEMENT_SET_ACTION action = pInputAttrs->Action; BOOL bEntireSet = pInputAttrs->Flags & DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE? TRUE : FALSE; ULONGLONG minSizedataSet = (ULONGLONG) pInputAttrs->DataSetRangesOffset + (ULONGLONG) pInputAttrs->DataSetRangesLength; @@ -1931,11 +1836,13 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Dump ("ProcessVolumeDeviceControlIrp: returning STATUS_INVALID_DEVICE_REQUEST for %ls\n", TCTranslateCode (irpSp->Parameters.DeviceIoControl.IoControlCode)); Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; Irp->IoStatus.Information = 0; break; default: - Dump ("ProcessVolumeDeviceControlIrp (unknown code 0x%.8X)\n", irpSp->Parameters.DeviceIoControl.IoControlCode); + Dump ("ProcessVolumeDeviceControlIrp: unknown code 0x%.8X (0x%.4X %d)\n", irpSp->Parameters.DeviceIoControl.IoControlCode, + (int)(irpSp->Parameters.DeviceIoControl.IoControlCode >> 16), + (int)((irpSp->Parameters.DeviceIoControl.IoControlCode & 0x1FFF) >> 2)); return TCCompleteIrp (Irp, STATUS_INVALID_DEVICE_REQUEST, 0); } #if defined(DEBUG) || defined (DEBG_TRACE) if (!NT_SUCCESS (Irp->IoStatus.Status)) @@ -1953,10 +1860,11 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension, PIRP Irp) { PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); NTSTATUS ntStatus; + UNREFERENCED_PARAMETER(Extension); switch (irpSp->Parameters.DeviceIoControl.IoControlCode) { case TC_IOCTL_GET_DRIVER_VERSION: @@ -1979,11 +1887,11 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex break; case TC_IOCTL_IS_DRIVER_UNLOAD_DISABLED: if (ValidateIOBufferSize (Irp, sizeof (int), ValidateOutput)) { - LONG deviceObjectCount = 0; + ULONG deviceObjectCount = 0; *(int *) Irp->AssociatedIrp.SystemBuffer = DriverUnloadDisabled; if (IoEnumerateDeviceObjectList (TCDriverObject, NULL, 0, &deviceObjectCount) == STATUS_BUFFER_TOO_SMALL && deviceObjectCount > 1) *(int *) Irp->AssociatedIrp.SystemBuffer = TRUE; @@ -2023,11 +1931,10 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex HANDLE NtFileHandle; UNICODE_STRING FullFileName; IO_STATUS_BLOCK IoStatus; LARGE_INTEGER offset; ACCESS_MASK access = FILE_READ_ATTRIBUTES; - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); if (!ValidateIOBufferSize (Irp, sizeof (OPEN_TEST_STRUCT), ValidateInputOutput)) break; if (irpSp->Parameters.DeviceIoControl.InputBufferLength != sizeof (OPEN_TEST_STRUCT)) @@ -2068,11 +1975,11 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex memset (opentest->VolumeIDComputed, 0, sizeof (opentest->VolumeIDComputed)); memset (opentest->volumeIDs, 0, sizeof (opentest->volumeIDs)); if (opentest->bDetectTCBootLoader || opentest->DetectFilesystem || opentest->bComputeVolumeIDs) { - byte *readBuffer = TCalloc (TC_MAX_VOLUME_SECTOR_SIZE); + uint8 *readBuffer = TCalloc (TC_MAX_VOLUME_SECTOR_SIZE); if (!readBuffer) { ntStatus = STATUS_INSUFFICIENT_RESOURCES; } else @@ -2231,11 +2138,11 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex SYNCHRONIZE | GENERIC_READ, &ObjectAttributes, &IoStatus, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT | FILE_RANDOM_ACCESS, NULL, 0); if (NT_SUCCESS (ntStatus)) { - byte *readBuffer = TCalloc (TC_MAX_VOLUME_SECTOR_SIZE); + uint8 *readBuffer = TCalloc (TC_MAX_VOLUME_SECTOR_SIZE); if (!readBuffer) { Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES; Irp->IoStatus.Information = 0; } @@ -2264,11 +2171,10 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex // Check for dynamic drive request->DriveIsDynamic = FALSE; if (readBuffer[510] == 0x55 && readBuffer[511] == 0xaa) { - int i; for (i = 0; i < 4; ++i) { if (readBuffer[446 + i * 16 + 4] == PARTITION_LDM) { request->DriveIsDynamic = TRUE; @@ -2457,36 +2363,36 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex case TC_IOCTL_GET_RESOLVED_SYMLINK: if (ValidateIOBufferSize (Irp, sizeof (RESOLVE_SYMLINK_STRUCT), ValidateInputOutput)) { RESOLVE_SYMLINK_STRUCT *resolve = (RESOLVE_SYMLINK_STRUCT *) Irp->AssociatedIrp.SystemBuffer; { - NTSTATUS ntStatus; + NTSTATUS ntStatusLocal; EnsureNullTerminatedString (resolve->symLinkName, sizeof (resolve->symLinkName)); - ntStatus = SymbolicLinkToTarget (resolve->symLinkName, + ntStatusLocal = SymbolicLinkToTarget (resolve->symLinkName, resolve->targetName, sizeof (resolve->targetName)); Irp->IoStatus.Information = sizeof (RESOLVE_SYMLINK_STRUCT); - Irp->IoStatus.Status = ntStatus; + Irp->IoStatus.Status = ntStatusLocal; } } break; case TC_IOCTL_GET_DRIVE_PARTITION_INFO: if (ValidateIOBufferSize (Irp, sizeof (DISK_PARTITION_INFO_STRUCT), ValidateInputOutput)) { DISK_PARTITION_INFO_STRUCT *info = (DISK_PARTITION_INFO_STRUCT *) Irp->AssociatedIrp.SystemBuffer; { PARTITION_INFORMATION_EX pi; - NTSTATUS ntStatus; + NTSTATUS ntStatusLocal; EnsureNullTerminatedString (info->deviceName, sizeof (info->deviceName)); - ntStatus = TCDeviceIoControl (info->deviceName, IOCTL_DISK_GET_PARTITION_INFO_EX, NULL, 0, &pi, sizeof (pi)); - if (NT_SUCCESS(ntStatus)) + ntStatusLocal = TCDeviceIoControl (info->deviceName, IOCTL_DISK_GET_PARTITION_INFO_EX, NULL, 0, &pi, sizeof (pi)); + if (NT_SUCCESS(ntStatusLocal)) { memset (&info->partInfo, 0, sizeof (info->partInfo)); info->partInfo.PartitionLength = pi.PartitionLength; info->partInfo.PartitionNumber = pi.PartitionNumber; @@ -2501,119 +2407,116 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex info->IsGPT = pi.PartitionStyle == PARTITION_STYLE_GPT; } else { // Windows 2000 does not support IOCTL_DISK_GET_PARTITION_INFO_EX - ntStatus = TCDeviceIoControl (info->deviceName, IOCTL_DISK_GET_PARTITION_INFO, NULL, 0, &info->partInfo, sizeof (info->partInfo)); + ntStatusLocal = TCDeviceIoControl (info->deviceName, IOCTL_DISK_GET_PARTITION_INFO, NULL, 0, &info->partInfo, sizeof (info->partInfo)); info->IsGPT = FALSE; } - if (!NT_SUCCESS (ntStatus)) + if (!NT_SUCCESS (ntStatusLocal)) { GET_LENGTH_INFORMATION lengthInfo; - ntStatus = TCDeviceIoControl (info->deviceName, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, &lengthInfo, sizeof (lengthInfo)); + ntStatusLocal = TCDeviceIoControl (info->deviceName, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, &lengthInfo, sizeof (lengthInfo)); - if (NT_SUCCESS (ntStatus)) + if (NT_SUCCESS (ntStatusLocal)) { memset (&info->partInfo, 0, sizeof (info->partInfo)); info->partInfo.PartitionLength = lengthInfo.Length; } } info->IsDynamic = FALSE; - if (NT_SUCCESS (ntStatus) && OsMajorVersion >= 6) + if (NT_SUCCESS (ntStatusLocal)) { # define IOCTL_VOLUME_IS_DYNAMIC CTL_CODE(IOCTL_VOLUME_BASE, 18, METHOD_BUFFERED, FILE_ANY_ACCESS) if (!NT_SUCCESS (TCDeviceIoControl (info->deviceName, IOCTL_VOLUME_IS_DYNAMIC, NULL, 0, &info->IsDynamic, sizeof (info->IsDynamic)))) info->IsDynamic = FALSE; } Irp->IoStatus.Information = sizeof (DISK_PARTITION_INFO_STRUCT); - Irp->IoStatus.Status = ntStatus; + Irp->IoStatus.Status = ntStatusLocal; } } break; case TC_IOCTL_GET_DRIVE_GEOMETRY: if (ValidateIOBufferSize (Irp, sizeof (DISK_GEOMETRY_STRUCT), ValidateInputOutput)) { DISK_GEOMETRY_STRUCT *g = (DISK_GEOMETRY_STRUCT *) Irp->AssociatedIrp.SystemBuffer; { - NTSTATUS ntStatus; + NTSTATUS ntStatusLocal; EnsureNullTerminatedString (g->deviceName, sizeof (g->deviceName)); Dump ("Calling IOCTL_DISK_GET_DRIVE_GEOMETRY on %ls\n", g->deviceName); - ntStatus = TCDeviceIoControl (g->deviceName, + ntStatusLocal = TCDeviceIoControl (g->deviceName, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, &g->diskGeometry, sizeof (g->diskGeometry)); Irp->IoStatus.Information = sizeof (DISK_GEOMETRY_STRUCT); - Irp->IoStatus.Status = ntStatus; + Irp->IoStatus.Status = ntStatusLocal; } } break; case VC_IOCTL_GET_DRIVE_GEOMETRY_EX: if (ValidateIOBufferSize (Irp, sizeof (DISK_GEOMETRY_EX_STRUCT), ValidateInputOutput)) { DISK_GEOMETRY_EX_STRUCT *g = (DISK_GEOMETRY_EX_STRUCT *) Irp->AssociatedIrp.SystemBuffer; { - NTSTATUS ntStatus; + NTSTATUS ntStatusLocal; PVOID buffer = TCalloc (256); // enough for DISK_GEOMETRY_EX and padded data if (buffer) { EnsureNullTerminatedString (g->deviceName, sizeof (g->deviceName)); Dump ("Calling IOCTL_DISK_GET_DRIVE_GEOMETRY_EX on %ls\n", g->deviceName); - ntStatus = TCDeviceIoControl (g->deviceName, + ntStatusLocal = TCDeviceIoControl (g->deviceName, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, NULL, 0, buffer, 256); - if (NT_SUCCESS(ntStatus)) + if (NT_SUCCESS(ntStatusLocal)) { PDISK_GEOMETRY_EX pGeo = (PDISK_GEOMETRY_EX) buffer; memcpy (&g->diskGeometry, &pGeo->Geometry, sizeof (DISK_GEOMETRY)); g->DiskSize.QuadPart = pGeo->DiskSize.QuadPart; } else { DISK_GEOMETRY dg = {0}; Dump ("Failed. Calling IOCTL_DISK_GET_DRIVE_GEOMETRY on %ls\n", g->deviceName); - ntStatus = TCDeviceIoControl (g->deviceName, + ntStatusLocal = TCDeviceIoControl (g->deviceName, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, &dg, sizeof (dg)); - if (NT_SUCCESS(ntStatus)) + if (NT_SUCCESS(ntStatusLocal)) { - memcpy (&g->diskGeometry, &dg, sizeof (DISK_GEOMETRY)); + memcpy(&g->diskGeometry, &dg, sizeof(DISK_GEOMETRY)); g->DiskSize.QuadPart = dg.Cylinders.QuadPart * dg.SectorsPerTrack * dg.TracksPerCylinder * dg.BytesPerSector; - if (OsMajorVersion >= 6) + STORAGE_READ_CAPACITY storage = { 0 }; + NTSTATUS lStatus; + storage.Version = sizeof(STORAGE_READ_CAPACITY); + Dump("Calling IOCTL_STORAGE_READ_CAPACITY on %ls\n", g->deviceName); + lStatus = TCDeviceIoControl(g->deviceName, + IOCTL_STORAGE_READ_CAPACITY, + NULL, 0, &storage, sizeof(STORAGE_READ_CAPACITY)); + if (NT_SUCCESS(lStatus) + && (storage.Size == sizeof(STORAGE_READ_CAPACITY)) + ) { - STORAGE_READ_CAPACITY storage = {0}; - NTSTATUS lStatus; - storage.Version = sizeof (STORAGE_READ_CAPACITY); - Dump ("Calling IOCTL_STORAGE_READ_CAPACITY on %ls\n", g->deviceName); - lStatus = TCDeviceIoControl (g->deviceName, - IOCTL_STORAGE_READ_CAPACITY, - NULL, 0, &storage, sizeof (STORAGE_READ_CAPACITY)); - if ( NT_SUCCESS(lStatus) - && (storage.Size == sizeof (STORAGE_READ_CAPACITY)) - ) - { - g->DiskSize.QuadPart = storage.DiskLength.QuadPart; - } + g->DiskSize.QuadPart = storage.DiskLength.QuadPart; } } } TCfree (buffer); Irp->IoStatus.Information = sizeof (DISK_GEOMETRY_EX_STRUCT); - Irp->IoStatus.Status = ntStatus; + Irp->IoStatus.Status = ntStatusLocal; } else { Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES; Irp->IoStatus.Information = 0; @@ -2667,11 +2570,10 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex case TC_IOCTL_MOUNT_VOLUME: if (ValidateIOBufferSize (Irp, sizeof (MOUNT_STRUCT), ValidateInputOutput)) { MOUNT_STRUCT *mount = (MOUNT_STRUCT *) Irp->AssociatedIrp.SystemBuffer; - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); if ((irpSp->Parameters.DeviceIoControl.InputBufferLength != sizeof (MOUNT_STRUCT)) || mount->VolumePassword.Length > MAX_PASSWORD || mount->ProtectedHidVolPassword.Length > MAX_PASSWORD || mount->pkcs5_prf < 0 || mount->pkcs5_prf > LAST_PRF_ID || mount->VolumePim < -1 || mount->VolumePim == INT_MAX @@ -2696,16 +2598,15 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex burn (&mount->ProtectedHidVolPkcs5Prf, sizeof (mount->ProtectedHidVolPkcs5Prf)); burn (&mount->ProtectedHidVolPim, sizeof (mount->ProtectedHidVolPim)); } break; - case TC_IOCTL_DISMOUNT_VOLUME: + case TC_IOCTL_UNMOUNT_VOLUME: if (ValidateIOBufferSize (Irp, sizeof (UNMOUNT_STRUCT), ValidateInputOutput)) { UNMOUNT_STRUCT *unmount = (UNMOUNT_STRUCT *) Irp->AssociatedIrp.SystemBuffer; PDEVICE_OBJECT ListDevice = GetVirtualVolumeDeviceObject (unmount->nDosDriveNo); - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); if (irpSp->Parameters.DeviceIoControl.InputBufferLength != sizeof (UNMOUNT_STRUCT)) { Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; @@ -2725,15 +2626,14 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex Irp->IoStatus.Information = sizeof (UNMOUNT_STRUCT); Irp->IoStatus.Status = STATUS_SUCCESS; } break; - case TC_IOCTL_DISMOUNT_ALL_VOLUMES: + case TC_IOCTL_UNMOUNT_ALL_VOLUMES: if (ValidateIOBufferSize (Irp, sizeof (UNMOUNT_STRUCT), ValidateInputOutput)) { UNMOUNT_STRUCT *unmount = (UNMOUNT_STRUCT *) Irp->AssociatedIrp.SystemBuffer; - PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); if (irpSp->Parameters.DeviceIoControl.InputBufferLength != sizeof (UNMOUNT_STRUCT)) { Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; @@ -2746,11 +2646,11 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex Irp->IoStatus.Status = STATUS_SUCCESS; } break; case VC_IOCTL_EMERGENCY_CLEAR_ALL_KEYS: - EmergencyClearAllKeys (Irp, irpSp); + EmergencyClearAllKeys (Irp); WipeCache(); break; case TC_IOCTL_BOOT_ENCRYPTION_SETUP: Irp->IoStatus.Status = StartBootEncryptionSetup (DeviceObject, Irp, irpSp); @@ -2761,36 +2661,36 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex Irp->IoStatus.Status = AbortBootEncryptionSetup(); Irp->IoStatus.Information = 0; break; case TC_IOCTL_GET_BOOT_ENCRYPTION_STATUS: - GetBootEncryptionStatus (Irp, irpSp); + GetBootEncryptionStatus (Irp); break; case TC_IOCTL_GET_BOOT_ENCRYPTION_SETUP_RESULT: Irp->IoStatus.Information = 0; Irp->IoStatus.Status = GetSetupResult(); break; case TC_IOCTL_GET_BOOT_DRIVE_VOLUME_PROPERTIES: - GetBootDriveVolumeProperties (Irp, irpSp); + GetBootDriveVolumeProperties (Irp); break; case TC_IOCTL_GET_BOOT_LOADER_VERSION: - GetBootLoaderVersion (Irp, irpSp); + GetBootLoaderVersion (Irp); break; case TC_IOCTL_REOPEN_BOOT_VOLUME_HEADER: - ReopenBootVolumeHeader (Irp, irpSp); + ReopenBootVolumeHeader (Irp); break; case VC_IOCTL_GET_BOOT_LOADER_FINGERPRINT: - GetBootLoaderFingerprint (Irp, irpSp); + GetBootLoaderFingerprint (Irp); break; case TC_IOCTL_GET_BOOT_ENCRYPTION_ALGORITHM_NAME: - GetBootEncryptionAlgorithmName (Irp, irpSp); + GetBootEncryptionAlgorithmName (Irp); break; case TC_IOCTL_IS_HIDDEN_SYSTEM_RUNNING: if (ValidateIOBufferSize (Irp, sizeof (int), ValidateOutput)) { @@ -2814,11 +2714,11 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex Irp->IoStatus.Status = GetDecoySystemWipeResult(); Irp->IoStatus.Information = 0; break; case TC_IOCTL_GET_DECOY_SYSTEM_WIPE_STATUS: - GetDecoySystemWipeStatus (Irp, irpSp); + GetDecoySystemWipeStatus (Irp); break; case TC_IOCTL_WRITE_BOOT_DRIVE_SECTOR: Irp->IoStatus.Status = WriteBootDriveSector (Irp, irpSp); Irp->IoStatus.Information = 0; @@ -2889,10 +2789,11 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex case VC_IOCTL_ENCRYPTION_QUEUE_PARAMS: if (ValidateIOBufferSize (Irp, sizeof (EncryptionQueueParameters), ValidateOutput)) { EncryptionQueueParameters* pParams = (EncryptionQueueParameters*) Irp->AssociatedIrp.SystemBuffer; + pParams->EncryptionMaxWorkItems = EncryptionMaxWorkItems; pParams->EncryptionFragmentSize = EncryptionFragmentSize; pParams->EncryptionIoRequestCount = EncryptionIoRequestCount; pParams->EncryptionItemCount = EncryptionItemCount; Irp->IoStatus.Information = sizeof (EncryptionQueueParameters); Irp->IoStatus.Status = STATUS_SUCCESS; @@ -3284,12 +3185,12 @@ LPWSTR TCTranslateCode (ULONG ulCode) #define TC_CASE_RET_NAME(CODE) case CODE : return L###CODE TC_CASE_RET_NAME (TC_IOCTL_ABORT_BOOT_ENCRYPTION_SETUP); TC_CASE_RET_NAME (TC_IOCTL_ABORT_DECOY_SYSTEM_WIPE); TC_CASE_RET_NAME (TC_IOCTL_BOOT_ENCRYPTION_SETUP); - TC_CASE_RET_NAME (TC_IOCTL_DISMOUNT_ALL_VOLUMES); - TC_CASE_RET_NAME (TC_IOCTL_DISMOUNT_VOLUME); + TC_CASE_RET_NAME (TC_IOCTL_UNMOUNT_ALL_VOLUMES); + TC_CASE_RET_NAME (TC_IOCTL_UNMOUNT_VOLUME); TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_DRIVE_VOLUME_PROPERTIES); TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_ENCRYPTION_ALGORITHM_NAME); TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_ENCRYPTION_SETUP_RESULT); TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_ENCRYPTION_STATUS); TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_LOADER_VERSION); @@ -3326,156 +3227,85 @@ LPWSTR TCTranslateCode (ULONG ulCode) TC_CASE_RET_NAME (VC_IOCTL_IS_RAM_ENCRYPTION_ENABLED); TC_CASE_RET_NAME (VC_IOCTL_ENCRYPTION_QUEUE_PARAMS); TC_CASE_RET_NAME (IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS); -#undef TC_CASE_RET_NAME - } + TC_CASE_RET_NAME(IOCTL_DISK_GET_DRIVE_GEOMETRY); + TC_CASE_RET_NAME(IOCTL_DISK_GET_DRIVE_GEOMETRY_EX); + TC_CASE_RET_NAME(IOCTL_MOUNTDEV_QUERY_DEVICE_NAME); + TC_CASE_RET_NAME(IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME); + TC_CASE_RET_NAME(IOCTL_MOUNTDEV_QUERY_UNIQUE_ID); + TC_CASE_RET_NAME(IOCTL_VOLUME_ONLINE); + TC_CASE_RET_NAME(IOCTL_MOUNTDEV_LINK_CREATED); + TC_CASE_RET_NAME(IOCTL_MOUNTDEV_LINK_DELETED); + TC_CASE_RET_NAME(IOCTL_MOUNTMGR_QUERY_POINTS); + TC_CASE_RET_NAME(IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED); + TC_CASE_RET_NAME(IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED); + TC_CASE_RET_NAME(IOCTL_DISK_GET_LENGTH_INFO); + TC_CASE_RET_NAME(IOCTL_STORAGE_GET_DEVICE_NUMBER); + TC_CASE_RET_NAME(IOCTL_DISK_GET_PARTITION_INFO); + TC_CASE_RET_NAME(IOCTL_DISK_GET_PARTITION_INFO_EX); + TC_CASE_RET_NAME(IOCTL_DISK_SET_PARTITION_INFO); + TC_CASE_RET_NAME(IOCTL_DISK_GET_DRIVE_LAYOUT); + TC_CASE_RET_NAME(IOCTL_DISK_GET_DRIVE_LAYOUT_EX); + TC_CASE_RET_NAME(IOCTL_DISK_SET_DRIVE_LAYOUT_EX); + TC_CASE_RET_NAME(IOCTL_DISK_VERIFY); + TC_CASE_RET_NAME(IOCTL_DISK_FORMAT_TRACKS); + TC_CASE_RET_NAME(IOCTL_DISK_REASSIGN_BLOCKS); + TC_CASE_RET_NAME(IOCTL_DISK_PERFORMANCE); + TC_CASE_RET_NAME(IOCTL_DISK_IS_WRITABLE); + TC_CASE_RET_NAME(IOCTL_DISK_LOGGING); + TC_CASE_RET_NAME(IOCTL_DISK_FORMAT_TRACKS_EX); + TC_CASE_RET_NAME(IOCTL_DISK_HISTOGRAM_STRUCTURE); + TC_CASE_RET_NAME(IOCTL_DISK_HISTOGRAM_DATA); + TC_CASE_RET_NAME(IOCTL_DISK_HISTOGRAM_RESET); + TC_CASE_RET_NAME(IOCTL_DISK_REQUEST_STRUCTURE); + TC_CASE_RET_NAME(IOCTL_DISK_REQUEST_DATA); + TC_CASE_RET_NAME(IOCTL_DISK_CONTROLLER_NUMBER); + TC_CASE_RET_NAME(SMART_GET_VERSION); + TC_CASE_RET_NAME(SMART_SEND_DRIVE_COMMAND); + TC_CASE_RET_NAME(SMART_RCV_DRIVE_DATA); + TC_CASE_RET_NAME(IOCTL_DISK_INTERNAL_SET_VERIFY); + TC_CASE_RET_NAME(IOCTL_DISK_INTERNAL_CLEAR_VERIFY); + TC_CASE_RET_NAME(IOCTL_DISK_CHECK_VERIFY); + TC_CASE_RET_NAME(IOCTL_DISK_MEDIA_REMOVAL); + TC_CASE_RET_NAME(IOCTL_STORAGE_MEDIA_REMOVAL); + TC_CASE_RET_NAME(IOCTL_DISK_EJECT_MEDIA); + TC_CASE_RET_NAME(IOCTL_DISK_LOAD_MEDIA); + TC_CASE_RET_NAME(IOCTL_DISK_RESERVE); + TC_CASE_RET_NAME(IOCTL_DISK_RELEASE); + TC_CASE_RET_NAME(IOCTL_DISK_FIND_NEW_DEVICES); + TC_CASE_RET_NAME(IOCTL_DISK_GET_MEDIA_TYPES); + TC_CASE_RET_NAME(IOCTL_DISK_IS_CLUSTERED); + TC_CASE_RET_NAME(IOCTL_DISK_UPDATE_DRIVE_SIZE); + TC_CASE_RET_NAME(IOCTL_STORAGE_GET_MEDIA_TYPES); + TC_CASE_RET_NAME(IOCTL_STORAGE_GET_HOTPLUG_INFO); + TC_CASE_RET_NAME(IOCTL_STORAGE_SET_HOTPLUG_INFO); + TC_CASE_RET_NAME(IOCTL_STORAGE_QUERY_PROPERTY); + TC_CASE_RET_NAME(IOCTL_VOLUME_GET_GPT_ATTRIBUTES); + TC_CASE_RET_NAME(FT_BALANCED_READ_MODE); + TC_CASE_RET_NAME(IOCTL_VOLUME_QUERY_ALLOCATION_HINT); + TC_CASE_RET_NAME(IOCTL_DISK_GET_CLUSTER_INFO); + TC_CASE_RET_NAME(IOCTL_DISK_ARE_VOLUMES_READY); + TC_CASE_RET_NAME(IOCTL_VOLUME_IS_DYNAMIC); + TC_CASE_RET_NAME(IOCTL_MOUNTDEV_QUERY_STABLE_GUID); + TC_CASE_RET_NAME(IOCTL_VOLUME_POST_ONLINE); + TC_CASE_RET_NAME(IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT); + TC_CASE_RET_NAME(IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES); + TC_CASE_RET_NAME(IOCTL_DISK_GROW_PARTITION); + TC_CASE_RET_NAME(IRP_MJ_READ); + TC_CASE_RET_NAME(IRP_MJ_WRITE); + TC_CASE_RET_NAME(IRP_MJ_CREATE); + TC_CASE_RET_NAME(IRP_MJ_CLOSE); + TC_CASE_RET_NAME(IRP_MJ_CLEANUP); + TC_CASE_RET_NAME(IRP_MJ_FLUSH_BUFFERS); + TC_CASE_RET_NAME(IRP_MJ_SHUTDOWN); + TC_CASE_RET_NAME(IRP_MJ_DEVICE_CONTROL); + default: + return (LPWSTR) L"IOCTL"; - if (ulCode == IOCTL_DISK_GET_DRIVE_GEOMETRY) - return (LPWSTR) _T ("IOCTL_DISK_GET_DRIVE_GEOMETRY"); - else if (ulCode == IOCTL_DISK_GET_DRIVE_GEOMETRY_EX) - return (LPWSTR) _T ("IOCTL_DISK_GET_DRIVE_GEOMETRY_EX"); - else if (ulCode == IOCTL_MOUNTDEV_QUERY_DEVICE_NAME) - return (LPWSTR) _T ("IOCTL_MOUNTDEV_QUERY_DEVICE_NAME"); - else if (ulCode == IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME) - return (LPWSTR) _T ("IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME"); - else if (ulCode == IOCTL_MOUNTDEV_QUERY_UNIQUE_ID) - return (LPWSTR) _T ("IOCTL_MOUNTDEV_QUERY_UNIQUE_ID"); - else if (ulCode == IOCTL_VOLUME_ONLINE) - return (LPWSTR) _T ("IOCTL_VOLUME_ONLINE"); - else if (ulCode == IOCTL_MOUNTDEV_LINK_CREATED) - return (LPWSTR) _T ("IOCTL_MOUNTDEV_LINK_CREATED"); - else if (ulCode == IOCTL_MOUNTDEV_LINK_DELETED) - return (LPWSTR) _T ("IOCTL_MOUNTDEV_LINK_DELETED"); - else if (ulCode == IOCTL_MOUNTMGR_QUERY_POINTS) - return (LPWSTR) _T ("IOCTL_MOUNTMGR_QUERY_POINTS"); - else if (ulCode == IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED) - return (LPWSTR) _T ("IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED"); - else if (ulCode == IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED) - return (LPWSTR) _T ("IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED"); - else if (ulCode == IOCTL_DISK_GET_LENGTH_INFO) - return (LPWSTR) _T ("IOCTL_DISK_GET_LENGTH_INFO"); - else if (ulCode == IOCTL_STORAGE_GET_DEVICE_NUMBER) - return (LPWSTR) _T ("IOCTL_STORAGE_GET_DEVICE_NUMBER"); - else if (ulCode == IOCTL_DISK_GET_PARTITION_INFO) - return (LPWSTR) _T ("IOCTL_DISK_GET_PARTITION_INFO"); - else if (ulCode == IOCTL_DISK_GET_PARTITION_INFO_EX) - return (LPWSTR) _T ("IOCTL_DISK_GET_PARTITION_INFO_EX"); - else if (ulCode == IOCTL_DISK_SET_PARTITION_INFO) - return (LPWSTR) _T ("IOCTL_DISK_SET_PARTITION_INFO"); - else if (ulCode == IOCTL_DISK_GET_DRIVE_LAYOUT) - return (LPWSTR) _T ("IOCTL_DISK_GET_DRIVE_LAYOUT"); - else if (ulCode == IOCTL_DISK_GET_DRIVE_LAYOUT_EX) - return (LPWSTR) _T ("IOCTL_DISK_GET_DRIVE_LAYOUT_EX"); - else if (ulCode == IOCTL_DISK_SET_DRIVE_LAYOUT_EX) - return (LPWSTR) _T ("IOCTL_DISK_SET_DRIVE_LAYOUT_EX"); - else if (ulCode == IOCTL_DISK_VERIFY) - return (LPWSTR) _T ("IOCTL_DISK_VERIFY"); - else if (ulCode == IOCTL_DISK_FORMAT_TRACKS) - return (LPWSTR) _T ("IOCTL_DISK_FORMAT_TRACKS"); - else if (ulCode == IOCTL_DISK_REASSIGN_BLOCKS) - return (LPWSTR) _T ("IOCTL_DISK_REASSIGN_BLOCKS"); - else if (ulCode == IOCTL_DISK_PERFORMANCE) - return (LPWSTR) _T ("IOCTL_DISK_PERFORMANCE"); - else if (ulCode == IOCTL_DISK_IS_WRITABLE) - return (LPWSTR) _T ("IOCTL_DISK_IS_WRITABLE"); - else if (ulCode == IOCTL_DISK_LOGGING) - return (LPWSTR) _T ("IOCTL_DISK_LOGGING"); - else if (ulCode == IOCTL_DISK_FORMAT_TRACKS_EX) - return (LPWSTR) _T ("IOCTL_DISK_FORMAT_TRACKS_EX"); - else if (ulCode == IOCTL_DISK_HISTOGRAM_STRUCTURE) - return (LPWSTR) _T ("IOCTL_DISK_HISTOGRAM_STRUCTURE"); - else if (ulCode == IOCTL_DISK_HISTOGRAM_DATA) - return (LPWSTR) _T ("IOCTL_DISK_HISTOGRAM_DATA"); - else if (ulCode == IOCTL_DISK_HISTOGRAM_RESET) - return (LPWSTR) _T ("IOCTL_DISK_HISTOGRAM_RESET"); - else if (ulCode == IOCTL_DISK_REQUEST_STRUCTURE) - return (LPWSTR) _T ("IOCTL_DISK_REQUEST_STRUCTURE"); - else if (ulCode == IOCTL_DISK_REQUEST_DATA) - return (LPWSTR) _T ("IOCTL_DISK_REQUEST_DATA"); - else if (ulCode == IOCTL_DISK_CONTROLLER_NUMBER) - return (LPWSTR) _T ("IOCTL_DISK_CONTROLLER_NUMBER"); - else if (ulCode == SMART_GET_VERSION) - return (LPWSTR) _T ("SMART_GET_VERSION"); - else if (ulCode == SMART_SEND_DRIVE_COMMAND) - return (LPWSTR) _T ("SMART_SEND_DRIVE_COMMAND"); - else if (ulCode == SMART_RCV_DRIVE_DATA) - return (LPWSTR) _T ("SMART_RCV_DRIVE_DATA"); - else if (ulCode == IOCTL_DISK_INTERNAL_SET_VERIFY) - return (LPWSTR) _T ("IOCTL_DISK_INTERNAL_SET_VERIFY"); - else if (ulCode == IOCTL_DISK_INTERNAL_CLEAR_VERIFY) - return (LPWSTR) _T ("IOCTL_DISK_INTERNAL_CLEAR_VERIFY"); - else if (ulCode == IOCTL_DISK_CHECK_VERIFY) - return (LPWSTR) _T ("IOCTL_DISK_CHECK_VERIFY"); - else if (ulCode == IOCTL_DISK_MEDIA_REMOVAL) - return (LPWSTR) _T ("IOCTL_DISK_MEDIA_REMOVAL"); - else if (ulCode == IOCTL_DISK_EJECT_MEDIA) - return (LPWSTR) _T ("IOCTL_DISK_EJECT_MEDIA"); - else if (ulCode == IOCTL_DISK_LOAD_MEDIA) - return (LPWSTR) _T ("IOCTL_DISK_LOAD_MEDIA"); - else if (ulCode == IOCTL_DISK_RESERVE) - return (LPWSTR) _T ("IOCTL_DISK_RESERVE"); - else if (ulCode == IOCTL_DISK_RELEASE) - return (LPWSTR) _T ("IOCTL_DISK_RELEASE"); - else if (ulCode == IOCTL_DISK_FIND_NEW_DEVICES) - return (LPWSTR) _T ("IOCTL_DISK_FIND_NEW_DEVICES"); - else if (ulCode == IOCTL_DISK_GET_MEDIA_TYPES) - return (LPWSTR) _T ("IOCTL_DISK_GET_MEDIA_TYPES"); - else if (ulCode == IOCTL_DISK_IS_CLUSTERED) - return (LPWSTR) _T ("IOCTL_DISK_IS_CLUSTERED"); - else if (ulCode == IOCTL_DISK_UPDATE_DRIVE_SIZE) - return (LPWSTR) _T ("IOCTL_DISK_UPDATE_DRIVE_SIZE"); - else if (ulCode == IOCTL_STORAGE_GET_MEDIA_TYPES) - return (LPWSTR) _T ("IOCTL_STORAGE_GET_MEDIA_TYPES"); - else if (ulCode == IOCTL_STORAGE_GET_HOTPLUG_INFO) - return (LPWSTR) _T ("IOCTL_STORAGE_GET_HOTPLUG_INFO"); - else if (ulCode == IOCTL_STORAGE_SET_HOTPLUG_INFO) - return (LPWSTR) _T ("IOCTL_STORAGE_SET_HOTPLUG_INFO"); - else if (ulCode == IOCTL_STORAGE_QUERY_PROPERTY) - return (LPWSTR) _T ("IOCTL_STORAGE_QUERY_PROPERTY"); - else if (ulCode == IOCTL_VOLUME_GET_GPT_ATTRIBUTES) - return (LPWSTR) _T ("IOCTL_VOLUME_GET_GPT_ATTRIBUTES"); - else if (ulCode == FT_BALANCED_READ_MODE) - return (LPWSTR) _T ("FT_BALANCED_READ_MODE"); - else if (ulCode == IOCTL_VOLUME_QUERY_ALLOCATION_HINT) - return (LPWSTR) _T ("IOCTL_VOLUME_QUERY_ALLOCATION_HINT"); - else if (ulCode == IOCTL_DISK_GET_CLUSTER_INFO) - return (LPWSTR) _T ("IOCTL_DISK_GET_CLUSTER_INFO"); - else if (ulCode == IOCTL_DISK_ARE_VOLUMES_READY) - return (LPWSTR) _T ("IOCTL_DISK_ARE_VOLUMES_READY"); - else if (ulCode == IOCTL_VOLUME_IS_DYNAMIC) - return (LPWSTR) _T ("IOCTL_VOLUME_IS_DYNAMIC"); - else if (ulCode == IOCTL_MOUNTDEV_QUERY_STABLE_GUID) - return (LPWSTR) _T ("IOCTL_MOUNTDEV_QUERY_STABLE_GUID"); - else if (ulCode == IOCTL_VOLUME_POST_ONLINE) - return (LPWSTR) _T ("IOCTL_VOLUME_POST_ONLINE"); - else if (ulCode == IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT) - return (LPWSTR) _T ("IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT"); - else if (ulCode == IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES) - return (LPWSTR) _T ("IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES"); - else if (ulCode == IOCTL_DISK_GROW_PARTITION) - return (LPWSTR) _T ("IOCTL_DISK_GROW_PARTITION"); - else if (ulCode == IRP_MJ_READ) - return (LPWSTR) _T ("IRP_MJ_READ"); - else if (ulCode == IRP_MJ_WRITE) - return (LPWSTR) _T ("IRP_MJ_WRITE"); - else if (ulCode == IRP_MJ_CREATE) - return (LPWSTR) _T ("IRP_MJ_CREATE"); - else if (ulCode == IRP_MJ_CLOSE) - return (LPWSTR) _T ("IRP_MJ_CLOSE"); - else if (ulCode == IRP_MJ_CLEANUP) - return (LPWSTR) _T ("IRP_MJ_CLEANUP"); - else if (ulCode == IRP_MJ_FLUSH_BUFFERS) - return (LPWSTR) _T ("IRP_MJ_FLUSH_BUFFERS"); - else if (ulCode == IRP_MJ_SHUTDOWN) - return (LPWSTR) _T ("IRP_MJ_SHUTDOWN"); - else if (ulCode == IRP_MJ_DEVICE_CONTROL) - return (LPWSTR) _T ("IRP_MJ_DEVICE_CONTROL"); - else - { - return (LPWSTR) _T ("IOCTL"); +#undef TC_CASE_RET_NAME } } #endif @@ -3503,15 +3333,17 @@ void TCDeleteDeviceObject (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension) if (Extension->UserSid) TCfree (Extension->UserSid); if (Extension->SecurityClientContextValid) { - VOID (*PsDereferenceImpersonationTokenD) (PACCESS_TOKEN ImpersonationToken); + typedef VOID (*PsDereferenceImpersonationTokenDType) (PACCESS_TOKEN ImpersonationToken); + + PsDereferenceImpersonationTokenDType PsDereferenceImpersonationTokenD; UNICODE_STRING name; RtlInitUnicodeString (&name, L"PsDereferenceImpersonationToken"); - PsDereferenceImpersonationTokenD = MmGetSystemRoutineAddress (&name); + PsDereferenceImpersonationTokenD = (PsDereferenceImpersonationTokenDType) MmGetSystemRoutineAddress (&name); if (!PsDereferenceImpersonationTokenD) TC_BUG_CHECK (STATUS_NOT_IMPLEMENTED); # define PsDereferencePrimaryToken # define PsDereferenceImpersonationToken PsDereferenceImpersonationTokenD @@ -3532,11 +3364,11 @@ void TCDeleteDeviceObject (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension) VOID TCUnloadDriver (PDRIVER_OBJECT DriverObject) { Dump ("TCUnloadDriver BEGIN\n"); - + UNREFERENCED_PARAMETER(DriverObject); OnShutdownPending(); if (IsBootDriveMounted()) TC_BUG_CHECK (STATUS_INVALID_DEVICE_STATE); @@ -3551,11 +3383,11 @@ void OnShutdownPending () { UNMOUNT_STRUCT unmount; memset (&unmount, 0, sizeof (unmount)); unmount.ignoreOpenFiles = TRUE; - while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_DISMOUNT_ALL_VOLUMES, &unmount, sizeof (unmount), &unmount, sizeof (unmount)) == STATUS_INSUFFICIENT_RESOURCES || unmount.HiddenVolumeProtectionTriggered) + while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_UNMOUNT_ALL_VOLUMES, &unmount, sizeof (unmount), &unmount, sizeof (unmount)) == STATUS_INSUFFICIENT_RESOURCES || unmount.HiddenVolumeProtectionTriggered) unmount.HiddenVolumeProtectionTriggered = FALSE; while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_WIPE_PASSWORD_CACHE, NULL, 0, NULL, 0) == STATUS_INSUFFICIENT_RESOURCES); } @@ -3566,10 +3398,11 @@ typedef struct KEVENT WorkItemCompletedEvent; } TCDeviceIoControlWorkItemArgs; static VOID TCDeviceIoControlWorkItemRoutine (PDEVICE_OBJECT rootDeviceObject, TCDeviceIoControlWorkItemArgs *arg) { + UNREFERENCED_PARAMETER(rootDeviceObject); arg->Status = TCDeviceIoControl (arg->deviceName, arg->IoControlCode, arg->InputBuffer, arg->InputBufferSize, arg->OutputBuffer, arg->OutputBufferSize); KeSetEvent (&arg->WorkItemCompletedEvent, IO_NO_INCREMENT, FALSE); } NTSTATUS TCDeviceIoControl (PWSTR deviceName, ULONG IoControlCode, void *InputBuffer, ULONG InputBufferSize, void *OutputBuffer, ULONG OutputBufferSize) @@ -3580,11 +3413,11 @@ NTSTATUS TCDeviceIoControl (PWSTR deviceName, ULONG IoControlCode, void *InputBu PFILE_OBJECT fileObject; PDEVICE_OBJECT deviceObject; KEVENT event; UNICODE_STRING name; - if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled()) + if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled()) { TCDeviceIoControlWorkItemArgs args; PIO_WORKITEM workItem = IoAllocateWorkItem (RootDeviceObject); if (!workItem) @@ -3652,10 +3485,11 @@ typedef struct } SendDeviceIoControlRequestWorkItemArgs; static VOID SendDeviceIoControlRequestWorkItemRoutine (PDEVICE_OBJECT rootDeviceObject, SendDeviceIoControlRequestWorkItemArgs *arg) { + UNREFERENCED_PARAMETER(rootDeviceObject); arg->Status = SendDeviceIoControlRequest (arg->deviceObject, arg->ioControlCode, arg->inputBuffer, arg->inputBufferSize, arg->outputBuffer, arg->outputBufferSize); KeSetEvent (&arg->WorkItemCompletedEvent, IO_NO_INCREMENT, FALSE); } @@ -3664,11 +3498,11 @@ NTSTATUS SendDeviceIoControlRequest (PDEVICE_OBJECT deviceObject, ULONG ioContro IO_STATUS_BLOCK ioStatusBlock; NTSTATUS status; PIRP irp; KEVENT event; - if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled()) + if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled()) { SendDeviceIoControlRequestWorkItemArgs args; PIO_WORKITEM workItem = IoAllocateWorkItem (RootDeviceObject); if (!workItem) @@ -3715,11 +3549,11 @@ NTSTATUS SendDeviceIoControlRequest (PDEVICE_OBJECT deviceObject, ULONG ioContro NTSTATUS ProbeRealDriveSize (PDEVICE_OBJECT driveDeviceObject, LARGE_INTEGER *driveSize) { NTSTATUS status; LARGE_INTEGER sysLength; LARGE_INTEGER offset; - byte *sectorBuffer; + uint8 *sectorBuffer; ULONGLONG startTime; ULONG sectorSize; if (!UserCanAccessDriveDevice()) return STATUS_ACCESS_DENIED; @@ -3996,10 +3830,11 @@ typedef struct static NTSTATUS UpdateFsVolumeInformation (MOUNT_STRUCT* mount, PEXTENSION NewExtension); static VOID UpdateFsVolumeInformationWorkItemRoutine (PDEVICE_OBJECT rootDeviceObject, UpdateFsVolumeInformationWorkItemArgs *arg) { + UNREFERENCED_PARAMETER(rootDeviceObject); arg->Status = UpdateFsVolumeInformation (arg->mount, arg->NewExtension); KeSetEvent (&arg->WorkItemCompletedEvent, IO_NO_INCREMENT, FALSE); } static NTSTATUS UpdateFsVolumeInformation (MOUNT_STRUCT* mount, PEXTENSION NewExtension) @@ -4008,11 +3843,11 @@ static NTSTATUS UpdateFsVolumeInformation (MOUNT_STRUCT* mount, PEXTENSION NewEx PFILE_OBJECT volumeFileObject; ULONG labelLen = (ULONG) wcslen (mount->wszLabel); BOOL bIsNTFS = FALSE; ULONG labelMaxLen, labelEffectiveLen; - if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled()) + if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled()) { UpdateFsVolumeInformationWorkItemArgs args; PIO_WORKITEM workItem = IoAllocateWorkItem (RootDeviceObject); if (!workItem) @@ -4263,10 +4098,11 @@ typedef struct } UnmountDeviceWorkItemArgs; static VOID UnmountDeviceWorkItemRoutine (PDEVICE_OBJECT rootDeviceObject, UnmountDeviceWorkItemArgs *arg) { + UNREFERENCED_PARAMETER(rootDeviceObject); arg->Status = UnmountDevice (arg->unmountRequest, arg->deviceObject, arg->ignoreOpenFiles); KeSetEvent (&arg->WorkItemCompletedEvent, IO_NO_INCREMENT, FALSE); } NTSTATUS UnmountDevice (UNMOUNT_STRUCT *unmountRequest, PDEVICE_OBJECT deviceObject, BOOL ignoreOpenFiles) @@ -4274,11 +4110,11 @@ NTSTATUS UnmountDevice (UNMOUNT_STRUCT *unmountRequest, PDEVICE_OBJECT deviceObj PEXTENSION extension = deviceObject->DeviceExtension; NTSTATUS ntStatus; HANDLE volumeHandle; PFILE_OBJECT volumeFileObject; - if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled()) + if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled()) { UnmountDeviceWorkItemArgs args; PIO_WORKITEM workItem = IoAllocateWorkItem (RootDeviceObject); if (!workItem) @@ -4304,11 +4140,11 @@ NTSTATUS UnmountDevice (UNMOUNT_STRUCT *unmountRequest, PDEVICE_OBJECT deviceObj if (NT_SUCCESS (ntStatus)) { int dismountRetry; // Dismounting a writable NTFS filesystem prevents the driver from being unloaded on Windows 7 - if (IsOSAtLeast (WIN_7) && !extension->bReadOnly) + if (!extension->bReadOnly) { NTFS_VOLUME_DATA_BUFFER ntfsData; if (NT_SUCCESS (TCFsctlCall (volumeFileObject, FSCTL_GET_NTFS_VOLUME_DATA, NULL, 0, &ntfsData, sizeof (ntfsData)))) DriverUnloadDisabled = TRUE; @@ -4568,72 +4404,47 @@ NTSTATUS TCCompleteDiskIrp (PIRP irp, NTSTATUS status, ULONG_PTR information) size_t GetCpuCount (WORD* pGroupCount) { size_t cpuCount = 0; - if (KeQueryActiveGroupCountPtr && KeQueryActiveProcessorCountExPtr) + USHORT i, groupCount = KeQueryActiveGroupCount (); + for (i = 0; i < groupCount; i++) { - USHORT i, groupCount = KeQueryActiveGroupCountPtr (); - for (i = 0; i < groupCount; i++) - { - cpuCount += (size_t) KeQueryActiveProcessorCountExPtr (i); - } - - if (pGroupCount) - *pGroupCount = groupCount; + cpuCount += (size_t) KeQueryActiveProcessorCountEx (i); } - else - { - KAFFINITY activeCpuMap = KeQueryActiveProcessors(); - size_t mapSize = sizeof (activeCpuMap) * 8; - while (mapSize--) - { - if (activeCpuMap & 1) - ++cpuCount; - - activeCpuMap >>= 1; - } - - if (pGroupCount) - *pGroupCount = 1; - } + if (pGroupCount) + *pGroupCount = groupCount; if (cpuCount == 0) return 1; return cpuCount; } USHORT GetCpuGroup (size_t index) { - if (KeQueryActiveGroupCountPtr && KeQueryActiveProcessorCountExPtr) + USHORT i, groupCount = KeQueryActiveGroupCount (); + size_t cpuCount = 0; + for (i = 0; i < groupCount; i++) { - USHORT i, groupCount = KeQueryActiveGroupCountPtr (); - size_t cpuCount = 0; - for (i = 0; i < groupCount; i++) + cpuCount += (size_t) KeQueryActiveProcessorCountEx (i); + if (cpuCount >= index) { - cpuCount += (size_t) KeQueryActiveProcessorCountExPtr (i); - if (cpuCount >= index) - { - return i; - } + return i; } } return 0; } void SetThreadCpuGroupAffinity (USHORT index) { - if (KeSetSystemGroupAffinityThreadPtr) - { - GROUP_AFFINITY groupAffinity = {0}; - groupAffinity.Mask = ~0ULL; - groupAffinity.Group = index; - KeSetSystemGroupAffinityThreadPtr (&groupAffinity, NULL); - } + GROUP_AFFINITY groupAffinity = {0}; + groupAffinity.Mask = ~0ULL; + groupAffinity.Group = index; + KeSetSystemGroupAffinityThread (&groupAffinity, NULL); } void EnsureNullTerminatedString (wchar_t *str, size_t maxSizeInBytes) { ASSERT ((maxSizeInBytes & 1) == 0); @@ -4849,10 +4660,18 @@ NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry) EncryptionFragmentSize = *(uint32 *) data->Data; TCfree (data); } + if (driverEntry && NT_SUCCESS(TCReadRegistryKey(&name, VC_ENCRYPTION_MAX_WORK_ITEMS, &data))) + { + if (data->Type == REG_DWORD) + EncryptionMaxWorkItems = *(uint32*)data->Data; + + TCfree(data); + } + if (driverEntry) { if (EncryptionIoRequestCount < TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT) EncryptionIoRequestCount = TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT; else if (EncryptionIoRequestCount > TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_MAX_COUNT) @@ -4866,10 +4685,13 @@ NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry) EncryptionFragmentSize *= 1024; if (EncryptionFragmentSize == 0) EncryptionFragmentSize = TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE; else if (EncryptionFragmentSize > (8 * TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE)) EncryptionFragmentSize = 8 * TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE; + + if (EncryptionMaxWorkItems == 0) + EncryptionMaxWorkItems = VC_MAX_WORK_ITEMS; } if (driverEntry && NT_SUCCESS (TCReadRegistryKey (&name, VC_ERASE_KEYS_SHUTDOWN, &data))) @@ -4917,11 +4739,11 @@ NTSTATUS GetDeviceSectorSize (PDEVICE_OBJECT deviceObject, ULONG *bytesPerSector NTSTATUS ZeroUnreadableSectors (PDEVICE_OBJECT deviceObject, LARGE_INTEGER startOffset, ULONG size, uint64 *zeroedSectorCount) { NTSTATUS status; ULONG sectorSize; ULONG sectorCount; - byte *sectorBuffer = NULL; + uint8 *sectorBuffer = NULL; *zeroedSectorCount = 0; status = GetDeviceSectorSize (deviceObject, §orSize); if (!NT_SUCCESS (status)) @@ -4955,11 +4777,11 @@ err: return status; } -NTSTATUS ReadDeviceSkipUnreadableSectors (PDEVICE_OBJECT deviceObject, byte *buffer, LARGE_INTEGER startOffset, ULONG size, uint64 *badSectorCount) +NTSTATUS ReadDeviceSkipUnreadableSectors (PDEVICE_OBJECT deviceObject, uint8 *buffer, LARGE_INTEGER startOffset, ULONG size, uint64 *badSectorCount) { NTSTATUS status; ULONG sectorSize; ULONG sectorCount; @@ -5072,38 +4894,5 @@ BOOL IsOSAtLeast (OSVersionEnum reqMinOS) } return ((OsMajorVersion << 16 | OsMinorVersion << 8) >= (major << 16 | minor << 8)); } - -NTSTATUS NTAPI KeSaveExtendedProcessorStateVC ( - __in ULONG64 Mask, - PXSTATE_SAVE XStateSave - ) -{ - if (KeSaveExtendedProcessorStatePtr) - { - return (KeSaveExtendedProcessorStatePtr) (Mask, XStateSave); - } - else - { - return STATUS_SUCCESS; - } -} - -VOID NTAPI KeRestoreExtendedProcessorStateVC ( - PXSTATE_SAVE XStateSave - ) -{ - if (KeRestoreExtendedProcessorStatePtr) - { - (KeRestoreExtendedProcessorStatePtr) (XStateSave); - } -} - -BOOLEAN VC_KeAreAllApcsDisabled (VOID) -{ - if (KeAreAllApcsDisabledPtr) - return (KeAreAllApcsDisabledPtr) (); - else - return FALSE; -} diff --git a/src/Driver/Ntdriver.h b/src/Driver/Ntdriver.h index 3bbeb457..c23bbfe3 100644 --- a/src/Driver/Ntdriver.h +++ b/src/Driver/Ntdriver.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_NTDRIVER @@ -126,10 +126,11 @@ extern BOOL CacheBootPim; extern BOOL BlockSystemTrimCommand; extern BOOL AllowWindowsDefrag; extern int EncryptionIoRequestCount; extern int EncryptionItemCount; extern int EncryptionFragmentSize; +extern int EncryptionMaxWorkItems; extern BOOL EraseKeysOnShutdown; /* Helper macro returning x seconds in units of 100 nanoseconds */ #define WAIT_SECONDS(x) ((x)*10000000) NTSTATUS DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); @@ -189,11 +190,11 @@ BOOL IsVolumeClassFilterRegistered (); NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry); NTSTATUS WriteRegistryConfigFlags (uint32 flags); BOOL ValidateIOBufferSize (PIRP irp, size_t requiredBufferSize, ValidateIOBufferSizeType type); NTSTATUS GetDeviceSectorSize (PDEVICE_OBJECT deviceObject, ULONG *bytesPerSector); NTSTATUS ZeroUnreadableSectors (PDEVICE_OBJECT deviceObject, LARGE_INTEGER startOffset, ULONG size, uint64 *zeroedSectorCount); -NTSTATUS ReadDeviceSkipUnreadableSectors (PDEVICE_OBJECT deviceObject, byte *buffer, LARGE_INTEGER startOffset, ULONG size, uint64 *badSectorCount); +NTSTATUS ReadDeviceSkipUnreadableSectors (PDEVICE_OBJECT deviceObject, uint8 *buffer, LARGE_INTEGER startOffset, ULONG size, uint64 *badSectorCount); BOOL IsVolumeAccessibleByCurrentUser (PEXTENSION volumeDeviceExtension); void GetElapsedTimeInit (LARGE_INTEGER *lastPerfCounter); int64 GetElapsedTime (LARGE_INTEGER *lastPerfCounter); BOOL IsOSAtLeast (OSVersionEnum reqMinOS); PDEVICE_OBJECT GetVirtualVolumeDeviceObject (int driveNumber); diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c index 6f2ff399..9856fc2b 100644 --- a/src/Driver/Ntvol.c +++ b/src/Driver/Ntvol.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "TCdefs.h" @@ -51,11 +51,11 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, PCRYPTO_INFO cryptoInfoPtr = NULL; PCRYPTO_INFO tmpCryptoInfo = NULL; LARGE_INTEGER lDiskLength = { 0 }; __int64 partitionStartingOffset = 0; int volumeType; - char *readBuffer = 0; + unsigned char *readBuffer = 0; NTSTATUS ntStatus = 0; BOOL forceAccessCheck = !bRawDevice; BOOL disableBuffering = TRUE; BOOL exclusiveAccess = mount->bExclusiveAccess; /* when mounting with hidden volume protection, we cache the passwords after both outer and hidden volumes are mounted successfully*/ @@ -87,163 +87,157 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, goto error; } mount->VolumeMountedReadOnlyAfterDeviceWriteProtected = FALSE; mount->VolumeMountedReadOnlyAfterPartialSysEnc = FALSE; + mount->VolumeMasterKeyVulnerable = FALSE; // If we are opening a device, query its size first if (bRawDevice) { PARTITION_INFORMATION pi; PARTITION_INFORMATION_EX pix; LARGE_INTEGER diskLengthInfo; DISK_GEOMETRY_EX dg; - STORAGE_PROPERTY_QUERY storagePropertyQuery = {0}; - byte* dgBuffer; + STORAGE_PROPERTY_QUERY storagePropertyQuery = { 0 }; + uint8* dgBuffer; STORAGE_DEVICE_NUMBER storageDeviceNumber; - ntStatus = IoGetDeviceObjectPointer (&FullFileName, + ntStatus = IoGetDeviceObjectPointer(&FullFileName, FILE_READ_DATA | FILE_READ_ATTRIBUTES, &Extension->pfoDeviceFile, &Extension->pFsdDevice); - if (!NT_SUCCESS (ntStatus)) + if (!NT_SUCCESS(ntStatus)) goto error; - dgBuffer = TCalloc (256); + dgBuffer = TCalloc(256); if (!dgBuffer) { ntStatus = STATUS_INSUFFICIENT_RESOURCES; goto error; } - ntStatus = TCSendHostDeviceIoControlRequest (DeviceObject, Extension, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, (char *) dgBuffer, 256); - if (!NT_SUCCESS (ntStatus)) + ntStatus = TCSendHostDeviceIoControlRequest(DeviceObject, Extension, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, (char*)dgBuffer, 256); + if (!NT_SUCCESS(ntStatus)) { DISK_GEOMETRY geo; - ntStatus = TCSendHostDeviceIoControlRequest (DeviceObject, Extension, IOCTL_DISK_GET_DRIVE_GEOMETRY, (char *) &geo, sizeof (geo)); - if (!NT_SUCCESS (ntStatus)) + ntStatus = TCSendHostDeviceIoControlRequest(DeviceObject, Extension, IOCTL_DISK_GET_DRIVE_GEOMETRY, (char*)&geo, sizeof(geo)); + if (!NT_SUCCESS(ntStatus)) { - TCfree (dgBuffer); + TCfree(dgBuffer); goto error; } - memset (&dg, 0, sizeof (dg)); - memcpy (&dg.Geometry, &geo, sizeof (geo)); + memset(&dg, 0, sizeof(dg)); + memcpy(&dg.Geometry, &geo, sizeof(geo)); dg.DiskSize.QuadPart = geo.Cylinders.QuadPart * geo.SectorsPerTrack * geo.TracksPerCylinder * geo.BytesPerSector; - if (OsMajorVersion >= 6) + STORAGE_READ_CAPACITY storage = { 0 }; + NTSTATUS lStatus; + + storage.Version = sizeof(STORAGE_READ_CAPACITY); + storage.Size = sizeof(STORAGE_READ_CAPACITY); + lStatus = TCSendHostDeviceIoControlRequest(DeviceObject, Extension, + IOCTL_STORAGE_READ_CAPACITY, + (char*)&storage, sizeof(STORAGE_READ_CAPACITY)); + if (NT_SUCCESS(lStatus) + && (storage.Size == sizeof(STORAGE_READ_CAPACITY)) + ) { - STORAGE_READ_CAPACITY storage = {0}; - NTSTATUS lStatus; - - storage.Version = sizeof (STORAGE_READ_CAPACITY); - storage.Size = sizeof (STORAGE_READ_CAPACITY); - lStatus = TCSendHostDeviceIoControlRequest (DeviceObject, Extension, - IOCTL_STORAGE_READ_CAPACITY, - (char*) &storage, sizeof (STORAGE_READ_CAPACITY)); - if ( NT_SUCCESS(lStatus) - && (storage.Size == sizeof (STORAGE_READ_CAPACITY)) - ) - { - dg.DiskSize.QuadPart = storage.DiskLength.QuadPart; - } + dg.DiskSize.QuadPart = storage.DiskLength.QuadPart; } } else - memcpy (&dg, dgBuffer, sizeof (DISK_GEOMETRY_EX)); + memcpy(&dg, dgBuffer, sizeof(DISK_GEOMETRY_EX)); - TCfree (dgBuffer); + TCfree(dgBuffer); - if (NT_SUCCESS (TCSendHostDeviceIoControlRequest (DeviceObject, Extension, - IOCTL_STORAGE_GET_DEVICE_NUMBER, - (char*) &storageDeviceNumber, sizeof (storageDeviceNumber)))) + if (NT_SUCCESS(TCSendHostDeviceIoControlRequest(DeviceObject, Extension, + IOCTL_STORAGE_GET_DEVICE_NUMBER, + (char*)&storageDeviceNumber, sizeof(storageDeviceNumber)))) { Extension->DeviceNumber = storageDeviceNumber.DeviceNumber; } lDiskLength.QuadPart = dg.DiskSize.QuadPart; Extension->HostBytesPerSector = dg.Geometry.BytesPerSector; Extension->HostBytesPerPhysicalSector = dg.Geometry.BytesPerSector; - /* IOCTL_STORAGE_QUERY_PROPERTY supported only on Vista and above */ - if (OsMajorVersion >= 6) - { - STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR alignmentDesc = {0}; - STORAGE_ADAPTER_DESCRIPTOR adapterDesc = {0}; - DEVICE_SEEK_PENALTY_DESCRIPTOR penaltyDesc = {0}; - DEVICE_TRIM_DESCRIPTOR trimDesc = {0}; + STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR alignmentDesc = { 0 }; + STORAGE_ADAPTER_DESCRIPTOR adapterDesc = { 0 }; + DEVICE_SEEK_PENALTY_DESCRIPTOR penaltyDesc = { 0 }; + DEVICE_TRIM_DESCRIPTOR trimDesc = { 0 }; - storagePropertyQuery.PropertyId = StorageAccessAlignmentProperty; - storagePropertyQuery.QueryType = PropertyStandardQuery; + storagePropertyQuery.PropertyId = StorageAccessAlignmentProperty; + storagePropertyQuery.QueryType = PropertyStandardQuery; - alignmentDesc.Version = sizeof (STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR); - alignmentDesc.Size = sizeof (STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR); + alignmentDesc.Version = sizeof(STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR); + alignmentDesc.Size = sizeof(STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR); - if (NT_SUCCESS (TCSendHostDeviceIoControlRequestEx (DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, - (char*) &storagePropertyQuery, sizeof(storagePropertyQuery), - (char *) &alignmentDesc, sizeof (alignmentDesc)))) - { - Extension->HostBytesPerPhysicalSector = alignmentDesc.BytesPerPhysicalSector; - } + if (NT_SUCCESS(TCSendHostDeviceIoControlRequestEx(DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, + (char*)&storagePropertyQuery, sizeof(storagePropertyQuery), + (char*)&alignmentDesc, sizeof(alignmentDesc)))) + { + Extension->HostBytesPerPhysicalSector = alignmentDesc.BytesPerPhysicalSector; + } - storagePropertyQuery.PropertyId = StorageAdapterProperty; - adapterDesc.Version = sizeof (STORAGE_ADAPTER_DESCRIPTOR); - adapterDesc.Size = sizeof (STORAGE_ADAPTER_DESCRIPTOR); + storagePropertyQuery.PropertyId = StorageAdapterProperty; + adapterDesc.Version = sizeof(STORAGE_ADAPTER_DESCRIPTOR); + adapterDesc.Size = sizeof(STORAGE_ADAPTER_DESCRIPTOR); - if (NT_SUCCESS (TCSendHostDeviceIoControlRequestEx (DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, - (char*) &storagePropertyQuery, sizeof(storagePropertyQuery), - (char *) &adapterDesc, sizeof (adapterDesc)))) - { - Extension->HostMaximumTransferLength = adapterDesc.MaximumTransferLength; - Extension->HostMaximumPhysicalPages = adapterDesc.MaximumPhysicalPages; - Extension->HostAlignmentMask = adapterDesc.AlignmentMask; - } + if (NT_SUCCESS(TCSendHostDeviceIoControlRequestEx(DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, + (char*)&storagePropertyQuery, sizeof(storagePropertyQuery), + (char*)&adapterDesc, sizeof(adapterDesc)))) + { + Extension->HostMaximumTransferLength = adapterDesc.MaximumTransferLength; + Extension->HostMaximumPhysicalPages = adapterDesc.MaximumPhysicalPages; + Extension->HostAlignmentMask = adapterDesc.AlignmentMask; + } - storagePropertyQuery.PropertyId = StorageDeviceSeekPenaltyProperty; - penaltyDesc.Version = sizeof (DEVICE_SEEK_PENALTY_DESCRIPTOR); - penaltyDesc.Size = sizeof (DEVICE_SEEK_PENALTY_DESCRIPTOR); + storagePropertyQuery.PropertyId = StorageDeviceSeekPenaltyProperty; + penaltyDesc.Version = sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR); + penaltyDesc.Size = sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR); - if (NT_SUCCESS (TCSendHostDeviceIoControlRequestEx (DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, - (char*) &storagePropertyQuery, sizeof(storagePropertyQuery), - (char *) &penaltyDesc, sizeof (penaltyDesc)))) - { - Extension->IncursSeekPenalty = penaltyDesc.IncursSeekPenalty; - } + if (NT_SUCCESS(TCSendHostDeviceIoControlRequestEx(DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, + (char*)&storagePropertyQuery, sizeof(storagePropertyQuery), + (char*)&penaltyDesc, sizeof(penaltyDesc)))) + { + Extension->IncursSeekPenalty = penaltyDesc.IncursSeekPenalty; + } - storagePropertyQuery.PropertyId = StorageDeviceTrimProperty; - trimDesc.Version = sizeof (DEVICE_TRIM_DESCRIPTOR); - trimDesc.Size = sizeof (DEVICE_TRIM_DESCRIPTOR); + storagePropertyQuery.PropertyId = StorageDeviceTrimProperty; + trimDesc.Version = sizeof(DEVICE_TRIM_DESCRIPTOR); + trimDesc.Size = sizeof(DEVICE_TRIM_DESCRIPTOR); - if (NT_SUCCESS (TCSendHostDeviceIoControlRequestEx (DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, - (char*) &storagePropertyQuery, sizeof(storagePropertyQuery), - (char *) &trimDesc, sizeof (trimDesc)))) - { - Extension->TrimEnabled = trimDesc.TrimEnabled; - } + if (NT_SUCCESS(TCSendHostDeviceIoControlRequestEx(DeviceObject, Extension, IOCTL_STORAGE_QUERY_PROPERTY, + (char*)&storagePropertyQuery, sizeof(storagePropertyQuery), + (char*)&trimDesc, sizeof(trimDesc)))) + { + Extension->TrimEnabled = trimDesc.TrimEnabled; } // Drive geometry is used only when IOCTL_DISK_GET_PARTITION_INFO fails - if (NT_SUCCESS (TCSendHostDeviceIoControlRequest (DeviceObject, Extension, IOCTL_DISK_GET_PARTITION_INFO_EX, (char *) &pix, sizeof (pix)))) + if (NT_SUCCESS(TCSendHostDeviceIoControlRequest(DeviceObject, Extension, IOCTL_DISK_GET_PARTITION_INFO_EX, (char*)&pix, sizeof(pix)))) { lDiskLength.QuadPart = pix.PartitionLength.QuadPart; partitionStartingOffset = pix.StartingOffset.QuadPart; } // If IOCTL_DISK_GET_PARTITION_INFO_EX fails, switch to IOCTL_DISK_GET_PARTITION_INFO - else if (NT_SUCCESS (TCSendHostDeviceIoControlRequest (DeviceObject, Extension, IOCTL_DISK_GET_PARTITION_INFO, (char *) &pi, sizeof (pi)))) + else if (NT_SUCCESS(TCSendHostDeviceIoControlRequest(DeviceObject, Extension, IOCTL_DISK_GET_PARTITION_INFO, (char*)&pi, sizeof(pi)))) { lDiskLength.QuadPart = pi.PartitionLength.QuadPart; partitionStartingOffset = pi.StartingOffset.QuadPart; } - else if (NT_SUCCESS (TCSendHostDeviceIoControlRequest (DeviceObject, Extension, IOCTL_DISK_GET_LENGTH_INFO, &diskLengthInfo, sizeof (diskLengthInfo)))) + else if (NT_SUCCESS(TCSendHostDeviceIoControlRequest(DeviceObject, Extension, IOCTL_DISK_GET_LENGTH_INFO, &diskLengthInfo, sizeof(diskLengthInfo)))) { lDiskLength = diskLengthInfo; } ProbingHostDeviceForWrite = TRUE; if (!mount->bMountReadOnly - && TCSendHostDeviceIoControlRequest (DeviceObject, Extension, + && TCSendHostDeviceIoControlRequest(DeviceObject, Extension, IsHiddenSystemRunning() ? TC_IOCTL_DISK_IS_WRITABLE : IOCTL_DISK_IS_WRITABLE, NULL, 0) == STATUS_MEDIA_WRITE_PROTECTED) { mount->bMountReadOnly = TRUE; DeviceObject->Characteristics |= FILE_READ_ONLY_DEVICE; mount->VolumeMountedReadOnlyAfterDeviceWriteProtected = TRUE; @@ -638,18 +632,19 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, mount->nReturnCode = ERR_OUTOFMEMORY; ntStatus = STATUS_SUCCESS; goto error; } -#ifdef _WIN64 if (IsRamEncryptionEnabled() && (volumeType == TC_VOLUME_TYPE_NORMAL || !mount->bProtectHiddenVolume)) VcProtectKeys (Extension->cryptoInfo, VcGetEncryptionID (Extension->cryptoInfo)); -#endif Dump ("Volume header decrypted\n"); Dump ("Required program version = %x\n", (int) Extension->cryptoInfo->RequiredProgramVersion); Dump ("Legacy volume = %d\n", (int) Extension->cryptoInfo->LegacyVolume); + Dump ("Master key vulnerable = %d\n", (int) Extension->cryptoInfo->bVulnerableMasterKey); + + mount->VolumeMasterKeyVulnerable = Extension->cryptoInfo->bVulnerableMasterKey; if (IsHiddenSystemRunning() && !Extension->cryptoInfo->hiddenVolume) { Extension->bReadOnly = mount->bMountReadOnly = TRUE; HiddenSysLeakProtectionCount++; @@ -796,12 +791,11 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, // Calculate virtual volume geometry Extension->TracksPerCylinder = 1; Extension->SectorsPerTrack = 1; Extension->BytesPerSector = Extension->cryptoInfo->SectorSize; - // Add extra sector since our virtual partition starts at Extension->BytesPerSector and not 0 - Extension->NumberOfCylinders = (Extension->DiskLength / Extension->BytesPerSector) + 1; + Extension->NumberOfCylinders = Extension->DiskLength / Extension->BytesPerSector; Extension->PartitionType = 0; Extension->bRawDevice = bRawDevice; memset (Extension->wszVolume, 0, sizeof (Extension->wszVolume)); @@ -932,10 +926,11 @@ typedef struct KEVENT WorkItemCompletedEvent; } TCSendHostDeviceIoControlRequestExWorkItemArgs; static VOID TCSendHostDeviceIoControlRequestExWorkItemRoutine (PDEVICE_OBJECT rootDeviceObject, TCSendHostDeviceIoControlRequestExWorkItemArgs *arg) { + UNREFERENCED_PARAMETER(rootDeviceObject); /* Remove compiler warning */ arg->Status = TCSendHostDeviceIoControlRequestEx (arg->deviceObject, arg->Extension, arg->ioControlCode, arg->inputBuffer, arg->inputBufferSize, arg->outputBuffer, arg->outputBufferSize); KeSetEvent (&arg->WorkItemCompletedEvent, IO_NO_INCREMENT, FALSE); } NTSTATUS TCSendHostDeviceIoControlRequestEx (PDEVICE_OBJECT DeviceObject, @@ -950,11 +945,11 @@ NTSTATUS TCSendHostDeviceIoControlRequestEx (PDEVICE_OBJECT DeviceObject, NTSTATUS ntStatus; PIRP Irp; UNREFERENCED_PARAMETER(DeviceObject); /* Remove compiler warning */ - if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled()) + if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled()) { TCSendHostDeviceIoControlRequestExWorkItemArgs args; PIO_WORKITEM workItem = IoAllocateWorkItem (RootDeviceObject); if (!workItem) diff --git a/src/Driver/Ntvol.h b/src/Driver/Ntvol.h index 1d80b7de..a1051e94 100644 --- a/src/Driver/Ntvol.h +++ b/src/Driver/Ntvol.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ extern volatile BOOL ProbingHostDeviceForWrite; diff --git a/src/Driver/VolumeFilter.c b/src/Driver/VolumeFilter.c index 29d02673..f4fc9610 100644 --- a/src/Driver/VolumeFilter.c +++ b/src/Driver/VolumeFilter.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -153,10 +153,11 @@ static BOOL IsSystemVolumePartition (VolumeFilterExtension *Extension) static NTSTATUS DispatchControl (PDEVICE_OBJECT DeviceObject, PIRP Irp, VolumeFilterExtension *Extension, PIO_STACK_LOCATION irpSp) { NTSTATUS status = IoAcquireRemoveLock (&Extension->Queue.RemoveLock, Irp); + UNREFERENCED_PARAMETER(DeviceObject); if (!NT_SUCCESS (status)) return TCCompleteIrp (Irp, status, 0); if (IsHiddenSystemRunning()) { @@ -268,13 +269,14 @@ static NTSTATUS DispatchPnp (PDEVICE_OBJECT DeviceObject, PIRP Irp, VolumeFilter return status; } -static NTSTATUS DispatchPower (PDEVICE_OBJECT DeviceObject, PIRP Irp, VolumeFilterExtension *Extension, PIO_STACK_LOCATION irpSp) +static NTSTATUS DispatchPower (PDEVICE_OBJECT DeviceObject, PIRP Irp, VolumeFilterExtension *Extension) { NTSTATUS status; + UNREFERENCED_PARAMETER(DeviceObject); PoStartNextPowerIrp (Irp); status = IoAcquireRemoveLock (&Extension->Queue.RemoveLock, Irp); if (!NT_SUCCESS (status)) return TCCompleteIrp (Irp, status, 0); @@ -302,11 +304,11 @@ NTSTATUS VolumeFilterDispatchIrp (PDEVICE_OBJECT DeviceObject, PIRP Irp) case IRP_MJ_PNP: return DispatchPnp (DeviceObject, Irp, Extension, irpSp); case IRP_MJ_POWER: - return DispatchPower (DeviceObject, Irp, Extension, irpSp); + return DispatchPower (DeviceObject, Irp, Extension); default: status = IoAcquireRemoveLock (&Extension->Queue.RemoveLock, Irp); if (!NT_SUCCESS (status)) return TCCompleteIrp (Irp, status, 0); diff --git a/src/Driver/VolumeFilter.h b/src/Driver/VolumeFilter.h index f3e53237..e318e99d 100644 --- a/src/Driver/VolumeFilter.h +++ b/src/Driver/VolumeFilter.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Driver/veracrypt.Inf b/src/Driver/veracrypt.Inf new file mode 100644 index 00000000..c5751ac2 --- /dev/null +++ b/src/Driver/veracrypt.Inf @@ -0,0 +1,91 @@ +;;; +;;; VeraCrypt +;;; +;;; +;;; Copyright (c) 2025, IDRIX +;;; + +[Version] +signature = "$Windows NT$" +Class = "Encryption" ;This is determined by the work this filter driver does +ClassGuid = {a0a701c0-a511-42ff-aa6c-06dc0395576f} ;This value is determined by the Class +Provider = %ProviderString% +DriverVer = ; +CatalogFile = veracrypt.cat +PnpLockdown = 1 + +[DestinationDirs] +DefaultDestDir = 12 +veracrypt.DriverFiles = 12 ;%windir%\system32\drivers + +;; +;; Default install sections +;; + +[DefaultInstall.NTx86] +OptionDesc = %ServiceDescription% +CopyFiles = veracrypt.DriverFiles +AddReg = veracrypt.AddReg + +[DefaultInstall.NTamd64] +OptionDesc = %ServiceDescription% +CopyFiles = veracrypt.DriverFiles +AddReg = veracrypt.AddReg + +[DefaultInstall.NTarm64] +OptionDesc = %ServiceDescription% +CopyFiles = veracrypt.DriverFiles +AddReg = veracrypt.AddReg + +[DefaultInstall.NTx86.Services] +AddService = veracrypt,,veracrypt.Service + +[DefaultInstall.NTamd64.Services] +AddService = veracrypt,,veracrypt.Service + +[DefaultInstall.NTarm64.Services] +AddService = veracrypt,,veracrypt.Service + +; +; Services Section +; + +[veracrypt.Service] +DisplayName = %ServiceDescription% +Description = %ServiceDescription% +ServiceBinary = %12%\veracrypt.sys ;%windir%\system32\drivers\ +ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER +StartType = 0 ;SERVICE_BOOT_START +ErrorControl = 1 ;SERVICE_ERROR_NORMAL +LoadOrderGroup = "Filter" + +; +; Copy Files +; + +[veracrypt.DriverFiles] +veracrypt.sys + +[SourceDisksFiles] +veracrypt.sys = 1,, + +[SourceDisksNames] +1 = %DiskId1%,,, + +; +; Registry Entries +; + +[veracrypt.AddReg] +HKLM, System\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}, UpperFilters, 0x00010008, veracrypt +HKLM, System\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}, UpperFilters, 0x00010008, PartMgr + +;; +;; String Section +;; + +[Strings] +ProviderString = "IDRIX" +ServiceDescription = "veracrypt" +DiskId1 = "VeraCrypt Device Installation Disk" + diff --git a/src/Driver/veracrypt_vs2019.vcxproj b/src/Driver/veracrypt_vs2019.vcxproj deleted file mode 100644 index e956bcb0..00000000 --- a/src/Driver/veracrypt_vs2019.vcxproj +++ /dev/null @@ -1,598 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|ARM64"> - <Configuration>Debug</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|ARM64"> - <Configuration>Release</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\Common\Cache.c" /> - <ClCompile Include="..\Common\Crc.c" /> - <ClCompile Include="..\Common\Crypto.c" /> - <ClCompile Include="..\Common\EncryptionThreadPool.c" /> - <ClCompile Include="..\Common\Endian.c" /> - <ClCompile Include="..\Common\GfMul.c" /> - <ClCompile Include="..\Common\Pkcs5.c" /> - <ClCompile Include="..\Common\Tests.c" /> - <ClCompile Include="..\Common\Volumes.c" /> - <ClCompile Include="..\Common\Wipe.c" /> - <ClCompile Include="..\Common\Xts.c" /> - <ClCompile Include="..\Crypto\Aescrypt.c" /> - <ClCompile Include="..\Crypto\Aeskey.c" /> - <ClCompile Include="..\Crypto\Aestab.c" /> - <ClCompile Include="..\Crypto\blake2s.c" /> - <ClCompile Include="..\Crypto\blake2s_SSE2.c" /> - <ClCompile Include="..\Crypto\blake2s_SSE41.c" /> - <ClCompile Include="..\Crypto\blake2s_SSSE3.c" /> - <ClCompile Include="..\Crypto\Camellia.c" /> - <ClCompile Include="..\Crypto\chacha-xmm.c" /> - <ClCompile Include="..\Crypto\chacha256.c" /> - <ClCompile Include="..\Crypto\chachaRng.c" /> - <ClCompile Include="..\Crypto\cpu.c" /> - <ClCompile Include="..\Crypto\jitterentropy-base.c" /> - <ClCompile Include="..\Crypto\kuznyechik.c" /> - <ClCompile Include="..\Crypto\kuznyechik_simd.c"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\Crypto\rdrand.c"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\Crypto\SerpentFast.c" /> - <ClCompile Include="..\Crypto\SerpentFast_simd.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\Crypto\Sha2.c" /> - <ClCompile Include="..\Crypto\Streebog.c" /> - <ClCompile Include="..\Crypto\t1ha2.c" /> - <ClCompile Include="..\Crypto\t1ha2_selfcheck.c" /> - <ClCompile Include="..\Crypto\t1ha_selfcheck.c" /> - <ClCompile Include="..\Crypto\Twofish.c" /> - <ClCompile Include="..\Crypto\Whirlpool.c" /> - <ClCompile Include="Ntdriver.c" /> - <ClCompile Include="VolumeFilter.c" /> - <ClCompile Include="DriveFilter.c" /> - <ClCompile Include="DumpFilter.c" /> - <ClCompile Include="EncryptedIoQueue.c" /> - <ClCompile Include="Ntvol.c" /> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}</ProjectGuid> - <TemplateGuid>{f2f62967-0815-4fd7-9b86-6eedcac766eb}</TemplateGuid> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion> - <Configuration>Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <RootNamespace>veracrypt</RootNamespace> - <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion> - <ProjectName>driver</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - <DriverType>WDM</DriverType> - <DriverTargetPlatform>Universal</DriverTargetPlatform> - <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION> - <SupportsPackaging>false</SupportsPackaging> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - <DriverType>WDM</DriverType> - <DriverTargetPlatform>Universal</DriverTargetPlatform> - <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION> - <SupportsPackaging>false</SupportsPackaging> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - <DriverType>WDM</DriverType> - <DriverTargetPlatform>Universal</DriverTargetPlatform> - <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION> - <SupportsPackaging>false</SupportsPackaging> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - <DriverType>WDM</DriverType> - <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION> - <SupportsPackaging>false</SupportsPackaging> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - <DriverType>WDM</DriverType> - <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION> - <SupportsPackaging>false</SupportsPackaging> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - <DriverType>WDM</DriverType> - <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION> - <SupportsPackaging>false</SupportsPackaging> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> - <OutDir>$(SolutionDir)$(Platform)\$(ConfigurationName)\</OutDir> - <TargetName>veracrypt</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetName>veracrypt</TargetName> - <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetName>veracrypt</TargetName> - <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> - <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir> - <TargetName>veracrypt</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetName>veracrypt</TargetName> - <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetName>veracrypt</TargetName> - <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <Link> - <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Link> - <ClCompile> - <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.sys"</Command> - </PostBuildEvent> - <Inf> - <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion> - </Inf> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Link> - <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Link> - <ClCompile> - <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.sys"</Command> - </PostBuildEvent> - <Inf> - <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion> - </Inf> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Link> - <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Link> - <ClCompile> - <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.sys"</Command> - </PostBuildEvent> - <Inf> - <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion> - </Inf> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <Link> - <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Link> - <ClCompile> - <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.sys"</Command> - </PostBuildEvent> - <Inf> - <SpecifyArchitecture>true</SpecifyArchitecture> - <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion> - </Inf> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Link> - <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Link> - <ClCompile> - <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.sys"</Command> - </PostBuildEvent> - <Inf> - <SpecifyArchitecture>true</SpecifyArchitecture> - <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion> - </Inf> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Link> - <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Link> - <ClCompile> - <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.sys"</Command> - </PostBuildEvent> - <Inf> - <SpecifyArchitecture>true</SpecifyArchitecture> - <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion> - </Inf> - </ItemDefinitionGroup> - <ItemGroup> - <FilesToPackage Include="$(TargetPath)" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\Crypto\Aes.h" /> - <ClInclude Include="..\Crypto\Aesopt.h" /> - <ClInclude Include="..\Crypto\AesSmall.h" /> - <ClInclude Include="..\Crypto\Aestab.h" /> - <ClInclude Include="..\Crypto\Aes_hw_cpu.h" /> - <ClInclude Include="..\Crypto\Camellia.h" /> - <ClInclude Include="..\Crypto\chacha256.h" /> - <ClInclude Include="..\Crypto\chachaRng.h" /> - <ClInclude Include="..\Crypto\chacha_u1.h" /> - <ClInclude Include="..\Crypto\chacha_u4.h" /> - <ClInclude Include="..\Crypto\config.h" /> - <ClInclude Include="..\Crypto\cpu.h" /> - <ClInclude Include="..\Crypto\GostCipher.h" /> - <ClInclude Include="..\Crypto\jitterentropy-base-user.h" /> - <ClInclude Include="..\Crypto\jitterentropy.h" /> - <ClInclude Include="..\Crypto\kuznyechik.h" /> - <ClInclude Include="..\Crypto\misc.h" /> - <ClInclude Include="..\Crypto\rdrand.h" /> - <ClInclude Include="..\Crypto\Rmd160.h" /> - <ClInclude Include="..\Crypto\SerpentFast.h" /> - <ClInclude Include="..\Crypto\SerpentFast_sbox.h" /> - <ClInclude Include="..\Crypto\Sha2.h" /> - <ClInclude Include="..\Crypto\Streebog.h" /> - <ClInclude Include="..\Crypto\t1ha.h" /> - <ClInclude Include="..\Crypto\t1ha_bits.h" /> - <ClInclude Include="..\Crypto\t1ha_selfcheck.h" /> - <ClInclude Include="..\Crypto\Twofish.h" /> - <ClInclude Include="..\Crypto\Whirlpool.h" /> - <ClInclude Include="DriveFilter.h" /> - <ClInclude Include="DumpFilter.h" /> - <ClInclude Include="EncryptedIoQueue.h" /> - <ClInclude Include="Ntdriver.h" /> - <ClInclude Include="Ntvol.h" /> - <ClInclude Include="Resource.h" /> - <ClInclude Include="VolumeFilter.h" /> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\Aes_hw_cpu.asm"> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\Aes_x64.asm"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\Aes_x86.asm"> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\Twofish_x64.S"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\Camellia_aesni_x64.S"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\Camellia_x64.S"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha256-x86-nayuki.S"> - <FileType>Document</FileType> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha256_avx1_x64.asm"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha256_avx2_x64.asm"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha256_sse4_x64.asm"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha512-x86-nayuki.S"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha512-x64-nayuki.S"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha512_avx1_x64.asm"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha512_avx2_x64.asm"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\sha512_sse4_x64.asm"> - <FileType>Document</FileType> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\rdrand_ml.asm"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\rdseed_ml.asm"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) & ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)" -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="Driver.rc" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/src/Driver/veracrypt_vs2019.vcxproj.filters b/src/Driver/veracrypt_vs2019.vcxproj.filters deleted file mode 100644 index f0c7d0e3..00000000 --- a/src/Driver/veracrypt_vs2019.vcxproj.filters +++ /dev/null @@ -1,326 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> - <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - <Filter Include="Resource Files"> - <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> - </Filter> - <Filter Include="Driver Files"> - <UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier> - <Extensions>inf;inv;inx;mof;mc;</Extensions> - </Filter> - <Filter Include="Crypto"> - <UniqueIdentifier>{27c1f176-3bb2-46ab-abe5-d5ea01d8d4c9}</UniqueIdentifier> - </Filter> - <Filter Include="Crypto\Source Files"> - <UniqueIdentifier>{a5c1dc1f-29ec-4ea8-b535-61dd2c5e4342}</UniqueIdentifier> - </Filter> - <Filter Include="Crypto\Header Files"> - <UniqueIdentifier>{e69db28f-0030-4532-9d70-5c11b63d1e2b}</UniqueIdentifier> - </Filter> - <Filter Include="Common"> - <UniqueIdentifier>{c9095cb6-8efa-4261-902e-a9b8afa443d6}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="DriveFilter.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="DumpFilter.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="EncryptedIoQueue.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="Ntvol.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="VolumeFilter.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Aeskey.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Aestab.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Camellia.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\chacha-xmm.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\chacha256.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\chachaRng.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\cpu.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\jitterentropy-base.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\kuznyechik.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\kuznyechik_simd.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\rdrand.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\SerpentFast.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\SerpentFast_simd.cpp"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Sha2.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Streebog.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\t1ha2.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\t1ha2_selfcheck.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\t1ha_selfcheck.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Twofish.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Whirlpool.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Common\Cache.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Crc.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Crypto.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\EncryptionThreadPool.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Endian.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\GfMul.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Pkcs5.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Tests.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Volumes.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Wipe.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Xts.c"> - <Filter>Common</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\Aescrypt.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="Ntdriver.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\blake2s.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\blake2s_SSE2.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\blake2s_SSE41.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Crypto\blake2s_SSSE3.c"> - <Filter>Crypto\Source Files</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="DriveFilter.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="DumpFilter.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="EncryptedIoQueue.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Ntdriver.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Ntvol.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Resource.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="VolumeFilter.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Aes.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Aes_hw_cpu.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Aesopt.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Aestab.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Camellia.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\chacha256.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\chachaRng.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\chacha_u1.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\chacha_u4.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\config.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\cpu.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\GostCipher.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\jitterentropy-base-user.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\jitterentropy.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\kuznyechik.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\misc.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\rdrand.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Rmd160.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\SerpentFast.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\SerpentFast_sbox.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Sha2.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Streebog.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\t1ha.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\t1ha_bits.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\t1ha_selfcheck.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Twofish.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\Whirlpool.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Crypto\AesSmall.h"> - <Filter>Crypto\Header Files</Filter> - </ClInclude> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\Crypto\Aes_hw_cpu.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\Aes_x64.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\Aes_x86.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\Twofish_x64.S"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\Camellia_aesni_x64.S"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\Camellia_x64.S"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha256-x86-nayuki.S"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha256_avx1_x64.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha256_avx2_x64.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha256_sse4_x64.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha512-x86-nayuki.S"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha512-x64-nayuki.S"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha512_avx1_x64.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha512_avx2_x64.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\sha512_sse4_x64.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\rdrand_ml.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - <CustomBuild Include="..\Crypto\rdseed_ml.asm"> - <Filter>Crypto\Source Files</Filter> - </CustomBuild> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="Driver.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/src/ExpandVolume/DlgExpandVolume.cpp b/src/ExpandVolume/DlgExpandVolume.cpp index 0d803511..8124e19a 100644 --- a/src/ExpandVolume/DlgExpandVolume.cpp +++ b/src/ExpandVolume/DlgExpandVolume.cpp @@ -7,11 +7,11 @@ and which is governed by the 'License Agreement for Encryption for the Masses' and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk> Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -546,11 +546,11 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume) EnableElevatedCursorChange (hwndDlg); WaitCursor(); if (IsMountedVolume (lpszVolume)) { - Warning ("DISMOUNT_FIRST", hwndDlg); + Warning ("UNMOUNT_FIRST", hwndDlg); goto ret; } if (Randinit() != ERR_SUCCESS) { if (CryptoAPILastError == ERROR_SUCCESS) diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c index 712d23a3..9a53bbde 100644 --- a/src/ExpandVolume/ExpandVolume.c +++ b/src/ExpandVolume/ExpandVolume.c @@ -7,11 +7,11 @@ and which is governed by the 'License Agreement for Encryption for the Masses' and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk> Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -516,17 +516,15 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas FILETIME ftLastWriteTime; FILETIME ftLastAccessTime; BOOL bTimeStampValid = FALSE; LARGE_INTEGER headerOffset; BOOL backupHeader; - byte *wipeBuffer = NULL; + uint8 *wipeBuffer = NULL; uint32 workChunkSize = TC_VOLUME_HEADER_GROUP_SIZE; -#ifdef _WIN64 CRYPTO_INFO tmpCI; PCRYPTO_INFO cryptoInfoBackup = NULL; BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); -#endif if (pVolumePassword->Length == 0) return -1; WaitCursor (); @@ -689,22 +687,26 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas nStatus = ReadVolumeHeader (FALSE, buffer, pVolumePassword, VolumePkcs5, VolumePim, &cryptoInfo, NULL); if (nStatus == ERR_CIPHER_INIT_WEAK_KEY) nStatus = 0; // We can ignore this error here + // if the volume master key is vulnerable, print a warning to inform the user + if ((nStatus == 0) && cryptoInfo->bVulnerableMasterKey) + { + DebugAddProgressDlgStatus(hwndDlg, GetString ("ERR_XTS_MASTERKEY_VULNERABLE_SHORT")); + } + if (nStatus != 0) { cryptoInfo = NULL; goto error; } -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); } -#endif if (cryptoInfo->HeaderFlags & TC_HEADER_FLAG_ENCRYPTED_SYSTEM) { nStatus = ERR_SYS_HIDVOL_HEAD_REENC_MODE_WRONG; goto error; @@ -867,20 +869,18 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas if (backupHeader) DebugAddProgressDlgStatus(hwndDlg, GetString("EXPANDER_WRITING_ENCRYPTED_BACKUP")); else DebugAddProgressDlgStatus(hwndDlg, GetString("EXPANDER_WRITING_ENCRYPTED_PRIMARY")); -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VirtualLock (&tmpCI, sizeof (CRYPTO_INFO)); memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo)); cryptoInfoBackup = cryptoInfo; cryptoInfo = &tmpCI; } -#endif // Prepare new volume header nStatus = CreateVolumeHeaderInMemory (hwndDlg, FALSE, buffer, cryptoInfo->ea, @@ -897,18 +897,16 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas cryptoInfo->RequiredProgramVersion, cryptoInfo->HeaderFlags, cryptoInfo->SectorSize, FALSE ); // use slow poll -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { cryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (CRYPTO_INFO)); } -#endif if (ci != NULL) crypto_close (ci); if (nStatus != 0) @@ -937,30 +935,26 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas { //DebugAddProgressDlgStatus(hwndDlg, L"WriteRandomDataToReservedHeaderAreas() ...\r\n"); PCRYPTO_INFO dummyInfo = NULL; LARGE_INTEGER hiddenOffset; -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VirtualLock (&tmpCI, sizeof (CRYPTO_INFO)); memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo)); cryptoInfoBackup = cryptoInfo; cryptoInfo = &tmpCI; } -#endif nStatus = WriteRandomDataToReservedHeaderAreas (hwndDlg, dev, cryptoInfo, newDataAreaSize, !backupHeader, backupHeader); -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { cryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (CRYPTO_INFO)); } -#endif if (nStatus != ERR_SUCCESS) goto error; // write fake hidden volume header to protect against attacks that use statistical entropy // analysis to detect presence of hidden volumes @@ -1021,13 +1015,13 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas } /* wipe old backup header */ if ( !cryptoInfo->LegacyVolume ) { - byte wipeRandChars [TC_WIPE_RAND_CHAR_COUNT]; - byte wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT]; - byte wipePass; + uint8 wipeRandChars [TC_WIPE_RAND_CHAR_COUNT]; + uint8 wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT]; + uint8 wipePass; UINT64_STRUCT unitNo; LARGE_INTEGER offset; WipeAlgorithmId wipeAlgorithm = TC_WIPE_35_GUTMANN; if ( !RandgetBytes (hwndDlg, wipeRandChars, TC_WIPE_RAND_CHAR_COUNT, TRUE) @@ -1038,11 +1032,11 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas goto error; } DebugAddProgressDlgStatus(hwndDlg, GetString("EXPANDER_WIPING_OLD_HEADER")); - wipeBuffer = (byte *) TCalloc (workChunkSize); + wipeBuffer = (uint8 *) TCalloc (workChunkSize); if (!wipeBuffer) { nStatus = ERR_OUTOFMEMORY; goto error; } diff --git a/src/ExpandVolume/ExpandVolume.h b/src/ExpandVolume/ExpandVolume.h index 668eb79d..1aea9ea1 100644 --- a/src/ExpandVolume/ExpandVolume.h +++ b/src/ExpandVolume/ExpandVolume.h @@ -7,11 +7,11 @@ and which is governed by the 'License Agreement for Encryption for the Masses' and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk> Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_ExpandVolume diff --git a/src/ExpandVolume/ExpandVolume.rc b/src/ExpandVolume/ExpandVolume.rc index 71e26faa..a84a838d 100644 --- a/src/ExpandVolume/ExpandVolume.rc +++ b/src/ExpandVolume/ExpandVolume.rc @@ -190,12 +190,12 @@ IDR_MOUNT_RSRC_HEADER HEADER "resource.h" // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -208,15 +208,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Expander" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCryptExpander.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 diff --git a/src/ExpandVolume/ExpandVolume.vcproj b/src/ExpandVolume/ExpandVolume.vcproj deleted file mode 100644 index 37b6f461..00000000 --- a/src/ExpandVolume/ExpandVolume.vcproj +++ /dev/null @@ -1,977 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="ExpandVolume" - ProjectGUID="{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}" - RootNamespace="ExpandVolume" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - CommandLine="" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11" - PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - ExceptionHandling="1" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - EnableFunctionLevelLinking="false" - UsePrecompiledHeader="0" - BrowseInformation="0" - BrowseInformationFile="" - WarningLevel="3" - DebugInformationFormat="4" - DisableSpecificWarnings="4311" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\Debug\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptExpander.exe" - LinkIncremental="2" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/ExpandVolume.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="VeraCryptExpander.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" >NUL:
" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - CommandLine="" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TargetEnvironment="3" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11" - PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - ExceptionHandling="1" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - EnableFunctionLevelLinking="false" - UsePrecompiledHeader="0" - BrowseInformation="0" - BrowseInformationFile="" - WarningLevel="3" - DebugInformationFormat="3" - DisableSpecificWarnings="4311" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\x64\Debug\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptExpander.exe" - LinkIncremental="2" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/ExpandVolume.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="VeraCryptExpander.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL:
" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TypeLibraryName="$(SolutionDir)/Mount/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11" - PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="3" - DebugInformationFormat="0" - DisableSpecificWarnings="4311" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\Release\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptExpander.exe" - LinkIncremental="1" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="VeraCryptExpander.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TargetEnvironment="3" - TypeLibraryName="$(SolutionDir)/Mount/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11" - PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="3" - DebugInformationFormat="0" - DisableSpecificWarnings="4311" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\x64\Release\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptExpander.exe" - LinkIncremental="1" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="VeraCryptExpander.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"" - /> - </Configuration> - </Configurations> - <References> - <ProjectReference - ReferencedProjectIdentifier="{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}" - RelativePathToProject=".\Crypto\Crypto.vcproj" - /> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\DlgExpandVolume.cpp" - > - </File> - <File - RelativePath=".\ExpandVolume.c" - > - </File> - <File - RelativePath=".\InitDataArea.c" - > - </File> - <File - RelativePath=".\WinMain.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\BaseCom.cpp" - > - </File> - <File - RelativePath="..\Common\BootEncryption.cpp" - > - </File> - <File - RelativePath="..\Common\Cmdline.c" - > - </File> - <File - RelativePath="..\Common\Combo.c" - > - </File> - <File - RelativePath="..\Common\Crc.c" - > - </File> - <File - RelativePath="..\Common\Crypto.c" - > - </File> - <File - RelativePath="..\Common\Dictionary.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Dlgcode.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.c" - > - </File> - <File - RelativePath="..\Common\Endian.c" - > - </File> - <File - RelativePath="..\Common\GfMul.c" - > - </File> - <File - RelativePath="..\Common\Keyfiles.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Language.c" - > - </File> - <File - RelativePath="..\Common\Password.c" - > - </File> - <File - RelativePath="..\Common\Pkcs5.c" - > - </File> - <File - RelativePath="..\Common\Progress.c" - > - </File> - <File - RelativePath="..\Common\Random.c" - > - </File> - <File - RelativePath="..\Common\Registry.c" - > - </File> - <File - RelativePath="..\Common\SecurityToken.cpp" - > - </File> - <File - RelativePath="..\Common\Tests.c" - > - </File> - <File - RelativePath="..\Common\Volumes.c" - > - </File> - <File - RelativePath="..\Common\Wipe.c" - > - </File> - <File - RelativePath="..\Common\Wipe.h" - > - </File> - <File - RelativePath="..\Common\Xml.c" - > - </File> - <File - RelativePath="..\Common\Xts.c" - > - </File> - </Filter> - <Filter - Name="Mount" - > - <File - RelativePath="..\Mount\Favorites.cpp" - > - </File> - <File - RelativePath="..\Mount\Hotkeys.c" - > - </File> - <File - RelativePath="..\Mount\MainCom.cpp" - > - </File> - <File - RelativePath="..\Mount\MainCom.idl" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCMIDLTool" - OutputDirectory="$(SolutionDir)/Mount" - HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCMIDLTool" - OutputDirectory="$(SolutionDir)/Mount" - HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCMIDLTool" - OutputDirectory="$(SolutionDir)/Mount" - HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCMIDLTool" - OutputDirectory="$(SolutionDir)/Mount" - HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Mount\Mount.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\Common\Apidrvr.h" - > - </File> - <File - RelativePath="..\Common\BaseCom.h" - > - </File> - <File - RelativePath="..\Common\BootEncryption.h" - > - </File> - <File - RelativePath="..\Common\Cmdline.h" - > - </File> - <File - RelativePath="..\Common\Combo.h" - > - </File> - <File - RelativePath="..\Common\Common.h" - > - </File> - <File - RelativePath="..\Common\Crc.h" - > - </File> - <File - RelativePath="..\Common\Crypto.h" - > - </File> - <File - RelativePath="..\Common\Dictionary.h" - > - </File> - <File - RelativePath="..\Common\Dlgcode.h" - > - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.h" - > - </File> - <File - RelativePath="..\Common\Exception.h" - > - </File> - <File - RelativePath=".\ExpandVolume.h" - > - </File> - <File - RelativePath="..\Common\GfMul.h" - > - </File> - <File - RelativePath=".\Hotkeys.h" - > - </File> - <File - RelativePath=".\InitDataArea.h" - > - </File> - <File - RelativePath="..\Common\Keyfiles.h" - > - </File> - <File - RelativePath="..\Common\Language.h" - > - </File> - <File - RelativePath="..\Mount\MainCom.h" - > - </File> - <File - RelativePath="..\Mount\Mount.h" - > - </File> - <File - RelativePath="..\Common\Password.h" - > - </File> - <File - RelativePath="..\Common\Pkcs5.h" - > - </File> - <File - RelativePath="..\Common\Progress.h" - > - </File> - <File - RelativePath="..\Common\Random.h" - > - </File> - <File - RelativePath="..\Common\Registry.h" - > - </File> - <File - RelativePath="..\Common\Resource.h" - > - </File> - <File - RelativePath=".\resource.h" - > - </File> - <File - RelativePath="..\Common\SecurityToken.h" - > - </File> - <File - RelativePath="..\Common\Tcdefs.h" - > - </File> - <File - RelativePath="..\Common\Tests.h" - > - </File> - <File - RelativePath="..\Common\Volumes.h" - > - </File> - <File - RelativePath="..\Common\Xml.h" - > - </File> - <File - RelativePath="..\Common\Xts.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - <File - RelativePath=".\ExpandVolume.rc" - > - </File> - <File - RelativePath=".\Logo_288dpi.bmp" - > - </File> - <File - RelativePath=".\Logo_96dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_288dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_96dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_background.bmp" - > - </File> - <File - RelativePath="..\Common\VeraCrypt.ico" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_mounted.ico" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_Volume.ico" - > - </File> - <File - RelativePath=".\VeraCryptExpander.manifest" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\Common.rc" - > - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Language.xml" - > - </File> - </Filter> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/ExpandVolume/ExpandVolume.vcxproj b/src/ExpandVolume/ExpandVolume.vcxproj index 62ff1a09..2f06870e 100644 --- a/src/ExpandVolume/ExpandVolume.vcxproj +++ b/src/ExpandVolume/ExpandVolume.vcxproj @@ -1,173 +1,142 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> + <ProjectConfiguration Include="ReleaseCustomEFI|ARM64"> <Configuration>ReleaseCustomEFI</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="ReleaseCustomEFI|x64"> <Configuration>ReleaseCustomEFI</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32"> - <Configuration>Release_SkipOsDriverReqCheck</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|x64"> - <Configuration>Release_SkipOsDriverReqCheck</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}</ProjectGuid> <RootNamespace>ExpandVolume</RootNamespace> <Keyword>Win32Proj</Keyword> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <ProjectName>ExpandVolume</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptExpander</TargetName> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptExpander</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCryptExpander</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">VeraCryptExpander</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCryptExpander</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptExpander</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCryptExpander</TargetName> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <CustomBuildStep> <Command> </Command> </CustomBuildStep> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -177,51 +146,55 @@ <MinimalRebuild>true</MinimalRebuild> <ExceptionHandling>Sync</ExceptionHandling> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> + <FunctionLevelLinking> + </FunctionLevelLinking> <PrecompiledHeader> </PrecompiledHeader> <BrowseInformation> </BrowseInformation> <BrowseInformationFile> </BrowseInformationFile> <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)ExpandVolume.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> + <TargetMachine>MachineX64</TargetMachine> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> <Command>md "..\Debug\Setup Files" 2>NUL: -copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" >NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: </Command> </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <CustomBuildStep> <Command> </Command> </CustomBuildStep> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -231,11 +204,12 @@ copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" >NUL: <MinimalRebuild>true</MinimalRebuild> <ExceptionHandling>Sync</ExceptionHandling> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> + <FunctionLevelLinking> + </FunctionLevelLinking> <PrecompiledHeader> </PrecompiledHeader> <BrowseInformation> </BrowseInformation> <BrowseInformationFile> @@ -243,37 +217,37 @@ copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" >NUL: <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)ExpandVolume.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" >NUL: </Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -288,128 +262,40 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> - <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;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <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;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> + <TargetMachine>MachineX64</TargetMachine> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> </Link> <Manifest> <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -424,37 +310,37 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> </Link> <Manifest> <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-arm64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> @@ -462,11 +348,11 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: </Midl> <ClCompile> <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> <PrecompiledHeader> </PrecompiledHeader> <AssemblerOutput>All</AssemblerOutput> @@ -474,14 +360,14 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -495,17 +381,16 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: </Manifest> <PostBuildEvent> <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -522,61 +407,34 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> </Link> <Manifest> <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-arm64.exe"</Command> </PostBuildEvent> <ResourceCompile> <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Common\Lzma.vcxproj"> - <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> - </ProjectReference> - <ProjectReference Include="..\Crypto\Crypto.vcxproj"> - <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> - <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies> - <ReferenceOutputAssembly>true</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Driver\Driver.vcxproj"> - <Project>{ef5ef444-18d0-40d7-8dfa-775ec4448602}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Format\Format.vcxproj"> - <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Mount\Mount.vcxproj"> - <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </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" /> @@ -589,57 +447,49 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <ClCompile Include="..\Setup\SelfExtract.c" /> <ClCompile Include="DlgExpandVolume.cpp" /> <ClCompile Include="ExpandVolume.c" /> <ClCompile Include="InitDataArea.c" /> <ClCompile Include="WinMain.cpp"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\BaseCom.cpp" /> <ClCompile Include="..\Common\BootEncryption.cpp" /> <ClCompile Include="..\Common\Cmdline.c" /> <ClCompile Include="..\Common\Combo.c" /> <ClCompile Include="..\Common\Crc.c" /> <ClCompile Include="..\Common\Crypto.c" /> <ClCompile Include="..\Common\Dictionary.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\Dlgcode.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\EncryptionThreadPool.c" /> <ClCompile Include="..\Common\Endian.c" /> <ClCompile Include="..\Common\GfMul.c" /> <ClCompile Include="..\Common\Keyfiles.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\Language.c" /> <ClCompile Include="..\Common\Password.c" /> <ClCompile Include="..\Common\Pkcs5.c" /> <ClCompile Include="..\Common\Progress.c" /> @@ -653,18 +503,16 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <ClCompile Include="..\Common\Xts.c" /> <ClCompile Include="..\Mount\Favorites.cpp" /> <ClCompile Include="..\Mount\Hotkeys.c" /> <ClCompile Include="..\Mount\MainCom.cpp" /> <ClCompile Include="..\Mount\Mount.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\Common\CommandAPDU.h" /> <ClInclude Include="..\Common\EMVCard.h" /> @@ -712,39 +560,33 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <ClInclude Include="..\Common\Xml.h" /> <ClInclude Include="..\Common\Xts.h" /> </ItemGroup> <ItemGroup> <Midl Include="..\Mount\MainCom.idl"> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)/Mount</OutputDirectory> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount</OutputDirectory> + <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(SolutionDir)/Mount</OutputDirectory> <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(SolutionDir)/Mount</OutputDirectory> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> + <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(SolutionDir)/Mount</OutputDirectory> + <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(SolutionDir)/Mount</OutputDirectory> <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount</OutputDirectory> + <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(SolutionDir)/Mount</OutputDirectory> <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> + <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> + <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> </Midl> </ItemGroup> <ItemGroup> <ResourceCompile Include="ExpandVolume.rc" /> <ResourceCompile Include="..\Common\Common.rc"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild> </ResourceCompile> </ItemGroup> <ItemGroup> <None Include="Logo_288dpi.bmp" /> <None Include="Logo_96dpi.bmp" /> @@ -757,9 +599,23 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: <None Include="..\Common\Language.xml" /> </ItemGroup> <ItemGroup> <Manifest Include="VeraCryptExpander.manifest" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\Lzma.vcxproj"> + <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> + </ProjectReference> + <ProjectReference Include="..\Crypto\Crypto.vcxproj"> + <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> + </ProjectReference> + <ProjectReference Include="..\Format\Format.vcxproj"> + <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> + </ProjectReference> + <ProjectReference Include="..\Mount\Mount.vcxproj"> + <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> + </ProjectReference> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/src/ExpandVolume/ExpandVolume.vcxproj.filters b/src/ExpandVolume/ExpandVolume.vcxproj.filters index c168cfc2..17ed8515 100644 --- a/src/ExpandVolume/ExpandVolume.vcxproj.filters +++ b/src/ExpandVolume/ExpandVolume.vcxproj.filters @@ -127,32 +127,32 @@ <Filter>Source Files\Setup</Filter> </ClCompile> <ClCompile Include="..\Common\EMVToken.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\Token.cpp"> + <ClCompile Include="..\Common\TLVParser.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\TLVParser.cpp"> + <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\SCardReader.cpp"> + <ClCompile Include="..\Common\PCSCException.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\SCardLoader.cpp"> + <ClCompile Include="..\Common\ResponseAPDU.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\SCardManager.cpp"> + <ClCompile Include="..\Common\SCardLoader.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\ResponseAPDU.cpp"> + <ClCompile Include="..\Common\SCardManager.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> - <ClCompile Include="..\Common\PCSCException.cpp"> + <ClCompile Include="..\Common\SCardReader.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> <ClCompile Include="..\Common\EMVCard.cpp"> <Filter>Source Files\Common</Filter> </ClCompile> @@ -264,32 +264,32 @@ <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\Common\EMVToken.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\Token.h"> + <ClInclude Include="..\Common\TLVParser.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\TLVParser.h"> + <ClInclude Include="..\Common\Token.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\Common\CommandAPDU.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\SCardLoader.h"> + <ClInclude Include="..\Common\PCSCException.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\PCSCException.h"> + <ClInclude Include="..\Common\ResponseAPDU.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\SCardManager.h"> + <ClInclude Include="..\Common\SCardLoader.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\SCardReader.h"> + <ClInclude Include="..\Common\SCardManager.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\Common\ResponseAPDU.h"> + <ClInclude Include="..\Common\SCardReader.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\Common\EMVCard.h"> <Filter>Header Files</Filter> </ClInclude> diff --git a/src/ExpandVolume/ExpandVolume.vcxproj.user b/src/ExpandVolume/ExpandVolume.vcxproj.user index ace9a86a..88a55094 100644 --- a/src/ExpandVolume/ExpandVolume.vcxproj.user +++ b/src/ExpandVolume/ExpandVolume.vcxproj.user @@ -1,3 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> </Project>
\ No newline at end of file diff --git a/src/ExpandVolume/ExpandVolume_vs2019.vcxproj b/src/ExpandVolume/ExpandVolume_vs2019.vcxproj deleted file mode 100644 index 32937616..00000000 --- a/src/ExpandVolume/ExpandVolume_vs2019.vcxproj +++ /dev/null @@ -1,839 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|ARM64"> - <Configuration>Debug</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|ARM64"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|x64"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|ARM64"> - <Configuration>Release</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}</ProjectGuid> - <RootNamespace>ExpandVolume</RootNamespace> - <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> - <ProjectName>ExpandVolume</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptExpander</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCryptExpander</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <CustomBuildStep> - <Command> - </Command> - </CustomBuildStep> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling>Sync</ExceptionHandling> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> - <BrowseInformation> - </BrowseInformation> - <BrowseInformationFile> - </BrowseInformationFile> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)ExpandVolume.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" >NUL: -</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <CustomBuildStep> - <Command> - </Command> - </CustomBuildStep> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling>Sync</ExceptionHandling> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> - <BrowseInformation> - </BrowseInformation> - <BrowseInformationFile> - </BrowseInformationFile> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)ExpandVolume.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" >NUL: -</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <CustomBuildStep> - <Command> - </Command> - </CustomBuildStep> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling>Sync</ExceptionHandling> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> - <BrowseInformation> - </BrowseInformation> - <BrowseInformationFile> - </BrowseInformationFile> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)ExpandVolume.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <DataExecutionPrevention>true</DataExecutionPrevention> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" >NUL: -</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-arm64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\AMD64\Release\crypto.lib;..\Common\AMD64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - </Link> - <Manifest> - <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-arm64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemGroup> - <ProjectReference Include="..\Common\Lzma_vs2019.vcxproj"> - <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> - </ProjectReference> - <ProjectReference Include="..\Crypto\Crypto_vs2019.vcxproj"> - <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> - <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies> - <ReferenceOutputAssembly>true</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Format\Format_vs2019.vcxproj"> - <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Mount\Mount_vs2019.vcxproj"> - <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </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" /> - <ClCompile Include="InitDataArea.c" /> - <ClCompile Include="WinMain.cpp"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\BaseCom.cpp" /> - <ClCompile Include="..\Common\BootEncryption.cpp" /> - <ClCompile Include="..\Common\Cmdline.c" /> - <ClCompile Include="..\Common\Combo.c" /> - <ClCompile Include="..\Common\Crc.c" /> - <ClCompile Include="..\Common\Crypto.c" /> - <ClCompile Include="..\Common\Dictionary.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\Dlgcode.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\EncryptionThreadPool.c" /> - <ClCompile Include="..\Common\Endian.c" /> - <ClCompile Include="..\Common\GfMul.c" /> - <ClCompile Include="..\Common\Keyfiles.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\Language.c" /> - <ClCompile Include="..\Common\Password.c" /> - <ClCompile Include="..\Common\Pkcs5.c" /> - <ClCompile Include="..\Common\Progress.c" /> - <ClCompile Include="..\Common\Random.c" /> - <ClCompile Include="..\Common\Registry.c" /> - <ClCompile Include="..\Common\SecurityToken.cpp" /> - <ClCompile Include="..\Common\Tests.c" /> - <ClCompile Include="..\Common\Volumes.c" /> - <ClCompile Include="..\Common\Wipe.c" /> - <ClCompile Include="..\Common\Xml.c" /> - <ClCompile Include="..\Common\Xts.c" /> - <ClCompile Include="..\Mount\Favorites.cpp" /> - <ClCompile Include="..\Mount\Hotkeys.c" /> - <ClCompile Include="..\Mount\MainCom.cpp" /> - <ClCompile Include="..\Mount\Mount.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </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" /> - <ClInclude Include="..\Common\BootEncryption.h" /> - <ClInclude Include="..\Common\Cmdline.h" /> - <ClInclude Include="..\Common\Combo.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\EncryptionThreadPool.h" /> - <ClInclude Include="..\Common\Exception.h" /> - <ClInclude Include="ExpandVolume.h" /> - <ClInclude Include="..\Common\GfMul.h" /> - <ClInclude Include="Hotkeys.h" /> - <ClInclude Include="InitDataArea.h" /> - <ClInclude Include="..\Common\Keyfiles.h" /> - <ClInclude Include="..\Common\Language.h" /> - <ClInclude Include="..\Mount\MainCom.h" /> - <ClInclude Include="..\Mount\Mount.h" /> - <ClInclude Include="..\Common\Password.h" /> - <ClInclude Include="..\Common\Pkcs5.h" /> - <ClInclude Include="..\Common\Progress.h" /> - <ClInclude Include="..\Common\Random.h" /> - <ClInclude Include="..\Common\Registry.h" /> - <ClInclude Include="..\Common\Resource.h" /> - <ClInclude Include="resource.h" /> - <ClInclude Include="..\Common\SecurityToken.h" /> - <ClInclude Include="..\Common\Tcdefs.h" /> - <ClInclude Include="..\Common\Tests.h" /> - <ClInclude Include="..\Common\Volumes.h" /> - <ClInclude Include="..\Common\Xml.h" /> - <ClInclude Include="..\Common\Xts.h" /> - </ItemGroup> - <ItemGroup> - <Midl Include="..\Mount\MainCom.idl"> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)/Mount</OutputDirectory> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(SolutionDir)/Mount</OutputDirectory> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(SolutionDir)/Mount</OutputDirectory> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount</OutputDirectory> - <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(SolutionDir)/Mount</OutputDirectory> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName> - </Midl> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="ExpandVolume.rc" /> - <ResourceCompile Include="..\Common\Common.rc"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <None Include="Logo_288dpi.bmp" /> - <None Include="Logo_96dpi.bmp" /> - <None Include="..\Common\Textual_logo_288dpi.bmp" /> - <None Include="..\Common\Textual_logo_96dpi.bmp" /> - <None Include="..\Common\Textual_logo_background.bmp" /> - <None Include="..\Common\VeraCrypt.ico" /> - <None Include="..\Common\VeraCrypt_mounted.ico" /> - <None Include="..\Common\VeraCrypt_Volume.ico" /> - <None Include="..\Common\Language.xml" /> - </ItemGroup> - <ItemGroup> - <Manifest Include="VeraCryptExpander.manifest" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters b/src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters deleted file mode 100644 index 17ed8515..00000000 --- a/src/ExpandVolume/ExpandVolume_vs2019.vcxproj.filters +++ /dev/null @@ -1,347 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> - <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - <Filter Include="Source Files\Common"> - <UniqueIdentifier>{72ac1543-f2dc-4c01-8803-65822dc01862}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\Mount"> - <UniqueIdentifier>{1d0126bc-b4d1-4ed2-a244-52cb9dc1e516}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - <Filter Include="Resource Files"> - <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions> - </Filter> - <Filter Include="Resource Files\Common"> - <UniqueIdentifier>{ece6c790-f488-400d-b92d-64f73ce9f990}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\Setup"> - <UniqueIdentifier>{922a1924-e0f2-4829-8ed2-eb783e03e8a5}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="DlgExpandVolume.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="ExpandVolume.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="InitDataArea.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="WinMain.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Common\BaseCom.cpp"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\BootEncryption.cpp"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Cmdline.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Combo.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Crc.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Crypto.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Dictionary.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Dlgcode.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\EncryptionThreadPool.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Endian.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\GfMul.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Keyfiles.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Language.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Password.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Pkcs5.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Progress.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Random.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Registry.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\SecurityToken.cpp"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Tests.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Volumes.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Wipe.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Xml.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Xts.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Mount\Favorites.cpp"> - <Filter>Source Files\Mount</Filter> - </ClCompile> - <ClCompile Include="..\Mount\Hotkeys.c"> - <Filter>Source Files\Mount</Filter> - </ClCompile> - <ClCompile Include="..\Mount\MainCom.cpp"> - <Filter>Source Files\Mount</Filter> - </ClCompile> - <ClCompile Include="..\Mount\Mount.c"> - <Filter>Source Files\Mount</Filter> - </ClCompile> - <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"> - <Filter>Source Files\Common</Filter> - </ClInclude> - <ClInclude Include="..\Common\Apidrvr.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\BaseCom.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\BootEncryption.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Cmdline.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Combo.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Common.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Crc.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Crypto.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Dictionary.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Dlgcode.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\EncryptionThreadPool.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Exception.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="ExpandVolume.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\GfMul.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Hotkeys.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="InitDataArea.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Keyfiles.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Language.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Mount\MainCom.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Mount\Mount.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Password.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Pkcs5.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Progress.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Random.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Registry.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Resource.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="resource.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\SecurityToken.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Tcdefs.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Tests.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Volumes.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Xml.h"> - <Filter>Header Files</Filter> - </ClInclude> - <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"> - <Filter>Source Files\Mount</Filter> - </Midl> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="ExpandVolume.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - <ResourceCompile Include="..\Common\Common.rc"> - <Filter>Resource Files\Common</Filter> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <None Include="Logo_288dpi.bmp"> - <Filter>Resource Files</Filter> - </None> - <None Include="Logo_96dpi.bmp"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\Textual_logo_288dpi.bmp"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\Textual_logo_96dpi.bmp"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\Textual_logo_background.bmp"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\VeraCrypt.ico"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\VeraCrypt_mounted.ico"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\VeraCrypt_Volume.ico"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\Language.xml"> - <Filter>Resource Files\Common</Filter> - </None> - </ItemGroup> - <ItemGroup> - <Manifest Include="VeraCryptExpander.manifest"> - <Filter>Resource Files</Filter> - </Manifest> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/src/ExpandVolume/InitDataArea.c b/src/ExpandVolume/InitDataArea.c index 709f44b9..b85afad7 100644 --- a/src/ExpandVolume/InitDataArea.c +++ b/src/ExpandVolume/InitDataArea.c @@ -7,11 +7,11 @@ and which is governed by the 'License Agreement for Encryption for the Masses' and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk> Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include <stdlib.h> @@ -54,13 +54,11 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors, CRYPTOPP_ALIGN_DATA(16) char temporaryKey[MASTER_KEYDATA_SIZE]; CRYPTOPP_ALIGN_DATA(16) char originalK2[MASTER_KEYDATA_SIZE]; LARGE_INTEGER startOffset; LARGE_INTEGER newOffset; -#ifdef _WIN64 CRYPTO_INFO tmpCI; -#endif // Seek to start sector startOffset.QuadPart = startSector * FormatSectorSize; if (!SetFilePointerEx ((HANDLE) dev, startOffset, &newOffset, FILE_BEGIN) || newOffset.QuadPart != startOffset.QuadPart) @@ -75,19 +73,17 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors, VirtualLock (temporaryKey, sizeof (temporaryKey)); VirtualLock (originalK2, sizeof (originalK2)); memset (sector, 0, sizeof (sector)); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { VirtualLock (&tmpCI, sizeof (tmpCI)); memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo)); cryptoInfo = &tmpCI; } -#endif // Remember the original secondary key (XTS mode) before generating a temporary one memcpy (originalK2, cryptoInfo->k2, sizeof (cryptoInfo->k2)); /* Fill the rest of the data area with random data */ @@ -114,14 +110,12 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors, { retVal = ERR_MODE_INIT_FAILED; goto fail; } -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); -#endif while (num_sectors--) { if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo, cryptoInfo) == FALSE) @@ -152,17 +146,15 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors, burn (temporaryKey, sizeof(temporaryKey)); burn (originalK2, sizeof(originalK2)); VirtualUnlock (temporaryKey, sizeof (temporaryKey)); VirtualUnlock (originalK2, sizeof (originalK2)); TCfree (write_buf); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (tmpCI)); } -#endif return 0; fail: err = GetLastError(); @@ -170,17 +162,15 @@ fail: burn (temporaryKey, sizeof(temporaryKey)); burn (originalK2, sizeof(originalK2)); VirtualUnlock (temporaryKey, sizeof (temporaryKey)); VirtualUnlock (originalK2, sizeof (originalK2)); TCfree (write_buf); -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) { burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (tmpCI)); } -#endif SetLastError (err); return (retVal ? retVal : ERR_OS_ERROR); } @@ -214,11 +204,11 @@ BOOL WriteSector (void *dev, char *sector, static volatile BOOL WriteThreadRunning; static volatile BOOL WriteThreadExitRequested; static HANDLE WriteThreadHandle; -static byte *WriteThreadBuffer; +static uint8 *WriteThreadBuffer; static HANDLE WriteBufferEmptyEvent; static HANDLE WriteBufferFullEvent; static volatile HANDLE WriteRequestHandle; static volatile int WriteRequestSize; diff --git a/src/ExpandVolume/InitDataArea.h b/src/ExpandVolume/InitDataArea.h index f8104150..e273cfaa 100644 --- a/src/ExpandVolume/InitDataArea.h +++ b/src/ExpandVolume/InitDataArea.h @@ -4,11 +4,11 @@ by the TrueCrypt License 3.0, and also derived from source code of extcv which is Copyright (c) 2009-2010 by Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk> Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index 9a822153..64fccd55 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -7,11 +7,11 @@ and which is governed by the 'License Agreement for Encryption for the Masses' and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk> Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -129,11 +129,11 @@ BOOL CmdVolumePasswordValid = FALSE; MountOptions mountOptions; MountOptions defaultMountOptions; KeyFile *FirstCmdKeyFile; HBITMAP hbmLogoBitmapRescaled = NULL; -wchar_t OrigKeyboardLayout [8+1] = L"00000409"; +wchar_t OrigKeyboardLayout [KL_NAMELENGTH] = L"00000409"; BOOL bKeyboardLayoutChanged = FALSE; /* TRUE if the keyboard layout was changed to the standard US keyboard layout (from any other layout). */ BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informed that it is not possible to type characters by pressing keys while the right Alt key is held down. */ static KeyFilesDlgParam hidVolProtKeyFilesParam; VOLUME_NOTIFICATIONS_LIST VolumeNotificationsList; @@ -550,13 +550,16 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA wmemset (tmp, L'X', MAX_PASSWORD); tmp [MAX_PASSWORD] = 0; SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp); SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), L""); - StringCbPrintfW (OrigKeyboardLayout, sizeof(OrigKeyboardLayout),L"%08X", (DWORD) GetKeyboardLayout (NULL) & 0xFFFF); + if (!GetKeyboardLayoutNameW(OrigKeyboardLayout)) + { + StringCbPrintfW(OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD) (DWORD_PTR) GetKeyboardLayout(NULL) & 0xFFFF); + } - DWORD keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + DWORD keybLayout = (DWORD) (DWORD_PTR) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg); EndDialog (hwndDlg, IDCANCEL); @@ -592,11 +595,11 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA switch (wParam) { case TIMER_ID_KEYB_LAYOUT_GUARD: if (bPrebootPasswordDlgMode) { - DWORD keybLayout = (DWORD) GetKeyboardLayout (NULL); + DWORD keybLayout = (DWORD) (DWORD_PTR) GetKeyboardLayout (NULL); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { // Keyboard layout is not standard US @@ -605,11 +608,11 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA wmemset (tmp, L'X', MAX_PASSWORD); tmp [MAX_PASSWORD] = 0; SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp); SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), L""); - keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + keybLayout = (DWORD) (DWORD_PTR) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD); Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg); @@ -1088,11 +1091,15 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz InitApp (hInstance, lpszCommandLine); /* application title */ lpszTitle = L"VeraCrypt Expander"; - DetectX86Features (); +#ifndef _M_ARM64 + DetectX86Features(); +#else + DetectArmFeatures(); +#endif status = DriverAttach (); if (status != 0) { if (status == ERR_OS_ERROR) diff --git a/src/Format/Format.rc b/src/Format/Format.rc index db0df59f..057fd837 100644 --- a/src/Format/Format.rc +++ b/src/Format/Format.rc @@ -26,12 +26,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -44,15 +44,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Format" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt Format.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 diff --git a/src/Format/Format.vcproj b/src/Format/Format.vcproj deleted file mode 100644 index 9fa108bc..00000000 --- a/src/Format/Format.vcproj +++ /dev/null @@ -1,1028 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="Format" - ProjectGUID="{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}" - RootNamespace="Format" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="VOLFORMAT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - WarningLevel="4" - DebugInformationFormat="4" - DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\Debug\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptFormat.exe" - LinkIncremental="2" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Format.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Format.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >NUL:
" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="VOLFORMAT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - WarningLevel="4" - DebugInformationFormat="3" - DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\x64\Debug\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptFormat.exe" - LinkIncremental="2" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Format.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Format.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL:
" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="VOLFORMAT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - DebugInformationFormat="0" - DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\Release\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptFormat.exe" - LinkIncremental="1" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Format.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="VOLFORMAT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - DebugInformationFormat="0" - DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\x64\Release\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptFormat.exe" - LinkIncremental="1" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Format.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\FormatCom.cpp" - > - </File> - <File - RelativePath=".\FormatCom.idl" - > - </File> - <File - RelativePath=".\InPlace.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\Tcformat.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\BaseCom.cpp" - > - </File> - <File - RelativePath="..\Common\BootEncryption.cpp" - > - </File> - <File - RelativePath="..\Common\Cmdline.c" - > - </File> - <File - RelativePath="..\Common\Combo.c" - > - </File> - <File - RelativePath="..\Common\Crc.c" - > - </File> - <File - RelativePath="..\Common\Crypto.c" - > - </File> - <File - RelativePath="..\Common\Dictionary.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Dlgcode.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.c" - > - </File> - <File - RelativePath="..\Common\Endian.c" - > - </File> - <File - RelativePath="..\Common\Fat.c" - > - </File> - <File - RelativePath="..\Common\Format.c" - > - </File> - <File - RelativePath="..\Common\GfMul.c" - > - </File> - <File - RelativePath="..\Common\Keyfiles.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Language.c" - > - </File> - <File - RelativePath="..\Common\Password.c" - > - </File> - <File - RelativePath="..\Common\Pkcs5.c" - > - </File> - <File - RelativePath="..\Common\Progress.c" - > - </File> - <File - RelativePath="..\Common\Random.c" - > - </File> - <File - RelativePath="..\Common\Registry.c" - > - </File> - <File - RelativePath="..\Common\SecurityToken.cpp" - > - </File> - <File - RelativePath="..\Common\Tests.c" - > - </File> - <File - RelativePath="..\Common\Volumes.c" - > - </File> - <File - RelativePath="..\Common\Wipe.c" - > - </File> - <File - RelativePath="..\Common\Xml.c" - > - </File> - <File - RelativePath="..\Common\Xts.c" - > - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\Common\BaseCom.h" - > - </File> - <File - RelativePath="..\Common\Common.h" - > - </File> - <File - RelativePath="..\Common\Crc.h" - > - </File> - <File - RelativePath="..\Common\Crypto.h" - > - </File> - <File - RelativePath="..\Common\Dictionary.h" - > - </File> - <File - RelativePath="..\Common\Dlgcode.h" - > - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.h" - > - </File> - <File - RelativePath="..\Common\Endian.h" - > - </File> - <File - RelativePath="..\Common\Exception.h" - > - </File> - <File - RelativePath="..\Common\Fat.h" - > - </File> - <File - RelativePath="..\Common\Format.h" - > - </File> - <File - RelativePath=".\FormatCom.h" - > - </File> - <File - RelativePath="..\Common\GfMul.h" - > - </File> - <File - RelativePath=".\InPlace.h" - > - </File> - <File - RelativePath="..\Common\Keyfiles.h" - > - </File> - <File - RelativePath="..\Common\Language.h" - > - </File> - <File - RelativePath="..\Mount\Mount.h" - > - </File> - <File - RelativePath="..\Common\Pkcs5.h" - > - </File> - <File - RelativePath="..\Common\Progress.h" - > - </File> - <File - RelativePath="..\Common\Random.h" - > - </File> - <File - RelativePath="..\Common\Registry.h" - > - </File> - <File - RelativePath=".\resource.h" - > - </File> - <File - RelativePath="..\Common\Resource.h" - > - </File> - <File - RelativePath="..\Common\SecurityToken.h" - > - </File> - <File - RelativePath="..\Common\Tcdefs.h" - > - </File> - <File - RelativePath=".\Tcformat.h" - > - </File> - <File - RelativePath="..\Common\Tests.h" - > - </File> - <File - RelativePath="..\Common\Volumes.h" - > - </File> - <File - RelativePath="..\Common\Wipe.h" - > - </File> - <File - RelativePath="..\Common\Xml.h" - > - </File> - <File - RelativePath="..\Common\Xts.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - <File - RelativePath="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Twofish_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Serpent_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_AES_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_AES_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish_SHA2\BootSector.bin" - > - </File> - <File - RelativePath=".\Format.manifest" - > - </File> - <File - RelativePath=".\Format.rc" - > - </File> - <File - RelativePath=".\Format.tlb" - SubType="Designer" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_mounted.ico" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_Volume.ico" - > - </File> - <File - RelativePath=".\VeraCrypt_wizard.bmp" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Boot\Windows\Release_AES\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_AES\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Serpent\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_AES\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Serpent\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Serpent\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Twofish\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_AES\BootSector.bin" - > - </File> - <File - RelativePath="..\Common\Common.rc" - > - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Boot\Windows\Release\Decompressor.com" - > - </File> - <File - RelativePath="..\Common\Language.xml" - > - </File> - <File - RelativePath="..\Resources\Texts\License.rtf" - > - </File> - <File - RelativePath="..\Common\Textual_logo_288dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_96dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_background.bmp" - > - </File> - <File - RelativePath="..\Common\VeraCrypt.ico" - > - </File> - </Filter> - </Filter> - <File - RelativePath="..\Boot\Windows\Release_Serpent_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_AES_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Serpent_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Twofish_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_AES_SHA2\BootLoader.com.gz" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/Format/Format.vcxproj b/src/Format/Format.vcxproj index 1ae26d43..1ffac006 100644 --- a/src/Format/Format.vcxproj +++ b/src/Format/Format.vcxproj @@ -1,168 +1,137 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> + <ProjectConfiguration Include="ReleaseCustomEFI|ARM64"> <Configuration>ReleaseCustomEFI</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="ReleaseCustomEFI|x64"> <Configuration>ReleaseCustomEFI</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32"> - <Configuration>Release_SkipOsDriverReqCheck</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|x64"> - <Configuration>Release_SkipOsDriverReqCheck</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}</ProjectGuid> <RootNamespace>Format</RootNamespace> <Keyword>Win32Proj</Keyword> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <ProjectName>Format</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptFormat</TargetName> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCryptFormat</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCryptFormat</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCryptFormat</TargetName> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Midl> + <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> </Midl> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -172,37 +141,40 @@ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> + <TargetMachine>MachineX64</TargetMachine> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> <Command>md "..\Debug\Setup Files" 2>NUL: -copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: </Command> </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Midl> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> </Midl> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -216,35 +188,35 @@ copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >N <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: </Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Midl> + <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> </Midl> <ClCompile> <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> @@ -257,118 +229,38 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <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;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <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;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> + <TargetMachine>MachineX64</TargetMachine> </Link> <Manifest> <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Midl> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> </Midl> <ClCompile> <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> @@ -381,45 +273,45 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> </Link> <Manifest> <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> <Midl> <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> </Midl> <ClCompile> <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> <PrecompiledHeader> </PrecompiledHeader> <AssemblerOutput>All</AssemblerOutput> @@ -427,14 +319,14 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -447,16 +339,15 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: </Manifest> <PostBuildEvent> <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'"> <Midl> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> </Midl> <ClCompile> <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> @@ -471,31 +362,30 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> </Link> <Manifest> <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\Common\CommandAPDU.cpp" /> <ClCompile Include="..\Common\EMVCard.cpp" /> @@ -508,69 +398,59 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="Tcformat.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\BaseCom.cpp" /> <ClCompile Include="..\Common\BootEncryption.cpp" /> <ClCompile Include="..\Common\Cmdline.c" /> <ClCompile Include="..\Common\Combo.c" /> <ClCompile Include="..\Common\Crc.c" /> <ClCompile Include="..\Common\Crypto.c" /> <ClCompile Include="..\Common\Dictionary.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\Dlgcode.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\EncryptionThreadPool.c" /> <ClCompile Include="..\Common\Endian.c" /> <ClCompile Include="..\Common\Fat.c" /> <ClCompile Include="..\Common\Format.c" /> <ClCompile Include="..\Common\GfMul.c" /> <ClCompile Include="..\Common\Keyfiles.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\Language.c" /> <ClCompile Include="..\Common\Password.c" /> <ClCompile Include="..\Common\Pkcs5.c" /> <ClCompile Include="..\Common\Progress.c" /> @@ -664,13 +544,11 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <None Include="..\Boot\Windows\Rescue_Serpent\BootSector.bin" /> <None Include="..\Boot\Windows\Rescue_Twofish\BootSector.bin" /> <None Include="..\Boot\Windows\Release_Twofish\BootSector.bin" /> <None Include="..\Boot\Windows\Release_AES\BootSector.bin" /> <None Include="..\Boot\Windows\Release\Decompressor.com" /> - <None Include="..\Common\Language.xml"> - <SubType>Designer</SubType> - </None> + <None Include="..\Common\Language.xml" /> <None Include="..\Resources\Texts\License.rtf" /> <None Include="..\Common\Textual_logo_288dpi.bmp" /> <None Include="..\Common\Textual_logo_96dpi.bmp" /> <None Include="..\Common\Textual_logo_background.bmp" /> <None Include="..\Common\VeraCrypt.ico" /> @@ -679,38 +557,27 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <Manifest Include="Format.manifest" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="Format.rc" /> <ResourceCompile Include="..\Common\Common.rc"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild> </ResourceCompile> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> <ProjectReference Include="..\Common\Lzma.vcxproj"> <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> </ProjectReference> <ProjectReference Include="..\Common\Zip.vcxproj"> <Project>{6316ee71-0210-4ca4-bcc7-cfb7a3c090fc}</Project> </ProjectReference> <ProjectReference Include="..\Crypto\Crypto.vcxproj"> <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Driver\Driver.vcxproj"> - <Project>{ef5ef444-18d0-40d7-8dfa-775ec4448602}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/src/Format/Format.vcxproj.user b/src/Format/Format.vcxproj.user index ace9a86a..88a55094 100644 --- a/src/Format/Format.vcxproj.user +++ b/src/Format/Format.vcxproj.user @@ -1,3 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> </Project>
\ No newline at end of file diff --git a/src/Format/FormatCom.cpp b/src/Format/FormatCom.cpp index 90333f23..904128c3 100644 --- a/src/Format/FormatCom.cpp +++ b/src/Format/FormatCom.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Format/FormatCom.h b/src/Format/FormatCom.h index e474608d..17eff52e 100644 --- a/src/Format/FormatCom.h +++ b/src/Format/FormatCom.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Format/Format_vs2019.vcxproj b/src/Format/Format_vs2019.vcxproj deleted file mode 100644 index 95f61615..00000000 --- a/src/Format/Format_vs2019.vcxproj +++ /dev/null @@ -1,770 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|ARM64"> - <Configuration>Debug</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|ARM64"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|x64"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|ARM64"> - <Configuration>Release</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}</ProjectGuid> - <RootNamespace>Format</RootNamespace> - <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> - <ProjectName>Format</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptFormat</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCryptFormat</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >NUL: -</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: -</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <DataExecutionPrevention>true</DataExecutionPrevention> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: -</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> - <Midl> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'"> - <Midl> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - </Link> - <Manifest> - <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </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> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="Tcformat.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\BaseCom.cpp" /> - <ClCompile Include="..\Common\BootEncryption.cpp" /> - <ClCompile Include="..\Common\Cmdline.c" /> - <ClCompile Include="..\Common\Combo.c" /> - <ClCompile Include="..\Common\Crc.c" /> - <ClCompile Include="..\Common\Crypto.c" /> - <ClCompile Include="..\Common\Dictionary.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\Dlgcode.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\EncryptionThreadPool.c" /> - <ClCompile Include="..\Common\Endian.c" /> - <ClCompile Include="..\Common\Fat.c" /> - <ClCompile Include="..\Common\Format.c" /> - <ClCompile Include="..\Common\GfMul.c" /> - <ClCompile Include="..\Common\Keyfiles.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\Language.c" /> - <ClCompile Include="..\Common\Password.c" /> - <ClCompile Include="..\Common\Pkcs5.c" /> - <ClCompile Include="..\Common\Progress.c" /> - <ClCompile Include="..\Common\Random.c" /> - <ClCompile Include="..\Common\Registry.c" /> - <ClCompile Include="..\Common\SecurityToken.cpp" /> - <ClCompile Include="..\Common\Tests.c" /> - <ClCompile Include="..\Common\Volumes.c" /> - <ClCompile Include="..\Common\Wipe.c" /> - <ClCompile Include="..\Common\Xml.c" /> - <ClCompile Include="..\Common\Xts.c" /> - </ItemGroup> - <ItemGroup> - <Midl Include="FormatCom.idl" /> - </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" /> - <ClInclude Include="..\Common\Keyfiles.h" /> - <ClInclude Include="..\Common\Language.h" /> - <ClInclude Include="..\Mount\Mount.h" /> - <ClInclude Include="..\Common\Pkcs5.h" /> - <ClInclude Include="..\Common\Progress.h" /> - <ClInclude Include="..\Common\Random.h" /> - <ClInclude Include="..\Common\Registry.h" /> - <ClInclude Include="resource.h" /> - <ClInclude Include="..\Common\Resource.h" /> - <ClInclude Include="..\Common\SecurityToken.h" /> - <ClInclude Include="..\Common\Tcdefs.h" /> - <ClInclude Include="Tcformat.h" /> - <ClInclude Include="..\Common\Tests.h" /> - <ClInclude Include="..\Common\Volumes.h" /> - <ClInclude Include="..\Common\Wipe.h" /> - <ClInclude Include="..\Common\Xml.h" /> - <ClInclude Include="..\Common\Xts.h" /> - </ItemGroup> - <ItemGroup> - <None Include="..\Boot\Windows\Release_Camellia\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Camellia_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Camellia\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Camellia_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Twofish_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Serpent_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_AES_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_AES_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Twofish_SHA2\BootSector.bin" /> - <None Include="Format.tlb"> - <SubType>Designer</SubType> - </None> - <None Include="..\Common\VeraCrypt_mounted.ico" /> - <None Include="..\Common\VeraCrypt_Volume.ico" /> - <None Include="VeraCrypt_wizard.bmp" /> - <None Include="..\Boot\Windows\Release_AES\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Release\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Release_Twofish\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue_AES\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Release_Serpent\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue_AES\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue\BootSector.bin" /> - <None Include="..\Boot\Windows\Release\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Serpent\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Serpent\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Twofish\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Twofish\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_AES\BootSector.bin" /> - <None Include="..\Boot\Windows\Release\Decompressor.com" /> - <None Include="..\Common\Language.xml" /> - <None Include="..\Resources\Texts\License.rtf" /> - <None Include="..\Common\Textual_logo_288dpi.bmp" /> - <None Include="..\Common\Textual_logo_96dpi.bmp" /> - <None Include="..\Common\Textual_logo_background.bmp" /> - <None Include="..\Common\VeraCrypt.ico" /> - </ItemGroup> - <ItemGroup> - <Manifest Include="Format.manifest" /> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="Format.rc" /> - <ResourceCompile Include="..\Common\Common.rc"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Common\Lzma_vs2019.vcxproj"> - <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> - </ProjectReference> - <ProjectReference Include="..\Crypto\Crypto_vs2019.vcxproj"> - <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/src/Format/Format_vs2019.vcxproj.user b/src/Format/Format_vs2019.vcxproj.user deleted file mode 100644 index 88a55094..00000000 --- a/src/Format/Format_vs2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup /> -</Project>
\ No newline at end of file diff --git a/src/Format/InPlace.c b/src/Format/InPlace.c index 877ff7eb..0c35ccce 100644 --- a/src/Format/InPlace.c +++ b/src/Format/InPlace.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -373,11 +373,11 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol int nStatus = ERR_SUCCESS; PCRYPTO_INFO cryptoInfo = NULL; PCRYPTO_INFO cryptoInfo2 = NULL; HANDLE dev = INVALID_HANDLE_VALUE; DWORD dwError; - char *header; + unsigned char *header; WCHAR dosDev[TC_MAX_PATH] = {0}; WCHAR devName[MAX_PATH] = {0}; int driveLetter = -1; WCHAR deviceName[MAX_PATH]; uint64 dataAreaSize; @@ -391,11 +391,11 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol if (!CheckRequirementsForNonSysInPlaceEnc (hwndDlg, volParams->volumePath, FALSE)) return ERR_DONT_REPORT; - header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); + header = (unsigned char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); if (!header) return ERR_OUTOFMEMORY; VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE); @@ -598,11 +598,11 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol nStatus = ERR_OS_ERROR; goto closing_seq; } // Write the backup header to the partition - if (!WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header)) + if (!WriteEffectiveVolumeHeader (TRUE, dev, header)) { nStatus = ERR_OS_ERROR; goto closing_seq; } @@ -644,11 +644,11 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol nStatus = ERR_OS_ERROR; goto closing_seq; } // Write the fake hidden backup header to the partition - if (!WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header)) + if (!WriteEffectiveVolumeHeader (TRUE, dev, (uint8 *) header)) { nStatus = ERR_OS_ERROR; goto closing_seq; } @@ -751,14 +751,14 @@ int EncryptPartitionInPlaceResume (HANDLE dev, WipeAlgorithmId wipeAlgorithm, volatile BOOL *bTryToCorrectReadErrors) { PCRYPTO_INFO masterCryptoInfo = NULL, headerCryptoInfo = NULL, tmpCryptoInfo = NULL; UINT64_STRUCT unitNo; - char *buf = NULL, *header = NULL; - byte *wipeBuffer = NULL; - byte wipeRandChars [TC_WIPE_RAND_CHAR_COUNT]; - byte wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT]; + unsigned char *buf = NULL, *header = NULL; + uint8 *wipeBuffer = NULL; + uint8 wipeRandChars [TC_WIPE_RAND_CHAR_COUNT]; + uint8 wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT]; WCHAR dosDev[TC_MAX_PATH] = {0}; WCHAR devName[MAX_PATH] = {0}; WCHAR deviceName[MAX_PATH]; int nStatus = ERR_SUCCESS; __int64 deviceSize; @@ -774,36 +774,34 @@ int EncryptPartitionInPlaceResume (HANDLE dev, Password *password = volParams->password; int pkcs5_prf = volParams->pkcs5; int pim = volParams->pim; DISK_GEOMETRY driveGeometry; HWND hwndDlg = volParams->hwndDlg; -#ifdef _WIN64 BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); -#endif bInPlaceEncNonSysResumed = TRUE; - buf = (char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE); + buf = (unsigned char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE); if (!buf) { nStatus = ERR_OUTOFMEMORY; goto closing_seq; } - header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); + header = (unsigned char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); if (!header) { nStatus = ERR_OUTOFMEMORY; goto closing_seq; } VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE); if (wipeAlgorithm != TC_WIPE_NONE) { - wipeBuffer = (byte *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE); + wipeBuffer = (uint8 *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE); if (!wipeBuffer) { nStatus = ERR_OUTOFMEMORY; goto closing_seq; } @@ -872,17 +870,15 @@ int EncryptPartitionInPlaceResume (HANDLE dev, nStatus = OpenBackupHeader (dev, devicePath, password, pkcs5_prf, pim, &masterCryptoInfo, headerCryptoInfo, deviceSize); if (nStatus != ERR_SUCCESS) goto closing_seq; -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VcProtectKeys (masterCryptoInfo, VcGetEncryptionID (masterCryptoInfo)); VcProtectKeys (headerCryptoInfo, VcGetEncryptionID (headerCryptoInfo)); } -#endif remainingBytes = masterCryptoInfo->VolumeSize.Value - masterCryptoInfo->EncryptedAreaLength.Value; lastHeaderUpdateDistance = 0; @@ -972,18 +968,18 @@ inplace_enc_read: } // Encrypt the plaintext in RAM - EncryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); + EncryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); // If enabled, wipe the area to which we will write the ciphertext if (wipeAlgorithm != TC_WIPE_NONE) { - byte wipePass; + uint8 wipePass; int wipePassCount = GetWipePassCount (wipeAlgorithm); if (wipePassCount <= 0) { SetLastError (ERROR_INVALID_PARAMETER); @@ -995,14 +991,14 @@ inplace_enc_read: for (wipePass = 1; wipePass <= wipePassCount; ++wipePass) { if (!WipeBuffer (wipeAlgorithm, wipeRandChars, wipePass, wipeBuffer, workChunkSize)) { - ULONG i; - for (i = 0; i < workChunkSize; ++i) + ULONG index; + for (index = 0; index < workChunkSize; ++index) { - wipeBuffer[i] = buf[i] + wipePass; + wipeBuffer[index] = buf[index] + wipePass; } EncryptDataUnits (wipeBuffer, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); memcpy (wipeRandCharsUpdate, wipeBuffer, sizeof (wipeRandCharsUpdate)); } @@ -1014,11 +1010,11 @@ inplace_enc_read: dwError = GetLastError(); // Undo failed write operation if (workChunkSize > TC_VOLUME_DATA_OFFSET && MoveFilePointer (dev, offset)) { - DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); + DecryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL); } SetLastError (dwError); nStatus = ERR_OS_ERROR; @@ -1046,11 +1042,11 @@ inplace_enc_read: dwError = GetLastError(); // Undo failed write operation if (workChunkSize > TC_VOLUME_DATA_OFFSET && MoveFilePointer (dev, offset)) { - DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); + DecryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL); } SetLastError (dwError); nStatus = ERR_OS_ERROR; @@ -1100,22 +1096,20 @@ inplace_enc_read: for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_HEADER_WIPE_PASSES); wipePass++) { PCRYPTO_INFO dummyInfo = NULL; -#ifdef _WIN64 CRYPTO_INFO tmpCI; PCRYPTO_INFO cryptoInfoBackup = NULL; if (bIsRamEncryptionEnabled) { VirtualLock (&tmpCI, sizeof(tmpCI)); memcpy (&tmpCI, masterCryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (masterCryptoInfo)); cryptoInfoBackup = masterCryptoInfo; masterCryptoInfo = &tmpCI; } -#endif nStatus = CreateVolumeHeaderInMemory (hwndDlg, FALSE, header, headerCryptoInfo->ea, headerCryptoInfo->mode, @@ -1131,53 +1125,48 @@ inplace_enc_read: masterCryptoInfo->RequiredProgramVersion, masterCryptoInfo->HeaderFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC, masterCryptoInfo->SectorSize, wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_HEADER_WIPE_PASSES - 1)); -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { masterCryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof(tmpCI)); } -#endif if (nStatus != ERR_SUCCESS) goto closing_seq; offset.QuadPart = TC_VOLUME_HEADER_OFFSET; if (MoveFilePointer (dev, offset) == 0 - || !WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header)) + || !WriteEffectiveVolumeHeader (TRUE, dev, (uint8 *) header)) { nStatus = ERR_OS_ERROR; goto closing_seq; } -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VirtualLock (&tmpCI, sizeof(tmpCI)); memcpy (&tmpCI, headerCryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (headerCryptoInfo)); cryptoInfoBackup = headerCryptoInfo; headerCryptoInfo = &tmpCI; } -#endif + // Fill the reserved sectors of the header area with random data nStatus = WriteRandomDataToReservedHeaderAreas (hwndDlg, dev, headerCryptoInfo, masterCryptoInfo->VolumeSize.Value, TRUE, FALSE); -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { headerCryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof(tmpCI)); } -#endif if (nStatus != ERR_SUCCESS) goto closing_seq; // write fake hidden volume header to protect against attacks that use statistical entropy @@ -1206,11 +1195,11 @@ inplace_enc_read: crypto_close (dummyInfo); offset.QuadPart += TC_HIDDEN_VOLUME_HEADER_OFFSET; if (MoveFilePointer (dev, offset) == 0 - || !WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header)) + || !WriteEffectiveVolumeHeader (TRUE, dev, (uint8 *) header)) { nStatus = ERR_OS_ERROR; goto closing_seq; } } @@ -1314,11 +1303,11 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile { HANDLE dev = INVALID_HANDLE_VALUE; PCRYPTO_INFO masterCryptoInfo = NULL, headerCryptoInfo = NULL; UINT64_STRUCT unitNo; char *buf = NULL; - byte *tmpSectorBuf = NULL; + uint8 *tmpSectorBuf = NULL; WCHAR dosDev[TC_MAX_PATH] = {0}; WCHAR devName[MAX_PATH] = {0}; WCHAR deviceName[MAX_PATH]; int nStatus = ERR_SUCCESS; __int64 deviceSize; @@ -1334,13 +1323,11 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile Password *password = volParams->password; HWND hwndDlg = volParams->hwndDlg; int pkcs5_prf = volParams->pkcs5; int pim = volParams->pim; DISK_GEOMETRY driveGeometry; -#ifdef _WIN64 BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); -#endif buf = (char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE); if (!buf) { @@ -1372,11 +1359,11 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile if (driveLetter == -1 || !UnmountVolume (hwndDlg, driveLetter, TRUE)) { handleWin32Error (hwndDlg, SRC_POS); - AbortProcess ("CANT_DISMOUNT_VOLUME"); + AbortProcess ("CANT_UNMOUNT_VOLUME"); } } StringCchCopyW (deviceName, ARRAYSIZE(deviceName), devicePath); @@ -1430,11 +1417,11 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile } sectorSize = driveGeometry.BytesPerSector; - tmpSectorBuf = (byte *) TCalloc (sectorSize); + tmpSectorBuf = (uint8 *) TCalloc (sectorSize); if (!tmpSectorBuf) { nStatus = ERR_OUTOFMEMORY; goto closing_seq; } @@ -1443,17 +1430,15 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile nStatus = OpenBackupHeader (dev, devicePath, password, pkcs5_prf, pim, &masterCryptoInfo, headerCryptoInfo, deviceSize); if (nStatus != ERR_SUCCESS) goto closing_seq; -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VcProtectKeys (masterCryptoInfo, VcGetEncryptionID (masterCryptoInfo)); VcProtectKeys (headerCryptoInfo, VcGetEncryptionID (headerCryptoInfo)); } -#endif if (masterCryptoInfo->LegacyVolume) { Error ("NONSYS_INPLACE_DECRYPTION_BAD_VOL_FORMAT", hwndDlg); nStatus = ERR_DONT_REPORT; @@ -1618,11 +1603,11 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile } } // Decrypt the ciphertext in RAM - DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); + DecryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); // Conceal initial portion of the filesystem @@ -1841,39 +1826,36 @@ closing_seq: int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_INFO *masterCryptoInfo, __int64 deviceSize) { LARGE_INTEGER offset; DWORD n; int nStatus = ERR_SUCCESS; - byte *header; + uint8 *header; DWORD dwError; uint32 headerCrc32; - byte *fieldPos; + uint8 *fieldPos; PCRYPTO_INFO pCryptoInfo = headerCryptoInfo; -#ifdef _WIN64 BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); -#endif - header = (byte *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); + header = (uint8 *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); if (!header) return ERR_OUTOFMEMORY; VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE); - fieldPos = (byte *) header + TC_HEADER_OFFSET_ENCRYPTED_AREA_START; + fieldPos = (uint8 *) header + TC_HEADER_OFFSET_ENCRYPTED_AREA_START; offset.QuadPart = deviceSize - TC_VOLUME_HEADER_GROUP_SIZE; if (MoveFilePointer (dev, offset) == 0 || !ReadEffectiveVolumeHeader (TRUE, dev, header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE) { nStatus = ERR_OS_ERROR; goto closing_seq; } -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { pCryptoInfo = crypto_open(); if (!pCryptoInfo) { @@ -1882,11 +1864,10 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN } memcpy (pCryptoInfo, headerCryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (pCryptoInfo, VcGetEncryptionID (headerCryptoInfo)); } -#endif DecryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); if (GetHeaderField32 (header, TC_HEADER_OFFSET_MAGIC) != 0x56455241) @@ -1900,16 +1881,16 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN // We need to ensure the TC_HEADER_FLAG_NONSYS_INPLACE_ENC flag bit is set, because if volumes created by TC-format // were decrypted in place, it would be possible to mount them partially encrypted and it wouldn't be possible // to resume interrupted decryption after the wizard exits. masterCryptoInfo->HeaderFlags |= TC_HEADER_FLAG_NONSYS_INPLACE_ENC; - fieldPos = (byte *) header + TC_HEADER_OFFSET_FLAGS; + fieldPos = (uint8 *) header + TC_HEADER_OFFSET_FLAGS; mputLong (fieldPos, (masterCryptoInfo->HeaderFlags)); headerCrc32 = GetCrc32 (header + TC_HEADER_OFFSET_MAGIC, TC_HEADER_OFFSET_HEADER_CRC - TC_HEADER_OFFSET_MAGIC); - fieldPos = (byte *) header + TC_HEADER_OFFSET_HEADER_CRC; + fieldPos = (uint8 *) header + TC_HEADER_OFFSET_HEADER_CRC; mputLong (fieldPos, headerCrc32); EncryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); @@ -1923,16 +1904,14 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN closing_seq: dwError = GetLastError(); -#ifdef _WIN64 if (bIsRamEncryptionEnabled && pCryptoInfo) { crypto_close(pCryptoInfo); } -#endif burn (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE); VirtualUnlock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE); TCfree (header); @@ -2040,18 +2019,18 @@ static int DismountFileSystem (HWND hwndDlg, HANDLE dev, if (!bResult) { if (!bForcedAllowed) { if (!bSilent) - ShowInPlaceEncErrMsgWAltSteps (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_DISMOUNT_FILESYS", TRUE); + ShowInPlaceEncErrMsgWAltSteps (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_UNMOUNT_FILESYS", TRUE); return ERR_DONT_REPORT; } if (bForcedRequiresConfirmation && !bSilent - && AskWarnYesNo ("VOL_LOCK_FAILED_OFFER_FORCED_DISMOUNT", hwndDlg) == IDNO) + && AskWarnYesNo ("VOL_LOCK_FAILED_OFFER_FORCED_UNMOUNT", hwndDlg) == IDNO) { return ERR_DONT_REPORT; } } @@ -2067,11 +2046,11 @@ static int DismountFileSystem (HWND hwndDlg, HANDLE dev, } if (!bResult) { if (!bSilent) - ShowInPlaceEncErrMsgWAltSteps (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_DISMOUNT_FILESYS", TRUE); + ShowInPlaceEncErrMsgWAltSteps (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_UNMOUNT_FILESYS", TRUE); return ERR_DONT_REPORT; } return ERR_SUCCESS; @@ -2206,44 +2185,47 @@ BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm, // This approach of moving the file pointer relatively (instead of absolutely) was implemented // as a workaround to address the performance issues related to in-place encryption. When using // SetFilePointerEx() with FILE_BEGIN as the reference point, reaching the end of large drives // during in-place encryption can cause significant slowdowns. By moving the file pointer // relatively, these performance issues are mitigated. +// +// We fall back to absolute positioning if the relative positioning fails. BOOL MoveFilePointer (HANDLE dev, LARGE_INTEGER offset) { LARGE_INTEGER currOffset; LARGE_INTEGER diffOffset; currOffset.QuadPart = 0; - if (SetFilePointerEx (dev, currOffset, &currOffset, FILE_CURRENT) == 0) - return FALSE; - - diffOffset.QuadPart = offset.QuadPart - currOffset.QuadPart; - if (diffOffset.QuadPart == 0) - return TRUE; + if (SetFilePointerEx (dev, currOffset, &currOffset, FILE_CURRENT)) + { + diffOffset.QuadPart = offset.QuadPart - currOffset.QuadPart; + if (diffOffset.QuadPart == 0) + return TRUE; - // Moves the file pointer by the difference between current and desired positions - if (SetFilePointerEx (dev, diffOffset, NULL, FILE_CURRENT) == 0) - return FALSE; + // Moves the file pointer by the difference between current and desired positions + if (SetFilePointerEx (dev, diffOffset, NULL, FILE_CURRENT)) + return TRUE; + } - return TRUE; + // An error occurred, fallback to absolute positioning + return SetFilePointerEx (dev, offset, NULL, FILE_BEGIN); } // Repairs damaged sectors (i.e. those with read errors) by zeroing them. // Note that this operating fails if there are any write errors. int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, int sectorSize, uint64 *zeroedSectorCount) { int nStatus; DWORD n; int64 sectorCount; LARGE_INTEGER workOffset; - byte *sectorBuffer = NULL; + uint8 *sectorBuffer = NULL; DWORD dwError; workOffset.QuadPart = startOffset.QuadPart; - sectorBuffer = (byte *) TCalloc (sectorSize); + sectorBuffer = (uint8 *) TCalloc (sectorSize); if (!sectorBuffer) return ERR_OUTOFMEMORY; if (!MoveFilePointer(dev, workOffset)) @@ -2296,25 +2278,25 @@ closing_seq: static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *password, int pkcs5, int pim, PCRYPTO_INFO *retMasterCryptoInfo, CRYPTO_INFO *headerCryptoInfo, __int64 deviceSize) { LARGE_INTEGER offset; DWORD n; int nStatus = ERR_SUCCESS; - char *header; + unsigned char *header; DWORD dwError; - header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); + header = (unsigned char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); if (!header) return ERR_OUTOFMEMORY; VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE); offset.QuadPart = deviceSize - TC_VOLUME_HEADER_GROUP_SIZE; if (MoveFilePointer (dev, offset) == 0 - || !ReadEffectiveVolumeHeader (TRUE, dev, (byte *) header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE) + || !ReadEffectiveVolumeHeader (TRUE, dev, header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE) { nStatus = ERR_OS_ERROR; goto closing_seq; } @@ -2342,11 +2324,11 @@ closing_seq: static BOOL GetFreeClusterBeforeThreshold (HANDLE volumeHandle, int64 *freeCluster, int64 clusterThreshold) { const int bitmapSize = 65536; - byte bitmapBuffer[bitmapSize + sizeof (VOLUME_BITMAP_BUFFER)]; + uint8 bitmapBuffer[bitmapSize + sizeof (VOLUME_BITMAP_BUFFER)]; VOLUME_BITMAP_BUFFER *bitmap = (VOLUME_BITMAP_BUFFER *) bitmapBuffer; STARTING_LCN_INPUT_BUFFER startLcn; startLcn.StartingLcn.QuadPart = 0; DWORD bytesReturned; diff --git a/src/Format/InPlace.h b/src/Format/InPlace.h index 717a8ed3..30c59b7e 100644 --- a/src/Format/InPlace.h +++ b/src/Format/InPlace.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index aa28d5ee..d26564fc 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -218,11 +218,11 @@ volatile HWND hRandPoolSys = NULL; /* Text box showing hex dump of the random po volatile HWND hPasswordInputField = NULL; /* Password input field */ volatile HWND hVerifyPasswordInputField = NULL; /* Verify-password input field */ HBITMAP hbmWizardBitmapRescaled = NULL; -wchar_t OrigKeyboardLayout [8+1] = L"00000409"; +wchar_t OrigKeyboardLayout [KL_NAMELENGTH] = L"00000409"; BOOL bKeyboardLayoutChanged = FALSE; /* TRUE if the keyboard layout was changed to the standard US keyboard layout (from any other layout). */ BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informed that it is not possible to type characters by pressing keys while the right Alt key is held down. */ #ifndef _DEBUG BOOL bWarnDeviceFormatAdvanced = TRUE; @@ -399,11 +399,11 @@ static BOOL ElevateWholeWizardProcess (wstring arguments) GetModuleFileName (NULL, modPath, ARRAYSIZE (modPath)); while (true) { - if ((int)ShellExecute (MainDlg, L"runas", modPath, (wstring(L"/q UAC ") + arguments).c_str(), NULL, SW_SHOWNORMAL) > 32) + if ((intptr_t)ShellExecute (MainDlg, L"runas", modPath, (wstring(L"/q UAC ") + arguments).c_str(), NULL, SW_SHOWNORMAL) > 32) { exit (0); } else { @@ -3185,52 +3185,52 @@ static void LoadPage (HWND hwndDlg, int nPageNo) __int64 PrintFreeSpace (HWND hwndTextBox, wchar_t *lpszDrive, PLARGE_INTEGER lDiskFree) { char *nResourceString; - __int64 nMultiplier; + __int64 nPrintMultiplier; wchar_t szTmp2[256]; if (lDiskFree->QuadPart < BYTES_PER_KB) - nMultiplier = 1; + nPrintMultiplier = 1; else if (lDiskFree->QuadPart < BYTES_PER_MB) - nMultiplier = BYTES_PER_KB; + nPrintMultiplier = BYTES_PER_KB; else if (lDiskFree->QuadPart < BYTES_PER_GB) - nMultiplier = BYTES_PER_MB; + nPrintMultiplier = BYTES_PER_MB; else if (lDiskFree->QuadPart < BYTES_PER_TB) - nMultiplier = BYTES_PER_GB; + nPrintMultiplier = BYTES_PER_GB; else - nMultiplier = BYTES_PER_TB; + nPrintMultiplier = BYTES_PER_TB; - if (nMultiplier == 1) + if (nPrintMultiplier == 1) { if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume nResourceString = "MAX_HIDVOL_SIZE_BYTES"; else if (bDevice) nResourceString = "DEVICE_FREE_BYTES"; else nResourceString = "DISK_FREE_BYTES"; } - else if (nMultiplier == BYTES_PER_KB) + else if (nPrintMultiplier == BYTES_PER_KB) { if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume nResourceString = "MAX_HIDVOL_SIZE_KB"; else if (bDevice) nResourceString = "DEVICE_FREE_KB"; else nResourceString = "DISK_FREE_KB"; } - else if (nMultiplier == BYTES_PER_MB) + else if (nPrintMultiplier == BYTES_PER_MB) { if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume nResourceString = "MAX_HIDVOL_SIZE_MB"; else if (bDevice) nResourceString = "DEVICE_FREE_MB"; else nResourceString = "DISK_FREE_MB"; } - else if (nMultiplier == BYTES_PER_GB) + else if (nPrintMultiplier == BYTES_PER_GB) { if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume nResourceString = "MAX_HIDVOL_SIZE_GB"; else if (bDevice) nResourceString = "DEVICE_FREE_GB"; @@ -3247,24 +3247,24 @@ __int64 PrintFreeSpace (HWND hwndTextBox, wchar_t *lpszDrive, PLARGE_INTEGER lDi nResourceString = "DISK_FREE_TB"; } if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume { - StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), ((double) lDiskFree->QuadPart) / nMultiplier); + StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), ((double) lDiskFree->QuadPart) / nPrintMultiplier); SetWindowTextW (GetDlgItem (hwndTextBox, IDC_SIZEBOX), szTmp2); } else if (lpszDrive) - StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), lpszDrive, ((double) lDiskFree->QuadPart) / nMultiplier); + StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), lpszDrive, ((double) lDiskFree->QuadPart) / nPrintMultiplier); else szTmp2 [0] = 0; SetWindowTextW (hwndTextBox, szTmp2); if (lDiskFree->QuadPart % (__int64) BYTES_PER_MB != 0) - nMultiplier = BYTES_PER_KB; + nPrintMultiplier = BYTES_PER_KB; - return nMultiplier; + return nPrintMultiplier; } void DisplaySizingErrorText (HWND hwndTextBox) { wchar_t szTmp[1024]; @@ -3660,11 +3660,11 @@ void HandleOldAssignedDriveLetter (void) if (!Silent && !bHiddenVolHost && !bHiddenOS && driveLetter >= 0) { - wchar_t rootPath[] = { (wchar_t) driveLetter + L'A', L':', L'\\', 0 }; + wchar_t rootPath[] = { (wchar_t) (driveLetter + L'A'), L':', L'\\', 0 }; wchar_t szTmp[8192]; StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("AFTER_FORMAT_DRIVE_LETTER_WARN"), rootPath[0], rootPath[0], rootPath[0], rootPath[0]); MessageBoxW (MainDlg, szTmp, lpszTitle, MB_ICONWARNING); } @@ -4384,15 +4384,18 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (SysEncInEffect ()) { ToBootPwdField (hwndDlg, IDC_PASSWORD); ToBootPwdField (hwndDlg, IDC_VERIFY); - StringCbPrintfW (OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD) GetKeyboardLayout (NULL) & 0xFFFF); + if (!GetKeyboardLayoutNameW(OrigKeyboardLayout)) + { + StringCbPrintfW(OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD)(DWORD_PTR)GetKeyboardLayout(NULL) & 0xFFFF); + } - if ((DWORD) GetKeyboardLayout (NULL) != 0x00000409 && (DWORD) GetKeyboardLayout (NULL) != 0x04090409) + if ((DWORD)(DWORD_PTR)GetKeyboardLayout (NULL) != 0x00000409 && (DWORD)(DWORD_PTR)GetKeyboardLayout (NULL) != 0x04090409) { - DWORD keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + DWORD keybLayout = (DWORD)(DWORD_PTR)LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", MainDlg); EndMainDlg (MainDlg); @@ -4473,13 +4476,15 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa PimValueChangedWarning = TRUE; SetDlgItemTextW (hwndDlg, IDC_PIM_HELP, GetString (SysEncInEffect ()? "PIM_SYSENC_CHANGE_WARNING" : "PIM_CHANGE_WARNING")); } SetFocus (GetDlgItem (hwndDlg, IDC_PIM)); - + #ifndef WOLFCRYPT_BACKEND SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512 && hash_algo != WHIRLPOOL? "PIM_SYSENC_HELP" : "PIM_HELP")); - + #else + SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512? "PIM_SYSENC_HELP" : "PIM_HELP")); + #endif ToHyperlink (hwndDlg, IDC_LINK_PIM_INFO); if (CreatingHiddenSysVol()) SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("PIM_HIDDEN_OS_TITLE")); else if (bHiddenVol) @@ -5315,11 +5320,11 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa // we're about to draw the static // set the text colour in (HDC)lParam SetBkMode((HDC)wParam,TRANSPARENT); SetTextColor((HDC)wParam, RGB(255,0,0)); // NOTE: per documentation as pointed out by selbie, GetSolidBrush would leak a GDI handle. - return (BOOL)GetSysColorBrush(COLOR_MENU); + return (BOOL) (INT_PTR)GetSysColorBrush(COLOR_MENU); } } return 0; case WM_COMMAND: @@ -6694,11 +6699,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; case TIMER_ID_KEYB_LAYOUT_GUARD: if (SysEncInEffect ()) { - DWORD keybLayout = (DWORD) GetKeyboardLayout (NULL); + DWORD keybLayout = (DWORD)(DWORD_PTR) GetKeyboardLayout (NULL); /* Watch the keyboard layout */ if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { @@ -6707,11 +6712,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa WipePasswordsAndKeyfiles (true); SetPassword (hCurPage, IDC_PASSWORD, szRawPassword); SetPassword (hCurPage, IDC_VERIFY, szVerify); - keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + keybLayout = (DWORD)(DWORD_PTR)LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD); Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", MainDlg); @@ -7847,11 +7852,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa BOOL tmp_result; // Dismount the hidden volume host (in order to remount it as read-only subsequently) while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE))) { - if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY) + if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY) { // Cancel NormalCursor(); return 1; } @@ -7925,11 +7930,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa /* Maximum possible size of the hidden volume successfully determined */ // Dismount the hidden volume host while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE))) { - if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY) + if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY) { // Cancel NormalCursor(); return 1; } @@ -8016,11 +8021,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (driveNo == -1 || !UnmountVolume (hwndDlg, driveNo, TRUE)) { handleWin32Error (MainDlg, SRC_POS); - AbortProcess ("CANT_DISMOUNT_VOLUME"); + AbortProcess ("CANT_UNMOUNT_VOLUME"); } } driveNo = GetLastAvailableDrive (); @@ -8071,11 +8076,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa // Remount the volume using the backup header to verify it is working if (!UnmountVolume (hwndDlg, driveNo, TRUE)) { handleWin32Error (MainDlg, SRC_POS); - AbortProcess ("CANT_DISMOUNT_VOLUME"); + AbortProcess ("CANT_UNMOUNT_VOLUME"); } mountOptions.UseBackupHeader = TRUE; // This must be TRUE at this point (we won't be using the regular header, which will be lost soon after the decryption process starts) if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1) @@ -8085,11 +8090,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } if (!UnmountVolume (hwndDlg, driveNo, TRUE)) { handleWin32Error (MainDlg, SRC_POS); - AbortProcess ("CANT_DISMOUNT_VOLUME"); + AbortProcess ("CANT_UNMOUNT_VOLUME"); } BOOL tmpbDevice; CreateFullVolumePath (szDiskFile, sizeof(szDiskFile), szFileName, &tmpbDevice); @@ -8708,11 +8713,11 @@ retryCDDriveCheck: // Dismount the hidden volume host (in order to remount it as read-only subsequently) CloseVolumeExplorerWindows (hwndDlg, hiddenVolHostDriveNo); while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE))) { - if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL | MB_ICONERROR | MB_SETFOREGROUND) != IDRETRY) + if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL | MB_ICONERROR | MB_SETFOREGROUND) != IDRETRY) { // Cancel NormalCursor(); return 1; } @@ -8777,11 +8782,11 @@ retryCDDriveCheck: /* Maximum possible size of the hidden volume successfully determined */ // Dismount the hidden volume host while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE))) { - if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY) + if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY) { // Cancel NormalCursor (); goto ovf_end; } @@ -9696,20 +9701,20 @@ int DetermineMaxHiddenVolSize (HWND hwndDlg) // Tests whether the file system of the given volume is suitable to host a hidden volume, // retrieves the cluster size, and scans the volume cluster bitmap. In addition, checks // the TrueCrypt volume format version and the type of volume. -int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *pnbrFreeClusters) +int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *pRealClusterSize, __int64 *pnbrFreeClusters) { HANDLE hDevice; DWORD bytesReturned; DWORD dwSectorsPerCluster, dwBytesPerSector, dwNumberOfFreeClusters, dwTotalNumberOfClusters; DWORD dwResult; int result; wchar_t szFileSystemNameBuffer[256]; - wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\',(wchar_t) *driveNo + L'A',L':',0}; - wchar_t szRootPathName[4] = {(wchar_t) *driveNo + L'A', L':', L'\\', 0}; + wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\',(wchar_t) (*driveNo + L'A'),L':',0}; + wchar_t szRootPathName[4] = {(wchar_t) (*driveNo + L'A'), L':', L'\\', 0}; BYTE readBuffer[TC_MAX_VOLUME_SECTOR_SIZE * 2]; LARGE_INTEGER offset, offsetNew; VOLUME_PROPERTIES_STRUCT volProp; memset (&volProp, 0, sizeof(volProp)); @@ -9780,21 +9785,21 @@ int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSi || (readBuffer[0x52] == 'F' && readBuffer[0x53] == 'A' && readBuffer[0x54] == 'T')) { // FAT12/FAT16/FAT32 // Retrieve the cluster size - *realClusterSize = ((int) readBuffer[0xb] + ((int) readBuffer[0xc] << 8)) * (int) readBuffer[0xd]; + *pRealClusterSize = ((int) readBuffer[0xb] + ((int) readBuffer[0xc] << 8)) * (int) readBuffer[0xd]; // Get the map of the clusters that are free and in use on the outer volume. // The map will be scanned to determine the size of the uninterrupted block of free // space (provided there is any) whose end is aligned with the end of the volume. // The value will then be used to determine the maximum possible size of the hidden volume. - if (*realClusterSize > 0) + if (*pRealClusterSize > 0) { return ScanVolClusterBitmap (hwndDlg, driveNo, - hiddenVolHostSize / *realClusterSize, + hiddenVolHostSize / *pRealClusterSize, pnbrFreeClusters); } else { // should never happen @@ -9818,20 +9823,20 @@ int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSi handleWin32Error (hwndDlg, SRC_POS); Error ("CANT_GET_OUTER_VOL_INFO", hwndDlg); return -1; }; - *realClusterSize = dwBytesPerSector * dwSectorsPerCluster; + *pRealClusterSize = dwBytesPerSector * dwSectorsPerCluster; // Get the map of the clusters that are free and in use on the outer volume. // The map will be scanned to determine the size of the uninterrupted block of free // space (provided there is any) whose end is aligned with the end of the volume. // The value will then be used to determine the maximum possible size of the hidden volume. return ScanVolClusterBitmap (hwndDlg, driveNo, - hiddenVolHostSize / *realClusterSize, + hiddenVolHostSize / *pRealClusterSize, pnbrFreeClusters); } else { // Unsupported file system @@ -9883,19 +9888,19 @@ int MountHiddenVolHost (HWND hwndDlg, wchar_t *volumePath, int *driveNo, Passwor /* Gets the map of the clusters that are free and in use on a volume that is to host a hidden volume. The map is scanned to determine the size of the uninterrupted area of free space (provided there is any) whose end is aligned with the end of the volume. The value will then be used to determine the maximum possible size of the hidden volume. */ -int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int64 *nbrFreeClusters) +int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int64 *pnbrFreeClusters) { PVOLUME_BITMAP_BUFFER lpOutBuffer; STARTING_LCN_INPUT_BUFFER lpInBuffer; HANDLE hDevice; DWORD lBytesReturned; BYTE rmnd; - wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\', (wchar_t) *driveNo + L'A', L':', 0}; + wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\', (wchar_t) (*driveNo + L'A'), L':', 0}; DWORD bufLen; __int64 bitmapCnt; hDevice = CreateFile (tmpPath, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); @@ -9937,25 +9942,25 @@ int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int rmnd = (BYTE) (lpOutBuffer->BitmapSize.QuadPart % 8); if ((rmnd != 0) && ((lpOutBuffer->Buffer[lpOutBuffer->BitmapSize.QuadPart / 8] & ((1 << rmnd)-1) ) != 0)) { - *nbrFreeClusters = 0; + *pnbrFreeClusters = 0; } else { - *nbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart; + *pnbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart; bitmapCnt = lpOutBuffer->BitmapSize.QuadPart / 8; // Scan the bitmap from the end while (--bitmapCnt >= 0) { if (lpOutBuffer->Buffer[bitmapCnt] != 0) { // There might be up to 7 extra free clusters in this byte of the bitmap. // These are ignored because there is always a cluster reserve added anyway. - *nbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart - ((bitmapCnt + 1) * 8); + *pnbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart - ((bitmapCnt + 1) * 8); break; } } } @@ -10581,11 +10586,15 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz VirtualLock (maskRandPool, sizeof(maskRandPool)); VirtualLock (&szFileName, sizeof(szFileName)); VirtualLock (&szDiskFile, sizeof(szDiskFile)); - DetectX86Features (); +#ifndef _M_ARM64 + DetectX86Features(); +#else + DetectArmFeatures(); +#endif try { BootEncObj = new BootEncryption (NULL); } diff --git a/src/Format/Tcformat.h b/src/Format/Tcformat.h index f9328afd..dd8bf793 100644 --- a/src/Format/Tcformat.h +++ b/src/Format/Tcformat.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Common/Common.h" diff --git a/src/LICENSE b/src/LICENSE index 19d47e25..0872b542 100644 --- a/src/LICENSE +++ b/src/LICENSE @@ -173,11 +173,11 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS -Copyright 2013-2023 IDRIX +Copyright 2013-2025 IDRIX Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/Main/Application.cpp b/src/Main/Application.cpp index c72e2cc6..7948235e 100644 --- a/src/Main/Application.cpp +++ b/src/Main/Application.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -87,11 +87,11 @@ namespace VeraCrypt } #endif FilePath Application::GetConfigFilePath (const wxString &configFileName, bool createConfigDir) { - static wxScopedPtr<const wxString> configDirC; + static std::unique_ptr<const wxString> configDirC; static bool configDirExists = false; if (!configDirExists) { if (!configDirC) diff --git a/src/Main/Application.h b/src/Main/Application.h index 82c6b00e..4bc9c199 100644 --- a/src/Main/Application.h +++ b/src/Main/Application.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp index 2bbc73ea..2d38a5bd 100644 --- a/src/Main/CommandLineInterface.cpp +++ b/src/Main/CommandLineInterface.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -27,39 +27,45 @@ namespace VeraCrypt ArgNewPim (-1), ArgNoHiddenVolumeProtection (false), ArgPim (-1), ArgSize (0), ArgVolumeType (VolumeType::Unknown), + ArgAllowScreencapture (false), ArgDisableFileSizeCheck (false), ArgUseLegacyPassword (false), -#if defined(TC_LINUX ) || defined (TC_FREEBSD) ArgUseDummySudoPassword (false), -#endif +#if defined(TC_UNIX) + ArgAllowInsecureMount (false), + #endif StartBackgroundTask (false) { wxCmdLineParser parser; parser.SetCmdLine (argc, argv); parser.SetSwitchChars (L"-"); +#if defined(TC_WINDOWS) || defined(TC_MACOSX) + parser.AddSwitch (L"", L"allow-screencapture", _("Allow window to be included in screenshots and screen captures (Windows/MacOS)")); +#endif parser.AddOption (L"", L"auto-mount", _("Auto mount device-hosted/favorite volumes")); parser.AddSwitch (L"", L"backup-headers", _("Backup volume headers")); parser.AddSwitch (L"", L"background-task", _("Start Background Task")); #ifdef TC_WINDOWS parser.AddSwitch (L"", L"cache", _("Cache passwords and keyfiles")); #endif parser.AddSwitch (L"C", L"change", _("Change password or keyfiles")); parser.AddSwitch (L"c", L"create", _("Create new volume")); parser.AddSwitch (L"", L"create-keyfile", _("Create new keyfile")); parser.AddSwitch (L"", L"delete-token-keyfiles", _("Delete security token keyfiles")); - parser.AddSwitch (L"d", L"dismount", _("Dismount volume")); + parser.AddSwitch (L"d", L"dismount", _("Unmount volume (deprecated: use 'unmount')")); + parser.AddSwitch (L"u", L"unmount", _("Unmount volume")); parser.AddSwitch (L"", L"display-password", _("Display password while typing")); parser.AddOption (L"", L"encryption", _("Encryption algorithm")); parser.AddSwitch (L"", L"explore", _("Open explorer window for mounted volume")); parser.AddSwitch (L"", L"export-token-keyfile",_("Export keyfile from token")); parser.AddOption (L"", L"filesystem", _("Filesystem type")); - parser.AddSwitch (L"f", L"force", _("Force mount/dismount/overwrite")); + parser.AddSwitch (L"f", L"force", _("Force mount/unmount/overwrite")); #if !defined(TC_WINDOWS) && !defined(TC_MACOSX) parser.AddOption (L"", L"fs-options", _("Filesystem mount options")); #endif parser.AddOption (L"", L"hash", _("Hash algorithm")); parser.AddSwitch (L"h", L"help", _("Display detailed command line help"), wxCMD_LINE_OPTION_HELP); @@ -104,10 +110,13 @@ namespace VeraCrypt parser.AddSwitch (L"", L"no-size-check", _("Disable check of container size against disk free space.")); parser.AddSwitch (L"", L"legacy-password-maxlength", _("Use legacy maximum password length (64 UTF-8 bytes)")); #if defined(TC_LINUX ) || defined (TC_FREEBSD) parser.AddSwitch (L"", L"use-dummy-sudo-password", _("Use dummy password in sudo to detect if it is already authenticated")); #endif +#if defined(TC_UNIX) + parser.AddSwitch (L"", L"allow-insecure-mount", _("Allow mounting volumes on mount points that are in the user's PATH")); +#endif wxString str; bool param1IsVolume = false; bool param1IsMountedVolumeSpec = false; bool param1IsMountPoint = false; bool param1IsFile = false; @@ -140,10 +149,15 @@ namespace VeraCrypt // Load preferences first to allow command line options to override them Preferences.Load(); ArgMountOptions = Preferences.DefaultMountOptions; } +#if defined(TC_WINDOWS) || defined(TC_MACOSX) + ArgAllowScreencapture = parser.Found (L"allow-screencapture"); +#else + ArgAllowScreencapture = true; // Protection against screenshots is supported only on Windows and MacOS +#endif // Commands if (parser.Found (L"auto-mount", &str)) { CheckCommandSingle(); @@ -207,11 +221,11 @@ namespace VeraCrypt { CheckCommandSingle(); ArgCommand = CommandId::DeleteSecurityTokenKeyfiles; } - if (parser.Found (L"dismount")) + if (parser.Found (L"unmount") || parser.Found (L"dismount")) { CheckCommandSingle(); ArgCommand = CommandId::DismountVolumes; param1IsMountedVolumeSpec = true; } @@ -345,24 +359,38 @@ namespace VeraCrypt else if (str.IsSameAs (L"APFS", false)) ArgFilesystem = VolumeCreationOptions::FilesystemType::APFS; #elif defined (TC_FREEBSD) || defined (TC_SOLARIS) else if (str.IsSameAs (L"UFS", false)) ArgFilesystem = VolumeCreationOptions::FilesystemType::UFS; + else if (str.IsSameAs (L"Ext2", false)) + ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext2; + else if (str.IsSameAs (L"Ext3", false)) + ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext3; + else if (str.IsSameAs (L"Ext4", false)) + ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext4; + else if (str.IsSameAs (L"NTFS", false)) + ArgFilesystem = VolumeCreationOptions::FilesystemType::NTFS; + else if (str.IsSameAs (L"exFAT", false)) + ArgFilesystem = VolumeCreationOptions::FilesystemType::exFAT; #endif else throw_err (LangString["UNKNOWN_OPTION"] + L": " + str); } } ArgForce = parser.Found (L"force"); ArgDisableFileSizeCheck = parser.Found (L"no-size-check"); - ArgUseLegacyPassword = parser.Found (L"legacy-password-maxlength"); + ArgUseLegacyPassword = parser.Found (L"legacy-password-maxlength"); #if defined(TC_LINUX ) || defined (TC_FREEBSD) ArgUseDummySudoPassword = parser.Found (L"use-dummy-sudo-password"); #endif +#if defined(TC_UNIX) + ArgAllowInsecureMount = parser.Found (L"allow-insecure-mount"); +#endif + #if !defined(TC_WINDOWS) && !defined(TC_MACOSX) if (parser.Found (L"fs-options", &str)) ArgMountOptions.FilesystemOptions = str; #endif @@ -822,22 +850,22 @@ namespace VeraCrypt wxMBConvUTF8 utf8; size_t ulen = utf8.FromWChar (NULL, 0, str, charCount); if (wxCONV_FAILED == ulen) throw PasswordUTF8Invalid (SRC_POS); SecureBuffer passwordBuf(ulen); - ulen = utf8.FromWChar ((char*) (byte*) passwordBuf, ulen, str, charCount); + ulen = utf8.FromWChar ((char*) (uint8*) passwordBuf, ulen, str, charCount); if (wxCONV_FAILED == ulen) throw PasswordUTF8Invalid (SRC_POS); if (ulen > maxUtf8Len) { if (maxUtf8Len == VolumePassword::MaxLegacySize) throw PasswordLegacyUTF8TooLong (SRC_POS); else throw PasswordUTF8TooLong (SRC_POS); } - ConstBufferPtr utf8Buffer ((byte*) passwordBuf, ulen); + ConstBufferPtr utf8Buffer ((uint8*) passwordBuf, ulen); return shared_ptr<SecureBuffer>(new SecureBuffer (utf8Buffer)); } else return shared_ptr<SecureBuffer>(new SecureBuffer ()); } diff --git a/src/Main/CommandLineInterface.h b/src/Main/CommandLineInterface.h index 4003dc05..c255feb0 100644 --- a/src/Main/CommandLineInterface.h +++ b/src/Main/CommandLineInterface.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -82,14 +82,17 @@ namespace VeraCrypt uint64 ArgSize; shared_ptr <VolumePath> ArgVolumePath; VolumeInfoList ArgVolumes; VolumeType::Enum ArgVolumeType; shared_ptr<SecureBuffer> ArgTokenPin; + bool ArgAllowScreencapture; bool ArgDisableFileSizeCheck; bool ArgUseLegacyPassword; -#if defined(TC_LINUX ) || defined (TC_FREEBSD) bool ArgUseDummySudoPassword; + +#if defined(TC_UNIX) + bool ArgAllowInsecureMount; #endif bool StartBackgroundTask; UserPreferences Preferences; diff --git a/src/Main/FatalErrorHandler.cpp b/src/Main/FatalErrorHandler.cpp index 5e391698..092a65dc 100644 --- a/src/Main/FatalErrorHandler.cpp +++ b/src/Main/FatalErrorHandler.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/FatalErrorHandler.h b/src/Main/FatalErrorHandler.h index d787cdd7..c037d80f 100644 --- a/src/Main/FatalErrorHandler.h +++ b/src/Main/FatalErrorHandler.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/FavoriteVolume.cpp b/src/Main/FavoriteVolume.cpp index 0b6ff146..e804e15b 100644 --- a/src/Main/FavoriteVolume.cpp +++ b/src/Main/FavoriteVolume.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/FavoriteVolume.h b/src/Main/FavoriteVolume.h index 7bc6a430..f59a10f1 100644 --- a/src/Main/FavoriteVolume.h +++ b/src/Main/FavoriteVolume.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/AboutDialog.cpp b/src/Main/Forms/AboutDialog.cpp index e3768361..9b92ed0b 100644 --- a/src/Main/Forms/AboutDialog.cpp +++ b/src/Main/Forms/AboutDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -25,11 +25,15 @@ namespace VeraCrypt wxFont versionStaticTextFont = VersionStaticText->GetFont(); versionStaticTextFont.SetWeight (wxFONTWEIGHT_BOLD); VersionStaticText->SetFont (versionStaticTextFont); - VersionStaticText->SetLabel (Application::GetName() + L" " + StringConverter::ToWide (Version::String())); + wstring versionStr = StringConverter::ToWide (Version::String()); +#ifdef VC_MACOSX_FUSET + versionStr += L" (FUSE-T build)"; +#endif + VersionStaticText->SetLabel (Application::GetName() + L" " + versionStr); CopyrightStaticText->SetLabel (TC_STR_RELEASED_BY); WebsiteHyperlink->SetLabel (L"www.idrix.fr"); CreditsTextCtrl->SetMinSize (wxSize ( Gui->GetCharWidth (CreditsTextCtrl) * 70, @@ -55,11 +59,11 @@ namespace VeraCrypt L"Phillip Rogaway, " L"Hans Dobbertin, Antoon Bosselaers, Bart Preneel, Jack Lloyd" L"Paulo Barreto, Brian Gladman, Wei Dai, Peter Gutmann, and many others.\n\n" L"Portions of this software:\n" - L"Copyright \xA9 2013-2023 IDRIX. All rights reserved.\n" + L"Copyright \xA9 2013-2025 IDRIX. All rights reserved.\n" L"Copyright \xA9 2003-2012 TrueCrypt Developers Association. All Rights Reserved.\n" L"Copyright \xA9 1998-2000 Paul Le Roux. All Rights Reserved.\n" L"Copyright \xA9 1998-2008 Brian Gladman. All Rights Reserved.\n" L"Copyright \xA9 1995-2023 Jean-loup Gailly and Mark Adler.\n" L"Copyright \xA9 2016 Disk Cryptography Services for EFI (DCS), Alex Kolotnikov.\n" @@ -68,11 +72,11 @@ namespace VeraCrypt L"Copyright \xA9 1999-2016 Jack Lloyd. All rights reserved.\n" L"Copyright \xA9 2013-2019 Stephan Mueller <smueller@chronox.de>\n" L"Copyright \xA9 1999-2023 Igor Pavlov\n\n" L"\nThis software as a whole:\n" - L"Copyright \xA9 2013-2023 IDRIX. All rights reserved.\n\n" + L"Copyright \xA9 2013-2025 IDRIX. All rights reserved.\n\n" L"This software uses wxWidgets library, which is copyright \xA9 1998-2011 Julian Smart, Robert Roebling et al.\n\n" L"An IDRIX Release"); } diff --git a/src/Main/Forms/AboutDialog.h b/src/Main/Forms/AboutDialog.h index 7ce64b98..01cf5e90 100644 --- a/src/Main/Forms/AboutDialog.h +++ b/src/Main/Forms/AboutDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/BenchmarkDialog.cpp b/src/Main/Forms/BenchmarkDialog.cpp index 7b0209ff..168630fa 100644 --- a/src/Main/Forms/BenchmarkDialog.cpp +++ b/src/Main/Forms/BenchmarkDialog.cpp @@ -2,18 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "System.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "Main/GraphicUserInterface.h" #include "BenchmarkDialog.h" namespace VeraCrypt { @@ -40,14 +43,14 @@ namespace VeraCrypt BenchmarkChoice->Select (0); BufferSizeChoice->Select (1); UpdateBenchmarkList (); - - wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc. - const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" }; - validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr)); + + VolumePimText->SetMinSize (wxSize (Gui->GetCharWidth (VolumePimText) * 15, -1)); + + wxTextValidator validator (wxFILTER_DIGITS); VolumePimText->SetValidator (validator); Layout(); Fit(); Center(); @@ -207,13 +210,17 @@ namespace VeraCrypt BenchmarkResult result; result.AlgorithmName = ea->GetName(true); Buffer key (ea->GetKeySize()); ea->SetKey (key); - + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS); + ea->SetKeyXTS (key); + #else shared_ptr <EncryptionMode> xts (new EncryptionModeXTS); - xts->SetKey (key); + #endif + xts->SetKey (key); ea->SetMode (xts); wxLongLong startTime = wxGetLocalTimeMillis(); // CPU "warm up" (an attempt to prevent skewed results on systems where CPU frequency gradually changes depending on CPU load). @@ -272,11 +279,11 @@ namespace VeraCrypt Buffer dk(MASTER_KEYDATA_SIZE); Buffer salt(64); const char *tmp_salt = {"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF"}; unsigned long pim; Pkcs5KdfList prfList = Pkcs5Kdf::GetAvailableAlgorithms (); - VolumePassword password ((const byte*) "passphrase-1234567890", 21); + VolumePassword password ((const uint8*) "passphrase-1234567890", 21); memcpy (&pim, buffer.Ptr (), sizeof (unsigned long)); memcpy (salt.Ptr(), tmp_salt, 64); foreach (shared_ptr <Pkcs5Kdf> prf, prfList) diff --git a/src/Main/Forms/BenchmarkDialog.h b/src/Main/Forms/BenchmarkDialog.h index 16a5446b..3b17e20b 100644 --- a/src/Main/Forms/BenchmarkDialog.h +++ b/src/Main/Forms/BenchmarkDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/ChangePasswordDialog.cpp b/src/Main/Forms/ChangePasswordDialog.cpp index 397ee693..6b613b05 100644 --- a/src/Main/Forms/ChangePasswordDialog.cpp +++ b/src/Main/Forms/ChangePasswordDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -169,10 +169,11 @@ namespace VeraCrypt /* force the display of the random enriching interface */ RandomNumberGenerator::SetEnrichedByUserStatus (false); Gui->UserEnrichRandomPool (this, NewPasswordPanel->GetPkcs5Kdf() ? NewPasswordPanel->GetPkcs5Kdf()->GetHash() : shared_ptr <Hash>()); + bool masterKeyVulnerable = false; { #ifdef TC_UNIX // Temporarily take ownership of a device if the user is not an administrator UserId origDeviceOwner ((uid_t) -1); @@ -191,10 +192,11 @@ namespace VeraCrypt wxBusyCursor busy; ChangePasswordThreadRoutine routine(Path, Gui->GetPreferences().DefaultMountOptions.PreserveTimestamps, CurrentPasswordPanel->GetPassword(), CurrentPasswordPanel->GetVolumePim(), CurrentPasswordPanel->GetPkcs5Kdf(), CurrentPasswordPanel->GetKeyfiles(), newPassword, newPim, newKeyfiles, NewPasswordPanel->GetPkcs5Kdf(), NewPasswordPanel->GetHeaderWipeCount(), Gui->GetPreferences().EMVSupportEnabled); Gui->ExecuteWaitThreadRoutine (this, &routine); + masterKeyVulnerable = routine.m_masterKeyVulnerable; } switch (DialogMode) { case Mode::ChangePasswordAndKeyfiles: @@ -212,10 +214,13 @@ namespace VeraCrypt default: throw ParameterIncorrect (SRC_POS); } + if (masterKeyVulnerable) + Gui->ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + EndModal (wxID_OK); } catch (UnportablePassword &e) { Gui->ShowError (e); diff --git a/src/Main/Forms/ChangePasswordDialog.h b/src/Main/Forms/ChangePasswordDialog.h index 66fbfecf..88ced0ae 100644 --- a/src/Main/Forms/ChangePasswordDialog.h +++ b/src/Main/Forms/ChangePasswordDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/DeviceSelectionDialog.cpp b/src/Main/Forms/DeviceSelectionDialog.cpp index df4292c9..9573414c 100644 --- a/src/Main/Forms/DeviceSelectionDialog.cpp +++ b/src/Main/Forms/DeviceSelectionDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/DeviceSelectionDialog.h b/src/Main/Forms/DeviceSelectionDialog.h index 2ab7a9ce..960d90af 100644 --- a/src/Main/Forms/DeviceSelectionDialog.h +++ b/src/Main/Forms/DeviceSelectionDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/EncryptionOptionsWizardPage.cpp b/src/Main/Forms/EncryptionOptionsWizardPage.cpp index 663a6129..594c0c0a 100644 --- a/src/Main/Forms/EncryptionOptionsWizardPage.cpp +++ b/src/Main/Forms/EncryptionOptionsWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/EncryptionOptionsWizardPage.h b/src/Main/Forms/EncryptionOptionsWizardPage.h index fbc63f9e..07b357c1 100644 --- a/src/Main/Forms/EncryptionOptionsWizardPage.h +++ b/src/Main/Forms/EncryptionOptionsWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/EncryptionTestDialog.cpp b/src/Main/Forms/EncryptionTestDialog.cpp index 17184a0e..47918532 100644 --- a/src/Main/Forms/EncryptionTestDialog.cpp +++ b/src/Main/Forms/EncryptionTestDialog.cpp @@ -2,18 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "System.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "Volume/EncryptionTest.h" #include "Main/GraphicUserInterface.h" #include "EncryptionTestDialog.h" namespace VeraCrypt @@ -92,12 +95,17 @@ namespace VeraCrypt { BlockNumberTextCtrl->SetFocus(); throw StringConversionFailed (SRC_POS); } + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS); + ea->SetKeyXTS (secondaryKey); + #else shared_ptr <EncryptionMode> xts (new EncryptionModeXTS); - xts->SetKey (secondaryKey); + #endif + xts->SetKey (secondaryKey); ea->SetMode (xts); Buffer sector (ENCRYPTION_DATA_UNIT_SIZE); BufferPtr block = sector.GetRange (blockNumber * ea->GetMaxBlockSize(), ea->GetMaxBlockSize()); @@ -131,11 +139,11 @@ namespace VeraCrypt return Gui->GetSelectedData <EncryptionAlgorithm> (EncryptionAlgorithmChoice)->GetNew(); } void EncryptionTestDialog::GetTextCtrlData (wxTextCtrl *textCtrl, Buffer &buffer) const { - vector <byte> data; + vector <uint8> data; string dataStr = StringConverter::ToSingle (wstring (textCtrl->GetValue())); for (size_t i = 0; i < dataStr.size() / 2; ++i) { unsigned int dataByte; @@ -143,11 +151,11 @@ namespace VeraCrypt { textCtrl->SetFocus(); throw StringConversionFailed (SRC_POS); } - data.push_back ((byte) dataByte); + data.push_back ((uint8) dataByte); } if (data.empty()) return; diff --git a/src/Main/Forms/EncryptionTestDialog.h b/src/Main/Forms/EncryptionTestDialog.h index 3ba7d5e3..67e033b9 100644 --- a/src/Main/Forms/EncryptionTestDialog.h +++ b/src/Main/Forms/EncryptionTestDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/FavoriteVolumesDialog.cpp b/src/Main/Forms/FavoriteVolumesDialog.cpp index a0c48f92..ee92a47a 100644 --- a/src/Main/Forms/FavoriteVolumesDialog.cpp +++ b/src/Main/Forms/FavoriteVolumesDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/FavoriteVolumesDialog.h b/src/Main/Forms/FavoriteVolumesDialog.h index adbf400d..3b5cd828 100644 --- a/src/Main/Forms/FavoriteVolumesDialog.h +++ b/src/Main/Forms/FavoriteVolumesDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index 7afad90f..6e1432a3 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -128,10 +128,14 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t ToolsMenu->Append( WipeCachedPasswordsMenuItem ); MainMenuBar->Append( ToolsMenu, _("MENU_TOOLS") ); SettingsMenu = new wxMenu(); + wxMenuItem* LanguageMenuItem; + LanguageMenuItem = new wxMenuItem( SettingsMenu, wxID_ANY, wxString( _("IDM_LANGUAGE") ) , wxEmptyString, wxITEM_NORMAL ); + SettingsMenu->Append( LanguageMenuItem ); + HotkeysMenuItem = new wxMenuItem( SettingsMenu, wxID_ANY, wxString( _("IDM_HOTKEY_SETTINGS") ) , wxEmptyString, wxITEM_NORMAL ); SettingsMenu->Append( HotkeysMenuItem ); wxMenuItem* DefaultKeyfilesMenuItem; DefaultKeyfilesMenuItem = new wxMenuItem( SettingsMenu, wxID_ANY, wxString( _("IDM_DEFAULT_KEYFILES") ) , wxEmptyString, wxITEM_NORMAL ); @@ -432,21 +436,22 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnRestoreVolumeHeaderMenuItemSelected ), this, RestoreVolumeHeaderMenuItem->GetId()); ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnCreateKeyfileMenuItemSelected ), this, CreateKeyfileMenuItem->GetId()); ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnManageSecurityTokenKeyfilesMenuItemSelected ), this, ManageSecurityTokenKeyfilesMenuItem->GetId()); ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnCloseAllSecurityTokenSessionsMenuItemSelected ), this, CloseAllSecurityTokenSessionsMenuItem->GetId()); ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnWipeCacheButtonClick ), this, WipeCachedPasswordsMenuItem->GetId()); + SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnLanguageMenuItemSelected ), this, LanguageMenuItem->GetId()); SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnHotkeysMenuItemSelected ), this, HotkeysMenuItem->GetId()); SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDefaultKeyfilesMenuItemSelected ), this, DefaultKeyfilesMenuItem->GetId()); SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDefaultMountParametersMenuItemSelected ), this, DefaultMountParametersMenuItem->GetId()); SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnSecurityTokenPreferencesMenuItemSelected ), this, SecurityTokenPreferencesMenuItem->GetId()); #ifdef TC_MACOSX this->Connect( PreferencesMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnPreferencesMenuItemSelected ) ); this->Connect( UserGuideMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnUserGuideMenuItemSelected ) ); #else SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnPreferencesMenuItemSelected ), this, PreferencesMenuItem->GetId()); HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnUserGuideMenuItemSelected ), this, UserGuideMenuItem->GetId()); -#endif +#endif HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnOnlineHelpMenuItemSelected ), this, OnlineHelpMenuItem->GetId()); HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnBeginnersTutorialMenuItemSelected ), this, BeginnersTutorialMenuItem->GetId()); HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnFaqMenuItemSelected ), this, FaqMenuItem->GetId()); HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnWebsiteMenuItemSelected ), this, WebsiteMenuItem->GetId()); HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDownloadsMenuItemSelected ), this, DownloadsMenuItem->GetId()); @@ -1814,19 +1819,19 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c bSizer44 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bSizer33; bSizer33 = new wxBoxSizer( wxVERTICAL ); - AutoDismountSizer = new wxStaticBoxSizer( new wxStaticBox( SecurityPage, wxID_ANY, _("IDT_AUTO_DISMOUNT") ), wxVERTICAL ); + AutoDismountSizer = new wxStaticBoxSizer( new wxStaticBox( SecurityPage, wxID_ANY, _("IDT_AUTO_UNMOUNT") ), wxVERTICAL ); wxStaticBoxSizer* sbSizer13; - sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("LINUX_DISMOUNT_ALL_WHEN") ), wxVERTICAL ); + sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("LINUX_UNMOUNT_ALL_WHEN") ), wxVERTICAL ); - DismountOnLogOffCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_DISMOUNT_LOGOFF"), wxDefaultPosition, wxDefaultSize, 0 ); + DismountOnLogOffCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_UNMOUNT_LOGOFF"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer13->Add( DismountOnLogOffCheckBox, 0, wxALL, 5 ); - DismountOnScreenSaverCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_DISMOUNT_SCREENSAVER"), wxDefaultPosition, wxDefaultSize, 0 ); + DismountOnScreenSaverCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_UNMOUNT_SCREENSAVER"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer13->Add( DismountOnScreenSaverCheckBox, 0, wxALL, 5 ); DismountOnPowerSavingCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("LINUX_ENTERING_POVERSAWING"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer13->Add( DismountOnPowerSavingCheckBox, 0, wxALL, 5 ); @@ -1834,11 +1839,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c AutoDismountSizer->Add( sbSizer13, 0, wxEXPAND|wxALL, 5 ); wxBoxSizer* bSizer34; bSizer34 = new wxBoxSizer( wxHORIZONTAL ); - DismountOnInactivityCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_DISMOUNT_INACTIVE"), wxDefaultPosition, wxDefaultSize, 0 ); + DismountOnInactivityCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_UNMOUNT_INACTIVE"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer34->Add( DismountOnInactivityCheckBox, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); DismountOnInactivitySpinCtrl = new wxSpinCtrl( AutoDismountSizer->GetStaticBox(), wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 9999, 1 ); DismountOnInactivitySpinCtrl->SetMinSize( wxSize( 60,-1 ) ); @@ -1850,11 +1855,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c bSizer34->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); AutoDismountSizer->Add( bSizer34, 0, wxEXPAND, 5 ); - ForceAutoDismountCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_FORCE_AUTO_DISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); + ForceAutoDismountCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_FORCE_AUTO_UNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); AutoDismountSizer->Add( ForceAutoDismountCheckBox, 0, wxALL, 5 ); bSizer33->Add( AutoDismountSizer, 0, wxEXPAND|wxALL, 5 ); @@ -1870,11 +1875,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( SecurityPage, wxID_ANY, _("IDT_PW_CACHE_OPTIONS") ), wxVERTICAL ); WipeCacheOnCloseCheckBox = new wxCheckBox( sbSizer14->GetStaticBox(), wxID_ANY, _("IDC_PREF_WIPE_CACHE_ON_EXIT"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer14->Add( WipeCacheOnCloseCheckBox, 0, wxALL, 5 ); - WipeCacheOnAutoDismountCheckBox = new wxCheckBox( sbSizer14->GetStaticBox(), wxID_ANY, _("IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); + WipeCacheOnAutoDismountCheckBox = new wxCheckBox( sbSizer14->GetStaticBox(), wxID_ANY, _("IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer14->Add( WipeCacheOnAutoDismountCheckBox, 0, wxALL, 5 ); bSizer33->Add( sbSizer14, 0, wxEXPAND|wxALL, 5 ); @@ -1976,11 +1981,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c sbSizer26->Add( BackgroundTaskMenuMountItemsEnabledCheckBox, 0, wxALL, 5 ); BackgroundTaskMenuOpenItemsEnabledCheckBox = new wxCheckBox( sbSizer26->GetStaticBox(), wxID_ANY, _("TASKICON_PREF_OPEN_VOL"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer26->Add( BackgroundTaskMenuOpenItemsEnabledCheckBox, 0, wxALL, 5 ); - BackgroundTaskMenuDismountItemsEnabledCheckBox = new wxCheckBox( sbSizer26->GetStaticBox(), wxID_ANY, _("TASKICON_PREF_DISMOUNT_VOL"), wxDefaultPosition, wxDefaultSize, 0 ); + BackgroundTaskMenuDismountItemsEnabledCheckBox = new wxCheckBox( sbSizer26->GetStaticBox(), wxID_ANY, _("TASKICON_PREF_UNMOUNT_VOL"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer26->Add( BackgroundTaskMenuDismountItemsEnabledCheckBox, 0, wxALL, 5 ); sbSizer18->Add( sbSizer26, 1, wxEXPAND|wxALL, 5 ); @@ -2019,11 +2024,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c ExplorerSizer = new wxStaticBoxSizer( new wxStaticBox( SystemIntegrationPage, wxID_ANY, _("LINUX_PREF_TAB_SYSTEM_INTEGRATION_EXPLORER") ), wxVERTICAL ); OpenExplorerWindowAfterMountCheckBox = new wxCheckBox( ExplorerSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_OPEN_EXPLORER"), wxDefaultPosition, wxDefaultSize, 0 ); ExplorerSizer->Add( OpenExplorerWindowAfterMountCheckBox, 0, wxALL, 5 ); - CloseExplorerWindowsOnDismountCheckBox = new wxCheckBox( ExplorerSizer->GetStaticBox(), wxID_ANY, _("LINUX_CLOSE_EXPL_ON_DISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); + CloseExplorerWindowsOnDismountCheckBox = new wxCheckBox( ExplorerSizer->GetStaticBox(), wxID_ANY, _("LINUX_CLOSE_EXPL_ON_UNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); ExplorerSizer->Add( CloseExplorerWindowsOnDismountCheckBox, 0, wxALL, 5 ); bSizer37->Add( ExplorerSizer, 0, wxEXPAND|wxALL, 5 ); @@ -2231,11 +2236,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( sbSizer21->GetStaticBox(), wxID_ANY, _("IDT_FORMAT_OPTIONS") ), wxVERTICAL ); BeepAfterHotkeyMountDismountCheckBox = new wxCheckBox( sbSizer24->GetStaticBox(), wxID_ANY, _("LINUX_SOUND_NOTIFICATION"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer24->Add( BeepAfterHotkeyMountDismountCheckBox, 0, wxALL, 5 ); - DisplayMessageAfterHotkeyDismountCheckBox = new wxCheckBox( sbSizer24->GetStaticBox(), wxID_ANY, _("LINUX_CONFIRM_AFTER_DISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); + DisplayMessageAfterHotkeyDismountCheckBox = new wxCheckBox( sbSizer24->GetStaticBox(), wxID_ANY, _("LINUX_CONFIRM_AFTER_UNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer24->Add( DisplayMessageAfterHotkeyDismountCheckBox, 0, wxALL, 5 ); sbSizer21->Add( sbSizer24, 0, wxEXPAND|wxALL, 5 ); @@ -2248,10 +2253,71 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c HotkeysPage->SetSizer( bSizer51 ); HotkeysPage->Layout(); bSizer51->Fit( HotkeysPage ); PreferencesNotebook->AddPage( HotkeysPage, _("LINUX_HOTKEYS"), false ); + LanguagesPage = new wxPanel( PreferencesNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer170; + bSizer170 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer171; + bSizer171 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer173; + bSizer173 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer49; + sbSizer49 = new wxStaticBoxSizer( new wxStaticBox( LanguagesPage, wxID_ANY, _("LINUX_LANGUAGE") ), wxVERTICAL ); + + wxBoxSizer* bSizer174; + bSizer174 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText73 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("IDT_ACTIVE_LANG_PACK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText73->Wrap( -1 ); + bSizer174->Add( m_staticText73, 0, wxLEFT|wxTOP, 5 ); + + m_staticText74 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("CURRENT_LANGUAGE_PACK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText74->Wrap( -1 ); + bSizer174->Add( m_staticText74, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + + sbSizer49->Add( bSizer174, 0, wxBOTTOM, 5 ); + + wxWrapSizer* wSizer1; + wSizer1 = new wxWrapSizer( wxHORIZONTAL, wxWRAPSIZER_DEFAULT_FLAGS ); + + m_staticText72 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("IDT_LANGPACK_AUTHORS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText72->Wrap( -1 ); + wSizer1->Add( m_staticText72, 0, wxBOTTOM|wxLEFT, 5 ); + + m_staticText71 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("LANGUAGE_TRANSLATORS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText71->Wrap( -1 ); + wSizer1->Add( m_staticText71, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 ); + + + sbSizer49->Add( wSizer1, 0, 0, 5 ); + + LanguageListBox = new wxListBox( sbSizer49->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT ); + sbSizer49->Add( LanguageListBox, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); + + SysDefaultLangButton = new wxButton( sbSizer49->GetStaticBox(), wxID_ANY, _("LINUX_SELECT_SYS_DEFAULT_LANG"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer49->Add( SysDefaultLangButton, 0, wxALIGN_BOTTOM|wxALL|wxEXPAND, 5 ); + + + bSizer173->Add( sbSizer49, 1, wxALL|wxEXPAND, 5 ); + + + bSizer171->Add( bSizer173, 1, wxEXPAND, 5 ); + + + bSizer170->Add( bSizer171, 1, wxALL|wxEXPAND, 5 ); + + + LanguagesPage->SetSizer( bSizer170 ); + LanguagesPage->Layout(); + bSizer170->Fit( LanguagesPage ); + PreferencesNotebook->AddPage( LanguagesPage, _("LINUX_LANGUAGE"), false ); bSizer178->Add( PreferencesNotebook, 1, wxEXPAND | wxALL, 5 ); wxBoxSizer* bSizer182; bSizer182 = new wxBoxSizer( wxHORIZONTAL ); @@ -2278,10 +2344,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c this->Layout(); bSizer32->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PreferencesDialogBase::OnClose ) ); + PreferencesNotebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PreferencesDialogBase::OnPageChanged ), NULL, this ); DismountOnScreenSaverCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnScreenSaverCheckBoxClick ), NULL, this ); DismountOnPowerSavingCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnPowerSavingCheckBoxClick ), NULL, this ); ForceAutoDismountCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnForceAutoDismountCheckBoxClick ), NULL, this ); PreserveTimestampsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnPreserveTimestampsCheckBoxClick ), NULL, this ); BackgroundTaskEnabledCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnBackgroundTaskEnabledCheckBoxClick ), NULL, this ); @@ -2290,17 +2357,19 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c SelectPkcs11ModuleButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSelectPkcs11ModuleButtonClick ), NULL, this ); HotkeyListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemDeselected ), NULL, this ); HotkeyListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemSelected ), NULL, this ); AssignHotkeyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnAssignHotkeyButtonClick ), NULL, this ); RemoveHotkeyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnRemoveHotkeyButtonClick ), NULL, this ); + SysDefaultLangButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSysDefaultLangButtonClick ), NULL, this ); OKButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnOKButtonClick ), NULL, this ); } PreferencesDialogBase::~PreferencesDialogBase() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PreferencesDialogBase::OnClose ) ); + PreferencesNotebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PreferencesDialogBase::OnPageChanged ), NULL, this ); DismountOnScreenSaverCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnScreenSaverCheckBoxClick ), NULL, this ); DismountOnPowerSavingCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnPowerSavingCheckBoxClick ), NULL, this ); ForceAutoDismountCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnForceAutoDismountCheckBoxClick ), NULL, this ); PreserveTimestampsCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnPreserveTimestampsCheckBoxClick ), NULL, this ); BackgroundTaskEnabledCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnBackgroundTaskEnabledCheckBoxClick ), NULL, this ); @@ -2309,10 +2378,11 @@ PreferencesDialogBase::~PreferencesDialogBase() SelectPkcs11ModuleButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSelectPkcs11ModuleButtonClick ), NULL, this ); HotkeyListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemDeselected ), NULL, this ); HotkeyListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemSelected ), NULL, this ); AssignHotkeyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnAssignHotkeyButtonClick ), NULL, this ); RemoveHotkeyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnRemoveHotkeyButtonClick ), NULL, this ); + SysDefaultLangButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSysDefaultLangButtonClick ), NULL, this ); OKButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnOKButtonClick ), NULL, this ); } RandomPoolEnrichmentDialogBase::RandomPoolEnrichmentDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) @@ -2713,23 +2783,23 @@ KeyfilesPanelBase::KeyfilesPanelBase( wxWindow* parent, wxWindowID id, const wxP wxBoxSizer* bSizer137; bSizer137 = new wxBoxSizer( wxHORIZONTAL ); AddFilesButton = new wxButton( this, wxID_ANY, _("IDC_KEYADD"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer137->Add( AddFilesButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bSizer137->Add( AddFilesButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); AddDirectoryButton = new wxButton( this, wxID_ANY, _("IDC_ADD_KEYFILE_PATH"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer137->Add( AddDirectoryButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bSizer137->Add( AddDirectoryButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); AddSecurityTokenSignatureButton = new wxButton( this, wxID_ANY, _("IDC_TOKEN_FILES_ADD"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer137->Add( AddSecurityTokenSignatureButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bSizer137->Add( AddSecurityTokenSignatureButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); RemoveButton = new wxButton( this, wxID_ANY, _("IDC_KEYREMOVE"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer137->Add( RemoveButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bSizer137->Add( RemoveButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); RemoveAllButton = new wxButton( this, wxID_ANY, _("IDC_KEYREMOVEALL"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer137->Add( RemoveAllButton, 0, wxEXPAND|wxALL, 5 ); + bSizer137->Add( RemoveAllButton, 0, wxALL|wxEXPAND, 5 ); bSizer21->Add( bSizer137, 0, wxEXPAND, 5 ); diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h index 96a03c79..70a8c230 100644 --- a/src/Main/Forms/Forms.h +++ b/src/Main/Forms/Forms.h @@ -36,10 +36,12 @@ #include <wx/textctrl.h> #include <wx/dialog.h> #include <wx/choice.h> #include <wx/gauge.h> #include <wx/spinctrl.h> +#include <wx/wrapsizer.h> +#include <wx/listbox.h> #include <wx/notebook.h> #include "international.h" /////////////////////////////////////////////////////////////////////////// @@ -114,10 +116,11 @@ namespace VeraCrypt virtual void OnRestoreVolumeHeaderMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnCreateKeyfileMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnManageSecurityTokenKeyfilesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnCloseAllSecurityTokenSessionsMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnWipeCacheButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLanguageMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnHotkeysMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnDefaultKeyfilesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnDefaultMountParametersMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnSecurityTokenPreferencesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnPreferencesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } @@ -611,15 +614,21 @@ namespace VeraCrypt wxCheckBox* HotkeyAltCheckBox; wxCheckBox* HotkeyWinCheckBox; wxButton* RemoveHotkeyButton; wxCheckBox* BeepAfterHotkeyMountDismountCheckBox; wxCheckBox* DisplayMessageAfterHotkeyDismountCheckBox; + wxStaticText* m_staticText73; + wxStaticText* m_staticText74; + wxStaticText* m_staticText72; + wxStaticText* m_staticText71; + wxButton* SysDefaultLangButton; wxButton* OKButton; wxButton* CancelButton; // Virtual event handlers, override them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnPageChanged( wxNotebookEvent& event ) { event.Skip(); } virtual void OnDismountOnScreenSaverCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnDismountOnPowerSavingCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnForceAutoDismountCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnPreserveTimestampsCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnBackgroundTaskEnabledCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } @@ -628,18 +637,21 @@ namespace VeraCrypt virtual void OnSelectPkcs11ModuleButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnHotkeyListItemDeselected( wxListEvent& event ) { event.Skip(); } virtual void OnHotkeyListItemSelected( wxListEvent& event ) { event.Skip(); } virtual void OnAssignHotkeyButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemoveHotkeyButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSysDefaultLangButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } public: wxPanel* DefaultMountOptionsPage; wxPanel* DefaultKeyfilesPage; wxPanel* SecurityTokensPage; wxPanel* HotkeysPage; + wxPanel* LanguagesPage; + wxListBox* LanguageListBox; PreferencesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("IDD_PREFERENCES_DLG"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~PreferencesDialogBase(); diff --git a/src/Main/Forms/InfoWizardPage.cpp b/src/Main/Forms/InfoWizardPage.cpp index 6d8cf926..465f1693 100644 --- a/src/Main/Forms/InfoWizardPage.cpp +++ b/src/Main/Forms/InfoWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/InfoWizardPage.h b/src/Main/Forms/InfoWizardPage.h index aa7da264..0a4c3324 100644 --- a/src/Main/Forms/InfoWizardPage.h +++ b/src/Main/Forms/InfoWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/KeyfileGeneratorDialog.cpp b/src/Main/Forms/KeyfileGeneratorDialog.cpp index 2d729ccf..58224e18 100644 --- a/src/Main/Forms/KeyfileGeneratorDialog.cpp +++ b/src/Main/Forms/KeyfileGeneratorDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -162,16 +162,16 @@ namespace VeraCrypt void KeyfileGeneratorDialog::OnMouseMotion (wxMouseEvent& event) { event.Skip(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&event), sizeof (event))); long coord = event.GetX(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord))); coord = event.GetY(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord))); if (ShowRandomPoolCheckBox->IsChecked()) ShowBytes (RandomPoolStaticText, RandomNumberGenerator::PeekPool().GetRange (0, 24)); else HideBytes (RandomPoolStaticText, 24); diff --git a/src/Main/Forms/KeyfileGeneratorDialog.h b/src/Main/Forms/KeyfileGeneratorDialog.h index 7b8b2b29..de3a1287 100644 --- a/src/Main/Forms/KeyfileGeneratorDialog.h +++ b/src/Main/Forms/KeyfileGeneratorDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/KeyfilesDialog.cpp b/src/Main/Forms/KeyfilesDialog.cpp index c734b4d9..d81b101f 100644 --- a/src/Main/Forms/KeyfilesDialog.cpp +++ b/src/Main/Forms/KeyfilesDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/KeyfilesDialog.h b/src/Main/Forms/KeyfilesDialog.h index 2ee601e3..2abaf713 100644 --- a/src/Main/Forms/KeyfilesDialog.h +++ b/src/Main/Forms/KeyfilesDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/KeyfilesPanel.cpp b/src/Main/Forms/KeyfilesPanel.cpp index e3d086fc..4439ff36 100644 --- a/src/Main/Forms/KeyfilesPanel.cpp +++ b/src/Main/Forms/KeyfilesPanel.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/KeyfilesPanel.h b/src/Main/Forms/KeyfilesPanel.h index ef680d49..d22abb8b 100644 --- a/src/Main/Forms/KeyfilesPanel.h +++ b/src/Main/Forms/KeyfilesPanel.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/LegalNoticesDialog.cpp b/src/Main/Forms/LegalNoticesDialog.cpp index ce7e442c..0de62897 100644 --- a/src/Main/Forms/LegalNoticesDialog.cpp +++ b/src/Main/Forms/LegalNoticesDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/LegalNoticesDialog.h b/src/Main/Forms/LegalNoticesDialog.h index 31df666b..0769fdb7 100644 --- a/src/Main/Forms/LegalNoticesDialog.h +++ b/src/Main/Forms/LegalNoticesDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index de1c99a4..59329e09 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -82,10 +82,11 @@ namespace VeraCrypt InitControls(); InitPreferences(); InitTaskBarIcon(); InitEvents(); InitMessageFilter(); + InitWindowPrivacy(); if (!GetPreferences().SecurityTokenModule.IsEmpty() && !SecurityToken::IsInitialized()) { try { @@ -468,10 +469,16 @@ namespace VeraCrypt MainFrameWndProc = (WNDPROC) GetWindowLongPtr (mainFrameHwnd, GWL_WNDPROC); SetWindowLongPtr (mainFrameHwnd, GWL_WNDPROC, (LONG_PTR) MainFrameWndProcFilter); #endif } + + void MainFrame::InitWindowPrivacy () + { + Gui->SetContentProtection(!CmdLine->ArgAllowScreencapture); + } + void MainFrame::InitPreferences () { try { LoadPreferences(); @@ -516,11 +523,11 @@ namespace VeraCrypt Gui->AppendToMenu (*popup, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"], this, wxCommandEventHandler (TaskBarIcon::OnShowHideMenuItemSelected)); popup->AppendSeparator(); Gui->AppendToMenu (*popup, LangString["IDM_MOUNT_FAVORITE_VOLUMES"], this, wxCommandEventHandler (TaskBarIcon::OnMountAllFavoritesMenuItemSelected))->Enable (!Busy); - Gui->AppendToMenu (*popup, LangString["HK_DISMOUNT_ALL"], this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy); + Gui->AppendToMenu (*popup, LangString["HK_UNMOUNT_ALL"], this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy); // Favorite volumes if (Gui->GetPreferences().BackgroundTaskMenuMountItemsEnabled && !Frame->FavoriteVolumesMenuMap.empty()) { popup->AppendSeparator(); @@ -556,11 +563,11 @@ namespace VeraCrypt { popup->AppendSeparator(); DismountMap.clear(); foreach (shared_ptr <VolumeInfo> volume, mountedVolumes) { - wxString label = LangString["DISMOUNT"] + L" "; + wxString label = LangString["UNMOUNT"] + L" "; if (!volume->MountPoint.IsEmpty()) label += wstring (volume->MountPoint) + L" (" + wstring (volume->Path) + L")"; else label += wstring (volume->Path); @@ -999,11 +1006,11 @@ namespace VeraCrypt size_t newMountedCount = Core->GetMountedVolumes().size(); if (newMountedCount < mountedCount) { if (newMountedCount == 0 && GetPreferences().DisplayMessageAfterHotkeyDismount) - Gui->ShowInfo ("MOUNTED_VOLUMES_DISMOUNTED"); + Gui->ShowInfo ("MOUNTED_VOLUMES_UNMOUNTED"); else if (GetPreferences().BeepAfterHotkeyMountDismount) MessageBeep((UINT) -1); } } break; @@ -1015,11 +1022,11 @@ namespace VeraCrypt WipeCache(); Gui->DismountAllVolumes (true, true); if (mounted && GetPreferences().DisplayMessageAfterHotkeyDismount) - Gui->ShowInfo ("VOLUMES_DISMOUNTED_CACHE_WIPED"); + Gui->ShowInfo ("VOLUMES_UNMOUNTED_CACHE_WIPED"); else if (mounted && GetPreferences().BeepAfterHotkeyMountDismount) MessageBeep((UINT) -1); if (event.GetId() == Hotkey::Id::ForceDismountAllWipeCacheExit) Close (true); @@ -1066,10 +1073,21 @@ namespace VeraCrypt PreferencesDialog dialog (this); dialog.SelectPage (dialog.HotkeysPage); dialog.ShowModal(); } + void MainFrame::OnLanguageMenuItemSelected (wxCommandEvent& event) + { +#ifdef TC_MACOSX + if (Gui->IsInBackgroundMode()) + Gui->SetBackgroundMode (false); +#endif + PreferencesDialog dialog (this); + dialog.SelectPage (dialog.LanguagesPage); + dialog.ShowModal(); + } + void MainFrame::OnLegalNoticesMenuItemSelected (wxCommandEvent& event) { #ifdef TC_MACOSX if (Gui->IsInBackgroundMode()) Gui->SetBackgroundMode (false); @@ -1129,11 +1147,11 @@ namespace VeraCrypt #endif wxMenu popup; if (IsMountedSlotSelected()) { - Gui->AppendToMenu (popup, LangString["DISMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected)); + Gui->AppendToMenu (popup, LangString["UNMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected)); Gui->AppendToMenu (popup, LangString["OPEN"], this, wxCommandEventHandler (MainFrame::OnOpenVolumeMenuItemSelected)); Gui->AppendToMenu (popup, LangString["LINUX_DESELECT"], this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected)); popup.AppendSeparator(); Gui->AppendToMenu (popup, LangString["IDPM_ADD_TO_FAVORITES"], this, wxCommandEventHandler (MainFrame::OnAddToFavoritesMenuItemSelected)); @@ -1424,11 +1442,11 @@ namespace VeraCrypt } #if defined(TC_UNIX) && !defined(TC_MACOSX) try { - byte buf[128]; + uint8 buf[128]; if (read (ShowRequestFifo, buf, sizeof (buf)) > 0 && Gui->IsInBackgroundMode()) Gui->SetBackgroundMode (false); } catch (...) { @@ -1601,11 +1619,11 @@ namespace VeraCrypt indicator_item_mountfavorites = gtk_menu_item_new_with_label (LangString["IDM_MOUNT_FAVORITE_VOLUMES"]); gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_mountfavorites); g_signal_connect (indicator_item_mountfavorites, "activate", G_CALLBACK (IndicatorOnMountAllFavoritesMenuItemSelected), this); - indicator_item_dismountall = gtk_menu_item_new_with_label (LangString["HK_DISMOUNT_ALL"]); + indicator_item_dismountall = gtk_menu_item_new_with_label (LangString["HK_UNMOUNT_ALL"]); gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_dismountall); g_signal_connect (indicator_item_dismountall, "activate", G_CALLBACK (IndicatorOnDismountAllMenuItemSelected), this); gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index 5372adbb..9b2b4eb0 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -82,10 +82,11 @@ namespace VeraCrypt void InitControls (); void InitEvents (); void InitMessageFilter (); void InitPreferences (); void InitTaskBarIcon (); + void InitWindowPrivacy(); bool IsFreeSlotSelected () const { return SlotListCtrl->GetSelectedItemCount() == 1 && Gui->GetListCtrlSubItemText (SlotListCtrl, SelectedItemIndex, ColumnPath).empty(); } bool IsMountedSlotSelected () const { return SlotListCtrl->GetSelectedItemCount() == 1 && !Gui->GetListCtrlSubItemText (SlotListCtrl, SelectedItemIndex, ColumnPath).empty(); } void LoadFavoriteVolumes (); void LoadPreferences (); void MountAllDevices (); @@ -126,10 +127,11 @@ namespace VeraCrypt void OnFavoriteVolumeMenuItemSelected (wxCommandEvent& event); void OnFaqMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"faq"); } void OnHiddenVolumeProtectionTriggered (shared_ptr <VolumeInfo> protectedVolume); void OnHotkey (wxKeyEvent& event); void OnHotkeysMenuItemSelected (wxCommandEvent& event); + void OnLanguageMenuItemSelected (wxCommandEvent& event); void OnLegalNoticesMenuItemSelected (wxCommandEvent& event); void OnListChanged (); void OnListItemActivated (wxListEvent& event); void OnListItemDeleted (long itemIndex); void OnListItemDeselected (wxListEvent& event); diff --git a/src/Main/Forms/MountOptionsDialog.cpp b/src/Main/Forms/MountOptionsDialog.cpp index 85a06d1e..32b7ae57 100644 --- a/src/Main/Forms/MountOptionsDialog.cpp +++ b/src/Main/Forms/MountOptionsDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -32,18 +32,31 @@ namespace VeraCrypt : MountOptionsDialogBase (parent, wxID_ANY, wxString() #ifdef __WXGTK__ // GTK apparently needs wxRESIZE_BORDER to support dynamic resizing , wxDefaultPosition, wxSize (-1,-1), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER #endif ), Options (options) +#ifdef TC_UNIX + , m_showRedBorder(false) +#endif { if (!title.empty()) this->SetTitle (title); else if (options.Path && !options.Path->IsEmpty()) this->SetTitle (StringFormatter (LangString["ENTER_PASSWORD_FOR"], wstring (*options.Path))); else this->SetTitle (LangString["ENTER_TC_VOL_PASSWORD"]); +#ifdef TC_UNIX + if (Gui->InsecureMountAllowed()) + { + this->SetTitle (LangString["INSECURE_MODE"] + L" - " + this->GetTitle()); + m_showRedBorder = true; + Bind(wxEVT_PAINT, &MountOptionsDialog::OnPaint, this); + Bind(wxEVT_SIZE, &MountOptionsDialog::OnSize, this); + } +#endif + if (disableMountOptions) OptionsButton->Show (false); #ifdef TC_MACOSX @@ -228,6 +241,29 @@ namespace VeraCrypt Fit(); Layout(); MainSizer->Fit( this ); } + +#ifdef TC_UNIX + void MountOptionsDialog::OnPaint(wxPaintEvent& event) + { + wxPaintDC dc(this); + if (m_showRedBorder) + { + wxSize size = GetClientSize(); + wxPen pen(*wxRED, 3); // 3 pixels width + dc.SetPen(pen); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight()); + } + event.Skip(); + } + + void MountOptionsDialog::OnSize(wxSizeEvent& event) + { + event.Skip(); + if (m_showRedBorder) + Refresh(); + } +#endif } diff --git a/src/Main/Forms/MountOptionsDialog.h b/src/Main/Forms/MountOptionsDialog.h index 6366ce85..b9bf38ea 100644 --- a/src/Main/Forms/MountOptionsDialog.h +++ b/src/Main/Forms/MountOptionsDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -38,11 +38,20 @@ namespace VeraCrypt void OnProtectionCheckBoxClick (wxCommandEvent& event); void OnProtectionHyperlinkClick (wxHyperlinkEvent& event); void OnReadOnlyCheckBoxClick (wxCommandEvent& event) { UpdateDialog(); } void UpdateDialog (); +#ifdef TC_UNIX + // Used for displaying a red border around the dialog window when insecure mode is enabled + void OnPaint(wxPaintEvent& event); + void OnSize(wxSizeEvent& event); +#endif + MountOptions &Options; +#ifdef TC_UNIX + bool m_showRedBorder; +#endif wxString OptionsButtonLabel; VolumePasswordPanel *PasswordPanel; VolumePasswordPanel *ProtectionPasswordPanel; }; } diff --git a/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp b/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp index e52d2f60..09dfe5d5 100644 --- a/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp +++ b/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/NewSecurityTokenKeyfileDialog.h b/src/Main/Forms/NewSecurityTokenKeyfileDialog.h index faa76283..f956462f 100644 --- a/src/Main/Forms/NewSecurityTokenKeyfileDialog.h +++ b/src/Main/Forms/NewSecurityTokenKeyfileDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp index 91204389..4a6eaec0 100644 --- a/src/Main/Forms/PreferencesDialog.cpp +++ b/src/Main/Forms/PreferencesDialog.cpp @@ -2,20 +2,23 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "System.h" #include <wx/dynlib.h> #ifdef TC_WINDOWS #include <wx/msw/registry.h> +#else +#include <wx/dir.h> +#include <wx/arrstr.h> #endif #include "Common/SecurityToken.h" #include "Main/Main.h" #include "Main/Application.h" #include "Main/GraphicUserInterface.h" @@ -66,10 +69,91 @@ namespace VeraCrypt prfInitialIndex = index; } } Pkcs5PrfChoice->Select (prfInitialIndex); + // Language for non-Windows +#ifndef TC_WINDOWS +#if defined (TC_MACOSX) + wxDir languagesFolder(StringConverter::ToSingle (Application::GetExecutableDirectory()) + "/../Resources/languages/"); +#else + wxDir languagesFolder("/usr/share/veracrypt/languages/"); +#endif + wxArrayString langArray; + LanguageListBox->Append("System default"); + LanguageListBox->Append("English"); + + langEntries = { + {"system", L"System default"}, + {"ar", L"العربية"}, + {"be", L"БеларуÑкаÑ"}, + {"bg", L"БългарÑки"}, + {"ca", L"Català "}, + {"co", L"Corsu"}, + {"cs", L"ÄŒeÅ¡tina"}, + {"da", L"Dansk"}, + {"de", L"Deutsch"}, + {"el", L"Ελληνικά"}, + {"en", L"English"}, + {"es", L"Español"}, + {"et", L"Eesti"}, + {"eu", L"Euskara"}, + {"fa", L"Ùارسي"}, + {"fi", L"Suomi"}, + {"fr", L"Français"}, + {"he", L"עברית"}, + {"hu", L"Magyar"}, + {"id", L"Bahasa Indonesia"}, + {"it", L"Italiano"}, + {"ja", L"日本語"}, + {"ka", L"ქáƒáƒ თული"}, + {"ko", L"í•œêµì–´"}, + {"lv", L"LatvieÅ¡u"}, + {"nb", L"Norsk BokmÃ¥l"}, + {"nl", L"Nederlands"}, + {"nn", L"Norsk Nynorsk"}, + {"pl", L"Polski"}, + {"ro", L"Română"}, + {"ru", L"РуÑÑкий"}, + {"pt-br", L"Português-Brasil"}, + {"sk", L"SlovenÄina"}, + {"sl", L"SlovenÅ¡Äina"}, + {"sv", L"Svenska"}, + {"th", L"ภาษาไทย"}, + {"tr", L"Türkçe"}, + {"uk", L"УкраїнÑька"}, + {"uz", L"Ўзбекча"}, + {"vi", L"Tiếng Việt"}, + {"zh-cn", L"简体ä¸æ–‡"}, + {"zh-hk", L"ç¹é«”ä¸æ–‡(香港)"}, + {"zh-tw", L"ç¹é«”ä¸æ–‡"} + }; + + if (wxDir::Exists(languagesFolder.GetName())) { + size_t langCount; + langCount = wxDir::GetAllFiles(languagesFolder.GetName(), &langArray, "*.xml", wxDIR_FILES); + for (size_t i = 0; i < langCount; ++i) { + wxFileName filename(langArray[i]); + + // Get the name part of the file (without extension) + wxString basename = filename.GetName(); + + // Check if the basename matches the pattern "Language.langId" + if (basename.StartsWith("Language.")) { + wxString langId = basename.AfterFirst('.'); + + // Verify if the language ID exists in langEntries map + wxString langNative = langEntries[langId]; + if (!langNative.empty()) { + LanguageListBox->Append(langNative); + } + } + } + } +#endif + + // Keyfiles TC_CHECK_BOX_VALIDATOR (UseKeyfiles); DefaultKeyfilesPanel = new KeyfilesPanel (DefaultKeyfilesPage, make_shared <KeyfileList> (Preferences.DefaultKeyfiles)); DefaultKeyfilesSizer->Add (DefaultKeyfilesPanel, 1, wxALL | wxEXPAND); @@ -236,10 +320,19 @@ namespace VeraCrypt if (PreferencesNotebook->GetPage (pageIndex) == page) PreferencesNotebook->ChangeSelection (pageIndex); } } + void PreferencesDialog::OnSysDefaultLangButtonClick (wxCommandEvent& event) + { + // SetStringSelection()'s Assert currently broken in sorted ListBoxes on macOS, workaround: + int itemIndex = LanguageListBox->FindString("System default", true); + if (itemIndex != wxNOT_FOUND) { + LanguageListBox->SetSelection(itemIndex); + } + } + void PreferencesDialog::OnAssignHotkeyButtonClick (wxCommandEvent& event) { #ifdef TC_WINDOWS foreach (long item, Gui->GetListCtrlSelectedItems (HotkeyListCtrl)) { @@ -326,23 +419,23 @@ namespace VeraCrypt } void PreferencesDialog::OnDismountOnPowerSavingCheckBoxClick (wxCommandEvent& event) { if (event.IsChecked() && !ForceAutoDismountCheckBox->IsChecked()) - Gui->ShowWarning ("WARN_PREF_AUTO_DISMOUNT"); + Gui->ShowWarning ("WARN_PREF_AUTO_UNMOUNT"); } void PreferencesDialog::OnDismountOnScreenSaverCheckBoxClick (wxCommandEvent& event) { if (event.IsChecked() && !ForceAutoDismountCheckBox->IsChecked()) - Gui->ShowWarning ("WARN_PREF_AUTO_DISMOUNT"); + Gui->ShowWarning ("WARN_PREF_AUTO_UNMOUNT"); } void PreferencesDialog::OnForceAutoDismountCheckBoxClick (wxCommandEvent& event) { if (!event.IsChecked()) - ForceAutoDismountCheckBox->SetValue (!Gui->AskYesNo (LangString["CONFIRM_NO_FORCED_AUTODISMOUNT"], false, true)); + ForceAutoDismountCheckBox->SetValue (!Gui->AskYesNo (LangString["CONFIRM_NO_FORCED_AUTOUNMOUNT"], false, true)); } void PreferencesDialog::OnHotkeyListItemDeselected (wxListEvent& event) { UpdateHotkeyButtons(); @@ -353,10 +446,17 @@ namespace VeraCrypt UpdateHotkeyButtons(); HotkeyTextCtrl->ChangeValue (LangString ["PRESS_A_KEY_TO_ASSIGN"]); AssignHotkeyButton->Enable (false); } + // Fixes an issue where going through PreferencesNotebook tabs would unintentionally select the first entry + // in the LanguageListBox and thus cause a language change on OKButton press. + void PreferencesDialog::OnPageChanged(wxBookCtrlEvent &event) + { + LanguageListBox->DeselectAll(); + } + void PreferencesDialog::OnOKButtonClick (wxCommandEvent& event) { #ifdef TC_WINDOWS HotkeyTextCtrl->SetValidator (wxTextValidator (wxFILTER_NONE)); #endif @@ -386,10 +486,23 @@ namespace VeraCrypt Preferences.DefaultMountOptions.ProtectionKdf = selectedKdf; bool securityTokenModuleChanged = (Preferences.SecurityTokenModule != wstring (Pkcs11ModulePathTextCtrl->GetValue())); Preferences.SecurityTokenModule = wstring (Pkcs11ModulePathTextCtrl->GetValue()); + if (LanguageListBox->GetSelection() != wxNOT_FOUND) { + wxString langToFind = LanguageListBox->GetString(LanguageListBox->GetSelection()); + for (map<wxString, std::wstring>::const_iterator each = langEntries.begin(); each != langEntries.end(); ++each) { + if (each->second == langToFind) { + Preferences.Language = each->first; +#ifdef DEBUG + cout << "Lang set to: " << each->first << endl; +#endif + } + } + Gui->ShowInfo (LangString["LINUX_RESTART_FOR_LANGUAGE_CHANGE"]); + } + Gui->SetPreferences (Preferences); try { if (securityTokenModuleChanged) diff --git a/src/Main/Forms/PreferencesDialog.h b/src/Main/Forms/PreferencesDialog.h index 0cd1482a..8e1e7363 100644 --- a/src/Main/Forms/PreferencesDialog.h +++ b/src/Main/Forms/PreferencesDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -38,13 +38,15 @@ namespace VeraCrypt void OnHotkeyListItemDeselected (wxListEvent& event); void OnHotkeyListItemSelected (wxListEvent& event); void OnNoHardwareCryptoCheckBoxClick (wxCommandEvent& event); void OnNoKernelCryptoCheckBoxClick (wxCommandEvent& event); void OnOKButtonClick (wxCommandEvent& event); + void OnPageChanged (wxBookCtrlEvent& event); void OnPreserveTimestampsCheckBoxClick (wxCommandEvent& event); void OnRemoveHotkeyButtonClick (wxCommandEvent& event); void OnSelectPkcs11ModuleButtonClick (wxCommandEvent& event); + void OnSysDefaultLangButtonClick (wxCommandEvent& event); void OnTimer (); void UpdateHotkeyButtons(); enum { @@ -56,9 +58,10 @@ namespace VeraCrypt int LastVirtualKeyPressed; unique_ptr <wxTimer> mTimer; UserPreferences Preferences; bool RestoreValidatorBell; HotkeyList UnregisteredHotkeys; + map<wxString, wstring> langEntries; }; } #endif // TC_HEADER_Main_Forms_PreferencesDialog diff --git a/src/Main/Forms/ProgressWizardPage.cpp b/src/Main/Forms/ProgressWizardPage.cpp index a827b718..83c32ba9 100644 --- a/src/Main/Forms/ProgressWizardPage.cpp +++ b/src/Main/Forms/ProgressWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/ProgressWizardPage.h b/src/Main/Forms/ProgressWizardPage.h index 34f5cf4d..6a7a732c 100644 --- a/src/Main/Forms/ProgressWizardPage.h +++ b/src/Main/Forms/ProgressWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/RandomPoolEnrichmentDialog.cpp b/src/Main/Forms/RandomPoolEnrichmentDialog.cpp index e5ef160b..3fc2e113 100644 --- a/src/Main/Forms/RandomPoolEnrichmentDialog.cpp +++ b/src/Main/Forms/RandomPoolEnrichmentDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -61,16 +61,16 @@ namespace VeraCrypt void RandomPoolEnrichmentDialog::OnMouseMotion (wxMouseEvent& event) { event.Skip(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&event), sizeof (event))); long coord = event.GetX(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord))); coord = event.GetY(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord))); if (ShowRandomPoolCheckBox->IsChecked()) ShowBytes (RandomPoolStaticText, RandomNumberGenerator::PeekPool().GetRange (0, 24)); else HideBytes (RandomPoolStaticText, 24); diff --git a/src/Main/Forms/RandomPoolEnrichmentDialog.h b/src/Main/Forms/RandomPoolEnrichmentDialog.h index a29109f1..2b2745e3 100644 --- a/src/Main/Forms/RandomPoolEnrichmentDialog.h +++ b/src/Main/Forms/RandomPoolEnrichmentDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp b/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp index 8f51cfa8..19eb196d 100644 --- a/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp +++ b/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -101,11 +101,11 @@ namespace VeraCrypt if (!files.empty()) { wxBusyCursor busy; - vector <byte> keyfileData; + vector <uint8> keyfileData; keyfile->GetKeyfileData (keyfileData); BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size()); finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); }); @@ -139,11 +139,11 @@ namespace VeraCrypt File keyfile; keyfile.Open (keyfilePath, File::OpenRead, File::ShareReadWrite, File::PreserveTimestamps); if (keyfile.Length() > 0) { - vector <byte> keyfileData (keyfile.Length()); + vector <uint8> keyfileData (keyfile.Length()); BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size()); keyfile.ReadCompleteBuffer (keyfileDataBuf); finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); }); diff --git a/src/Main/Forms/SecurityTokenKeyfilesDialog.h b/src/Main/Forms/SecurityTokenKeyfilesDialog.h index 92119e1e..ec6bafdb 100644 --- a/src/Main/Forms/SecurityTokenKeyfilesDialog.h +++ b/src/Main/Forms/SecurityTokenKeyfilesDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/SelectDirectoryWizardPage.cpp b/src/Main/Forms/SelectDirectoryWizardPage.cpp index a81b9fea..1831996a 100644 --- a/src/Main/Forms/SelectDirectoryWizardPage.cpp +++ b/src/Main/Forms/SelectDirectoryWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/SelectDirectoryWizardPage.h b/src/Main/Forms/SelectDirectoryWizardPage.h index 39517c56..069fab5f 100644 --- a/src/Main/Forms/SelectDirectoryWizardPage.h +++ b/src/Main/Forms/SelectDirectoryWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/SingleChoiceWizardPage.h b/src/Main/Forms/SingleChoiceWizardPage.h index 2398672d..2f137583 100644 --- a/src/Main/Forms/SingleChoiceWizardPage.h +++ b/src/Main/Forms/SingleChoiceWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/TrueCrypt.fbp b/src/Main/Forms/TrueCrypt.fbp index 498b6f83..3c911652 100644 --- a/src/Main/Forms/TrueCrypt.fbp +++ b/src/Main/Forms/TrueCrypt.fbp @@ -466,10 +466,24 @@ <property name="checked">0</property> <property name="enabled">1</property> <property name="help"></property> <property name="id">wxID_ANY</property> <property name="kind">wxITEM_NORMAL</property> + <property name="label">IDM_LANGUAGE</property> + <property name="name">LanguageMenuItem</property> + <property name="permission">none</property> + <property name="shortcut"></property> + <property name="unchecked_bitmap"></property> + <event name="OnMenuSelection">OnLanguageMenuItemSelected</event> + </object> + <object class="wxMenuItem" expanded="0"> + <property name="bitmap"></property> + <property name="checked">0</property> + <property name="enabled">1</property> + <property name="help"></property> + <property name="id">wxID_ANY</property> + <property name="kind">wxITEM_NORMAL</property> <property name="label">IDM_HOTKEY_SETTINGS</property> <property name="name">HotkeysMenuItem</property> <property name="permission">protected</property> <property name="shortcut"></property> <property name="unchecked_bitmap"></property> @@ -10862,10 +10876,11 @@ <property name="toolbar_pane">0</property> <property name="tooltip"></property> <property name="window_extra_style"></property> <property name="window_name"></property> <property name="window_style"></property> + <event name="OnNotebookPageChanged">OnPageChanged</event> <object class="notebookpage" expanded="0"> <property name="bitmap"></property> <property name="label">LINUX_PREF_TAB_SECURITY</property> <property name="select">1</property> <object class="wxPanel" expanded="0"> @@ -10937,11 +10952,11 @@ <property name="border">5</property> <property name="flag">wxEXPAND|wxALL</property> <property name="proportion">0</property> <object class="wxStaticBoxSizer" expanded="0"> <property name="id">wxID_ANY</property> - <property name="label">IDT_AUTO_DISMOUNT</property> + <property name="label">IDT_AUTO_UNMOUNT</property> <property name="minimum_size"></property> <property name="name">AutoDismountSizer</property> <property name="orient">wxVERTICAL</property> <property name="parent">1</property> <property name="permission">protected</property> @@ -10949,11 +10964,11 @@ <property name="border">5</property> <property name="flag">wxEXPAND|wxALL</property> <property name="proportion">0</property> <object class="wxStaticBoxSizer" expanded="0"> <property name="id">wxID_ANY</property> - <property name="label">LINUX_DISMOUNT_ALL_WHEN</property> + <property name="label">LINUX_UNMOUNT_ALL_WHEN</property> <property name="minimum_size"></property> <property name="name">sbSizer13</property> <property name="orient">wxVERTICAL</property> <property name="parent">1</property> <property name="permission">none</property> @@ -10988,11 +11003,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">IDC_PREF_DISMOUNT_LOGOFF</property> + <property name="label">IDC_PREF_UNMOUNT_LOGOFF</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -11052,11 +11067,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">IDC_PREF_DISMOUNT_SCREENSAVER</property> + <property name="label">IDC_PREF_UNMOUNT_SCREENSAVER</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -11193,11 +11208,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">IDC_PREF_DISMOUNT_INACTIVE</property> + <property name="label">IDC_PREF_UNMOUNT_INACTIVE</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -11382,11 +11397,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">IDC_PREF_FORCE_AUTO_DISMOUNT</property> + <property name="label">IDC_PREF_FORCE_AUTO_UNMOUNT</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -11604,11 +11619,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT</property> + <property name="label">IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -12598,11 +12613,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">TASKICON_PREF_DISMOUNT_VOL</property> + <property name="label">TASKICON_PREF_UNMOUNT_VOL</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -13022,11 +13037,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">LINUX_CLOSE_EXPL_ON_DISMOUNT</property> + <property name="label">LINUX_CLOSE_EXPL_ON_UNMOUNT</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -14830,11 +14845,11 @@ <property name="floatable">1</property> <property name="font"></property> <property name="gripper">0</property> <property name="hidden">0</property> <property name="id">wxID_ANY</property> - <property name="label">LINUX_CONFIRM_AFTER_DISMOUNT</property> + <property name="label">LINUX_CONFIRM_AFTER_UNMOUNT</property> <property name="max_size"></property> <property name="maximize_button">0</property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> @@ -14870,10 +14885,513 @@ </object> </object> </object> </object> </object> + <object class="notebookpage" expanded="0"> + <property name="bitmap"></property> + <property name="label">LINUX_LANGUAGE</property> + <property name="select">0</property> + <object class="wxPanel" expanded="0"> + <property name="BottomDockable">1</property> + <property name="LeftDockable">1</property> + <property name="RightDockable">1</property> + <property name="TopDockable">1</property> + <property name="aui_layer"></property> + <property name="aui_name"></property> + <property name="aui_position"></property> + <property name="aui_row"></property> + <property name="best_size"></property> + <property name="bg"></property> + <property name="caption"></property> + <property name="caption_visible">1</property> + <property name="center_pane">0</property> + <property name="close_button">1</property> + <property name="context_help"></property> + <property name="context_menu">1</property> + <property name="default_pane">0</property> + <property name="dock">Dock</property> + <property name="dock_fixed">0</property> + <property name="docking">Left</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="floatable">1</property> + <property name="font"></property> + <property name="gripper">0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="max_size"></property> + <property name="maximize_button">0</property> + <property name="maximum_size"></property> + <property name="min_size"></property> + <property name="minimize_button">0</property> + <property name="minimum_size"></property> + <property name="moveable">1</property> + <property name="name">LanguagesPage</property> + <property name="pane_border">1</property> + <property name="pane_position"></property> + <property name="pane_size"></property> + <property name="permission">public</property> + <property name="pin_button">1</property> + <property name="pos"></property> + <property name="resize">Resizable</property> + <property name="show">1</property> + <property name="size"></property> + <property name="subclass">; ; forward_declare</property> + <property name="toolbar_pane">0</property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style">wxTAB_TRAVERSAL</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer170</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxALL|wxEXPAND</property> + <property name="proportion">1</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer171</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxEXPAND</property> + <property name="proportion">1</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer173</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxALL|wxEXPAND</property> + <property name="proportion">1</property> + <object class="wxStaticBoxSizer" expanded="0"> + <property name="id">wxID_ANY</property> + <property name="label">LINUX_LANGUAGE</property> + <property name="minimum_size"></property> + <property name="name">sbSizer49</property> + <property name="orient">wxVERTICAL</property> + <property name="parent">1</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxBOTTOM</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer174</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxLEFT|wxTOP</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="0"> + <property name="BottomDockable">1</property> + <property name="LeftDockable">1</property> + <property name="RightDockable">1</property> + <property name="TopDockable">1</property> + <property name="aui_layer"></property> + <property name="aui_name"></property> + <property name="aui_position"></property> + <property name="aui_row"></property> + <property name="best_size"></property> + <property name="bg"></property> + <property name="caption"></property> + <property name="caption_visible">1</property> + <property name="center_pane">0</property> + <property name="close_button">1</property> + <property name="context_help"></property> + <property name="context_menu">1</property> + <property name="default_pane">0</property> + <property name="dock">Dock</property> + <property name="dock_fixed">0</property> + <property name="docking">Left</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="floatable">1</property> + <property name="font"></property> + <property name="gripper">0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">IDT_ACTIVE_LANG_PACK</property> + <property name="markup">0</property> + <property name="max_size"></property> + <property name="maximize_button">0</property> + <property name="maximum_size"></property> + <property name="min_size"></property> + <property name="minimize_button">0</property> + <property name="minimum_size"></property> + <property name="moveable">1</property> + <property name="name">m_staticText73</property> + <property name="pane_border">1</property> + <property name="pane_position"></property> + <property name="pane_size"></property> + <property name="permission">protected</property> + <property name="pin_button">1</property> + <property name="pos"></property> + <property name="resize">Resizable</property> + <property name="show">1</property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass">; ; forward_declare</property> + <property name="toolbar_pane">0</property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + </object> + </object> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxLEFT|wxRIGHT|wxTOP</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="0"> + <property name="BottomDockable">1</property> + <property name="LeftDockable">1</property> + <property name="RightDockable">1</property> + <property name="TopDockable">1</property> + <property name="aui_layer"></property> + <property name="aui_name"></property> + <property name="aui_position"></property> + <property name="aui_row"></property> + <property name="best_size"></property> + <property name="bg"></property> + <property name="caption"></property> + <property name="caption_visible">1</property> + <property name="center_pane">0</property> + <property name="close_button">1</property> + <property name="context_help"></property> + <property name="context_menu">1</property> + <property name="default_pane">0</property> + <property name="dock">Dock</property> + <property name="dock_fixed">0</property> + <property name="docking">Left</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="floatable">1</property> + <property name="font"></property> + <property name="gripper">0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">CURRENT_LANGUAGE_PACK</property> + <property name="markup">0</property> + <property name="max_size"></property> + <property name="maximize_button">0</property> + <property name="maximum_size"></property> + <property name="min_size"></property> + <property name="minimize_button">0</property> + <property name="minimum_size"></property> + <property name="moveable">1</property> + <property name="name">m_staticText74</property> + <property name="pane_border">1</property> + <property name="pane_position"></property> + <property name="pane_size"></property> + <property name="permission">protected</property> + <property name="pin_button">1</property> + <property name="pos"></property> + <property name="resize">Resizable</property> + <property name="show">1</property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass">; ; forward_declare</property> + <property name="toolbar_pane">0</property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag"></property> + <property name="proportion">0</property> + <object class="wxWrapSizer" expanded="0"> + <property name="flags">wxWRAPSIZER_DEFAULT_FLAGS</property> + <property name="minimum_size"></property> + <property name="name">wSizer1</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxBOTTOM|wxLEFT</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="0"> + <property name="BottomDockable">1</property> + <property name="LeftDockable">1</property> + <property name="RightDockable">1</property> + <property name="TopDockable">1</property> + <property name="aui_layer"></property> + <property name="aui_name"></property> + <property name="aui_position"></property> + <property name="aui_row"></property> + <property name="best_size"></property> + <property name="bg"></property> + <property name="caption"></property> + <property name="caption_visible">1</property> + <property name="center_pane">0</property> + <property name="close_button">1</property> + <property name="context_help"></property> + <property name="context_menu">1</property> + <property name="default_pane">0</property> + <property name="dock">Dock</property> + <property name="dock_fixed">0</property> + <property name="docking">Left</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="floatable">1</property> + <property name="font"></property> + <property name="gripper">0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">IDT_LANGPACK_AUTHORS</property> + <property name="markup">0</property> + <property name="max_size"></property> + <property name="maximize_button">0</property> + <property name="maximum_size"></property> + <property name="min_size"></property> + <property name="minimize_button">0</property> + <property name="minimum_size"></property> + <property name="moveable">1</property> + <property name="name">m_staticText72</property> + <property name="pane_border">1</property> + <property name="pane_position"></property> + <property name="pane_size"></property> + <property name="permission">protected</property> + <property name="pin_button">1</property> + <property name="pos"></property> + <property name="resize">Resizable</property> + <property name="show">1</property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass">; ; forward_declare</property> + <property name="toolbar_pane">0</property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + </object> + </object> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="0"> + <property name="BottomDockable">1</property> + <property name="LeftDockable">1</property> + <property name="RightDockable">1</property> + <property name="TopDockable">1</property> + <property name="aui_layer"></property> + <property name="aui_name"></property> + <property name="aui_position"></property> + <property name="aui_row"></property> + <property name="best_size"></property> + <property name="bg"></property> + <property name="caption"></property> + <property name="caption_visible">1</property> + <property name="center_pane">0</property> + <property name="close_button">1</property> + <property name="context_help"></property> + <property name="context_menu">1</property> + <property name="default_pane">0</property> + <property name="dock">Dock</property> + <property name="dock_fixed">0</property> + <property name="docking">Left</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="floatable">1</property> + <property name="font"></property> + <property name="gripper">0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">LANGUAGE_TRANSLATORS</property> + <property name="markup">0</property> + <property name="max_size"></property> + <property name="maximize_button">0</property> + <property name="maximum_size"></property> + <property name="min_size"></property> + <property name="minimize_button">0</property> + <property name="minimum_size"></property> + <property name="moveable">1</property> + <property name="name">m_staticText71</property> + <property name="pane_border">1</property> + <property name="pane_position"></property> + <property name="pane_size"></property> + <property name="permission">protected</property> + <property name="pin_button">1</property> + <property name="pos"></property> + <property name="resize">Resizable</property> + <property name="show">1</property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass">; ; forward_declare</property> + <property name="toolbar_pane">0</property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property> + <property name="proportion">1</property> + <object class="wxListBox" expanded="0"> + <property name="BottomDockable">1</property> + <property name="LeftDockable">1</property> + <property name="RightDockable">1</property> + <property name="TopDockable">1</property> + <property name="aui_layer"></property> + <property name="aui_name"></property> + <property name="aui_position"></property> + <property name="aui_row"></property> + <property name="best_size"></property> + <property name="bg"></property> + <property name="caption"></property> + <property name="caption_visible">1</property> + <property name="center_pane">0</property> + <property name="choices"></property> + <property name="close_button">1</property> + <property name="context_help"></property> + <property name="context_menu">1</property> + <property name="default_pane">0</property> + <property name="dock">Dock</property> + <property name="dock_fixed">0</property> + <property name="docking">Left</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="floatable">1</property> + <property name="font"></property> + <property name="gripper">0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="max_size"></property> + <property name="maximize_button">0</property> + <property name="maximum_size"></property> + <property name="min_size"></property> + <property name="minimize_button">0</property> + <property name="minimum_size">-1,-1</property> + <property name="moveable">1</property> + <property name="name">LanguageListBox</property> + <property name="pane_border">1</property> + <property name="pane_position"></property> + <property name="pane_size"></property> + <property name="permission">public</property> + <property name="pin_button">1</property> + <property name="pos"></property> + <property name="resize">Resizable</property> + <property name="show">1</property> + <property name="size"></property> + <property name="style">wxLB_SINGLE|wxLB_SORT</property> + <property name="subclass">; ; forward_declare</property> + <property name="toolbar_pane">0</property> + <property name="tooltip"></property> + <property name="validator_data_type"></property> + <property name="validator_style">wxFILTER_NONE</property> + <property name="validator_type">wxDefaultValidator</property> + <property name="validator_variable"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + </object> + </object> + <object class="sizeritem" expanded="0"> + <property name="border">5</property> + <property name="flag">wxALIGN_BOTTOM|wxALL|wxEXPAND</property> + <property name="proportion">0</property> + <object class="wxButton" expanded="0"> + <property name="BottomDockable">1</property> + <property name="LeftDockable">1</property> + <property name="RightDockable">1</property> + <property name="TopDockable">1</property> + <property name="aui_layer"></property> + <property name="aui_name"></property> + <property name="aui_position"></property> + <property name="aui_row"></property> + <property name="auth_needed">0</property> + <property name="best_size"></property> + <property name="bg"></property> + <property name="bitmap"></property> + <property name="caption"></property> + <property name="caption_visible">1</property> + <property name="center_pane">0</property> + <property name="close_button">1</property> + <property name="context_help"></property> + <property name="context_menu">1</property> + <property name="current"></property> + <property name="default">0</property> + <property name="default_pane">0</property> + <property name="disabled"></property> + <property name="dock">Dock</property> + <property name="dock_fixed">0</property> + <property name="docking">Left</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="floatable">1</property> + <property name="focus"></property> + <property name="font"></property> + <property name="gripper">0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">LINUX_SELECT_SYS_DEFAULT_LANG</property> + <property name="margins"></property> + <property name="markup">0</property> + <property name="max_size"></property> + <property name="maximize_button">0</property> + <property name="maximum_size"></property> + <property name="min_size"></property> + <property name="minimize_button">0</property> + <property name="minimum_size"></property> + <property name="moveable">1</property> + <property name="name">SysDefaultLangButton</property> + <property name="pane_border">1</property> + <property name="pane_position"></property> + <property name="pane_size"></property> + <property name="permission">protected</property> + <property name="pin_button">1</property> + <property name="pos"></property> + <property name="position"></property> + <property name="pressed"></property> + <property name="resize">Resizable</property> + <property name="show">1</property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass">; ; forward_declare</property> + <property name="toolbar_pane">0</property> + <property name="tooltip"></property> + <property name="validator_data_type"></property> + <property name="validator_style">wxFILTER_NONE</property> + <property name="validator_type">wxDefaultValidator</property> + <property name="validator_variable"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnButtonClick">OnSysDefaultLangButtonClick</event> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> </object> </object> <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> @@ -17268,11 +17786,11 @@ <property name="name">bSizer137</property> <property name="orient">wxHORIZONTAL</property> <property name="permission">none</property> <object class="sizeritem" expanded="0"> <property name="border">5</property> - <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property> + <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property> <property name="proportion">0</property> <object class="wxButton" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> @@ -17342,11 +17860,11 @@ <event name="OnButtonClick">OnAddFilesButtonClick</event> </object> </object> <object class="sizeritem" expanded="0"> <property name="border">5</property> - <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property> + <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property> <property name="proportion">0</property> <object class="wxButton" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> @@ -17416,11 +17934,11 @@ <event name="OnButtonClick">OnAddDirectoryButtonClick</event> </object> </object> <object class="sizeritem" expanded="0"> <property name="border">5</property> - <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property> + <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property> <property name="proportion">0</property> <object class="wxButton" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> @@ -17490,11 +18008,11 @@ <event name="OnButtonClick">OnAddSecurityTokenSignatureButtonClick</event> </object> </object> <object class="sizeritem" expanded="0"> <property name="border">5</property> - <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property> + <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property> <property name="proportion">0</property> <object class="wxButton" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> @@ -17564,11 +18082,11 @@ <event name="OnButtonClick">OnRemoveButtonClick</event> </object> </object> <object class="sizeritem" expanded="0"> <property name="border">5</property> - <property name="flag">wxEXPAND|wxALL</property> + <property name="flag">wxALL|wxEXPAND</property> <property name="proportion">0</property> <object class="wxButton" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> @@ -22207,48 +22725,48 @@ <property name="tooltip"></property> <property name="two_step_creation">0</property> <property name="window_extra_style"></property> <property name="window_name"></property> <property name="window_style">wxTAB_TRAVERSAL</property> - <object class="wxBoxSizer" expanded="1"> + <object class="wxBoxSizer" expanded="0"> <property name="minimum_size"></property> <property name="name">bSizer98</property> <property name="orient">wxVERTICAL</property> <property name="permission">none</property> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxEXPAND</property> <property name="proportion">0</property> - <object class="wxBoxSizer" expanded="1"> + <object class="wxBoxSizer" expanded="0"> <property name="minimum_size"></property> <property name="name">bSizer99</property> <property name="orient">wxVERTICAL</property> <property name="permission">none</property> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property> <property name="proportion">0</property> - <object class="spacer" expanded="1"> + <object class="spacer" expanded="0"> <property name="height">0</property> <property name="permission">protected</property> <property name="width">0</property> </object> </object> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxEXPAND</property> <property name="proportion">0</property> - <object class="wxBoxSizer" expanded="1"> + <object class="wxBoxSizer" expanded="0"> <property name="minimum_size"></property> <property name="name">bSizer100</property> <property name="orient">wxHORIZONTAL</property> <property name="permission">none</property> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxALL</property> <property name="proportion">0</property> - <object class="wxTextCtrl" expanded="1"> + <object class="wxTextCtrl" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> <property name="aui_layer"></property> @@ -22305,15 +22823,15 @@ <property name="window_name"></property> <property name="window_style"></property> <event name="OnText">OnVolumeSizeTextChanged</event> </object> </object> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxALL</property> <property name="proportion">0</property> - <object class="wxChoice" expanded="1"> + <object class="wxChoice" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> <property name="aui_layer"></property> @@ -22372,21 +22890,21 @@ <event name="OnChoice">OnVolumeSizePrefixSelected</event> </object> </object> </object> </object> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property> <property name="proportion">0</property> - <object class="spacer" expanded="1"> + <object class="spacer" expanded="0"> <property name="height">0</property> <property name="permission">protected</property> <property name="width">0</property> </object> </object> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="proportion">0</property> <object class="wxCheckBox" expanded="0"> <property name="BottomDockable">1</property> @@ -22461,11 +22979,11 @@ </object> <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="proportion">0</property> - <object class="wxStaticText" expanded="1"> + <object class="wxStaticText" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> <property name="aui_layer"></property> @@ -22518,25 +23036,25 @@ <property name="window_name"></property> <property name="window_style"></property> <property name="wrap">-1</property> </object> </object> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property> <property name="proportion">0</property> - <object class="spacer" expanded="1"> + <object class="spacer" expanded="0"> <property name="height">0</property> <property name="permission">protected</property> <property name="width">0</property> </object> </object> - <object class="sizeritem" expanded="1"> + <object class="sizeritem" expanded="0"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="proportion">0</property> - <object class="wxStaticText" expanded="1"> + <object class="wxStaticText" expanded="0"> <property name="BottomDockable">1</property> <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> <property name="aui_layer"></property> diff --git a/src/Main/Forms/VolumeCreationProgressWizardPage.cpp b/src/Main/Forms/VolumeCreationProgressWizardPage.cpp index 5739949c..9afb19c7 100644 --- a/src/Main/Forms/VolumeCreationProgressWizardPage.cpp +++ b/src/Main/Forms/VolumeCreationProgressWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumeCreationProgressWizardPage.h b/src/Main/Forms/VolumeCreationProgressWizardPage.h index fad4ac93..d3484aef 100644 --- a/src/Main/Forms/VolumeCreationProgressWizardPage.h +++ b/src/Main/Forms/VolumeCreationProgressWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumeCreationWizard.cpp b/src/Main/Forms/VolumeCreationWizard.cpp index 2653ff66..bbf9fe0d 100644 --- a/src/Main/Forms/VolumeCreationWizard.cpp +++ b/src/Main/Forms/VolumeCreationWizard.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -35,10 +35,23 @@ #include "VolumeSizeWizardPage.h" #include "WaitDialog.h" namespace VeraCrypt { + class OpenOuterVolumeFunctor : public Functor + { + public: + OpenOuterVolumeFunctor (const DirectoryPath &outerVolumeMountPoint) : OuterVolumeMountPoint (outerVolumeMountPoint) { } + + virtual void operator() () + { + Gui->OpenExplorerWindow (OuterVolumeMountPoint); + } + + DirectoryPath OuterVolumeMountPoint; + }; + #ifdef TC_MACOSX bool VolumeCreationWizard::ProcessEvent(wxEvent& event) { if(GraphicUserInterface::HandlePasswordEntryCustomEvent (event)) @@ -336,22 +349,10 @@ namespace VeraCrypt Close(); return new InfoWizardPage (GetPageParent()); } - struct OpenOuterVolumeFunctor : public Functor - { - OpenOuterVolumeFunctor (const DirectoryPath &outerVolumeMountPoint) : OuterVolumeMountPoint (outerVolumeMountPoint) { } - - virtual void operator() () - { - Gui->OpenExplorerWindow (OuterVolumeMountPoint); - } - - DirectoryPath OuterVolumeMountPoint; - }; - InfoWizardPage *page = new InfoWizardPage (GetPageParent(), LangString["LINUX_OPEN_OUTER_VOL"], shared_ptr <Functor> (new OpenOuterVolumeFunctor (MountedOuterVolume->MountPoint))); page->SetPageTitle (LangString["HIDVOL_HOST_FILLING_TITLE"]); @@ -388,16 +389,16 @@ namespace VeraCrypt void VolumeCreationWizard::OnMouseMotion (wxMouseEvent& event) { event.Skip(); if (!IsWorkInProgress() && RandomNumberGenerator::IsRunning()) { - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&event), sizeof (event))); long coord = event.GetX(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord))); coord = event.GetY(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord))); VolumeCreationProgressWizardPage *page = dynamic_cast <VolumeCreationProgressWizardPage *> (GetCurrentPage()); if (page) { page->IncrementEntropyProgress (); @@ -440,11 +441,11 @@ namespace VeraCrypt void VolumeCreationWizard::OnRandomPoolUpdateTimer () { if (!IsWorkInProgress()) { wxLongLong time = wxGetLocalTimeMillis(); - RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&time), sizeof (time))); + RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&time), sizeof (time))); } } void VolumeCreationWizard::OnVolumeCreatorFinished () { @@ -619,11 +620,11 @@ namespace VeraCrypt if (forward) { if (Core->IsVolumeMounted (SelectedVolumePath)) { - Gui->ShowInfo ("DISMOUNT_FIRST"); + Gui->ShowInfo ("UNMOUNT_FIRST"); return GetCurrentStep(); } if (SelectedVolumePath.IsDevice()) { @@ -973,11 +974,11 @@ namespace VeraCrypt if (SelectedVolumeType != VolumeType::Hidden || OuterVolume) { if (OuterVolume && VolumeSize > TC_MAX_FAT_SECTOR_COUNT * SectorSize) { uint64 limit = TC_MAX_FAT_SECTOR_COUNT * SectorSize / BYTES_PER_TB; - wstring err = StringFormatter (LangString["LINUX_ERROR_SIZE_HIDDEN_VOL"], limit, limit * 1024); + wstring err = static_cast<wstring>(StringFormatter (LangString["LINUX_ERROR_SIZE_HIDDEN_VOL"], limit, limit * 1024)); if (SectorSize < 4096) { err += LangString["LINUX_MAX_SIZE_HINT"]; #if defined (TC_LINUX) diff --git a/src/Main/Forms/VolumeCreationWizard.h b/src/Main/Forms/VolumeCreationWizard.h index fd4b3e06..9cae5899 100644 --- a/src/Main/Forms/VolumeCreationWizard.h +++ b/src/Main/Forms/VolumeCreationWizard.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp b/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp index 8d632059..5c2a087f 100644 --- a/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp +++ b/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumeFormatOptionsWizardPage.h b/src/Main/Forms/VolumeFormatOptionsWizardPage.h index b38f6e99..b9c21882 100644 --- a/src/Main/Forms/VolumeFormatOptionsWizardPage.h +++ b/src/Main/Forms/VolumeFormatOptionsWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumeLocationWizardPage.cpp b/src/Main/Forms/VolumeLocationWizardPage.cpp index 313d7fee..f1a6eb43 100644 --- a/src/Main/Forms/VolumeLocationWizardPage.cpp +++ b/src/Main/Forms/VolumeLocationWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumeLocationWizardPage.h b/src/Main/Forms/VolumeLocationWizardPage.h index 17ed39c2..709ab0b4 100644 --- a/src/Main/Forms/VolumeLocationWizardPage.h +++ b/src/Main/Forms/VolumeLocationWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp index 32b92edc..7247c3ed 100644 --- a/src/Main/Forms/VolumePasswordPanel.cpp +++ b/src/Main/Forms/VolumePasswordPanel.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -170,13 +170,11 @@ namespace VeraCrypt UseKeyfilesCheckBox->SetValue (true); } void VolumePasswordPanel::SetPimValidator () { - wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc. - const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" }; - validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr)); + wxTextValidator validator (wxFILTER_DIGITS); VolumePimTextCtrl->SetValidator (validator); } void VolumePasswordPanel::DisplayPassword (bool display, wxTextCtrl **textCtrl, int row) { @@ -214,11 +212,11 @@ namespace VeraCrypt shared_ptr <VolumePassword> VolumePasswordPanel::GetPassword (wxTextCtrl *textCtrl, bool bLegacyPassword) const { shared_ptr <VolumePassword> password; wchar_t passwordBuf[VolumePassword::MaxSize + 1]; size_t maxPasswordLength = (bLegacyPassword || CmdLine->ArgUseLegacyPassword)? VolumePassword::MaxLegacySize: VolumePassword::MaxSize; - finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <byte *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); }); + finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <uint8 *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); }); #ifdef TC_WINDOWS int len = GetWindowText (static_cast <HWND> (textCtrl->GetHandle()), passwordBuf, VolumePassword::MaxSize + 1); password = ToUTF8Password (passwordBuf, len, maxPasswordLength); #else @@ -465,10 +463,11 @@ namespace VeraCrypt wxWindow* layoutParent = TopOwnerParent? TopOwnerParent : GetParent(); PimCheckBox->Show (false); VolumePimStaticText->Show (true); VolumePimTextCtrl->Show (true); VolumePimHelpStaticText->Show (true); + VolumePimTextCtrl->SetFocus(); if (DisplayPasswordCheckBox->IsChecked ()) DisplayPassword (true, &VolumePimTextCtrl, 3); else { diff --git a/src/Main/Forms/VolumePasswordPanel.h b/src/Main/Forms/VolumePasswordPanel.h index 7019e8fd..23180399 100644 --- a/src/Main/Forms/VolumePasswordPanel.h +++ b/src/Main/Forms/VolumePasswordPanel.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumePasswordWizardPage.cpp b/src/Main/Forms/VolumePasswordWizardPage.cpp index 859a613a..4f848896 100644 --- a/src/Main/Forms/VolumePasswordWizardPage.cpp +++ b/src/Main/Forms/VolumePasswordWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumePasswordWizardPage.h b/src/Main/Forms/VolumePasswordWizardPage.h index 525db216..128b76a3 100644 --- a/src/Main/Forms/VolumePasswordWizardPage.h +++ b/src/Main/Forms/VolumePasswordWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumePimWizardPage.cpp b/src/Main/Forms/VolumePimWizardPage.cpp index c4f7014b..6500affb 100644 --- a/src/Main/Forms/VolumePimWizardPage.cpp +++ b/src/Main/Forms/VolumePimWizardPage.cpp @@ -21,10 +21,11 @@ namespace VeraCrypt { VolumePimWizardPage::VolumePimWizardPage (wxPanel* parent) : VolumePimWizardPageBase (parent) { + VolumePimTextCtrl->SetMinSize (wxSize (Gui->GetCharWidth (VolumePimTextCtrl) * 15, -1)); SetPimValidator (); } VolumePimWizardPage::~VolumePimWizardPage () { @@ -89,13 +90,11 @@ namespace VeraCrypt Layout(); } void VolumePimWizardPage::SetPimValidator () { - wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc. - const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" }; - validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr)); + wxTextValidator validator (wxFILTER_DIGITS); VolumePimTextCtrl->SetValidator (validator); } void VolumePimWizardPage::OnDisplayPimCheckBoxClick( wxCommandEvent& event ) { diff --git a/src/Main/Forms/VolumePropertiesDialog.cpp b/src/Main/Forms/VolumePropertiesDialog.cpp index 3bba33bc..c0c944ae 100644 --- a/src/Main/Forms/VolumePropertiesDialog.cpp +++ b/src/Main/Forms/VolumePropertiesDialog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumePropertiesDialog.h b/src/Main/Forms/VolumePropertiesDialog.h index 277c8290..05dc490a 100644 --- a/src/Main/Forms/VolumePropertiesDialog.h +++ b/src/Main/Forms/VolumePropertiesDialog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/VolumeSizeWizardPage.cpp b/src/Main/Forms/VolumeSizeWizardPage.cpp index 83fdd40f..5d4f5e82 100644 --- a/src/Main/Forms/VolumeSizeWizardPage.cpp +++ b/src/Main/Forms/VolumeSizeWizardPage.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -71,13 +71,11 @@ namespace VeraCrypt } } VolumeSizeTextCtrl->SetMinSize (wxSize (Gui->GetCharWidth (VolumeSizeTextCtrl) * 20, -1)); - wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc. - const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" }; - validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr)); + wxTextValidator validator (wxFILTER_DIGITS); VolumeSizeTextCtrl->SetValidator (validator); } uint64 VolumeSizeWizardPage::GetVolumeSize () const { diff --git a/src/Main/Forms/VolumeSizeWizardPage.h b/src/Main/Forms/VolumeSizeWizardPage.h index 754bd691..e2d928e6 100644 --- a/src/Main/Forms/VolumeSizeWizardPage.h +++ b/src/Main/Forms/VolumeSizeWizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/WaitDialog.cpp b/src/Main/Forms/WaitDialog.cpp index d53656f9..2489a17b 100644 --- a/src/Main/Forms/WaitDialog.cpp +++ b/src/Main/Forms/WaitDialog.cpp @@ -1,15 +1,18 @@ /* - Copyright (c) 2013-2017 IDRIX. All rights reserved. + Copyright (c) 2013-2025 IDRIX. All rights reserved. Governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "System.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "Main/GraphicUserInterface.h" #include "Common/PCSCException.h" #include "Common/SecurityToken.h" #include "WaitDialog.h" @@ -112,8 +115,11 @@ namespace VeraCrypt VC_CONVERT_EXCEPTION (EMVCPLCNotFound); VC_CONVERT_EXCEPTION (InvalidEMVPath); VC_CONVERT_EXCEPTION (EMVKeyfileDataNotFound); VC_CONVERT_EXCEPTION (EMVPANNotFound); + VC_CONVERT_EXCEPTION (MountPointBlocked); + VC_CONVERT_EXCEPTION (MountPointNotAllowed); + throw *ex; } } diff --git a/src/Main/Forms/WaitDialog.h b/src/Main/Forms/WaitDialog.h index 89de8718..fd3a80be 100644 --- a/src/Main/Forms/WaitDialog.h +++ b/src/Main/Forms/WaitDialog.h @@ -1,7 +1,7 @@ /* - Copyright (c) 2013-2018 IDRIX. All rights reserved. + Copyright (c) 2013-2025 IDRIX. All rights reserved. Governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -78,11 +78,11 @@ namespace VeraCrypt m_thread->Run(); m_timer.Start(100); m_bThreadRunning = true; } - int GetCharWidth (wxWindow *window) const + static int ComputeCharWidth (wxWindow *window) { int width; int height; window->GetTextExtent (L"a", &width, &height); @@ -177,11 +177,11 @@ namespace VeraCrypt void OnPinRequest(wxCommandEvent &e) { wxPasswordEntryDialog dialog (this, wxString::Format (LangString["ENTER_TOKEN_PASSWORD"], e.GetString()), LangString["IDD_TOKEN_PASSWORD"]); - dialog.SetSize (wxSize (GetCharWidth (&dialog) * 50, -1)); + dialog.SetSize (wxSize (ComputeCharWidth (&dialog) * 50, -1)); if (dialog.ShowModal() != wxID_OK) m_queue.Post(wxT("")); else m_queue.Post(dialog.GetValue()); diff --git a/src/Main/Forms/WizardFrame.cpp b/src/Main/Forms/WizardFrame.cpp index 1a6d1eea..298de6ae 100644 --- a/src/Main/Forms/WizardFrame.cpp +++ b/src/Main/Forms/WizardFrame.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/WizardFrame.h b/src/Main/Forms/WizardFrame.h index 86a53957..c5ea5950 100644 --- a/src/Main/Forms/WizardFrame.h +++ b/src/Main/Forms/WizardFrame.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Forms/WizardPage.h b/src/Main/Forms/WizardPage.h index 1bc5b82e..b6b1ca81 100644 --- a/src/Main/Forms/WizardPage.h +++ b/src/Main/Forms/WizardPage.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index 16db8f83..75b326e5 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -35,10 +35,36 @@ #include "Forms/RandomPoolEnrichmentDialog.h" #include "Forms/SecurityTokenKeyfilesDialog.h" namespace VeraCrypt { + class AdminPasswordGUIRequestHandler : public GetStringFunctor + { + public: + virtual void operator() (string &passwordStr) + { + + wxString sValue; + if (Gui->GetWaitDialog()) + { + Gui->GetWaitDialog()->RequestAdminPassword(sValue); + if (sValue.IsEmpty()) + throw UserAbort (SRC_POS); + } + else + { + wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), LangString["LINUX_ADMIN_PW_QUERY"], LangString["LINUX_ADMIN_PW_QUERY_TITLE"]); + if (dialog.ShowModal() != wxID_OK) + throw UserAbort (SRC_POS); + sValue = dialog.GetValue(); + } + wstring wPassword (sValue); // A copy of the password is created here by wxWidgets, which cannot be erased + finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); }); + + StringConverter::ToSingle (wPassword, passwordStr); + } + }; #ifdef TC_MACOSX int GraphicUserInterface::g_customIdCmdV = 0; int GraphicUserInterface::g_customIdCmdA = 0; #endif @@ -129,11 +155,11 @@ namespace VeraCrypt throw UserAbort (SRC_POS); #ifdef TC_WINDOWS if (Core->IsVolumeMounted (*volumePath)) { - ShowInfo ("DISMOUNT_FIRST"); + ShowInfo ("UNMOUNT_FIRST"); return; } #endif #ifdef TC_UNIX @@ -163,10 +189,11 @@ namespace VeraCrypt normalVolumeMountOptions.Path = volumePath; hiddenVolumeMountOptions.Path = volumePath; VolumeType::Enum volumeType = VolumeType::Normal; + bool masterKeyVulnerable = false; // Open both types of volumes while (true) { shared_ptr <Volume> volume; @@ -245,10 +272,17 @@ namespace VeraCrypt else ShowWarning ("HEADER_DAMAGED_AUTO_USED_HEADER_BAK"); } } + // check if volume master key is vulnerable + if (volume->IsMasterKeyVulnerable()) + { + masterKeyVulnerable = true; + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + } + if (volumeType == VolumeType::Hidden) hiddenVolume = volume; else normalVolume = volume; @@ -338,10 +372,14 @@ namespace VeraCrypt backupFile.Write (newHeaderBuffer); } ShowWarning ("VOL_HEADER_BACKED_UP"); + + // display again warning that master key is vulnerable + if (masterKeyVulnerable) + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); } void GraphicUserInterface::BeginInteractiveBusyState (wxWindow *window) { static unique_ptr <wxCursor> arrowWaitCursor; @@ -450,37 +488,11 @@ namespace VeraCrypt return dynamic_cast <wxTopLevelWindow *> (ActiveFrame ? ActiveFrame : GetTopWindow()); } shared_ptr <GetStringFunctor> GraphicUserInterface::GetAdminPasswordRequestHandler () { - struct AdminPasswordRequestHandler : public GetStringFunctor - { - virtual void operator() (string &passwordStr) - { - - wxString sValue; - if (Gui->GetWaitDialog()) - { - Gui->GetWaitDialog()->RequestAdminPassword(sValue); - if (sValue.IsEmpty()) - throw UserAbort (SRC_POS); - } - else - { - wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), LangString["LINUX_ADMIN_PW_QUERY"], LangString["LINUX_ADMIN_PW_QUERY_TITLE"]); - if (dialog.ShowModal() != wxID_OK) - throw UserAbort (SRC_POS); - sValue = dialog.GetValue(); - } - wstring wPassword (sValue); // A copy of the password is created here by wxWidgets, which cannot be erased - finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); }); - - StringConverter::ToSingle (wPassword, passwordStr); - } - }; - - return shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler); + return shared_ptr <GetStringFunctor> (new AdminPasswordGUIRequestHandler); } int GraphicUserInterface::GetCharHeight (wxWindow *window) const { int width; @@ -812,10 +824,23 @@ namespace VeraCrypt { ShowInfo (StringFormatter (LangString["VOLUME_ALREADY_MOUNTED"], wstring (*options.Path))); return volume; } + + // check if the volume path exists using stat function. Only ENOENT error is handled to exclude permission denied error + struct stat statBuf; + if (stat (string (*options.Path).c_str(), &statBuf) != 0) + { + if (errno == ENOENT) + { + SystemException ex (SRC_POS); + ShowError (ex); + return volume; + } + } + try { if ((!options.Password || options.Password->IsEmpty()) && (!options.Keyfiles || options.Keyfiles->empty()) && !Core->IsPasswordCacheEmpty()) @@ -990,11 +1015,11 @@ namespace VeraCrypt try { int showFifo = open (string (MainFrame::GetShowRequestFifoPath()).c_str(), O_WRONLY | O_NONBLOCK); throw_sys_if (showFifo == -1); - byte buf[1] = { 1 }; + uint8 buf[1] = { 1 }; if (write (showFifo, buf, 1) == 1) { close (showFifo); Gui->ShowInfo (LangString["LINUX_VC_RUNNING_ALREADY"]); Application::SetExitCode (0); @@ -1055,11 +1080,16 @@ namespace VeraCrypt #ifdef wxHAS_POWER_EVENTS Gui->Connect (wxEVT_POWER_SUSPENDING, wxPowerEventHandler (GraphicUserInterface::OnPowerSuspending)); #endif mMainFrame = new MainFrame (nullptr); - +#if defined(TC_UNIX) + if (CmdLine->ArgAllowInsecureMount) + { + mMainFrame->SetTitle (mMainFrame->GetTitle() + wxT(" ") + LangString["INSECURE_MODE"]); + } +#endif if (CmdLine->StartBackgroundTask) { UserPreferences prefs = GetPreferences (); prefs.BackgroundTaskEnabled = true; SetPreferences (prefs); @@ -1124,11 +1154,11 @@ namespace VeraCrypt if (GetPreferences().BackgroundTaskEnabled && GetPreferences().DismountOnPowerSaving && volumeCount > 0) { OnAutoDismountAllEvent(); if (Core->GetMountedVolumes().size() < volumeCount) - ShowInfoTopMost (LangString["MOUNTED_VOLUMES_AUTO_DISMOUNTED"]); + ShowInfoTopMost (LangString["MOUNTED_VOLUMES_AUTO_UNMOUNTED"]); } } #endif void GraphicUserInterface::OnSignal (int signal) @@ -1386,11 +1416,11 @@ namespace VeraCrypt throw UserAbort (SRC_POS); #ifdef TC_WINDOWS if (Core->IsVolumeMounted (*volumePath)) { - ShowInfo ("DISMOUNT_FIRST"); + ShowInfo ("UNMOUNT_FIRST"); return; } #endif #ifdef TC_UNIX @@ -1438,10 +1468,11 @@ namespace VeraCrypt } /* force the display of the random enriching interface */ RandomNumberGenerator::SetEnrichedByUserStatus (false); + bool masterKeyVulnerable = false; if (restoreInternalBackup) { // Restore header from the internal backup shared_ptr <Volume> volume; MountOptions options; @@ -1490,10 +1521,12 @@ namespace VeraCrypt { ShowError ("VOLUME_HAS_NO_BACKUP_HEADER"); return; } + masterKeyVulnerable = volume->IsMasterKeyVulnerable(); + RandomNumberGenerator::Start(); UserEnrichRandomPool (nullptr); // Re-encrypt volume header wxBusyCursor busy; @@ -1588,10 +1621,11 @@ namespace VeraCrypt ExecuteWaitThreadRoutine (parent, &decryptRoutine); if (decryptRoutine.m_bResult) { + masterKeyVulnerable = layout->GetHeader()->IsMasterKeyVulnerable(); decryptedLayout = layout; break; } } @@ -1643,10 +1677,16 @@ namespace VeraCrypt volumeFile.Write (newHeaderBuffer); } } ShowInfo ("VOL_HEADER_RESTORED"); + + // display warning if the volume master key is vulnerable + if (masterKeyVulnerable) + { + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + } } DevicePath GraphicUserInterface::SelectDevice (wxWindow *parent) const { try @@ -1850,10 +1890,18 @@ namespace VeraCrypt width += GetScrollbarWidth (listCtrl); #endif listCtrl->SetMinSize (wxSize (width, listCtrl->GetMinSize().GetHeight())); } + + void GraphicUserInterface::SetContentProtection (bool enable) const + { +#if defined(TC_WINDOWS) || defined(TC_MACOSX) + GetActiveWindow()->SetContentProtection(enable ? wxCONTENT_PROTECTION_ENABLED : wxCONTENT_PROTECTION_NONE); +#endif + } + void GraphicUserInterface::ShowErrorTopMost (const wxString &message) const { ShowMessage (message, wxOK | wxICON_ERROR, true); } diff --git a/src/Main/GraphicUserInterface.h b/src/Main/GraphicUserInterface.h index d48b7973..9b6d3cb8 100644 --- a/src/Main/GraphicUserInterface.h +++ b/src/Main/GraphicUserInterface.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -84,10 +84,11 @@ namespace VeraCrypt virtual void SetActiveFrame (wxFrame *frame) { ActiveFrame = frame; } virtual void SetBackgroundMode (bool state); virtual void SetListCtrlColumnWidths (wxListCtrl *listCtrl, list <int> columnWidthPermilles, bool hasVerticalScrollbar = true) const; virtual void SetListCtrlHeight (wxListCtrl *listCtrl, size_t rowCount) const; virtual void SetListCtrlWidth (wxListCtrl *listCtrl, size_t charCount, bool hasVerticalScrollbar = true) const; + virtual void SetContentProtection(bool enable) const; virtual void ShowErrorTopMost (char *langStringId) const { ShowErrorTopMost (LangString[langStringId]); } virtual void ShowErrorTopMost (const wxString &message) const; virtual void ShowInfoTopMost (char *langStringId) const { ShowInfoTopMost (LangString[langStringId]); } virtual void ShowInfoTopMost (const wxString &message) const; virtual void ShowWarningTopMost (char *langStringId) const { ShowWarningTopMost (LangString[langStringId]); } diff --git a/src/Main/Hotkey.cpp b/src/Main/Hotkey.cpp index 8715dc01..ed6a2aff 100644 --- a/src/Main/Hotkey.cpp +++ b/src/Main/Hotkey.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -25,14 +25,14 @@ namespace VeraCrypt #ifdef TC_WINDOWS #define TC_HOTKEY(ID,LANG) hotkeys.push_back (shared_ptr <Hotkey> (new Hotkey (Id::##ID, L###ID, LangString[LANG]))) TC_HOTKEY (CloseAllSecurityTokenSessions, "IDM_CLOSE_ALL_TOKEN_SESSIONS"); - TC_HOTKEY (DismountAll, "HK_DISMOUNT_ALL"); - TC_HOTKEY (DismountAllWipeCache, "HK_DISMOUNT_ALL_AND_WIPE"); - TC_HOTKEY (ForceDismountAllWipeCache, "HK_FORCE_DISMOUNT_ALL_AND_WIPE"); - TC_HOTKEY (ForceDismountAllWipeCacheExit, "HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT"); + TC_HOTKEY (DismountAll, "HK_UNMOUNT_ALL"); + TC_HOTKEY (DismountAllWipeCache, "HK_UNMOUNT_ALL_AND_WIPE"); + TC_HOTKEY (ForceDismountAllWipeCache, "HK_FORCE_UNMOUNT_ALL_AND_WIPE"); + TC_HOTKEY (ForceDismountAllWipeCacheExit, "HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT"); TC_HOTKEY (MountAllDevices, "HK_AUTOMOUNT_DEVICES"); TC_HOTKEY (MountAllFavorites, "HK_MOUNT_FAVORITE_VOLUMES"); TC_HOTKEY (ShowHideApplication, "HK_SHOW_HIDE_MAIN_WINDOW"); TC_HOTKEY (WipeCache, "HK_WIPE_CACHE"); diff --git a/src/Main/Hotkey.h b/src/Main/Hotkey.h index 1ebd6bc7..b526da46 100644 --- a/src/Main/Hotkey.h +++ b/src/Main/Hotkey.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/LanguageStrings.cpp b/src/Main/LanguageStrings.cpp index 71914ec7..24649ab7 100644 --- a/src/Main/LanguageStrings.cpp +++ b/src/Main/LanguageStrings.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -41,11 +41,11 @@ namespace VeraCrypt return wstring (LangString[key]); } void LanguageStrings::Init () { - static byte LanguageXml[] = + static uint8 LanguageXml[] = { # include "Common/Language.xml.h" , 0 }; string def = string ((const char*) LanguageXml); @@ -54,15 +54,20 @@ namespace VeraCrypt wxString text = node.InnerText; text.Replace (L"\\n", L"\n"); Map[StringConverter::ToSingle (wstring (node.Attributes[L"key"]))] = text; } - foreach (XmlNode node, XmlParser (Resources::GetLanguageXml()).GetNodes (L"entry")) + string translatedXml = Resources::GetLanguageXml(); + foreach (XmlNode node, XmlParser (translatedXml).GetNodes (L"entry")) { wxString text = node.InnerText; text.Replace (L"\\n", L"\n"); Map[StringConverter::ToSingle (wstring (node.Attributes[L"key"]))] = text; } + + XmlNode node = XmlParser (translatedXml).GetNodes (L"language").front(); + Map["LANGUAGE_TRANSLATORS"] = wxString (node.Attributes[L"translators"]); + Map["CURRENT_LANGUAGE_PACK"] = wxString (node.Attributes[L"name"]); } LanguageStrings LangString; } diff --git a/src/Main/LanguageStrings.h b/src/Main/LanguageStrings.h index f69928c1..c2341158 100644 --- a/src/Main/LanguageStrings.h +++ b/src/Main/LanguageStrings.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Main.h b/src/Main/Main.h index f0dade49..87f88976 100644 --- a/src/Main/Main.h +++ b/src/Main/Main.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Main.make b/src/Main/Main.make index 90b8b126..178c4669 100755 --- a/src/Main/Main.make +++ b/src/Main/Main.make @@ -100,11 +100,11 @@ WX_LIBS = $(shell $(WX_CONFIG) --debug $(WX_CONFIG_ARGS) --libs $(WX_CONFIG_LIBS endif #------ FUSE configuration ------ -FUSE_LIBS = $(shell $(PKG_CONFIG) fuse --libs) +FUSE_LIBS = $(shell $(PKG_CONFIG) $(VC_FUSE_PACKAGE) --libs) #------ Executable ------ export TC_VERSION := $(shell grep VERSION_STRING ../Common/Tcdefs.h | head -n 1 | cut -d'"' -f 2) @@ -125,19 +125,43 @@ PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(PLATFORM_ARCH)_legacy.tar.gz else PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(PLATFORM_ARCH).tar.gz endif endif +# Determine GUI/GTK conditions +GUI_CONDITION := $(filter gui,$(INSTALLER_TYPE)) +GTK2_CONDITION := $(filter 2,$(GTK_VERSION)) + ifeq "$(origin NOSSE2)" "command line" INTERNAL_INSTALLER_NAME := veracrypt_install_$(INSTALLER_TYPE)_$(CPU_ARCH)_legacy.sh + +ifneq (,$(GUI_CONDITION)) +ifneq (,$(GTK2_CONDITION)) +INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-gtk2-gui-$(CPU_ARCH)-legacy +else INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)-legacy +endif +else +INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)-legacy +endif + else INTERNAL_INSTALLER_NAME := veracrypt_install_$(INSTALLER_TYPE)_$(CPU_ARCH).sh + +ifneq (,$(GUI_CONDITION)) +ifneq (,$(GTK2_CONDITION)) +INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-gtk2-gui-$(CPU_ARCH) +else +INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH) +endif +else INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH) endif endif + +endif #----------------------------------- #------ FreeBSD package naming ------ ifeq "$(PLATFORM)" "FreeBSD" @@ -149,12 +173,25 @@ PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(SYSTEMNAME)_console_$(PLATFORM_ARCH). else INSTALLER_TYPE := gui PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(SYSTEMNAME)_$(PLATFORM_ARCH).tar.gz endif +# Determine GUI/GTK conditions +GUI_CONDITION := $(filter gui,$(INSTALLER_TYPE)) +GTK2_CONDITION := $(filter 2,$(GTK_VERSION)) + INTERNAL_INSTALLER_NAME := veracrypt_install_f$(SYSTEMNAME)_$(INSTALLER_TYPE)_$(CPU_ARCH).sh + +ifneq (,$(GUI_CONDITION)) +ifneq (,$(GTK2_CONDITION)) +INSTALLER_NAME := veracrypt-$(TC_VERSION)-$(SYSTEMNAME)-setup-gtk2-gui-$(CPU_ARCH) +else +INSTALLER_NAME := veracrypt-$(TC_VERSION)-$(SYSTEMNAME)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH) +endif +else INSTALLER_NAME := veracrypt-$(TC_VERSION)-$(SYSTEMNAME)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH) +endif endif #----------------------------------- $(APPNAME): $(LIBS) $(OBJS) @@ -208,23 +245,34 @@ ifdef VC_LEGACY_BUILD sed -e 's/_VERSION_/$(patsubst %a,%.1,$(patsubst %b,%.2,$(TC_VERSION)))/' ../Build/Resources/MacOSX/Info.plist.legacy.xml >$(APPNAME).app/Contents/Info.plist else sed -e 's/_VERSION_/$(patsubst %a,%.1,$(patsubst %b,%.2,$(TC_VERSION)))/' ../Build/Resources/MacOSX/Info.plist.xml >$(APPNAME).app/Contents/Info.plist endif chmod -R go-w $(APPNAME).app +ifneq ("$(LOCAL_DEVELOPMENT_BUILD)","true") codesign -s "Developer ID Application: IDRIX (Z933746L2S)" --timestamp $(APPNAME).app +endif install: prepare cp -R $(APPNAME).app /Applications/. package: prepare ifdef VC_LEGACY_BUILD /usr/local/bin/packagesbuild $(BASE_DIR)/Setup/MacOSX/veracrypt_Legacy.pkgproj productsign --sign "Developer ID Installer: IDRIX (Z933746L2S)" --timestamp "$(BASE_DIR)/Setup/MacOSX/VeraCrypt Legacy $(TC_VERSION).pkg" $(BASE_DIR)/Setup/MacOSX/VeraCrypt_$(TC_VERSION).pkg rm -f $(APPNAME)_Legacy_$(TC_VERSION).dmg else +ifeq "$(VC_OSX_FUSET)" "1" + /usr/local/bin/packagesbuild $(BASE_DIR)/Setup/MacOSX/veracrypt_fuse-t.pkgproj +else /usr/local/bin/packagesbuild $(BASE_DIR)/Setup/MacOSX/veracrypt.pkgproj +endif +ifneq ("$(LOCAL_DEVELOPMENT_BUILD)","true") productsign --sign "Developer ID Installer: IDRIX (Z933746L2S)" --timestamp "$(BASE_DIR)/Setup/MacOSX/VeraCrypt $(TC_VERSION).pkg" $(BASE_DIR)/Setup/MacOSX/VeraCrypt_$(TC_VERSION).pkg +else + # copy the unsigned package to the expected location + cp "$(BASE_DIR)/Setup/MacOSX/VeraCrypt $(TC_VERSION).pkg" $(BASE_DIR)/Setup/MacOSX/VeraCrypt_$(TC_VERSION).pkg +endif rm -f $(APPNAME)_$(TC_VERSION).dmg endif rm -f "$(BASE_DIR)/Setup/MacOSX/template.dmg" rm -fr "$(BASE_DIR)/Setup/MacOSX/VeraCrypt_dmg" mkdir -p "$(BASE_DIR)/Setup/MacOSX/VeraCrypt_dmg" @@ -308,10 +356,12 @@ prepare: $(APPNAME) cp $(BASE_DIR)/Main/$(APPNAME) $(BASE_DIR)/Setup/FreeBSD/usr/bin/$(APPNAME) cp $(BASE_DIR)/Setup/Linux/$(APPNAME)-uninstall.sh $(BASE_DIR)/Setup/FreeBSD/usr/bin/$(APPNAME)-uninstall.sh chmod +x $(BASE_DIR)/Setup/FreeBSD/usr/bin/$(APPNAME)-uninstall.sh cp $(BASE_DIR)/License.txt $(BASE_DIR)/Setup/FreeBSD/usr/share/doc/$(APPNAME)/License.txt cp -R $(BASE_DIR)/../doc/html/* "$(BASE_DIR)/Setup/FreeBSD/usr/share/doc/$(APPNAME)/HTML" + mkdir -p $(BASE_DIR)/Setup/FreeBSD/usr/share/veracrypt/languages + cp -r $(BASE_DIR)/../Translations/* $(BASE_DIR)/Setup/FreeBSD/usr/share/veracrypt/languages/ ifndef TC_NO_GUI mkdir -p $(BASE_DIR)/Setup/FreeBSD/usr/share/applications mkdir -p $(BASE_DIR)/Setup/FreeBSD/usr/share/pixmaps mkdir -p $(BASE_DIR)/Setup/Linux/usr/share/mime/packages diff --git a/src/Main/Resources.cpp b/src/Main/Resources.cpp index 58030c1e..5e5b68c8 100644 --- a/src/Main/Resources.cpp +++ b/src/Main/Resources.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -21,10 +21,11 @@ #include "Application.h" #endif #include "Platform/File.h" #include "Platform/StringConverter.h" #include <stdio.h> +#include "UserPreferences.h" #endif namespace VeraCrypt { @@ -37,18 +38,17 @@ namespace VeraCrypt hRes = FindResource (NULL, resourceName, resourceType); throw_sys_if (!hRes); hResL = LoadResource (NULL, hRes); throw_sys_if (!hResL); - const byte *resPtr = (const byte *) LockResource (hResL); + const uint8 *resPtr = (const uint8 *) LockResource (hResL); throw_sys_if (!resPtr); return ConstBufferPtr (resPtr, SizeofResource (NULL, hRes)); } #endif // TC_WINDOWS - string Resources::GetLanguageXml () { #ifdef TC_WINDOWS ConstBufferPtr res = GetWindowsResource (L"XML", L"IDR_LANGUAGE"); Buffer strBuf (res.Size() + 1); @@ -66,70 +66,82 @@ namespace VeraCrypt #else string filenamePrefix("/usr/share/veracrypt/languages/Language."); #endif string filenamePost(".xml"); string filename = filenamePrefix + defaultLang + filenamePost; - if(const char* env_p = getenv("LANG")){ - string lang(env_p); + + UserPreferences Preferences; + Preferences.Load(); + string preferredLang = string(Preferences.Language.begin(), Preferences.Language.end()); #ifdef DEBUG - std::cout << lang << std::endl; + std::cout << "Config language: " << preferredLang << std::endl; #endif - if ( lang.size() > 1 ){ - int found = lang.find("."); - if ( found > 1 ){ - string langTag = lang.substr (0,found); - string lowerLangTag(StringConverter::ToLower (langTag) ); - int foundUnderscore = lowerLangTag.find("_"); - if ( foundUnderscore > 0 ) { - lowerLangTag.replace(foundUnderscore,1,1,'-'); - filename = filenamePrefix + lowerLangTag + filenamePost; - FilesystemPath xml(filename); - if (! xml.IsFile()){ - string shortLangTag = lowerLangTag.substr(0,foundUnderscore); - filename = filenamePrefix + shortLangTag + filenamePost; + + if (preferredLang == "system") { + if (const char *env_p = getenv("LANG")) { + string lang(env_p); +#ifdef DEBUG + std::cout << "env $LANG: " << lang << std::endl; +#endif + if (lang.size() > 1) { + int found = lang.find("."); + if (found > 1) { + string langTag = lang.substr(0, found); + string lowerLangTag(StringConverter::ToLower(langTag)); + int foundUnderscore = lowerLangTag.find("_"); + if (foundUnderscore > 0) { + lowerLangTag.replace(foundUnderscore, 1, 1, '-'); + filename = filenamePrefix + lowerLangTag + filenamePost; FilesystemPath xml(filename); - if (! xml.IsFile()){ + if (!xml.IsFile()) { + string shortLangTag = lowerLangTag.substr(0, foundUnderscore); + filename = filenamePrefix + shortLangTag + filenamePost; + FilesystemPath xml(filename); + if (!xml.IsFile()) { + filename = filenamePrefix + defaultLang + filenamePost; + } + } + } else { + filename = filenamePrefix + langTag + filenamePost; + FilesystemPath xml(filename); + if (!xml.IsFile()) { filename = filenamePrefix + defaultLang + filenamePost; } } - }else{ - filename = filenamePrefix + langTag + filenamePost; + } else { + string lowerLang(StringConverter::ToLower(lang)); + filename = filenamePrefix + lowerLang + filenamePost; FilesystemPath xml(filename); - if (! xml.IsFile()){ - filename = filenamePrefix + defaultLang + filenamePost; - } - } - }else{ - string lowerLang(StringConverter::ToLower (lang) ); - filename = filenamePrefix + lowerLang + filenamePost; - FilesystemPath xml(filename); - if (! xml.IsFile()){ - int foundUnderscore = lowerLang.find("_"); - if ( foundUnderscore > 0 ) { - lowerLang.replace(foundUnderscore,1,1,'-'); - filename = filenamePrefix + lowerLang + filenamePost; - FilesystemPath xml(filename); - if (! xml.IsFile()){ - filename = filenamePrefix + defaultLang + filenamePost; + if (!xml.IsFile()) { + int foundUnderscore = lowerLang.find("_"); + if (foundUnderscore > 0) { + lowerLang.replace(foundUnderscore, 1, 1, '-'); + filename = filenamePrefix + lowerLang + filenamePost; + FilesystemPath xml(filename); + if (!xml.IsFile()) { + filename = filenamePrefix + defaultLang + filenamePost; + } } } } } } + } else { + filename = filenamePrefix + preferredLang + filenamePost; } FilesystemPath xml(filename); if ( xml.IsFile() ){ File file; file.Open (xml, File::OpenRead, File::ShareRead); - vector <byte> keyfileData (file.Length()); + vector <uint8> keyfileData (file.Length()); BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size()); file.ReadCompleteBuffer (keyfileDataBuf); file.Close(); string langxml(keyfileData.begin(), keyfileData.end()); return langxml; } - static byte LanguageXml[] = + static uint8 LanguageXml[] = { # include "Common/Language.xml.h" , 0 }; @@ -144,11 +156,11 @@ namespace VeraCrypt Buffer strBuf (res.Size() + 1); strBuf.Zero(); strBuf.CopyFrom (res); return string (reinterpret_cast <char *> (strBuf.Ptr())); #else - static byte License[] = + static uint8 License[] = { # include "License.txt.h" , 0 }; @@ -162,11 +174,11 @@ namespace VeraCrypt wxBitmap Resources::GetDriveIconBitmap () { #ifdef TC_WINDOWS return wxBitmap (L"IDB_DRIVE_ICON", wxBITMAP_TYPE_BMP_RESOURCE).ConvertToImage().Resize (wxSize (16, 12), wxPoint (0, 0)); #else - static const byte DriveIcon[] = + static const uint8 DriveIcon[] = { # include "Mount/Drive_icon_96dpi.bmp.h" }; wxMemoryInputStream stream (DriveIcon, sizeof (DriveIcon)); @@ -178,11 +190,11 @@ namespace VeraCrypt { #ifdef TC_WINDOWS wxImage image = wxBitmap (L"IDB_DRIVE_ICON_MASK", wxBITMAP_TYPE_BMP_RESOURCE).ConvertToImage().Resize (wxSize (16, 12), wxPoint (0, 0)); return wxBitmap (image.ConvertToMono (0, 0, 0), 1); #else - static const byte DriveIconMask[] = + static const uint8 DriveIconMask[] = { # include "Mount/Drive_icon_mask_96dpi.bmp.h" }; wxMemoryInputStream stream (DriveIconMask, sizeof (DriveIconMask)); @@ -201,11 +213,11 @@ namespace VeraCrypt wxBitmap Resources::GetLogoBitmap () { #ifdef TC_WINDOWS return wxBitmap (L"IDB_LOGO", wxBITMAP_TYPE_BMP_RESOURCE); #else - static const byte Logo[] = + static const uint8 Logo[] = { # include "Mount/Logo_96dpi.bmp.h" }; wxMemoryInputStream stream (Logo, sizeof (Logo)); @@ -216,11 +228,11 @@ namespace VeraCrypt wxBitmap Resources::GetTextualLogoBitmap () { #ifdef TC_WINDOWS return wxBitmap (L"IDB_TEXTUAL_LOGO", wxBITMAP_TYPE_BMP_RESOURCE); #else - static const byte Logo[] = + static const uint8 Logo[] = { # include "Common/Textual_logo_96dpi.bmp.h" }; wxMemoryInputStream stream (Logo, sizeof (Logo)); @@ -241,11 +253,11 @@ namespace VeraCrypt wxBitmap Resources::GetVolumeCreationWizardBitmap (int height) { #ifdef TC_WINDOWS return wxBitmap (L"IDB_VOLUME_WIZARD_BITMAP", wxBITMAP_TYPE_BMP_RESOURCE); #else - static const byte VolumeWizardIcon[] = + static const uint8 VolumeWizardIcon[] = { # include "Format/VeraCrypt_Wizard.bmp.h" }; wxMemoryInputStream stream (VolumeWizardIcon, sizeof (VolumeWizardIcon)); diff --git a/src/Main/Resources.h b/src/Main/Resources.h index 734c2ede..c2948618 100644 --- a/src/Main/Resources.h +++ b/src/Main/Resources.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/StringFormatter.cpp b/src/Main/StringFormatter.cpp index e64f85c3..2cae84bf 100644 --- a/src/Main/StringFormatter.cpp +++ b/src/Main/StringFormatter.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/StringFormatter.h b/src/Main/StringFormatter.h index 33a47a35..7ffcf5da 100644 --- a/src/Main/StringFormatter.h +++ b/src/Main/StringFormatter.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -50,10 +50,13 @@ namespace VeraCrypt { public: StringFormatter (const wxString &format, StringFormatterArg arg0 = StringFormatterArg(), StringFormatterArg arg1 = StringFormatterArg(), StringFormatterArg arg2 = StringFormatterArg(), StringFormatterArg arg3 = StringFormatterArg(), StringFormatterArg arg4 = StringFormatterArg(), StringFormatterArg arg5 = StringFormatterArg(), StringFormatterArg arg6 = StringFormatterArg(), StringFormatterArg arg7 = StringFormatterArg(), StringFormatterArg arg8 = StringFormatterArg(), StringFormatterArg arg9 = StringFormatterArg()); virtual ~StringFormatter (); +#if (__cplusplus >= 201103L) + explicit +#endif operator wstring () const { return wstring (FormattedString); } operator wxString () const { return FormattedString; } operator StringFormatterArg () const { return FormattedString; } protected: diff --git a/src/Main/System.cpp b/src/Main/System.cpp index 3f2200dd..709101ad 100644 --- a/src/Main/System.cpp +++ b/src/Main/System.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/System.h b/src/Main/System.h index 9d7ebc91..1af8e1ae 100644 --- a/src/Main/System.h +++ b/src/Main/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/SystemPrecompiled.h b/src/Main/SystemPrecompiled.h index 07021786..1331d399 100644 --- a/src/Main/SystemPrecompiled.h +++ b/src/Main/SystemPrecompiled.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index 7b79478f..5217199d 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -28,10 +28,31 @@ #include "Application.h" #include "TextUserInterface.h" namespace VeraCrypt { + class AdminPasswordTextRequestHandler : public GetStringFunctor + { + public: + AdminPasswordTextRequestHandler (TextUserInterface *userInterface) : UI (userInterface) { } + virtual void operator() (string &passwordStr) + { + UI->ShowString (_("Enter your user password or administrator password: ")); + + TextUserInterface::SetTerminalEcho (false); + finally_do ({ TextUserInterface::SetTerminalEcho (true); }); + + wstring wPassword (UI->ReadInputStreamLine()); + finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); }); + + UI->ShowString (L"\n"); + + StringConverter::ToSingle (wPassword, passwordStr); + } + TextUserInterface *UI; + }; + TextUserInterface::TextUserInterface () { #ifdef TC_UNIX signal (SIGHUP, OnSignal); signal (SIGINT, OnSignal); @@ -98,11 +119,11 @@ namespace VeraCrypt SetTerminalEcho (false); finally_do ({ TextUserInterface::SetTerminalEcho (true); }); wchar_t passwordBuf[4096]; - finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <byte *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); }); + finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <uint8 *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); }); shared_ptr<VolumePassword> password; bool verPhase = false; while (true) @@ -267,11 +288,11 @@ namespace VeraCrypt if (!volumePath) throw UserAbort (SRC_POS); #ifdef TC_WINDOWS if (Core->IsVolumeMounted (*volumePath)) - throw_err (LangString["DISMOUNT_FIRST"]); + throw_err (LangString["UNMOUNT_FIRST"]); #endif ShowInfo ("EXTERNAL_VOL_HEADER_BAK_FIRST_INFO"); shared_ptr <Pkcs5Kdf> kdf; @@ -291,10 +312,11 @@ namespace VeraCrypt normalVolumeMountOptions.EMVSupportEnabled = true; hiddenVolumeMountOptions.EMVSupportEnabled = true; VolumeType::Enum volumeType = VolumeType::Normal; + bool masterKeyVulnerable = false; // Open both types of volumes while (true) { shared_ptr <Volume> volume; @@ -364,10 +386,17 @@ namespace VeraCrypt else ShowInfo ("HEADER_DAMAGED_AUTO_USED_HEADER_BAK"); } } + // check if volume master key is vulnerable + if (volume->IsMasterKeyVulnerable()) + { + masterKeyVulnerable = true; + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + } + if (volumeType == VolumeType::Hidden) hiddenVolume = volume; else normalVolume = volume; @@ -431,10 +460,14 @@ namespace VeraCrypt backupFile.Write (newHeaderBuffer); ShowString (L"\n"); ShowInfo ("VOL_HEADER_BACKED_UP"); + + // display again warning that master key is vulnerable + if (masterKeyVulnerable) + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); } void TextUserInterface::ChangePassword (shared_ptr <VolumePath> volumePath, shared_ptr <VolumePassword> password, int pim, shared_ptr <Hash> currentHash, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, shared_ptr <Hash> newHash) const { shared_ptr <Volume> volume; @@ -509,10 +542,16 @@ namespace VeraCrypt } break; } + // display warning if volume master key is vulnerable + if (volume->IsMasterKeyVulnerable()) + { + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + } + // New password if (!newPassword.get() && !Preferences.NonInteractive) newPassword = AskPassword (_("Enter new password"), true); // New PIM @@ -666,24 +705,27 @@ namespace VeraCrypt wxString parentDir = wxFileName (wstring (options->Path)).GetPath(); if (parentDir.IsEmpty()) { parentDir = wxT("."); } - if (wxDirExists(parentDir) && wxGetDiskSpace (parentDir, nullptr, &diskSpace)) + if (options->Type == VolumeType::Normal && wxDirExists(parentDir) && wxGetDiskSpace (parentDir, nullptr, &diskSpace)) { AvailableDiskSpace = (uint64) diskSpace.GetValue (); if (maxVolumeSize > AvailableDiskSpace) maxVolumeSize = AvailableDiskSpace; } } if (options->Size == (uint64) (-1)) { - if (AvailableDiskSpace) + if (options->Type == VolumeType::Hidden) { + throw_err (_("Please do not use maximum size for hidden volume. As we do not mount the outer volume to determine the available space, it is your responsibility to choose a value so that the hidden volume does not overlap the outer volume.")); + } + else if (AvailableDiskSpace) { // caller requesting maximum size - // we use maxVolumeSize because it is guaranteed to be less of equal to AvailableDiskSpace + // we use maxVolumeSize because it is guaranteed to be less or equal to AvailableDiskSpace for outer volumes options->Size = maxVolumeSize; } else { throw_err (_("Failed to get available disk space on the selected target.")); @@ -700,18 +742,21 @@ namespace VeraCrypt { if (Preferences.NonInteractive) throw MissingArgument (SRC_POS); uint64 multiplier = 1024 * 1024; - wxString sizeStr = AskString (options->Type == VolumeType::Hidden ? _("\nEnter hidden volume size (sizeK/size[M]/sizeG/sizeT/max): ") : _("\nEnter volume size (sizeK/size[M]/sizeG.sizeT/max): ")); + wxString sizeStr = AskString (options->Type == VolumeType::Hidden ? _("\nEnter hidden volume size (sizeK/size[M]/sizeG/sizeT): ") : _("\nEnter volume size (sizeK/size[M]/sizeG.sizeT/max): ")); if (sizeStr.CmpNoCase(wxT("max")) == 0) { multiplier = 1; - if (AvailableDiskSpace) + if (options->Type == VolumeType::Hidden) { + throw_err (_("Please do not use maximum size for hidden volume. As we do not mount the outer volume to determine the available space, it is your responsibility to choose a value so that the hidden volume does not overlap the outer volume.")); + } + else if (AvailableDiskSpace) { // caller requesting maximum size - // we use maxVolumeSize because it is guaranteed to be less of equal to AvailableDiskSpace + // we use maxVolumeSize because it is guaranteed to be less or equal to AvailableDiskSpace for outer volumes options->Size = maxVolumeSize; } else { throw_err (_("Failed to get available disk space on the selected target.")); @@ -1069,11 +1114,11 @@ namespace VeraCrypt if (keyfilePath.empty()) throw UserAbort (SRC_POS); shared_ptr<TokenKeyfile> tokenKeyfile = Token::getTokenKeyfile(keyfilePath); - vector <byte> keyfileData; + vector <uint8> keyfileData; tokenKeyfile->GetKeyfileData (keyfileData); BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size()); finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); }); @@ -1087,31 +1132,11 @@ namespace VeraCrypt keyfile.Write (keyfileDataBuf); } shared_ptr <GetStringFunctor> TextUserInterface::GetAdminPasswordRequestHandler () { - struct AdminPasswordRequestHandler : public GetStringFunctor - { - AdminPasswordRequestHandler (TextUserInterface *userInterface) : UI (userInterface) { } - virtual void operator() (string &passwordStr) - { - UI->ShowString (_("Enter your user password or administrator password: ")); - - TextUserInterface::SetTerminalEcho (false); - finally_do ({ TextUserInterface::SetTerminalEcho (true); }); - - wstring wPassword (UI->ReadInputStreamLine()); - finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); }); - - UI->ShowString (L"\n"); - - StringConverter::ToSingle (wPassword, passwordStr); - } - TextUserInterface *UI; - }; - - return shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler (this)); + return shared_ptr <GetStringFunctor> (new AdminPasswordTextRequestHandler (this)); } void TextUserInterface::ImportTokenKeyfiles () const { list <shared_ptr<TokenInfo>> tokens = Token::GetAvailableTokens(); @@ -1156,11 +1181,11 @@ namespace VeraCrypt File keyfile; keyfile.Open (keyfilePath, File::OpenRead, File::ShareReadWrite, File::PreserveTimestamps); if (keyfile.Length() > 0) { - vector <byte> keyfileData (keyfile.Length()); + vector <uint8> keyfileData (keyfile.Length()); BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size()); keyfile.ReadCompleteBuffer (keyfileDataBuf); finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); }); @@ -1308,10 +1333,22 @@ namespace VeraCrypt { ShowInfo (StringFormatter (LangString["VOLUME_ALREADY_MOUNTED"], wstring (*options.Path))); return volume; } + // check if the volume path exists using stat function. Only ENOENT error is handled to exclude permission denied error + struct stat statBuf; + if (stat (string (*options.Path).c_str(), &statBuf) != 0) + { + if (errno == ENOENT) + { + SystemException ex (SRC_POS); + ShowError (ex); + return volume; + } + } + // Mount point if (!options.MountPoint && !options.NoFilesystem) options.MountPoint.reset (new DirectoryPath (AskString (_("Enter mount directory [default]: ")))); VolumePassword password; @@ -1407,11 +1444,10 @@ namespace VeraCrypt } catch (PasswordException &e) { ShowInfo (e); options.Password.reset(); - options.Pim = -1; } } #ifdef TC_LINUX if (!Preferences.NonInteractive && !Preferences.DisableKernelEncryptionModeWarning @@ -1499,11 +1535,11 @@ namespace VeraCrypt if (!volumePath) throw UserAbort (SRC_POS); #ifdef TC_WINDOWS if (Core->IsVolumeMounted (*volumePath)) - throw_err (LangString["DISMOUNT_FIRST"]); + throw_err (LangString["UNMOUNT_FIRST"]); #endif // Ask whether to restore internal or external backup bool restoreInternalBackup; shared_ptr <Pkcs5Kdf> kdf; @@ -1531,10 +1567,11 @@ namespace VeraCrypt } /* force the display of the random enriching interface */ RandomNumberGenerator::SetEnrichedByUserStatus (false); + bool masterKeyVulnerable = false; if (restoreInternalBackup) { // Restore header from the internal backup shared_ptr <Volume> volume; MountOptions options; @@ -1578,10 +1615,12 @@ namespace VeraCrypt if (typeid (*layout) == typeid (VolumeLayoutV1Normal)) { throw_err (LangString ["VOLUME_HAS_NO_BACKUP_HEADER"]); } + masterKeyVulnerable = volume->IsMasterKeyVulnerable(); + RandomNumberGenerator::Start(); UserEnrichRandomPool(); // Re-encrypt volume header SecureBuffer newHeaderBuffer (volume->GetLayout()->GetHeaderSize()); @@ -1665,10 +1704,11 @@ namespace VeraCrypt // Decrypt header shared_ptr <VolumePassword> passwordKey = Keyfile::ApplyListToPassword (options.Keyfiles, options.Password, options.EMVSupportEnabled); if (layout->GetHeader()->Decrypt (headerBuffer, *passwordKey, options.Pim, kdf, layout->GetSupportedKeyDerivationFunctions(), layout->GetSupportedEncryptionAlgorithms(), layout->GetSupportedEncryptionModes())) { decryptedLayout = layout; + masterKeyVulnerable = layout->GetHeader()->IsMasterKeyVulnerable(); break; } } if (!decryptedLayout) @@ -1715,10 +1755,15 @@ namespace VeraCrypt } } ShowString (L"\n"); ShowInfo ("VOL_HEADER_RESTORED"); + // display warning if the volume master key is vulnerable + if (masterKeyVulnerable) + { + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + } } void TextUserInterface::SetTerminalEcho (bool enable) { if (CmdLine->ArgDisplayPassword) @@ -1777,11 +1822,11 @@ namespace VeraCrypt finally_do ({ TextUserInterface::SetTerminalEcho (true); }); while (randCharsRequired > 0) { wstring randStr = AskString(); - RandomNumberGenerator::AddToPool (ConstBufferPtr ((byte *) randStr.c_str(), randStr.size() * sizeof (wchar_t))); + RandomNumberGenerator::AddToPool (ConstBufferPtr ((uint8 *) randStr.c_str(), randStr.size() * sizeof (wchar_t))); randCharsRequired -= randStr.size(); if (randCharsRequired > 0) ShowInfo (StringFormatter (_("Characters remaining: {0}"), randCharsRequired)); diff --git a/src/Main/TextUserInterface.h b/src/Main/TextUserInterface.h index becb1d59..091e4cbd 100644 --- a/src/Main/TextUserInterface.h +++ b/src/Main/TextUserInterface.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -17,13 +17,15 @@ #include "Main.h" #include "UserInterface.h" namespace VeraCrypt { + class AdminPasswordTextRequestHandler; class TextUserInterface : public UserInterface { public: + friend class AdminPasswordTextRequestHandler; TextUserInterface (); virtual ~TextUserInterface (); virtual FilePath AskFilePath (const wxString &message = wxEmptyString) const; virtual shared_ptr <KeyfileList> AskKeyfiles (const wxString &message = L"") const; diff --git a/src/Main/Unix/Main.cpp b/src/Main/Unix/Main.cpp index 39a2eaba..4197dcaf 100644 --- a/src/Main/Unix/Main.cpp +++ b/src/Main/Unix/Main.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -74,11 +74,11 @@ int main (int argc, char **argv) #else bool forceTextUI = false; #endif #ifdef __WXGTK__ - if (!getenv ("DISPLAY")) + if (!getenv ("DISPLAY") && !getenv ("WAYLAND_DISPLAY")) forceTextUI = true; #endif // Initialize application if (forceTextUI || (argc > 1 && (strcmp (argv[1], "-t") == 0 || strcmp (argv[1], "--text") == 0))) diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp index 8d046f87..b507d9a3 100644 --- a/src/Main/UserInterface.cpp +++ b/src/Main/UserInterface.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -30,10 +30,19 @@ #include "FavoriteVolume.h" #include "UserInterface.h" namespace VeraCrypt { + class AdminPasswordRequestHandler : public GetStringFunctor + { + public: + virtual void operator() (string &str) + { + throw ElevationFailed (SRC_POS, "sudo", 1, ""); + } + }; + UserInterface::UserInterface () { } UserInterface::~UserInterface () @@ -211,11 +220,11 @@ namespace VeraCrypt if (Preferences.Verbose) { if (!message.IsEmpty()) message += L'\n'; - message += StringFormatter (LangString["LINUX_VOL_DISMOUNTED"], wstring (volume->Path)); + message += StringFormatter (LangString["LINUX_VOL_UNMOUNTED"], wstring (volume->Path)); } } if (twoPassMode && firstPass) { @@ -388,11 +397,11 @@ namespace VeraCrypt errOutput += wxString (LangString["LINUX_CANT_GET_ADMIN_PRIV"]) + (StringConverter::Trim (execEx->GetErrorOutput()).empty() ? L". " : L": "); errOutput += StringConverter::ToWide (execEx->GetErrorOutput()); if (errOutput.empty()) - return errOutput + StringFormatter (LangString["LINUX_COMMAND_GET_ERROR"], execEx->GetCommand(), execEx->GetExitCode()); + return errOutput + static_cast<wstring>(StringFormatter (LangString["LINUX_COMMAND_GET_ERROR"], execEx->GetCommand(), execEx->GetExitCode())); return wxString (errOutput).Trim (true); } // PasswordIncorrect @@ -485,12 +494,12 @@ namespace VeraCrypt EX2MSG (PasswordIncorrect, LangString["PASSWORD_WRONG"]); EX2MSG (PasswordKeyfilesIncorrect, LangString["PASSWORD_OR_KEYFILE_WRONG"]); EX2MSG (PasswordOrKeyboardLayoutIncorrect, LangString["PASSWORD_OR_KEYFILE_WRONG"] + LangString["LINUX_EX2MSG_PASSWORDORKEYBOARDLAYOUTINCORRECT"]); EX2MSG (PasswordOrMountOptionsIncorrect, LangString["PASSWORD_OR_KEYFILE_OR_MODE_WRONG"] + LangString["LINUX_EX2MSG_PASSWORDORMOUNTOPTIONSINCORRECT"]); EX2MSG (PasswordTooLong, StringFormatter (LangString["LINUX_EX2MSG_PASSWORDTOOLONG"], (int) VolumePassword::MaxSize)); - EX2MSG (PasswordUTF8TooLong, LangString["PASSWORD_UTF8_TOO_LONG"]); - EX2MSG (PasswordLegacyUTF8TooLong, LangString["LEGACY_PASSWORD_UTF8_TOO_LONG"]); + EX2MSG (PasswordUTF8TooLong, StringFormatter (LangString["PASSWORD_UTF8_TOO_LONG"], (int) VolumePassword::MaxSize)); + EX2MSG (PasswordLegacyUTF8TooLong, StringFormatter (LangString["LEGACY_PASSWORD_UTF8_TOO_LONG"], (int) VolumePassword::MaxLegacySize)); EX2MSG (PasswordUTF8Invalid, LangString["PASSWORD_UTF8_INVALID"]); EX2MSG (PartitionDeviceRequired, LangString["LINUX_EX2MSG_PARTITIONDEVICEREQUIRED"]); EX2MSG (ProtectionPasswordIncorrect, LangString["LINUX_EX2MSG_PROTECTIONPASSWORDINCORRECT"]); EX2MSG (ProtectionPasswordKeyfilesIncorrect, LangString["LINUX_EX2MSG_PROTECTIONPASSWORDKEYFILESINCORRECT"]); EX2MSG (RootDeviceUnavailable, LangString["NODRIVER"]); @@ -508,13 +517,13 @@ namespace VeraCrypt EX2MSG (EMVUnknownCardType, LangString["EMV_UNKNOWN_CARD_TYPE"]); EX2MSG (EMVSelectAIDFailed, LangString["EMV_SELECT_AID_FAILED"]); EX2MSG (EMVIccCertNotFound, LangString["EMV_ICC_CERT_NOTFOUND"]); EX2MSG (EMVIssuerCertNotFound, LangString["EMV_ISSUER_CERT_NOTFOUND"]); EX2MSG (EMVCPLCNotFound, LangString["EMV_CPLC_NOTFOUND"]); - EX2MSG (InvalidEMVPath, LangString["EMV_PAN_NOTFOUND"]); - EX2MSG (EMVKeyfileDataNotFound, LangString["INVALID_EMV_PATH"]); - EX2MSG (EMVPANNotFound, LangString["EMV_KEYFILE_DATA_NOTFOUND"]); + EX2MSG (InvalidEMVPath, LangString["INVALID_EMV_PATH"]); + EX2MSG (EMVKeyfileDataNotFound, LangString["EMV_KEYFILE_DATA_NOTFOUND"]); + EX2MSG (EMVPANNotFound, LangString["EMV_PAN_NOTFOUND"]); #if defined (TC_LINUX) EX2MSG (TerminalNotFound, LangString["LINUX_EX2MSG_TERMINALNOTFOUND"]); EX2MSG (UnsupportedSectorSize, LangString["SECTOR_SIZE_UNSUPPORTED"]); EX2MSG (UnsupportedSectorSizeHiddenVolumeProtection, LangString["LINUX_EX2MSG_UNSUPPORTEDSECTORSIZEHIDDENVOLUMEPROTECTION"]); @@ -530,10 +539,13 @@ namespace VeraCrypt #ifdef TC_MACOSX EX2MSG (HigherFuseVersionRequired, LangString["LINUX_EX2MSG_HIGHERFUSEVERSIONREQUIRED"]); #endif + EX2MSG (MountPointBlocked, LangString["MOUNTPOINT_BLOCKED"]); + EX2MSG (MountPointNotAllowed, LangString["MOUNTPOINT_NOTALLOWED"]); + #undef EX2MSG return L""; } void UserInterface::Init () @@ -542,37 +554,35 @@ namespace VeraCrypt SetClassName (Application::GetName()); #ifdef CRYPTOPP_CPUID_AVAILABLE DetectX86Features (); #endif +#if CRYPTOPP_BOOL_ARMV8 + DetectArmFeatures(); +#endif LangString.Init(); Core->Init(); CmdLine.reset (new CommandLineInterface (argc, argv, InterfaceType)); SetPreferences (CmdLine->Preferences); Core->SetApplicationExecutablePath (Application::GetExecutablePath()); + Core->SetUserEnvPATH (getenv ("PATH")); if (!Preferences.NonInteractive) { Core->SetAdminPasswordCallback (GetAdminPasswordRequestHandler()); } else { - struct AdminPasswordRequestHandler : public GetStringFunctor - { - virtual void operator() (string &str) - { - throw ElevationFailed (SRC_POS, "sudo", 1, ""); - } - }; - Core->SetAdminPasswordCallback (shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler)); } -#if defined(TC_LINUX ) || defined (TC_FREEBSD) Core->ForceUseDummySudoPassword (CmdLine->ArgUseDummySudoPassword); + +#if defined(TC_UNIX) + Core->SetAllowInsecureMount (CmdLine->ArgAllowInsecureMount); #endif Core->WarningEvent.Connect (EventConnector <UserInterface> (this, &UserInterface::OnWarning)); Core->VolumeMountedEvent.Connect (EventConnector <UserInterface> (this, &UserInterface::OnVolumeMounted)); @@ -649,10 +659,11 @@ namespace VeraCrypt foreach_ref (const VolumeInfo &v, Core->GetMountedVolumes()) mountedVolumes.insert (v.Path); bool protectedVolumeMounted = false; bool legacyVolumeMounted = false; + bool vulnerableVolumeMounted = false; foreach_ref (const HostDevice &device, devices) { if (mountedVolumes.find (wstring (device.Path)) != mountedVolumes.end()) continue; @@ -691,10 +702,14 @@ namespace VeraCrypt if (newMountedVolumes.back()->Protection == VolumeProtection::HiddenVolumeReadOnly) protectedVolumeMounted = true; if (newMountedVolumes.back()->EncryptionAlgorithmMinBlockSize == 8) legacyVolumeMounted = true; + + if (newMountedVolumes.back()->MasterKeyVulnerable) + vulnerableVolumeMounted = true; + } catch (DriverError&) { } catch (MissingVolumeData&) { } catch (PasswordException&) { } catch (SystemException&) { } @@ -705,10 +720,13 @@ namespace VeraCrypt { ShowWarning (LangString [options.Keyfiles && !options.Keyfiles->empty() ? "PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT" : "PASSWORD_WRONG_AUTOMOUNT"]); } else { + if (vulnerableVolumeMounted) + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + if (someVolumesShared) ShowWarning ("DEVICE_IN_USE_INFO"); if (legacyVolumeMounted) ShowWarning ("WARN_64_BIT_BLOCK_CIPHER"); @@ -738,21 +756,24 @@ namespace VeraCrypt continue; } favorite.ToMountOptions (options); + bool mountPerformed = false; if (Preferences.NonInteractive) { BusyScope busy (this); newMountedVolumes.push_back (Core->MountVolume (options)); + mountPerformed = true; } else { try { BusyScope busy (this); newMountedVolumes.push_back (Core->MountVolume (options)); + mountPerformed = true; } catch (...) { UserPreferences prefs = GetPreferences(); if (prefs.CloseSecurityTokenSessionsAfterMount) @@ -766,10 +787,13 @@ namespace VeraCrypt if (!volume) break; newMountedVolumes.push_back (volume); } } + + if (mountPerformed && newMountedVolumes.back()->MasterKeyVulnerable) + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); } if (!newMountedVolumes.empty() && GetPreferences().CloseSecurityTokenSessionsAfterMount) SecurityToken::CloseAllSessions(); @@ -802,10 +826,13 @@ namespace VeraCrypt { throw_err (LangString["FILE_IN_USE_FAILED"]); } } + if (volume->MasterKeyVulnerable) + ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + if (volume->EncryptionAlgorithmMinBlockSize == 8) ShowWarning ("WARN_64_BIT_BLOCK_CIPHER"); if (VolumeHasUnrecommendedExtension (*options.Path)) ShowWarning ("EXE_FILE_EXTENSION_MOUNT_WARNING"); @@ -853,10 +880,37 @@ namespace VeraCrypt { ExceptionEventArgs &e = dynamic_cast <ExceptionEventArgs &> (args); ShowWarning (e.mException); } +#if !defined(TC_WINDOWS) && !defined(TC_MACOSX) +// Define file manager structures with their required parameters +struct FileManager { + const char* name; + const char* const* baseArgs; + size_t baseArgsCount; +}; + +// Array of supported file managers with their parameters +static const char* const gioArgs[] = {"open"}; +static const char* const kioclient5Args[] = {"exec"}; +static const char* const kfmclientArgs[] = {"openURL"}; +static const char* const exoOpenArgs[] = {"--launch", "FileManager"}; + +const FileManager fileManagers[] = { + {"gio", gioArgs, 1}, + {"kioclient5", kioclient5Args, 1}, + {"kfmclient", kfmclientArgs, 1}, + {"exo-open", exoOpenArgs, 2}, + {"nautilus", NULL, 0}, + {"dolphin", NULL, 0}, + {"caja", NULL, 0}, + {"thunar", NULL, 0}, + {"pcmanfm", NULL, 0} +}; +#endif + void UserInterface::OpenExplorerWindow (const DirectoryPath &path) { if (path.IsEmpty()) return; @@ -872,69 +926,58 @@ namespace VeraCrypt #elif defined (TC_MACOSX) args.push_back (string (path)); try { - Process::Execute ("open", args); + Process::Execute ("/usr/bin/open", args); } catch (exception &e) { ShowError (e); } #else - // MIME handler for directory seems to be unavailable through wxWidgets - wxString desktop = GetTraits()->GetDesktopEnvironment(); - bool xdgOpenPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/xdg-open")) || wxFileName::IsFileExecutable (wxT("/usr/local/bin/xdg-open")); - bool nautilusPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/nautilus")) || wxFileName::IsFileExecutable (wxT("/usr/local/bin/nautilus")); - - if (desktop == L"GNOME" || (desktop.empty() && !xdgOpenPresent && nautilusPresent)) + string directoryPath = string(path); + // Primary attempt: Use xdg-open + string errorMsg; + string binPath = Process::FindSystemBinary("xdg-open", errorMsg); + if (!binPath.empty()) { - // args.push_back ("--no-default-window"); // This option causes nautilus not to launch under FreeBSD 11 - args.push_back ("--no-desktop"); - args.push_back (string (path)); try { - Process::Execute ("nautilus", args, 2000); + args.push_back(directoryPath); + Process::Execute(binPath, args, 2000); + return; } catch (TimeOut&) { } - catch (exception &e) { ShowError (e); } + catch (exception&) {} } - else if (desktop == L"KDE") - { - try - { - args.push_back (string (path)); - Process::Execute ("dolphin", args, 2000); - } - catch (TimeOut&) { } - catch (exception&) - { + + // Fallback attempts: Try known file managers + const size_t numFileManagers = sizeof(fileManagers) / sizeof(fileManagers[0]); + for (size_t i = 0; i < numFileManagers; ++i) { + const FileManager& fm = fileManagers[i]; + string fmPath = Process::FindSystemBinary(fm.name, errorMsg); + if (!fmPath.empty()) { args.clear(); - args.push_back ("openURL"); - args.push_back (string (path)); - try - { - Process::Execute ("kfmclient", args, 2000); + + // Add base arguments first + for (size_t j = 0; j < fm.baseArgsCount; ++j) { + args.push_back(fm.baseArgs[j]); + } + + // Add path argument + args.push_back(directoryPath); + + try { + Process::Execute(fmPath, args, 2000); + return; // Success } catch (TimeOut&) { } - catch (exception &e) { ShowError (e); } - } - } - else if (xdgOpenPresent) - { - // Fallback on the standard xdg-open command - // which is not always available by default - args.push_back (string (path)); - try - { - Process::Execute ("xdg-open", args, 2000); + catch (exception &) {} } - catch (TimeOut&) { } - catch (exception &e) { ShowError (e); } - } - else - { - ShowWarning (wxT("Unable to find a file manager to open the mounted volume")); } + + ShowWarning(wxT("Unable to find a file manager to open the mounted volume.\n" + "Please install xdg-utils or set a default file manager.")); #endif } bool UserInterface::ProcessCommandLine () { @@ -1131,11 +1174,11 @@ namespace VeraCrypt " 1) Create an outer volume with no filesystem.\n" " 2) Create a hidden volume within the outer volume.\n" " 3) Mount the outer volume using hidden volume protection.\n" " 4) Create a filesystem on the virtual device of the outer volume.\n" " 5) Mount the new filesystem and fill it with data.\n" - " 6) Dismount the outer volume.\n" + " 6) Unmount the outer volume.\n" " If at any step the hidden volume protection is triggered, start again from 1).\n" "\n" "--create-keyfile[=FILE_PATH]\n" " Create a new keyfile containing pseudo-random data.\n" "\n" @@ -1143,13 +1186,13 @@ namespace VeraCrypt " Change a password and/or keyfile(s) of a volume. Most options are requested\n" " from the user if not specified on command line. PKCS-5 PRF HMAC hash\n" " algorithm can be changed with option --hash. See also options -k,\n" " --new-keyfiles, --new-password, -p, --random-source.\n" "\n" - "-d, --dismount[=MOUNTED_VOLUME]\n" - " Dismount a mounted volume. If MOUNTED_VOLUME is not specified, all\n" - " volumes are dismounted. See below for description of MOUNTED_VOLUME.\n" + "-u, --unmount[=MOUNTED_VOLUME]\n" + " Unmount a mounted volume. If MOUNTED_VOLUME is not specified, all\n" + " volumes are unmounted. See below for description of MOUNTED_VOLUME.\n" "\n" "--delete-token-keyfiles\n" " Delete keyfiles from security tokens. See also command --list-token-keyfiles.\n" "\n" "--export-token-keyfile\n" @@ -1216,11 +1259,11 @@ namespace VeraCrypt " with option -t. Default type is 'auto'. When creating a new volume, this\n" " option specifies the filesystem to be created on the new volume.\n" " Filesystem type 'none' disables mounting or creating a filesystem.\n" "\n" "--force\n" - " Force mounting of a volume in use, dismounting of a volume in use, or\n" + " Force mounting of a volume in use, unmounting of a volume in use, or\n" " overwriting a file. Note that this option has no effect on some platforms.\n" "\n" "--fs-options=OPTIONS\n" " Filesystem mount options. The OPTIONS argument is passed to mount(8)\n" " command with option -o when a filesystem on a VeraCrypt volume is mounted.\n" @@ -1252,11 +1295,11 @@ namespace VeraCrypt " headerbak: Use backup headers when mounting a volume.\n" " nokernelcrypto: Do not use kernel cryptographic services.\n" " readonly|ro: Mount volume as read-only.\n" " system: Mount partition using system encryption.\n" " timestamp|ts: Do not restore host-file modification timestamp when a volume\n" - " is dismounted (note that the operating system under certain circumstances\n" + " is unmounted (note that the operating system under certain circumstances\n" " does not alter host-file timestamps, which may be mistakenly interpreted\n" " to mean that this option does not work).\n" " See also option --fs-options.\n" "\n" "--new-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...]\n" @@ -1287,11 +1330,11 @@ namespace VeraCrypt " outer volume is mounted with all sectors belonging to the hidden volume\n" " protected against write operations. When a write to the protected area is\n" " prevented, the whole volume is switched to read-only mode. Verbose list\n" " (-v -l) can be used to query the state of the hidden volume protection.\n" " Warning message is displayed when a volume switched to read-only is being\n" - " dismounted.\n" + " unmounted.\n" "\n" "--protection-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...]\n" " Use specified keyfiles to open a hidden volume to be protected. This option\n" " may be used only when mounting an outer volume with hidden volume protected.\n" " See also options -k and --protect-hidden.\n" @@ -1308,11 +1351,11 @@ namespace VeraCrypt "--random-source=FILE\n" " Use FILE as a source of random data (e.g., when creating a volume) instead\n" " of requiring the user to type random characters.\n" "\n" "--slot=SLOT\n" - " Use specified slot number when mounting, dismounting, or listing a volume.\n" + " Use specified slot number when mounting, unmounting, or listing a volume.\n" "\n" "--size=SIZE[K|KiB|M|MiB|G|GiB|T|TiB] or --size=max\n" " Use specified size when creating a new volume. If no suffix is indicated,\n" " then SIZE is interpreted in bytes. Suffixes K, M, G or T can be used to\n" " indicate a value in KiB, MiB, GiB or TiB respectively.\n" @@ -1353,15 +1396,15 @@ namespace VeraCrypt "veracrypt --filesystem=none volume.hc\n" "\n" "Mount a volume prompting only for its password:\n" "veracrypt -t -k \"\" --pim=0 --protect-hidden=no volume.hc /media/veracrypt1\n" "\n" - "Dismount a volume:\n" - "veracrypt -d volume.hc\n" + "Unmount a volume:\n" + "veracrypt -u volume.hc\n" "\n" - "Dismount all mounted volumes:\n" - "veracrypt -d\n" + "Unmount all mounted volumes:\n" + "veracrypt -u\n" ); #ifndef TC_NO_GUI if (Application::GetUserInterfaceType() == UserInterfaceType::Graphic) { @@ -1514,11 +1557,11 @@ namespace VeraCrypt throw TestFailed (SRC_POS); EncryptionTest::TestAll(); // StringFormatter - if (StringFormatter (L"{9} {8} {7} {6} {5} {4} {3} {2} {1} {0} {{0}}", "1", L"2", '3', L'4', 5, 6, 7, 8, 9, 10) != L"10 9 8 7 6 5 4 3 2 1 {0}") + if (static_cast<wstring>(StringFormatter (L"{9} {8} {7} {6} {5} {4} {3} {2} {1} {0} {{0}}", "1", L"2", '3', L'4', 5, 6, 7, 8, 9, 10)) != L"10 9 8 7 6 5 4 3 2 1 {0}") throw TestFailed (SRC_POS); try { StringFormatter (L"{0} {1}", 1); throw TestFailed (SRC_POS); @@ -1612,10 +1655,17 @@ namespace VeraCrypt } return sResult; } +#ifdef TC_UNIX + bool UserInterface::InsecureMountAllowed () const + { + return CmdLine->ArgAllowInsecureMount; + } +#endif + #define VC_CONVERT_EXCEPTION(NAME) if (dynamic_cast<NAME*> (ex)) throw (NAME&) *ex; void UserInterface::ThrowException (Exception* ex) { VC_CONVERT_EXCEPTION (PasswordIncorrect); @@ -1700,8 +1750,11 @@ namespace VeraCrypt VC_CONVERT_EXCEPTION (EMVCPLCNotFound); VC_CONVERT_EXCEPTION (InvalidEMVPath); VC_CONVERT_EXCEPTION (EMVKeyfileDataNotFound); VC_CONVERT_EXCEPTION (EMVPANNotFound); + VC_CONVERT_EXCEPTION (MountPointBlocked); + VC_CONVERT_EXCEPTION (MountPointNotAllowed); + throw *ex; } } diff --git a/src/Main/UserInterface.h b/src/Main/UserInterface.h index 41415e9d..d04f0214 100644 --- a/src/Main/UserInterface.h +++ b/src/Main/UserInterface.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -84,11 +84,13 @@ namespace VeraCrypt virtual void Yield () const = 0; virtual WaitThreadUI* GetWaitThreadUI(WaitThreadRoutine *pRoutine) const { return new WaitThreadUI(pRoutine);} virtual wxDateTime VolumeTimeToDateTime (VolumeTime volumeTime) const { return wxDateTime ((time_t) (volumeTime / 1000ULL / 1000 / 10 - 134774ULL * 24 * 3600)); } virtual wxString VolumeTimeToString (VolumeTime volumeTime) const; virtual wxString VolumeTypeToString (VolumeType::Enum type, VolumeProtection::Enum protection) const; - +#ifdef TC_UNIX + virtual bool InsecureMountAllowed () const; +#endif Event PreferencesUpdatedEvent; struct BusyScope { BusyScope (const UserInterface *userInterface) : UI (userInterface) { UI->BeginBusyState (); } diff --git a/src/Main/UserInterfaceException.h b/src/Main/UserInterfaceException.h index 8a8c7a60..8886a655 100644 --- a/src/Main/UserInterfaceException.h +++ b/src/Main/UserInterfaceException.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/UserInterfaceType.h b/src/Main/UserInterfaceType.h index 41208ccb..0afa36a8 100644 --- a/src/Main/UserInterfaceType.h +++ b/src/Main/UserInterfaceType.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/UserPreferences.cpp b/src/Main/UserPreferences.cpp index b5a1f42c..d9d07b6d 100644 --- a/src/Main/UserPreferences.cpp +++ b/src/Main/UserPreferences.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -90,10 +90,11 @@ namespace VeraCrypt TC_CONFIG_SET (DismountOnScreenSaver); TC_CONFIG_SET (DisplayMessageAfterHotkeyDismount); TC_CONFIG_SET (BackgroundTaskEnabled); if (configMap.count(L"FilesystemOptions") > 0) { SetValue (configMap[L"FilesystemOptions"], DefaultMountOptions.FilesystemOptions); configMap.erase (L"FilesystemOptions"); } TC_CONFIG_SET (ForceAutoDismount); + TC_CONFIG_SET (Language); TC_CONFIG_SET (LastSelectedSlotNumber); TC_CONFIG_SET (MaxVolumeIdleTime); TC_CONFIG_SET (MountDevicesOnLogon); TC_CONFIG_SET (MountFavoritesOnLogon); @@ -212,10 +213,11 @@ namespace VeraCrypt TC_CONFIG_ADD (DismountOnScreenSaver); TC_CONFIG_ADD (DisplayMessageAfterHotkeyDismount); TC_CONFIG_ADD (BackgroundTaskEnabled); formatter.AddEntry (L"FilesystemOptions", DefaultMountOptions.FilesystemOptions); TC_CONFIG_ADD (ForceAutoDismount); + TC_CONFIG_ADD (Language); TC_CONFIG_ADD (LastSelectedSlotNumber); TC_CONFIG_ADD (MaxVolumeIdleTime); TC_CONFIG_ADD (MountDevicesOnLogon); TC_CONFIG_ADD (MountFavoritesOnLogon); formatter.AddEntry (L"MountVolumesReadOnly", DefaultMountOptions.Protection == VolumeProtection::ReadOnly); @@ -238,11 +240,11 @@ namespace VeraCrypt // add unknown config entries by iterating over all elements of the UnknownConfigMapEntries map for (map<wxString, wxString>::const_iterator it = UnknownConfigMapEntries.begin(); it != UnknownConfigMapEntries.end(); ++it) { formatter.AddEntry(it->first.c_str(), it->second); - } + } XmlWriter writer (Application::GetConfigFilePath (GetPreferencesFileName(), true)); writer.WriteNode (formatter.XmlConfig); writer.Close(); diff --git a/src/Main/UserPreferences.h b/src/Main/UserPreferences.h index 3f60b533..2c5cff9f 100644 --- a/src/Main/UserPreferences.h +++ b/src/Main/UserPreferences.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -37,10 +37,11 @@ namespace VeraCrypt DismountOnLogOff (true), DismountOnPowerSaving (false), DismountOnScreenSaver (false), DisplayMessageAfterHotkeyDismount (false), ForceAutoDismount (true), + Language (L"system"), LastSelectedSlotNumber (0), MaxVolumeIdleTime (60), MountDevicesOnLogon (false), MountFavoritesOnLogon (false), NonInteractive (false), @@ -79,10 +80,11 @@ namespace VeraCrypt bool DismountOnLogOff; bool DismountOnPowerSaving; bool DismountOnScreenSaver; bool DisplayMessageAfterHotkeyDismount; bool ForceAutoDismount; + wstring Language; uint64 LastSelectedSlotNumber; int32 MaxVolumeIdleTime; bool MountDevicesOnLogon; bool MountFavoritesOnLogon; bool NonInteractive; diff --git a/src/Main/VolumeHistory.cpp b/src/Main/VolumeHistory.cpp index ba33a04a..8b8c5f62 100644 --- a/src/Main/VolumeHistory.cpp +++ b/src/Main/VolumeHistory.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/VolumeHistory.h b/src/Main/VolumeHistory.h index fdbb099b..02d6bfe1 100644 --- a/src/Main/VolumeHistory.h +++ b/src/Main/VolumeHistory.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Main/Xml.cpp b/src/Main/Xml.cpp index 6d0faa18..e7efc39e 100644 --- a/src/Main/Xml.cpp +++ b/src/Main/Xml.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -106,11 +106,11 @@ namespace VeraCrypt if (MemOutStream.get()) { *TextOutStream << L"</VeraCrypt>" << endl; wxStreamBuffer *buf = MemOutStream->GetOutputStreamBuffer(); - OutFile.Write (ConstBufferPtr (reinterpret_cast <byte *> (buf->GetBufferStart()), buf->GetBufferSize())); + OutFile.Write (ConstBufferPtr (reinterpret_cast <uint8 *> (buf->GetBufferStart()), buf->GetBufferSize())); OutFile.Close(); TextOutStream.reset(); MemOutStream.reset(); } diff --git a/src/Main/Xml.h b/src/Main/Xml.h index 27f0b828..3d6dea67 100644 --- a/src/Main/Xml.h +++ b/src/Main/Xml.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Makefile b/src/Makefile index 4bea83b4..4f282e5a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -21,11 +21,12 @@ # VERBOSE: Enable verbose messages # WXSTATIC: Use static wxWidgets library # SSSE3: Enable SSSE3 support in compiler # SSE41: Enable SSE4.1 support in compiler # NOSSE2: Disable SEE2 support in compiler -# WITHGTK3: Build wxWidgets against GTK3 +# WOLFCRYPT: Build with wolfCrypt as crypto provider (see Crypto/wolfCrypt.md) +# WITHFUSET: Build with FUSE-T support on macOS instead of MacFUSE #------ Targets ------ # all # clean # wxbuild: Configure and build wxWidgets - source code must be located at $(WX_ROOT) @@ -49,20 +50,28 @@ C_CXX_FLAGS := -MMD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I export ASFLAGS := -D __GNUC__ -D __YASM__ export LFLAGS := export PKG_CONFIG ?= pkg-config export PKG_CONFIG_PATH ?= /usr/local/lib/pkgconfig +export VC_FUSE_PACKAGE := fuse +export VC_OSX_FUSET ?= 0 export WX_CONFIG ?= wx-config export WX_CONFIG_ARGS := --unicode WX_CONFIGURE_FLAGS := export WXCONFIG_CFLAGS := export WXCONFIG_CXXFLAGS := WX_ROOT ?= $(BASE_DIR)/wxWidgets export TC_BUILD_CONFIG := Release +ifeq "$(origin WITHFUSET)" "command line" + ifneq "$(WITHFUSET)" "0" + VC_OSX_FUSET := 1 + endif +endif + ifeq "$(origin DEBUG)" "command line" ifneq "$(DEBUG)" "0" TC_BUILD_CONFIG := Debug endif endif @@ -94,20 +103,10 @@ ifeq "$(origin WXSTATIC)" "command line" ifneq "$(WXSTATIC)" "FULL" export VC_WX_MINIMAL := 1 endif endif -ifeq "$(origin INDICATOR)" "command line" - ifneq (,$(findstring gtk3,$(shell $(WX_CONFIG) --selected-config))) - INDICATOR_LIBRARY=ayatana-appindicator3-0.1 - else - INDICATOR_LIBRARY=ayatana-appindicator-0.1 - endif - export AYATANA_LIBS += $(shell $(PKG_CONFIG) --libs $(INDICATOR_LIBRARY)) - C_CXX_FLAGS += $(shell $(PKG_CONFIG) --cflags $(INDICATOR_LIBRARY)) -DHAVE_INDICATORS -endif - #------ Release configuration ------ ifeq "$(TC_BUILD_CONFIG)" "Release" C_CXX_FLAGS += -O2 -fno-strict-aliasing # Do not enable strict aliasing @@ -143,13 +142,16 @@ export PLATFORM_ARCH := "Unknown" export PLATFORM_UNSUPPORTED := 0 export CPU_ARCH ?= unknown export SIMD_SUPPORTED := 0 export DISABLE_AESNI ?= 0 +export ENABLE_WOLFCRYPT ?= 0 export GCC_GTEQ_440 := 0 export GCC_GTEQ_430 := 0 +export GCC_GTEQ_500 := 0 +export GTK_VERSION := 0 ARCH ?= $(shell uname -m) ifneq (,$(filter i386 i486 i586 i686 x86,$(ARCH))) CPU_ARCH = x86 @@ -158,10 +160,13 @@ else ifneq (,$(filter x86_64 x86-64 amd64 x64,$(ARCH))) CPU_ARCH = x64 ASFLAGS += -f elf64 -D __BITS__=64 else ifneq (,$(filter armv7l,$(ARCH))) PLATFORM_ARCH := armv7 CPU_ARCH = armv7 +else ifneq (,$(filter aarch64 arm64 armv8l,$(ARCH))) + PLATFORM_ARCH := arm64 + CPU_ARCH = arm64 endif ifeq "$(origin NOASM)" "command line" CPU_ARCH = unknown C_CXX_FLAGS += -DCRYPTOPP_DISABLE_X86ASM @@ -183,19 +188,27 @@ endif ifeq "$(origin NOAESNI)" "command line" DISABLE_AESNI := 1 endif +ifeq "$(origin WOLFCRYPT)" "command line" + ENABLE_WOLFCRYPT := 1 + C_CXX_FLAGS += -DWOLFCRYPT_BACKEND + export LIBS += -lwolfssl + export LD_LIBRARY_PATH=/usr/local/lib +endif + #------ Linux configuration ------ ifeq "$(shell uname -s)" "Linux" PLATFORM := Linux C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX + LFLAGS += -rdynamic # PCSC - C_CXX_FLAGS += $(shell pkg-config --cflags libpcsclite) + C_CXX_FLAGS += $(shell $(PKG_CONFIG) --cflags libpcsclite) # Extract the major and minor version numbers of GCC in a combined format for easy comparison GCC_VERSION := $(shell $(CC) -dumpversion | awk -F. '{printf "%d%02d", $$1, $$2}') # Set the C++ standard based on the version numbers @@ -209,17 +222,24 @@ ifeq "$(shell uname -s)" "Linux" # GNU GCC version 11 and higher compile with -std=gnu++17 by default # which breaks "byte" definitions in Crypto++ library. So set -std=gnu++14 instead. CXXFLAGS += -std=gnu++14 endif + # Linked in GCC versions below 6 was setting large value for MAXPAGESIZE which is not good for ASLR security + # So, we need to manually add the linker flag "-z max-page-size=4096" to set the maximum page size to 4KB + # in order to improve ASLR security. Starting from GCC 6, the default value of MAXPAGESIZE is 4KB. + ifeq ($(shell expr $(GCC_VERSION) \< 600), 1) + LFLAGS += -Wl,-z,max-page-size=4096 + endif ifeq "$(SIMD_SUPPORTED)" "1" CFLAGS += -msse2 CXXFLAGS += -msse2 GCC_GTEQ_440 := $(shell expr `$(CC) -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/' -e 's/^[0-9]\{1,2\}$$/&0000/'` \>= 40400) GCC_GTEQ_430 := $(shell expr `$(CC) -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/' -e 's/^[0-9]\{1,2\}$$/&0000/'` \>= 40300) + GCC_GTEQ_500 := $(shell expr `$(CC) -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/' -e 's/^[0-9]\{1,2\}$$/&0000/'` \>= 50000) ifeq "$(DISABLE_AESNI)" "1" CFLAGS += -mno-aes -DCRYPTOPP_DISABLE_AESNI CXXFLAGS += -mno-aes -DCRYPTOPP_DISABLE_AESNI else @@ -268,33 +288,30 @@ ifeq "$(shell uname -s)" "Linux" CFLAGS += -mno-sse2 CXXFLAGS += -mno-sse2 WXCONFIG_CFLAGS += -mno-sse2 WXCONFIG_CXXFLAGS += -mno-sse2 endif - - ifeq "$(origin WITHGTK3)" "command line" - WX_CONFIGURE_FLAGS += --with-gtk=3 - else - WX_CONFIGURE_FLAGS += --with-gtk=2 - endif - endif #------ Mac OS X configuration ------ ifeq "$(shell uname -s)" "Darwin" PLATFORM := MacOSX APPNAME := VeraCrypt - export VC_OSX_TARGET ?= 10.7 - export VC_OSX_SDK ?= $(VC_OSX_TARGET) + export VC_OSX_TARGET ?= 12 + # use the output of the command "xcrun --show-sdk-version" to set the SDK version if not set + export VC_OSX_SDK ?= $(shell xcrun --show-sdk-version) #check to see if XCode 3 path exists.Otherwise, use XCode 4 path VC_OSX_SDK_PATH := /Developer/SDKs/MacOSX$(VC_OSX_SDK).sdk ifeq ($(wildcard $(VC_OSX_SDK_PATH)/SDKSettings.plist),) - VC_OSX_SDK_PATH := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(VC_OSX_SDK).sdk + VC_OSX_SDK_PATH := $(shell xcrun --sdk macosx$(VC_OSX_SDK) --show-sdk-path) + ifeq ($(VC_OSX_SDK_PATH),) +$(error Specified SDK version was not found, ensure your active developer directory is correct through xcode-select) + endif endif #----- Legacy build if OSX <= 10.8: we build both 32-bit and 64-bit ---- ifneq (,$(filter 10.6 10.7 10.8,$(VC_OSX_TARGET))) export VC_LEGACY_BUILD := 1 @@ -302,64 +319,91 @@ ifeq "$(shell uname -s)" "Darwin" CC := gcc CXX := g++ GCC_GTEQ_430 := 1 + GCC_GTEQ_500 := 1 + CXXFLAGS += -std=c++11 C_CXX_FLAGS += -DTC_UNIX -DTC_BSD -DTC_MACOSX -mmacosx-version-min=$(VC_OSX_TARGET) -isysroot $(VC_OSX_SDK_PATH) - LFLAGS += -mmacosx-version-min=$(VC_OSX_TARGET) -Wl,-syslibroot $(VC_OSX_SDK_PATH) + LFLAGS += -mmacosx-version-min=$(VC_OSX_TARGET) -Wl,-syslibroot $(VC_OSX_SDK_PATH) -Wl,-export_dynamic + # Xcode 15 linker emits a warning "no platform load command found" when linking object files generated by yasm + # To suppress this warning, we need to use -Wl,-ld_classic flag in order to use the old ld64 linker + # https://mjtsai.com/blog/2024/03/15/xcode-15-no-platform-load-command-found/ + # We can check whether newer linker is in use if ld -v reports dyld instead of ld64. + ifeq ($(shell xcrun --sdk macosx$(VC_OSX_SDK) ld -v 2>&1 | grep -oE 'PROJECT:[^-]+' | cut -d: -f2),dyld) + LFLAGS += -Wl,-ld_classic + endif + WX_CONFIGURE_FLAGS += --with-macosx-version-min=$(VC_OSX_TARGET) --with-macosx-sdk=$(VC_OSX_SDK_PATH) - ifeq "$(CPU_ARCH)" "x64" - CPU_ARCH = x86 - endif - - ifeq "$(CPU_ARCH)" "arm64" - CPU_ARCH = x86 + ifneq "$(VC_OSX_FUSET)" "0" + C_CXX_FLAGS += -DVC_MACOSX_FUSET + VC_FUSE_PACKAGE := fuse-t endif - CFLAGS += -msse2 - CXXFLAGS += -msse2 + export CFLAGS_ARM64 := $(CFLAGS) $(C_CXX_FLAGS) -arch arm64 -march=armv8-a+crypto + export CFLAGS_X64 := $(CFLAGS) $(C_CXX_FLAGS) -arch x86_64 - ifeq "$(origin SSSE3)" "command line" - CFLAGS += -mssse3 - CXXFLAGS += -mssse3 + # Set x86 assembly flags (-msse2, -mssse3, -msse4.1) + # Apply flags if SIMD_SUPPORTED is 1 or if not in local development build (we are creating universal binary in this case) + ifneq "$(LOCAL_DEVELOPMENT_BUILD)" "true" + SIMD_SUPPORTED = 1 endif - ifeq "$(origin SSE41)" "command line" - CFLAGS += -mssse3 -msse4.1 - CXXFLAGS += -mssse3 -msse4.1 + ifeq "$(SIMD_SUPPORTED)" "1" + CFLAGS += -msse2 + CXXFLAGS += -msse2 + + ifeq "$(origin SSSE3)" "command line" + CFLAGS += -mssse3 + CXXFLAGS += -mssse3 + endif + + ifeq "$(origin SSE41)" "command line" + CFLAGS += -mssse3 -msse4.1 + CXXFLAGS += -mssse3 -msse4.1 + endif endif - AS := $(BASE_DIR)/Build/Tools/MacOSX/yasm + AS ?= $(BASE_DIR)/Build/Tools/MacOSX/yasm export ASFLAGS32 := -D __GNUC__ -D __YASM__ -D __BITS__=32 --prefix=_ -f macho32 export ASFLAGS64 := -D __GNUC__ -D __YASM__ -D __BITS__=64 --prefix=_ -f macho64 ifeq "$(TC_BUILD_CONFIG)" "Release" - export DISABLE_PRECOMPILED_HEADERS := 1 + export DISABLE_PRECOMPILED_HEADERS := 1 - S := $(C_CXX_FLAGS) - C_CXX_FLAGS = $(subst -MMD,,$(S)) + C_CXX_FLAGS := $(subst -MMD,,$(C_CXX_FLAGS)) -gfull + LFLAGS += -Wl,-dead_strip - C_CXX_FLAGS += -gfull -arch x86_64 - LFLAGS += -Wl,-dead_strip -arch x86_64 - - WX_CONFIGURE_FLAGS += --without-libpng --disable-gif --disable-pcx --disable-tga --disable-iff --disable-gif --disable-svg + # Initialize architecture flag + ARCH_FLAG := -arch x86_64 - #----- Legacy build: we build both 32-bit and 64-bit ---- - ifdef VC_LEGACY_BUILD - C_CXX_FLAGS += -arch i386 - LFLAGS += -arch i386 - WX_CONFIGURE_FLAGS += --enable-universal_binary=i386,x86_64 + # Set architecture flags based on build type and CPU architecture + ifeq "$(LOCAL_DEVELOPMENT_BUILD)" "true" + ifeq "$(CPU_ARCH)" "arm64" + ARCH_FLAG := -arch arm64 + endif + WX_CONFIGURE_FLAGS += --disable-universal_binary else - CXXFLAGS += -std=c++11 - C_CXX_FLAGS += -arch arm64 - LFLAGS += -arch arm64 - WX_CONFIGURE_FLAGS += --enable-universal_binary=arm64,x86_64 + # Legacy build settings + ifdef VC_LEGACY_BUILD + ARCH_FLAG += -arch i386 + WX_CONFIGURE_FLAGS += --enable-universal_binary=i386,x86_64 + else + # Non-development build defaults to universal binary for arm64 and x86_64 + ARCH_FLAG += -arch arm64 + WX_CONFIGURE_FLAGS += --enable-universal_binary=arm64,x86_64 + endif endif + # Apply architecture flags + C_CXX_FLAGS += $(ARCH_FLAG) + LFLAGS += $(ARCH_FLAG) + + WX_CONFIGURE_FLAGS += --without-libpng --disable-gif --disable-pcx --disable-tga --disable-iff --disable-svg WXCONFIG_CFLAGS += -gfull WXCONFIG_CXXFLAGS += -gfull else @@ -375,18 +419,20 @@ endif ifeq "$(shell uname -s)" "FreeBSD" PLATFORM := FreeBSD PLATFORM_UNSUPPORTED := 1 C_CXX_FLAGS += -DTC_UNIX -DTC_BSD -DTC_FREEBSD + LFLAGS += -rdynamic # PCSC - C_CXX_FLAGS += $(shell pkg-config --cflags libpcsclite) + C_CXX_FLAGS += $(shell $(PKG_CONFIG) --cflags libpcsclite) CC := cc CXX := c++ GCC_GTEQ_430 := 1 + GCC_GTEQ_500 := 1 ifeq "$(TC_BUILD_CONFIG)" "Release" C_CXX_FLAGS += -fdata-sections -ffunction-sections -fpie LFLAGS += -Wl,--gc-sections -pie @@ -436,18 +482,20 @@ endif ifeq "$(shell uname -s)" "OpenBSD" PLATFORM := OpenBSD PLATFORM_UNSUPPORTED := 1 C_CXX_FLAGS += -DTC_UNIX -DTC_BSD -DTC_OPENBSD + LFLAGS += -rdynamic # PCSC - C_CXX_FLAGS += $(shell pkg-config --cflags libpcsclite) + C_CXX_FLAGS += $(shell $(PKG_CONFIG) --cflags libpcsclite) CC := cc CXX := c++ GCC_GTEQ_430 := 1 + GCC_GTEQ_500 := 1 ifeq "$(TC_BUILD_CONFIG)" "Release" C_CXX_FLAGS += -fdata-sections -ffunction-sections -fpie LFLAGS += -Wl,--gc-sections -pie @@ -465,14 +513,33 @@ ifeq "$(shell uname -s)" "SunOS" PLATFORM_UNSUPPORTED := 1 C_CXX_FLAGS += -DTC_UNIX -DTC_SOLARIS WX_CONFIGURE_FLAGS += --with-gtk # PCSC - C_CXX_FLAGS += $(shell pkg-config --cflags libpcsclite) + C_CXX_FLAGS += $(shell $(PKG_CONFIG) --cflags libpcsclite) endif +ifneq (,$(filter Linux FreeBSD OpenBSD,$(PLATFORM))) + # Determine GTK version + GTK_VERSION := $(shell $(PKG_CONFIG) --modversion gtk+-3.0 2>/dev/null | grep -o '^3' || echo 2) + ifeq ($(GTK_VERSION),3) + WX_CONFIGURE_FLAGS += --with-gtk=3 + else + WX_CONFIGURE_FLAGS += --with-gtk=2 + endif + + ifeq "$(origin INDICATOR)" "command line" + ifeq ($(GTK_VERSION),3) + INDICATOR_LIBRARY=ayatana-appindicator3-0.1 + else + INDICATOR_LIBRARY=ayatana-appindicator-0.1 + endif + export AYATANA_LIBS += $(shell $(PKG_CONFIG) --libs $(INDICATOR_LIBRARY)) + C_CXX_FLAGS += $(shell $(PKG_CONFIG) --cflags $(INDICATOR_LIBRARY)) -DHAVE_INDICATORS + endif +endif #------ Common configuration ------ CFLAGS := $(C_CXX_FLAGS) $(CFLAGS) $(TC_EXTRA_CFLAGS) CXXFLAGS := $(C_CXX_FLAGS) $(CXXFLAGS) $(TC_EXTRA_CXXFLAGS) @@ -496,18 +563,23 @@ WX_CONFIGURE_FLAGS += --disable-protocol --disable-protocols --disable-url --dis --without-gtkprint --without-gnomevfs --disable-fsvolume --disable-fswatcher \ --disable-sound --disable-mediactrl --disable-joystick --disable-apple_ieee \ --disable-gif --disable-pcx --disable-tga --disable-iff --disable-gif --disable-pnm --disable-svg \ --without-expat --without-libtiff --without-libjpeg --without-libpng -without-regex --without-zlib -ifeq "$(PLATFORM)" "Linux" +ifneq (,$(filter Linux FreeBSD,$(PLATFORM))) WX_CONFIGURE_FLAGS += --disable-tooltips -ifneq "$(origin WITHGTK3)" "command line" +ifneq ($(GTK_VERSION),3) WX_CONFIGURE_FLAGS += --disable-graphics_ctx endif else WX_CONFIGURE_FLAGS += --disable-graphics_ctx endif +else +# Disable libtiff on macOS +ifeq "$(PLATFORM)" "MacOSX" + WX_CONFIGURE_FLAGS += --without-libtiff +endif endif #------ Project build ------ diff --git a/src/Mount/Favorites.cpp b/src/Mount/Favorites.cpp index 93b7a5a6..5794f6cb 100644 --- a/src/Mount/Favorites.cpp +++ b/src/Mount/Favorites.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -450,17 +450,17 @@ namespace VeraCrypt EndDialog (hwndDlg, IDCLOSE); return 1; case WM_CTLCOLORSTATIC: { HDC hdc = (HDC) wParam; - HWND hw = (HWND) lParam; - if (hw == GetDlgItem(hwndDlg, IDC_FAVORITE_VOLUME_ID)) + HWND hwnd = (HWND) lParam; + if (hwnd == GetDlgItem(hwndDlg, IDC_FAVORITE_VOLUME_ID)) { // This the favorite ID field. Make its background like normal edit HBRUSH hbr = GetSysColorBrush (COLOR_WINDOW); ::SelectObject(hdc, hbr); - return (BOOL) hbr; + return (BOOL)(INT_PTR)hbr; } } break; } @@ -615,11 +615,11 @@ namespace VeraCrypt char label[1024]; XmlGetAttributeText (xml, "ID", label, sizeof (label)); if (strlen (label) == (2*VOLUME_ID_SIZE)) { - std::vector<byte> arr; + std::vector<uint8> arr; if (HexWideStringToArray (Utf8StringToWide (label).c_str(), arr) && arr.size() == VOLUME_ID_SIZE) { memcpy (favorite.VolumeID, &arr[0], VOLUME_ID_SIZE); } } @@ -729,21 +729,21 @@ namespace VeraCrypt { FillFavoriteVolumesMenu(); FavoritesOnArrivalMountRequired.clear(); - foreach (const FavoriteVolume favorite, FavoriteVolumes) + for (const FavoriteVolume favorite: FavoriteVolumes) { if (favorite.MountOnArrival) { FavoritesOnArrivalMountRequired.push_back (favorite); if (IsMountedVolume (favorite.Path.c_str())) { bool present = false; - foreach (const FavoriteVolume favoriteConnected, FavoritesMountedOnArrivalStillConnected) + for (const FavoriteVolume favoriteConnected: FavoritesMountedOnArrivalStillConnected) { if (favorite.Path == favoriteConnected.Path) { present = true; break; diff --git a/src/Mount/Favorites.h b/src/Mount/Favorites.h index 9384cbc8..534706b3 100644 --- a/src/Mount/Favorites.h +++ b/src/Mount/Favorites.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Mount/Hotkeys.c b/src/Mount/Hotkeys.c index 9af4c628..3ab0bd92 100644 --- a/src/Mount/Hotkeys.c +++ b/src/Mount/Hotkeys.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -252,28 +252,28 @@ static void DisplayHotkeyList (HWND hwndDlg) case HK_AUTOMOUNT_DEVICES: item.pszText = GetString ("HK_AUTOMOUNT_DEVICES"); break; - case HK_DISMOUNT_ALL: - item.pszText = GetString ("HK_DISMOUNT_ALL"); + case HK_UNMOUNT_ALL: + item.pszText = GetString ("HK_UNMOUNT_ALL"); break; case HK_WIPE_CACHE: item.pszText = GetString ("HK_WIPE_CACHE"); break; - case HK_DISMOUNT_ALL_AND_WIPE: - item.pszText = GetString ("HK_DISMOUNT_ALL_AND_WIPE"); + case HK_UNMOUNT_ALL_AND_WIPE: + item.pszText = GetString ("HK_UNMOUNT_ALL_AND_WIPE"); break; - case HK_FORCE_DISMOUNT_ALL_AND_WIPE: - item.pszText = GetString ("HK_FORCE_DISMOUNT_ALL_AND_WIPE"); + case HK_FORCE_UNMOUNT_ALL_AND_WIPE: + item.pszText = GetString ("HK_FORCE_UNMOUNT_ALL_AND_WIPE"); break; - case HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT: - item.pszText = GetString ("HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT"); + case HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT: + item.pszText = GetString ("HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT"); break; case HK_MOUNT_FAVORITE_VOLUMES: item.pszText = GetString ("HK_MOUNT_FAVORITE_VOLUMES"); break; @@ -376,12 +376,12 @@ BOOL CALLBACK HotkeysDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar SetCheckBox (hwndDlg, IDC_HK_MOD_CTRL, TRUE); SetCheckBox (hwndDlg, IDC_HK_MOD_SHIFT, FALSE); SetCheckBox (hwndDlg, IDC_HK_MOD_ALT, TRUE); SetCheckBox (hwndDlg, IDC_HK_MOD_WIN, FALSE); - SetCheckBox (hwndDlg, IDC_HK_DISMOUNT_PLAY_SOUND, bPlaySoundOnSuccessfulHkDismount); - SetCheckBox (hwndDlg, IDC_HK_DISMOUNT_BALLOON_TOOLTIP, bDisplayBalloonOnSuccessfulHkDismount); + SetCheckBox (hwndDlg, IDC_HK_UNMOUNT_PLAY_SOUND, bPlaySoundOnSuccessfulHkDismount); + SetCheckBox (hwndDlg, IDC_HK_UNMOUNT_BALLOON_TOOLTIP, bDisplayBalloonOnSuccessfulHkDismount); bTPlaySoundOnSuccessfulHkDismount = bPlaySoundOnSuccessfulHkDismount; bTDisplayBalloonOnSuccessfulHkDismount = bDisplayBalloonOnSuccessfulHkDismount; EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_ASSIGN), FALSE); @@ -559,18 +559,18 @@ BOOL CALLBACK HotkeysDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar memset (vkeysDown, 0, sizeof(vkeysDown)); DisplayHotkeyList(hwndDlg); return 1; } - if (lw == IDC_HK_DISMOUNT_PLAY_SOUND) + if (lw == IDC_HK_UNMOUNT_PLAY_SOUND) { - bTPlaySoundOnSuccessfulHkDismount = GetCheckBox (hwndDlg, IDC_HK_DISMOUNT_PLAY_SOUND); + bTPlaySoundOnSuccessfulHkDismount = GetCheckBox (hwndDlg, IDC_HK_UNMOUNT_PLAY_SOUND); } - if (lw == IDC_HK_DISMOUNT_BALLOON_TOOLTIP) + if (lw == IDC_HK_UNMOUNT_BALLOON_TOOLTIP) { - bTDisplayBalloonOnSuccessfulHkDismount = GetCheckBox (hwndDlg, IDC_HK_DISMOUNT_BALLOON_TOOLTIP); + bTDisplayBalloonOnSuccessfulHkDismount = GetCheckBox (hwndDlg, IDC_HK_UNMOUNT_BALLOON_TOOLTIP); } if (lw == IDCANCEL || lw == IDCLOSE) { KillTimer (hwndDlg, 0xfe); diff --git a/src/Mount/Hotkeys.h b/src/Mount/Hotkeys.h index 731f9549..ab90d6be 100644 --- a/src/Mount/Hotkeys.h +++ b/src/Mount/Hotkeys.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -22,14 +22,14 @@ enum LoadSettings() HandleHotKey() */ HK_AUTOMOUNT_DEVICES = 0, HK_CLOSE_SECURITY_TOKEN_SESSIONS, - HK_DISMOUNT_ALL, - HK_DISMOUNT_ALL_AND_WIPE, - HK_FORCE_DISMOUNT_ALL_AND_WIPE, - HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT, + HK_UNMOUNT_ALL, + HK_UNMOUNT_ALL_AND_WIPE, + HK_FORCE_UNMOUNT_ALL_AND_WIPE, + HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT, HK_MOUNT_FAVORITE_VOLUMES, HK_SHOW_HIDE_MAIN_WINDOW, HK_WIPE_CACHE, NBR_HOTKEYS }; diff --git a/src/Mount/MainCom.cpp b/src/Mount/MainCom.cpp index ce6803ac..5ccbf3e1 100644 --- a/src/Mount/MainCom.cpp +++ b/src/Mount/MainCom.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Mount/MainCom.h b/src/Mount/MainCom.h index aeafa549..419d6beb 100644 --- a/src/Mount/MainCom.h +++ b/src/Mount/MainCom.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 76de34b6..f6d1bc86 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -173,11 +173,11 @@ BOOL CmdMountOptionsValid = FALSE; MountOptions mountOptions; MountOptions defaultMountOptions; KeyFile *FirstCmdKeyFile = NULL; HBITMAP hbmLogoBitmapRescaled = NULL; -wchar_t OrigKeyboardLayout [8+1] = L"00000409"; +wchar_t OrigKeyboardLayout [KL_NAMELENGTH] = L"00000409"; BOOL bKeyboardLayoutChanged = FALSE; /* TRUE if the keyboard layout was changed to the standard US keyboard layout (from any other layout). */ BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informed that it is not possible to type characters by pressing keys while the right Alt key is held down. */ static KeyFilesDlgParam hidVolProtKeyFilesParam = {0}; @@ -700,11 +700,13 @@ void EnableDisableButtons (HWND hwndDlg) EnableMenuItem (GetMenu (hwndDlg), IDM_UNMOUNT_VOLUME, MF_GRAYED); break; case TC_MLIST_ITEM_FREE: default: +#if !defined(VCEXPANDER) EnableSplitButton(hwndDlg, IDOK); +#endif SetWindowTextW (hOKButton, GetString ("MOUNT_BUTTON")); // Invalid the button IDOK so that it will be redrawn InvalidateRect (hOKButton, NULL, TRUE); EnableWindow (GetDlgItem (hwndDlg, IDC_VOLUME_PROPERTIES), FALSE); EnableMenuItem (GetMenu (hwndDlg), IDM_VOLUME_PROPERTIES, MF_GRAYED); @@ -1054,20 +1056,20 @@ void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified, BOOL* // Hotkeys ConfigReadCompareInt ("PlaySoundOnHotkeyMountDismount", TRUE, &bPlaySoundOnSuccessfulHkDismount, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("DisplayMsgBoxOnHotkeyDismount", TRUE, &bDisplayBalloonOnSuccessfulHkDismount, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyModAutoMountDevices", 0, (int*) &Hotkeys [HK_AUTOMOUNT_DEVICES].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyCodeAutoMountDevices", 0, (int*) &Hotkeys [HK_AUTOMOUNT_DEVICES].vKeyCode, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyModDismountAll", 0, (int*) &Hotkeys [HK_DISMOUNT_ALL].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyCodeDismountAll", 0, (int*) &Hotkeys [HK_DISMOUNT_ALL].vKeyCode, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyModDismountAll", 0, (int*) &Hotkeys [HK_UNMOUNT_ALL].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyCodeDismountAll", 0, (int*) &Hotkeys [HK_UNMOUNT_ALL].vKeyCode, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyModWipeCache", 0, (int*) &Hotkeys [HK_WIPE_CACHE].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyCodeWipeCache", 0, (int*) &Hotkeys [HK_WIPE_CACHE].vKeyCode, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyModDismountAllWipe", 0, (int*) &Hotkeys [HK_DISMOUNT_ALL_AND_WIPE].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyCodeDismountAllWipe", 0, (int*) &Hotkeys [HK_DISMOUNT_ALL_AND_WIPE].vKeyCode, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyModForceDismountAllWipe", 0, (int*) &Hotkeys [HK_FORCE_DISMOUNT_ALL_AND_WIPE].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyCodeForceDismountAllWipe", 0, (int*) &Hotkeys [HK_FORCE_DISMOUNT_ALL_AND_WIPE].vKeyCode, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyModForceDismountAllWipeExit", 0, (int*) &Hotkeys [HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); - ConfigReadCompareInt ("HotkeyCodeForceDismountAllWipeExit", 0, (int*) &Hotkeys [HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyCode, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyModDismountAllWipe", 0, (int*) &Hotkeys [HK_UNMOUNT_ALL_AND_WIPE].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyCodeDismountAllWipe", 0, (int*) &Hotkeys [HK_UNMOUNT_ALL_AND_WIPE].vKeyCode, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyModForceDismountAllWipe", 0, (int*) &Hotkeys [HK_FORCE_UNMOUNT_ALL_AND_WIPE].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyCodeForceDismountAllWipe", 0, (int*) &Hotkeys [HK_FORCE_UNMOUNT_ALL_AND_WIPE].vKeyCode, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyModForceDismountAllWipeExit", 0, (int*) &Hotkeys [HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HotkeyCodeForceDismountAllWipeExit", 0, (int*) &Hotkeys [HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyCode, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyModMountFavoriteVolumes", 0, (int*) &Hotkeys [HK_MOUNT_FAVORITE_VOLUMES].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyCodeMountFavoriteVolumes", 0, (int*) &Hotkeys [HK_MOUNT_FAVORITE_VOLUMES].vKeyCode, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyModShowHideMainWindow", 0, (int*) &Hotkeys [HK_SHOW_HIDE_MAIN_WINDOW].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyCodeShowHideMainWindow", 0, (int*) &Hotkeys [HK_SHOW_HIDE_MAIN_WINDOW].vKeyCode, bOnlyCheckModified, pbSettingsModified); ConfigReadCompareInt ("HotkeyModCloseSecurityTokenSessions", 0, (int*) &Hotkeys [HK_CLOSE_SECURITY_TOKEN_SESSIONS].vKeyModifiers, bOnlyCheckModified, pbSettingsModified); @@ -1189,20 +1191,20 @@ void SaveSettings (HWND hwndDlg) ConfigWriteInt ("EMVSupportEnabled", EMVSupportEnabled); // Hotkeys ConfigWriteInt ("HotkeyModAutoMountDevices", Hotkeys[HK_AUTOMOUNT_DEVICES].vKeyModifiers); ConfigWriteInt ("HotkeyCodeAutoMountDevices", Hotkeys[HK_AUTOMOUNT_DEVICES].vKeyCode); - ConfigWriteInt ("HotkeyModDismountAll", Hotkeys[HK_DISMOUNT_ALL].vKeyModifiers); - ConfigWriteInt ("HotkeyCodeDismountAll", Hotkeys[HK_DISMOUNT_ALL].vKeyCode); + ConfigWriteInt ("HotkeyModDismountAll", Hotkeys[HK_UNMOUNT_ALL].vKeyModifiers); + ConfigWriteInt ("HotkeyCodeDismountAll", Hotkeys[HK_UNMOUNT_ALL].vKeyCode); ConfigWriteInt ("HotkeyModWipeCache", Hotkeys[HK_WIPE_CACHE].vKeyModifiers); ConfigWriteInt ("HotkeyCodeWipeCache", Hotkeys[HK_WIPE_CACHE].vKeyCode); - ConfigWriteInt ("HotkeyModDismountAllWipe", Hotkeys[HK_DISMOUNT_ALL_AND_WIPE].vKeyModifiers); - ConfigWriteInt ("HotkeyCodeDismountAllWipe", Hotkeys[HK_DISMOUNT_ALL_AND_WIPE].vKeyCode); - ConfigWriteInt ("HotkeyModForceDismountAllWipe", Hotkeys[HK_FORCE_DISMOUNT_ALL_AND_WIPE].vKeyModifiers); - ConfigWriteInt ("HotkeyCodeForceDismountAllWipe", Hotkeys[HK_FORCE_DISMOUNT_ALL_AND_WIPE].vKeyCode); - ConfigWriteInt ("HotkeyModForceDismountAllWipeExit", Hotkeys[HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyModifiers); - ConfigWriteInt ("HotkeyCodeForceDismountAllWipeExit", Hotkeys[HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyCode); + ConfigWriteInt ("HotkeyModDismountAllWipe", Hotkeys[HK_UNMOUNT_ALL_AND_WIPE].vKeyModifiers); + ConfigWriteInt ("HotkeyCodeDismountAllWipe", Hotkeys[HK_UNMOUNT_ALL_AND_WIPE].vKeyCode); + ConfigWriteInt ("HotkeyModForceDismountAllWipe", Hotkeys[HK_FORCE_UNMOUNT_ALL_AND_WIPE].vKeyModifiers); + ConfigWriteInt ("HotkeyCodeForceDismountAllWipe", Hotkeys[HK_FORCE_UNMOUNT_ALL_AND_WIPE].vKeyCode); + ConfigWriteInt ("HotkeyModForceDismountAllWipeExit", Hotkeys[HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyModifiers); + ConfigWriteInt ("HotkeyCodeForceDismountAllWipeExit", Hotkeys[HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT].vKeyCode); ConfigWriteInt ("HotkeyModMountFavoriteVolumes", Hotkeys[HK_MOUNT_FAVORITE_VOLUMES].vKeyModifiers); ConfigWriteInt ("HotkeyCodeMountFavoriteVolumes", Hotkeys[HK_MOUNT_FAVORITE_VOLUMES].vKeyCode); ConfigWriteInt ("HotkeyModShowHideMainWindow", Hotkeys[HK_SHOW_HIDE_MAIN_WINDOW].vKeyModifiers); ConfigWriteInt ("HotkeyCodeShowHideMainWindow", Hotkeys[HK_SHOW_HIDE_MAIN_WINDOW].vKeyCode); ConfigWriteInt ("HotkeyModCloseSecurityTokenSessions", Hotkeys[HK_CLOSE_SECURITY_TOKEN_SESSIONS].vKeyModifiers); @@ -1257,10 +1259,24 @@ static BOOL SysEncryptionOrDecryptionRequired (void) ) ) ); } +// Returns TRUE if system encryption master key is vulnerable +static BOOL SysEncryptionMasterKeyVulnerable (void) +{ + try + { + BootEncStatus = BootEncObj->GetStatus(); + return (BootEncStatus.DriveMounted || BootEncStatus.DriveEncrypted) && BootEncStatus.MasterKeyVulnerable; + } + catch (Exception &) + { + return FALSE; + } +} + // Returns TRUE if the system partition/drive is completely encrypted static BOOL SysDriveOrPartitionFullyEncrypted (BOOL bSilent) { /* If you update this function, revise SysDriveOrPartitionFullyEncrypted() in Tcformat.c as well. */ @@ -1702,11 +1718,11 @@ static void LaunchVolExpander (HWND hwndDlg) *tmp = 0; StringCbCatW (t, sizeof(t), expanderExeName); if (!FileExists(t)) Error ("VOL_EXPANDER_NOT_FOUND", hwndDlg); // Display a user-friendly error message and advise what to do - else if (((int)ShellExecuteW (NULL, (!IsAdmin() && IsUacSupported()) ? L"runas" : L"open", t, NULL, NULL, SW_SHOW)) <= 32) + else if (((INT_PTR)ShellExecuteW (NULL, (!IsAdmin() && IsUacSupported()) ? L"runas" : L"open", t, NULL, NULL, SW_SHOW)) <= 32) { handleWin32Error (hwndDlg, SRC_POS); } } } @@ -2027,16 +2043,16 @@ void LoadDriveLetters (HWND hwndDlg, HWND hTree, int drive) if (driver.volumeType[i] == PROP_VOL_TYPE_OUTER_VOL_WRITE_PREVENTED) // Normal/outer volume (hidden volume protected AND write denied) { if (!VolumeNotificationsList.bHidVolDamagePrevReported[i]) { - wchar_t szTmp[4096]; + wchar_t szMsgTmp[4096]; VolumeNotificationsList.bHidVolDamagePrevReported[i] = TRUE; - StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("DAMAGE_TO_HIDDEN_VOLUME_PREVENTED"), i+L'A'); + StringCbPrintfW (szMsgTmp, sizeof(szMsgTmp), GetString ("DAMAGE_TO_HIDDEN_VOLUME_PREVENTED"), i+L'A'); SetForegroundWindow (GetParent(hTree)); - MessageBoxW (GetParent(hTree), szTmp, lpszTitle, MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST); + MessageBoxW (GetParent(hTree), szMsgTmp, lpszTitle, MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST); } } else { VolumeNotificationsList.bHidVolDamagePrevReported[i] = FALSE; @@ -2421,13 +2437,13 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR { ToBootPwdField (hwndDlg, IDC_PASSWORD); ToBootPwdField (hwndDlg, IDC_VERIFY); ToBootPwdField (hwndDlg, IDC_OLD_PASSWORD); - if ((DWORD) GetKeyboardLayout (NULL) != 0x00000409 && (DWORD) GetKeyboardLayout (NULL) != 0x04090409) + if ((DWORD)(DWORD_PTR)GetKeyboardLayout (NULL) != 0x00000409 && (DWORD)(DWORD_PTR)GetKeyboardLayout (NULL) != 0x04090409) { - DWORD keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + DWORD keybLayout = (DWORD)(DWORD_PTR)LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg); EndDialog (hwndDlg, IDCANCEL); @@ -2478,11 +2494,11 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR switch (wParam) { case TIMER_ID_KEYB_LAYOUT_GUARD: if (bSysEncPwdChangeDlgMode) { - DWORD keybLayout = (DWORD) GetKeyboardLayout (NULL); + DWORD keybLayout = (DWORD)(DWORD_PTR)GetKeyboardLayout (NULL); /* Watch the keyboard layout */ if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { @@ -2498,11 +2514,11 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetWindowText (GetDlgItem (hwndDlg, IDC_OLD_PASSWORD), L""); SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), L""); SetWindowText (GetDlgItem (hwndDlg, IDC_VERIFY), L""); - keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + keybLayout = (DWORD)(DWORD_PTR)LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD); Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg); @@ -2547,11 +2563,11 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR // we're about to draw the static // set the text colour in (HDC)lParam SetBkMode((HDC)wParam,TRANSPARENT); SetTextColor((HDC)wParam, RGB(255,0,0)); // NOTE: per documentation as pointed out by selbie, GetSolidBrush would leak a GDI handle. - return (BOOL)GetSysColorBrush(COLOR_MENU); + return (BOOL)(INT_PTR)GetSysColorBrush(COLOR_MENU); } } return 0; case WM_COMMAND: @@ -2733,11 +2749,11 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int new_hash_algo_id = (int) SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0); if (new_hash_algo_id != 0 && !bSystemIsGPT && !HashForSystemEncryption(new_hash_algo_id)) { - int new_hash_algo_id = DEFAULT_HASH_ALGORITHM_BOOT; + new_hash_algo_id = DEFAULT_HASH_ALGORITHM_BOOT; Info ("ALGO_NOT_SUPPORTED_FOR_SYS_ENCRYPTION", hwndDlg); SelectAlgo (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), &new_hash_algo_id); } } break; @@ -3097,13 +3113,16 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa wmemset (tmp, L'X', MAX_PASSWORD); tmp [MAX_PASSWORD] = 0; SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp); SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), L""); - StringCbPrintfW (OrigKeyboardLayout, sizeof(OrigKeyboardLayout),L"%08X", (DWORD) GetKeyboardLayout (NULL) & 0xFFFF); + if (!GetKeyboardLayoutNameW(OrigKeyboardLayout)) + { + StringCbPrintfW(OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD)(DWORD_PTR)GetKeyboardLayout(NULL) & 0xFFFF); + } - DWORD keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + DWORD keybLayout = (DWORD) (DWORD_PTR) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg); /* don't be too agressive on enforcing an English keyboard layout. E.g. on WindowsPE this call fails and @@ -3155,11 +3174,11 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa KillTimer (hwndDlg, TIMER_ID_CHECK_FOREGROUND); return 0; case TIMER_ID_KEYB_LAYOUT_GUARD: if (bPrebootPasswordDlgMode) { - DWORD keybLayout = (DWORD) GetKeyboardLayout (NULL); + DWORD keybLayout = (DWORD)(DWORD_PTR)GetKeyboardLayout (NULL); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { // Keyboard layout is not standard US @@ -3168,11 +3187,11 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa wmemset (tmp, L'X', MAX_PASSWORD); tmp [MAX_PASSWORD] = 0; SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp); SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), L""); - keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); + keybLayout = (DWORD)(DWORD_PTR) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE); if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD); Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg); @@ -3367,28 +3386,28 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa } static void PreferencesDlgEnableButtons (HWND hwndDlg) { BOOL back = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_BKG_TASK_ENABLE)); - BOOL idle = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE)); + BOOL idle = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE)); BOOL installed = !IsNonInstallMode(); BOOL wtsEnabled = (hWtsLib != NULL) ? TRUE : FALSE; EnableWindow (GetDlgItem (hwndDlg, IDC_CLOSE_BKG_TASK_WHEN_NOVOL), back && installed); EnableWindow (GetDlgItem (hwndDlg, IDT_LOGON), installed); EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_LOGON_START), back && installed); EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_LOGON_MOUNT_DEVICES), installed); - EnableWindow (GetDlgItem (hwndDlg, IDT_AUTO_DISMOUNT), back); - EnableWindow (GetDlgItem (hwndDlg, IDT_AUTO_DISMOUNT_ON), back); + EnableWindow (GetDlgItem (hwndDlg, IDT_AUTO_UNMOUNT), back); + EnableWindow (GetDlgItem (hwndDlg, IDT_AUTO_UNMOUNT_ON), back); EnableWindow (GetDlgItem (hwndDlg, IDT_MINUTES), back); - EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF), back); - EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED), back && wtsEnabled); - EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING), back); - EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SCREENSAVER), back); - EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE), back); - EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE_TIME), back && idle); - EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT), back); + EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_LOGOFF), back); + EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SESSION_LOCKED), back && wtsEnabled); + EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_POWERSAVING), back); + EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SCREENSAVER), back); + EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE), back); + EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE_TIME), back && idle); + EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_UNMOUNT), back); } BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { static BOOL PreferencesDialogActive = FALSE; @@ -3438,11 +3457,11 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM bCacheDuringMultipleMount ? BST_CHECKED:BST_UNCHECKED, 0); SendMessage (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_EXIT), BM_SETCHECK, bWipeCacheOnExit ? BST_CHECKED:BST_UNCHECKED, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT), BM_SETCHECK, + SendMessage (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT), BM_SETCHECK, bWipeCacheOnAutoDismount ? BST_CHECKED:BST_UNCHECKED, 0); SendMessage (GetDlgItem (hwndDlg, IDC_PREF_CACHE_PASSWORDS), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0); @@ -3465,29 +3484,29 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM bEnableBkgTask ? BST_CHECKED:BST_UNCHECKED, 0); SendMessage (GetDlgItem (hwndDlg, IDC_CLOSE_BKG_TASK_WHEN_NOVOL), BM_SETCHECK, bCloseBkgTaskWhenNoVolumes || IsNonInstallMode() ? BST_CHECKED:BST_UNCHECKED, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF), BM_SETCHECK, + SendMessage (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_LOGOFF), BM_SETCHECK, bDismountOnLogOff ? BST_CHECKED:BST_UNCHECKED, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED), BM_SETCHECK, + SendMessage (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SESSION_LOCKED), BM_SETCHECK, bDismountOnSessionLocked ? BST_CHECKED:BST_UNCHECKED, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING), BM_SETCHECK, + SendMessage (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_POWERSAVING), BM_SETCHECK, bDismountOnPowerSaving ? BST_CHECKED:BST_UNCHECKED, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SCREENSAVER), BM_SETCHECK, + SendMessage (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SCREENSAVER), BM_SETCHECK, bDismountOnScreenSaver ? BST_CHECKED:BST_UNCHECKED, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT), BM_SETCHECK, + SendMessage (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_UNMOUNT), BM_SETCHECK, bForceAutoDismount ? BST_CHECKED:BST_UNCHECKED, 0); - SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE), BM_SETCHECK, + SendMessage (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE), BM_SETCHECK, MaxVolumeIdleTime > 0 ? BST_CHECKED:BST_UNCHECKED, 0); - SetDlgItemInt (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE_TIME, abs (MaxVolumeIdleTime), FALSE); + SetDlgItemInt (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE_TIME, abs (MaxVolumeIdleTime), FALSE); PreferencesDlgEnableButtons (hwndDlg); } return 0; @@ -3498,41 +3517,41 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (AskWarnNoYes ("CONFIRM_BACKGROUND_TASK_DISABLED", hwndDlg) == IDNO) SetCheckBox (hwndDlg, IDC_PREF_BKG_TASK_ENABLE, TRUE); } // Forced dismount disabled warning - if (lw == IDC_PREF_DISMOUNT_INACTIVE - || lw == IDC_PREF_DISMOUNT_LOGOFF - || lw == IDC_PREF_DISMOUNT_SESSION_LOCKED - || lw == IDC_PREF_DISMOUNT_POWERSAVING - || lw == IDC_PREF_DISMOUNT_SCREENSAVER - || lw == IDC_PREF_FORCE_AUTO_DISMOUNT) - { - BOOL i = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE)); - BOOL l = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF)); - BOOL sl = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED)); - BOOL p = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING)); - BOOL s = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SCREENSAVER)); - BOOL q = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT)); + if (lw == IDC_PREF_UNMOUNT_INACTIVE + || lw == IDC_PREF_UNMOUNT_LOGOFF + || lw == IDC_PREF_UNMOUNT_SESSION_LOCKED + || lw == IDC_PREF_UNMOUNT_POWERSAVING + || lw == IDC_PREF_UNMOUNT_SCREENSAVER + || lw == IDC_PREF_FORCE_AUTO_UNMOUNT) + { + BOOL i = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE)); + BOOL l = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_LOGOFF)); + BOOL sl = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SESSION_LOCKED)); + BOOL p = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_POWERSAVING)); + BOOL s = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SCREENSAVER)); + BOOL q = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_UNMOUNT)); if (!q) { - if (lw == IDC_PREF_FORCE_AUTO_DISMOUNT && (i || l || sl || p || s)) + if (lw == IDC_PREF_FORCE_AUTO_UNMOUNT && (i || l || sl || p || s)) { - if (AskWarnNoYes ("CONFIRM_NO_FORCED_AUTODISMOUNT", hwndDlg) == IDNO) - SetCheckBox (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT, TRUE); + if (AskWarnNoYes ("CONFIRM_NO_FORCED_AUTOUNMOUNT", hwndDlg) == IDNO) + SetCheckBox (hwndDlg, IDC_PREF_FORCE_AUTO_UNMOUNT, TRUE); } - else if ((lw == IDC_PREF_DISMOUNT_INACTIVE && i - || lw == IDC_PREF_DISMOUNT_LOGOFF && l - || lw == IDC_PREF_DISMOUNT_SESSION_LOCKED && sl - || lw == IDC_PREF_DISMOUNT_POWERSAVING && p - || lw == IDC_PREF_DISMOUNT_SCREENSAVER && s)) - Warning ("WARN_PREF_AUTO_DISMOUNT", hwndDlg); + else if ((lw == IDC_PREF_UNMOUNT_INACTIVE && i + || lw == IDC_PREF_UNMOUNT_LOGOFF && l + || lw == IDC_PREF_UNMOUNT_SESSION_LOCKED && sl + || lw == IDC_PREF_UNMOUNT_POWERSAVING && p + || lw == IDC_PREF_UNMOUNT_SCREENSAVER && s)) + Warning ("WARN_PREF_AUTO_UNMOUNT", hwndDlg); } - if (p && lw == IDC_PREF_DISMOUNT_POWERSAVING) - Warning ("WARN_PREF_AUTO_DISMOUNT_ON_POWER", hwndDlg); + if (p && lw == IDC_PREF_UNMOUNT_POWERSAVING) + Warning ("WARN_PREF_AUTO_UNMOUNT_ON_POWER", hwndDlg); } if (lw == IDCANCEL) { PreferencesDialogActive = FALSE; @@ -3551,24 +3570,24 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM bHideWaitingDialog = IsButtonChecked (GetDlgItem (hwndDlg, IDC_HIDE_WAITING_DIALOG)); bUseSecureDesktop = IsButtonChecked (GetDlgItem (hwndDlg, IDC_SECURE_DESKTOP_PASSWORD_ENTRY)); bUseLegacyMaxPasswordLength = IsButtonChecked (GetDlgItem (hwndDlg, IDC_USE_LEGACY_MAX_PASSWORD_LENGTH)); bCacheDuringMultipleMount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT)); bWipeCacheOnExit = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_EXIT)); - bWipeCacheOnAutoDismount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT)); + bWipeCacheOnAutoDismount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT)); bCacheInDriverDefault = bCacheInDriver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_CACHE_PASSWORDS)); bIncludePimInCache = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_CACHE_PIM)); defaultMountOptions.ReadOnly = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_MOUNT_READONLY)); defaultMountOptions.Removable = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_MOUNT_REMOVABLE)); bEnableBkgTask = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_BKG_TASK_ENABLE)); bCloseBkgTaskWhenNoVolumes = IsNonInstallMode() ? bCloseBkgTaskWhenNoVolumes : IsButtonChecked (GetDlgItem (hwndDlg, IDC_CLOSE_BKG_TASK_WHEN_NOVOL)); - bDismountOnLogOff = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF)); - bDismountOnSessionLocked = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED)); - bDismountOnPowerSaving = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING)); - bDismountOnScreenSaver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SCREENSAVER)); - bForceAutoDismount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT)); - MaxVolumeIdleTime = GetDlgItemInt (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE_TIME, NULL, FALSE) - * (IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE)) ? 1 : -1); + bDismountOnLogOff = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_LOGOFF)); + bDismountOnSessionLocked = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SESSION_LOCKED)); + bDismountOnPowerSaving = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_POWERSAVING)); + bDismountOnScreenSaver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_SCREENSAVER)); + bForceAutoDismount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_UNMOUNT)); + MaxVolumeIdleTime = GetDlgItemInt (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE_TIME, NULL, FALSE) + * (IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_UNMOUNT_INACTIVE)) ? 1 : -1); bStartOnLogon = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_LOGON_START)); bMountDevicesOnLogon = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_LOGON_MOUNT_DEVICES)); ManageStartupSeq (); @@ -3621,45 +3640,45 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM } BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - static MountOptions *mountOptions; + static MountOptions *pMountOptions; WORD lw = LOWORD (wParam); switch (msg) { case WM_INITDIALOG: { BOOL protect; - mountOptions = (MountOptions *) lParam; + pMountOptions = (MountOptions *) lParam; LocalizeDialog (hwndDlg, "IDD_MOUNT_OPTIONS"); SendDlgItemMessage (hwndDlg, IDC_MOUNT_READONLY, BM_SETCHECK, - mountOptions->ReadOnly ? BST_CHECKED : BST_UNCHECKED, 0); + pMountOptions->ReadOnly ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage (hwndDlg, IDC_MOUNT_REMOVABLE, BM_SETCHECK, - mountOptions->Removable ? BST_CHECKED : BST_UNCHECKED, 0); + pMountOptions->Removable ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage (hwndDlg, IDC_DISABLE_MOUNT_MANAGER, BM_SETCHECK, - mountOptions->DisableMountManager ? BST_CHECKED : BST_UNCHECKED, 0); + pMountOptions->DisableMountManager ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage (hwndDlg, IDC_PROTECT_HIDDEN_VOL, BM_SETCHECK, - mountOptions->ProtectHiddenVolume ? BST_CHECKED : BST_UNCHECKED, 0); + pMountOptions->ProtectHiddenVolume ? BST_CHECKED : BST_UNCHECKED, 0); - mountOptions->PartitionInInactiveSysEncScope = bPrebootPasswordDlgMode; + pMountOptions->PartitionInInactiveSysEncScope = bPrebootPasswordDlgMode; SendDlgItemMessage (hwndDlg, IDC_MOUNT_SYSENC_PART_WITHOUT_PBA, BM_SETCHECK, bPrebootPasswordDlgMode ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage (hwndDlg, IDC_USE_EMBEDDED_HEADER_BAK, BM_SETCHECK, - mountOptions->UseBackupHeader ? BST_CHECKED : BST_UNCHECKED, 0); + pMountOptions->UseBackupHeader ? BST_CHECKED : BST_UNCHECKED, 0); EnableWindow (GetDlgItem (hwndDlg, IDC_MOUNT_SYSENC_PART_WITHOUT_PBA), !bPrebootPasswordDlgMode); - SetDlgItemTextW (hwndDlg, IDC_VOLUME_LABEL, mountOptions->Label); + SetDlgItemTextW (hwndDlg, IDC_VOLUME_LABEL, pMountOptions->Label); SendDlgItemMessage (hwndDlg, IDC_VOLUME_LABEL, EM_LIMITTEXT, 32, 0); // 32 is the maximum possible length for a drive label in Windows protect = IsButtonChecked (GetDlgItem (hwndDlg, IDC_DISABLE_MOUNT_MANAGER)); EnableWindow (GetDlgItem (hwndDlg, IDC_VOLUME_LABEL), !protect); EnableWindow (GetDlgItem (hwndDlg, IDT_VOLUME_LABEL), !protect); @@ -3674,11 +3693,11 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++) { nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i)); SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i); /* if a PRF was selected previously, select it */ - if (i == mountOptions->ProtectedHidVolPkcs5Prf) + if (i == pMountOptions->ProtectedHidVolPkcs5Prf) nSelectedIndex = nIndex; } SendMessage (hComboBox, CB_SETCURSEL, nSelectedIndex, 0); @@ -3701,23 +3720,23 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT, hidVolProtKeyFilesParam.EnableKeyFiles); ToNormalPwdField (hwndDlg, IDC_PASSWORD_PROT_HIDVOL); SendDlgItemMessage (hwndDlg, IDC_PIM, EM_LIMITTEXT, MAX_PIM, 0); - if (mountOptions->ProtectedHidVolPassword.Length > 0) + if (pMountOptions->ProtectedHidVolPassword.Length > 0) { wchar_t szTmp[MAX_PASSWORD + 1]; - if (0 == MultiByteToWideChar (CP_UTF8, 0, (LPSTR) mountOptions->ProtectedHidVolPassword.Text, -1, szTmp, MAX_PASSWORD + 1)) + if (0 == MultiByteToWideChar (CP_UTF8, 0, (LPSTR) pMountOptions->ProtectedHidVolPassword.Text, -1, szTmp, MAX_PASSWORD + 1)) szTmp [0] = 0; SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_PROT_HIDVOL), szTmp); burn (szTmp, sizeof (szTmp)); } - SetPim (hwndDlg, IDC_PIM, mountOptions->ProtectedHidVolPim); + SetPim (hwndDlg, IDC_PIM, pMountOptions->ProtectedHidVolPim); /* make PIM field visible if a PIM value has been explicitely specified */ - if (mountOptions->ProtectedHidVolPim > 0) + if (pMountOptions->ProtectedHidVolPim > 0) { SetCheckBox (hwndDlg, IDC_PIM_ENABLE, TRUE); ShowWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), SW_HIDE); ShowWindow (GetDlgItem( hwndDlg, IDT_PIM), SW_SHOW); ShowWindow (GetDlgItem( hwndDlg, IDC_PIM), SW_SHOW); @@ -3817,40 +3836,40 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (lw == IDOK) { wchar_t tmp[MAX_PASSWORD+1]; - mountOptions->ReadOnly = IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_READONLY)); - mountOptions->Removable = IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_REMOVABLE)); - mountOptions->DisableMountManager = IsButtonChecked (GetDlgItem (hwndDlg, IDC_DISABLE_MOUNT_MANAGER)); - mountOptions->ProtectHiddenVolume = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PROTECT_HIDDEN_VOL)); - mountOptions->PartitionInInactiveSysEncScope = IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_SYSENC_PART_WITHOUT_PBA)); - mountOptions->UseBackupHeader = IsButtonChecked (GetDlgItem (hwndDlg, IDC_USE_EMBEDDED_HEADER_BAK)); + pMountOptions->ReadOnly = IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_READONLY)); + pMountOptions->Removable = IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_REMOVABLE)); + pMountOptions->DisableMountManager = IsButtonChecked (GetDlgItem (hwndDlg, IDC_DISABLE_MOUNT_MANAGER)); + pMountOptions->ProtectHiddenVolume = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PROTECT_HIDDEN_VOL)); + pMountOptions->PartitionInInactiveSysEncScope = IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_SYSENC_PART_WITHOUT_PBA)); + pMountOptions->UseBackupHeader = IsButtonChecked (GetDlgItem (hwndDlg, IDC_USE_EMBEDDED_HEADER_BAK)); - GetDlgItemTextW (hwndDlg, IDC_VOLUME_LABEL, mountOptions->Label, sizeof (mountOptions->Label) /sizeof (wchar_t)); + GetDlgItemTextW (hwndDlg, IDC_VOLUME_LABEL, pMountOptions->Label, sizeof (pMountOptions->Label) /sizeof (wchar_t)); - if (mountOptions->ProtectHiddenVolume) + if (pMountOptions->ProtectHiddenVolume) { int iMaxPasswordLength = bUseLegacyMaxPasswordLength? MAX_LEGACY_PASSWORD : MAX_PASSWORD; GetPassword (hwndDlg, IDC_PASSWORD_PROT_HIDVOL, - (LPSTR) mountOptions->ProtectedHidVolPassword.Text, iMaxPasswordLength + 1, + (LPSTR) pMountOptions->ProtectedHidVolPassword.Text, iMaxPasswordLength + 1, FALSE, FALSE); - mountOptions->ProtectedHidVolPassword.Length = (unsigned __int32) strlen ((char *) mountOptions->ProtectedHidVolPassword.Text); + pMountOptions->ProtectedHidVolPassword.Length = (unsigned __int32) strlen ((char *) pMountOptions->ProtectedHidVolPassword.Text); - mountOptions->ProtectedHidVolPkcs5Prf = (int) SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, + pMountOptions->ProtectedHidVolPkcs5Prf = (int) SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0); - mountOptions->ProtectedHidVolPim = GetPim (hwndDlg, IDC_PIM, 0); + pMountOptions->ProtectedHidVolPim = GetPim (hwndDlg, IDC_PIM, 0); } // Cleanup wmemset (tmp, L'X', MAX_PASSWORD); tmp[MAX_PASSWORD] = 0; SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_PROT_HIDVOL), tmp); - if ((mountOptions->ProtectHiddenVolume && !bEnableBkgTask) + if ((pMountOptions->ProtectHiddenVolume && !bEnableBkgTask) && (AskWarnYesNo ("HIDVOL_PROT_BKG_TASK_WARNING", hwndDlg) == IDYES)) { bEnableBkgTask = TRUE; TaskBarIconAdd (MainDlg); } @@ -4224,11 +4243,11 @@ BOOL CALLBACK VolumePropertiesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP // Primary key ListItemAdd (list, i, GetString ("KEY_SIZE")); StringCbPrintfW (sw, sizeof(sw), L"%d %s", size * 8, GetString ("BITS")); ListSubItemSet (list, i++, 1, sw); - if (wcscmp (EAGetModeName (prop.ea, prop.mode, TRUE), L"XTS") == 0) + if (wcscmp (EAGetModeName (prop.mode), L"XTS") == 0) { // Secondary key (XTS) ListItemAdd (list, i, GetString ("SECONDARY_KEY_SIZE_XTS")); ListSubItemSet (list, i++, 1, sw); @@ -4242,11 +4261,11 @@ BOOL CALLBACK VolumePropertiesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP StringCbCatW (sw, sizeof(sw), GetString ("BITS")); ListSubItemSet (list, i++, 1, sw); // Mode ListItemAdd (list, i, GetString ("MODE_OF_OPERATION")); - ListSubItemSet (list, i++, 1, EAGetModeName (prop.ea, prop.mode, TRUE)); + ListSubItemSet (list, i++, 1, EAGetModeName (prop.mode)); // PKCS 5 PRF ListItemAdd (list, i, GetString ("PKCS5_PRF")); if (prop.volumePim == 0) ListSubItemSet (list, i++, 1, get_pkcs5_prf_name (prop.pkcs5)); @@ -4461,11 +4480,11 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa if (hw == GetDlgItem(hwndDlg, IDC_DIRECTORY)) { // This the directory field. Make its background like normal edit HBRUSH hbr = GetSysColorBrush (COLOR_WINDOW); ::SelectObject(hdc, hbr); - return (BOOL) hbr; + return (BOOL)(INT_PTR)hbr; } } return 0; case WM_COMMAND: @@ -4527,11 +4546,11 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa } if (lw == IDC_CREATE) { - BOOL copyWizard, copyExpander, bExplore, bCacheInDriver, bIncludePimInCache, bAutoRun, bAutoMount, bMountReadOnly; + BOOL copyWizard, copyExpander, openExplorer, cacheInDriver, includePimInCache, bAutoRun, bAutoMount, bMountReadOnly; WCHAR dstDir[MAX_PATH + 1]; WCHAR srcPath[1024 + MAX_PATH + 1]; WCHAR dstPath[2*MAX_PATH + 1]; WCHAR appDir[1024]; WCHAR volName[MAX_PATH + 2]; @@ -4545,13 +4564,13 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa drive = (int) SendDlgItemMessage (hwndDlg, IDC_DRIVELIST, CB_GETCURSEL, 0, 0); drive = (int) SendDlgItemMessage (hwndDlg, IDC_DRIVELIST, CB_GETITEMDATA, drive, 0); copyWizard = IsButtonChecked (GetDlgItem (hwndDlg, IDC_COPY_WIZARD)); copyExpander = IsButtonChecked (GetDlgItem (hwndDlg, IDC_COPY_EXPANDER)); - bExplore = IsButtonChecked (GetDlgItem (hwndDlg, IDC_TRAVEL_OPEN_EXPLORER)); - bCacheInDriver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_TRAV_CACHE_PASSWORDS)); - bIncludePimInCache = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_CACHE_PIM)); + openExplorer = IsButtonChecked (GetDlgItem (hwndDlg, IDC_TRAVEL_OPEN_EXPLORER)); + cacheInDriver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_TRAV_CACHE_PASSWORDS)); + includePimInCache = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_CACHE_PIM)); bMountReadOnly = IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_READONLY)); bAutoRun = !IsButtonChecked (GetDlgItem (hwndDlg, IDC_AUTORUN_DISABLE)); bAutoMount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_AUTORUN_MOUNT)); if (dstDir[0] == 0) @@ -4960,20 +4979,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa goto stop; } StringCbPrintfW (autoMount, sizeof(autoMount), L"VeraCrypt\\VeraCrypt.exe /q background%s%s%s%s /m rm /v %s", drive > 0 ? driveLetter : L"", - bExplore ? L" /e" : L"", - bCacheInDriver ? (bIncludePimInCache? L" /c p" : L" /c y") : L"", + openExplorer ? L" /e" : L"", + cacheInDriver ? (includePimInCache? L" /c p" : L" /c y") : L"", bMountReadOnly ? L" /m ro" : L"", volName); fwprintf (af, L"[autorun]\nlabel=%s\nicon=VeraCrypt\\VeraCrypt.exe\n", GetString ("TC_TRAVELER_DISK")); fwprintf (af, L"action=%s\n", bAutoMount ? GetString ("MOUNT_TC_VOLUME") : GetString ("IDC_PREF_LOGON_START")); fwprintf (af, L"open=%s\n", bAutoMount ? autoMount : L"VeraCrypt\\VeraCrypt.exe"); fwprintf (af, L"shell\\start=%s\nshell\\start\\command=VeraCrypt\\VeraCrypt.exe\n", GetString ("IDC_PREF_LOGON_START")); - fwprintf (af, L"shell\\dismount=%s\nshell\\dismount\\command=VeraCrypt\\VeraCrypt.exe /q /d\n", GetString ("DISMOUNT_ALL_TC_VOLUMES")); + fwprintf (af, L"shell\\unmount=%s\nshell\\unmount\\command=VeraCrypt\\VeraCrypt.exe /q /u\n", GetString ("UNMOUNT_ALL_TC_VOLUMES")); CheckFileStreamWriteErrors (hwndDlg, af, dstPath); fclose (af); } MessageBoxW (hwndDlg, GetString ("TRAVELER_DISK_CREATED"), lpszTitle, MB_ICONINFORMATION); @@ -5143,11 +5162,11 @@ static int AskVolumePassword (HWND hwndDlg, Password *password, int *pkcs5, int return result == IDOK; } // GUI actions -static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szFileName, int pim, int pkcs5) +static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szVolFileName, int pim, int pkcs5) { BOOL status = FALSE; wchar_t fileName[MAX_PATH]; int mounted = 0, EffectiveVolumePkcs5 = 0; int EffectiveVolumePim = (pim < 0)? CmdVolumePim : pim; @@ -5175,16 +5194,16 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szFileName, int pim, VolumePassword.Length = 0; VolumePkcs5 = 0; VolumePim = -1; } - if (szFileName == NULL) + if (szVolFileName == NULL) { GetVolumePath (hwndDlg, fileName, ARRAYSIZE (fileName)); } else - StringCchCopyW (fileName, ARRAYSIZE (fileName), szFileName); + StringCchCopyW (fileName, ARRAYSIZE (fileName), szVolFileName); if (wcslen(fileName) == 0) { status = FALSE; goto ret; @@ -5194,20 +5213,20 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szFileName, int pim, { status = FALSE; goto ret; } - szFileName = fileName; + szVolFileName = fileName; - if (IsMountedVolume (szFileName)) + if (IsMountedVolume (szVolFileName)) { Warning ("VOL_ALREADY_MOUNTED", hwndDlg); status = FALSE; goto ret; } - if (!VolumePathExists (szFileName)) + if (!VolumePathExists (szVolFileName)) { if (!MultipleMountOperationInProgress) handleWin32Error (hwndDlg, SRC_POS); status = FALSE; @@ -5219,39 +5238,39 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szFileName, int pim, WaitCursor (); if (!bUseCmdVolumePassword) { // First try cached passwords and if they fail ask user for a new one - mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, NULL, EffectiveVolumePkcs5, EffectiveVolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, FALSE); + mounted = MountVolume (hwndDlg, nDosDriveNo, szVolFileName, NULL, EffectiveVolumePkcs5, EffectiveVolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, FALSE); // If keyfiles are enabled, test empty password first if (!mounted && KeyFilesEnable && FirstKeyFile && bEffectiveTryEmptyPasswordWhenKeyfileUsed) { Password emptyPassword = {0}; - KeyFilesApply (hwndDlg, &emptyPassword, FirstKeyFile, szFileName); + KeyFilesApply (hwndDlg, &emptyPassword, FirstKeyFile, szVolFileName); - mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &emptyPassword, EffectiveVolumePkcs5, EffectiveVolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, FALSE); + mounted = MountVolume (hwndDlg, nDosDriveNo, szVolFileName, &emptyPassword, EffectiveVolumePkcs5, EffectiveVolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, FALSE); burn (&emptyPassword, sizeof (emptyPassword)); } } // Test password and/or keyfiles used for the previous volume if (!mounted && bEffectiveCacheDuringMultipleMount && MultipleMountOperationInProgress && VolumePassword.Length != 0) { // if no PIM specified for favorite, we use also the PIM of the previous volume alongside its password. - mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, EffectiveVolumePkcs5, (EffectiveVolumePim < 0)? VolumePim : EffectiveVolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, FALSE); + mounted = MountVolume (hwndDlg, nDosDriveNo, szVolFileName, &VolumePassword, EffectiveVolumePkcs5, (EffectiveVolumePim < 0)? VolumePim : EffectiveVolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, FALSE); } NormalCursor (); if (mounted) { // Check for problematic file extensions (exe, dll, sys) - if (CheckFileExtension(szFileName)) + if (CheckFileExtension(szVolFileName)) Warning ("EXE_FILE_EXTENSION_MOUNT_WARNING", hwndDlg); } while (mounted == 0) { @@ -5263,11 +5282,11 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szFileName, int pim, } else if (!Silent) { int GuiPkcs5 = EffectiveVolumePkcs5; int GuiPim = EffectiveVolumePim; - StringCbCopyW (PasswordDlgVolume, sizeof(PasswordDlgVolume), szFileName); + StringCbCopyW (PasswordDlgVolume, sizeof(PasswordDlgVolume), szVolFileName); if (!AskVolumePassword (hwndDlg, &VolumePassword, &GuiPkcs5, &GuiPim, NULL, TRUE)) goto ret; else { @@ -5279,17 +5298,17 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szFileName, int pim, } WaitCursor (); if (KeyFilesEnable) - KeyFilesApply (hwndDlg, &VolumePassword, FirstKeyFile, szFileName); + KeyFilesApply (hwndDlg, &VolumePassword, FirstKeyFile, szVolFileName); - mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, VolumePkcs5, VolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, !Silent); + mounted = MountVolume (hwndDlg, nDosDriveNo, szVolFileName, &VolumePassword, VolumePkcs5, VolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, Silent, !Silent); NormalCursor (); // Check for problematic file extensions (exe, dll, sys) - if (mounted > 0 && CheckFileExtension (szFileName)) + if (mounted > 0 && CheckFileExtension (szVolFileName)) Warning ("EXE_FILE_EXTENSION_MOUNT_WARNING", hwndDlg); if (!MultipleMountOperationInProgress) { burn (&VolumePassword, sizeof (VolumePassword)); @@ -5414,11 +5433,11 @@ void CALLBACK DismountAllThreadProc(void* pArg, HWND hwndDlg) int dismountMaxRetries = pThreadParam->dismountMaxRetries; int dismountAutoRetryDelay = pThreadParam->dismountAutoRetryDelay; do { - *pbResult = DeviceIoControl (hDriver, TC_IOCTL_DISMOUNT_ALL_VOLUMES, punmount, + *pbResult = DeviceIoControl (hDriver, TC_IOCTL_UNMOUNT_ALL_VOLUMES, punmount, sizeof (UNMOUNT_STRUCT), punmount, sizeof (UNMOUNT_STRUCT), pdwResult, NULL); if ( punmount->nDosDriveNo < 0 || punmount->nDosDriveNo > 25 || (punmount->ignoreOpenFiles != TRUE && punmount->ignoreOpenFiles != FALSE) || (punmount->HiddenVolumeProtectionTriggered != TRUE && punmount->HiddenVolumeProtectionTriggered != FALSE) @@ -5573,11 +5592,11 @@ retry: { for (i = 0; i < 26; i++) { if (mountList.ulMountedDrives & (1 << i)) { - wchar_t root[] = { (wchar_t) i + L'A', L':', L'\\', 0 }; + wchar_t root[] = { (wchar_t) (i + L'A'), L':', L'\\', 0 }; SHChangeNotify (SHCNE_DRIVEADD, SHCNF_PATH, root, NULL); } } } @@ -5665,15 +5684,15 @@ static BOOL MountAllDevicesThreadCode (HWND hwndDlg, BOOL bPasswordPrompt) foreach (const HostDevice &drive, devices) { vector <HostDevice> partitions = drive.Partitions; partitions.insert (partitions.begin(), drive); - foreach (const HostDevice &device, partitions) + for (const HostDevice &device: partitions) { - wchar_t szFileName[TC_MAX_PATH]; - StringCbCopyW (szFileName, sizeof (szFileName), device.Path.c_str()); - BOOL mounted = IsMountedVolume (szFileName); + wchar_t szPartPath[TC_MAX_PATH]; + StringCbCopyW (szPartPath, sizeof (szPartPath), device.Path.c_str()); + BOOL mounted = IsMountedVolume (szPartPath); // Skip other partitions of the disk if partition0 (whole disk) is mounted if (!device.IsPartition && mounted) break; @@ -5729,12 +5748,12 @@ static BOOL MountAllDevicesThreadCode (HWND hwndDlg, BOOL bPasswordPrompt) else goto ret; } // First try user password then cached passwords - if ((mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, VolumePkcs5, VolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, TRUE, FALSE)) > 0 - || ((VolumePassword.Length > 0) && ((mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, NULL, VolumePkcs5, VolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, TRUE, FALSE)) > 0))) + if ((mounted = MountVolume (hwndDlg, nDosDriveNo, szPartPath, &VolumePassword, VolumePkcs5, VolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, TRUE, FALSE)) > 0 + || ((VolumePassword.Length > 0) && ((mounted = MountVolume (hwndDlg, nDosDriveNo, szPartPath, NULL, VolumePkcs5, VolumePim, bCacheInDriver, bIncludePimInCache, bForceMount, &mountOptions, TRUE, FALSE)) > 0))) { // A volume has been successfully mounted ResetWrongPwdRetryCount (); @@ -6001,11 +6020,14 @@ static void ChangeSysEncPassword (HWND hwndDlg, BOOL bOnlyChangeKDF) return; } if (CreateSysEncMutex ()) // If no instance of the wizard is currently taking care of system encryption { - StringCbPrintfW (OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD) GetKeyboardLayout (NULL) & 0xFFFF); + if (!GetKeyboardLayoutNameW(OrigKeyboardLayout)) + { + StringCbPrintfW(OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD)(DWORD_PTR)GetKeyboardLayout(NULL) & 0xFFFF); + } bSysEncPwdChangeDlgMode = TRUE; if (bOnlyChangeKDF) pwdChangeDlgMode = PCDM_CHANGE_PKCS5_PRF; @@ -6843,11 +6865,11 @@ void DisplayDriveListContextMenu (HWND hwndDlg, LPARAM lParam) case TC_MLIST_ITEM_NONSYS_VOL: // There's a mounted non-system volume at this drive letter - AppendMenuW (popup, MF_STRING, IDM_UNMOUNT_VOLUME, GetString ("DISMOUNT")); + AppendMenuW (popup, MF_STRING, IDM_UNMOUNT_VOLUME, GetString ("UNMOUNT")); AppendMenuW (popup, MF_STRING, IDPM_OPEN_VOLUME, GetString ("OPEN")); AppendMenu (popup, MF_SEPARATOR, 0, L""); AppendMenuW (popup, MF_STRING, IDPM_CHECK_FILESYS, GetString ("IDPM_CHECK_FILESYS")); AppendMenuW (popup, MF_STRING, IDPM_REPAIR_FILESYS, GetString ("IDPM_REPAIR_FILESYS")); AppendMenu (popup, MF_SEPARATOR, 0, L""); @@ -7433,14 +7455,16 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa /* Check system encryption status */ if (!Quit) // Do not care about system encryption or in-place encryption if we were launched from the system startup sequence (the wizard was added to it too). { + BOOL bActionPerformed = FALSE; if (SysEncryptionOrDecryptionRequired ()) { if (!MutexExistsOnSystem (TC_MUTEX_NAME_SYSENC)) // If no instance of the wizard is currently taking care of system encryption { + bActionPerformed = TRUE; // We shouldn't block the mutex at this point if (SystemEncryptionStatus == SYSENC_STATUS_PRETEST || AskWarnYesNo ("SYSTEM_ENCRYPTION_RESUME_PROMPT", hwndDlg) == IDYES) { @@ -7463,11 +7487,21 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (bInPlaceEncNonSysPending && !NonSysInplaceEncInProgressElsewhere()) { BOOL bDecrypt = FALSE; if (AskNonSysInPlaceEncryptionResume(hwndDlg, &bDecrypt) == IDYES) + { + bActionPerformed = TRUE; ResumeInterruptedNonSysInplaceEncProcess (bDecrypt); + } + } + + if (!bActionPerformed) + { + // display warning if the master key is vulnerable + if (SysEncryptionMasterKeyVulnerable()) + WarningTopMost ("ERR_SYSENC_XTS_MASTERKEY_VULNERABLE", hwndDlg); } } if (TaskBarIconMutex != NULL) RegisterWtsAndPowerNotification(hwndDlg); @@ -7650,11 +7684,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (reentry) break; reentry = true; - foreach (FavoriteVolume favorite, FavoritesOnArrivalMountRequired) + for (FavoriteVolume favorite: FavoritesOnArrivalMountRequired) { if (favorite.UseVolumeID) { if (IsMountedVolumeID (favorite.VolumeID)) continue; @@ -7700,11 +7734,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } else if (favorite.VolumePathId.empty()) continue; bool mountedAndNotDisconnected = false; - foreach (FavoriteVolume mountedFavorite, FavoritesMountedOnArrivalStillConnected) + for (FavoriteVolume mountedFavorite: FavoritesMountedOnArrivalStillConnected) { if (favorite.Path == mountedFavorite.Path) { mountedAndNotDisconnected = true; break; @@ -7834,11 +7868,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa label = (wchar_t *) LastKnownMountList.wszLabel[i]; if (label.empty()) label = GetFavoriteVolumeLabel (vol, useInExplorer); StringCbPrintfW (s, sizeof(s), L"%s %c: (%s)", - GetString (n==0 ? "OPEN" : "DISMOUNT"), + GetString (n==0 ? "OPEN" : "UNMOUNT"), i + L'A', label.empty() ? vol : label.c_str()); AppendMenuW (popup, MF_STRING, n*26 + TRAYICON_MENU_DRIVE_OFFSET + i, s); } } @@ -7874,13 +7908,13 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (CheckMountList (hwndDlg, FALSE)) { if (Dismount (hwndDlg, sel - TRAYICON_MENU_DRIVE_OFFSET - 26)) { wchar_t txt [2048]; - StringCbPrintfW (txt, sizeof(txt), GetString ("VOLUME_MOUNTED_AS_DRIVE_LETTER_X_DISMOUNTED"), sel - TRAYICON_MENU_DRIVE_OFFSET - 26 + L'A'); + StringCbPrintfW (txt, sizeof(txt), GetString ("VOLUME_MOUNTED_AS_DRIVE_LETTER_X_UNMOUNTED"), sel - TRAYICON_MENU_DRIVE_OFFSET - 26 + L'A'); - InfoBalloonDirect (GetString ("SUCCESSFULLY_DISMOUNTED"), txt, hwndDlg); + InfoBalloonDirect (GetString ("SUCCESSFULLY_UNMOUNTED"), txt, hwndDlg); } } } else if (sel == IDM_SHOW_HIDE) { @@ -7955,19 +7989,19 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { for (m = 0; m < 26; m++) { if ((LastKnownMountList.ulMountedDrives & (1 << m)) && IsNullTerminateString (LastKnownMountList.wszVolume[m], TC_MAX_PATH)) { - wchar_t *vol = (wchar_t *) LastKnownMountList.wszVolume[m]; + wchar_t *wszVol = (wchar_t *) LastKnownMountList.wszVolume[m]; - if (wcsstr (vol, L"\\??\\") == vol) + if (wcsstr (wszVol, L"\\??\\") == wszVol) vol += 4; - if (vol[1] == L':' && i == (vol[0] - (vol[0] <= L'Z' ? L'A' : L'a'))) + if (wszVol[1] == L':' && i == (wszVol[0] - (wszVol[0] <= L'Z' ? L'A' : L'a'))) { UnmountVolume (hwndDlg, m, TRUE); - WarningBalloon ("HOST_DEVICE_REMOVAL_DISMOUNT_WARN_TITLE", "HOST_DEVICE_REMOVAL_DISMOUNT_WARN", hwndDlg); + WarningBalloon ("HOST_DEVICE_REMOVAL_UNMOUNT_WARN_TITLE", "HOST_DEVICE_REMOVAL_UNMOUNT_WARN", hwndDlg); } } } } } @@ -7988,11 +8022,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa OPEN_TEST_STRUCT ots = {0}; if (!OpenDevice (vol, &ots, FALSE, FALSE)) { UnmountVolume (hwndDlg, m, TRUE); - WarningBalloon ("HOST_DEVICE_REMOVAL_DISMOUNT_WARN_TITLE", "HOST_DEVICE_REMOVAL_DISMOUNT_WARN", hwndDlg); + WarningBalloon ("HOST_DEVICE_REMOVAL_UNMOUNT_WARN_TITLE", "HOST_DEVICE_REMOVAL_UNMOUNT_WARN", hwndDlg); } } } } } @@ -8106,10 +8140,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; } } } +#if !defined(VCEXPANDER) else { LPNMHDR pnmh = (LPNMHDR)lParam; if (pnmh->idFrom == IDOK && pnmh->code == BCN_DROPDOWN) @@ -8118,10 +8153,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa HMENU hmenu = CreateMountNoCacheDropdownMenu(); HandleMountButtonDropdown(pnmh->hwndFrom, hwndDlg, hmenu); DestroyMenu(hmenu); } } +#endif return 0; case WM_ERASEBKGND: return 0; @@ -8175,11 +8211,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (lw == IDC_UNMOUNTALL || lw == IDM_UNMOUNTALL) { if (DismountAll (hwndDlg, bForceUnmount, TRUE, UNMOUNT_MAX_AUTO_RETRIES, UNMOUNT_AUTO_RETRY_DELAY) && lw == IDM_UNMOUNTALL) // If initiated via the systray menu { - InfoBalloon ("SUCCESSFULLY_DISMOUNTED", "MOUNTED_VOLUMES_DISMOUNTED", hwndDlg); + InfoBalloon ("SUCCESSFULLY_UNMOUNTED", "MOUNTED_VOLUMES_UNMOUNTED", hwndDlg); } return 1; } @@ -9132,10 +9168,11 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) OptionNoWaitDlg, OptionSecureDesktop, OptionDisableDeviceUpdate, OptionEnableMemoryProtection, OptionSignalExit, + CommandUnmount, }; argument args[]= { { OptionAuto, L"/auto", L"/a", FALSE }, @@ -9162,10 +9199,11 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) { OptionNoWaitDlg, L"/nowaitdlg", NULL, FALSE }, { OptionSecureDesktop, L"/secureDesktop", NULL, FALSE }, { OptionDisableDeviceUpdate, L"/disableDeviceUpdate", NULL, FALSE }, { OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE }, { OptionSignalExit, L"/signalExit", NULL, FALSE }, + { CommandUnmount, L"/unmount", L"/u", FALSE }, }; argumentspec as; as.args = args; @@ -9305,10 +9343,11 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) } } break; case CommandDismount: + case CommandUnmount: if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs, szDriveLetter, ARRAYSIZE (szDriveLetter))) { if ( (wcslen(szDriveLetter) == 1) @@ -10094,11 +10133,15 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz VirtualLock (&CmdVolumePassword, sizeof (CmdVolumePassword)); VirtualLock (&mountOptions, sizeof (mountOptions)); VirtualLock (&defaultMountOptions, sizeof (defaultMountOptions)); VirtualLock (&szFileName, sizeof(szFileName)); - DetectX86Features (); +#ifndef _M_ARM64 + DetectX86Features(); +#else + DetectArmFeatures(); +#endif try { BootEncObj = new BootEncryption (NULL); } @@ -10438,11 +10481,11 @@ skipMount: if (ServiceMode && LastMountedVolumeDirty) { DWORD bytesOut; DeviceIoControl (hDriver, TC_IOCTL_SET_SYSTEM_FAVORITE_VOLUME_DIRTY, NULL, 0, NULL, 0, &bytesOut, NULL); - SystemFavoritesServiceLogError (wstring (L"The filesystem of the volume mounted as ") + (wchar_t) (drive + L'A') + L": was not cleanly dismounted and needs to be checked for errors."); + SystemFavoritesServiceLogError (wstring (L"The filesystem of the volume mounted as ") + (wchar_t) (drive + L'A') + L": was not cleanly unmounted and needs to be checked for errors."); } } else if (!systemFavorites && !favoriteVolumeToMount.Path.empty()) Error ("DRIVE_LETTER_UNAVAILABLE", MainDlg); else if (ServiceMode && systemFavorites) @@ -10717,20 +10760,20 @@ static void HandleHotKey (HWND hwndDlg, WPARAM wParam) { case HK_AUTOMOUNT_DEVICES: MountAllDevices (hwndDlg, TRUE); break; - case HK_DISMOUNT_ALL: - case HK_DISMOUNT_ALL_AND_WIPE: + case HK_UNMOUNT_ALL: + case HK_UNMOUNT_ALL_AND_WIPE: - if (wParam == HK_DISMOUNT_ALL_AND_WIPE) + if (wParam == HK_UNMOUNT_ALL_AND_WIPE) WipeCache (hwndDlg, TRUE); if (DismountAll (hwndDlg, FALSE, TRUE, UNMOUNT_MAX_AUTO_RETRIES, UNMOUNT_AUTO_RETRY_DELAY)) { if (bDisplayBalloonOnSuccessfulHkDismount) - InfoBalloon ("SUCCESSFULLY_DISMOUNTED", (wParam == HK_DISMOUNT_ALL_AND_WIPE ? "VOLUMES_DISMOUNTED_CACHE_WIPED" : "MOUNTED_VOLUMES_DISMOUNTED"), hwndDlg); + InfoBalloon ("SUCCESSFULLY_UNMOUNTED", (wParam == HK_UNMOUNT_ALL_AND_WIPE ? "VOLUMES_UNMOUNTED_CACHE_WIPED" : "MOUNTED_VOLUMES_UNMOUNTED"), hwndDlg); if (bPlaySoundOnSuccessfulHkDismount) MessageBeep (0xFFFFFFFF); } @@ -10739,30 +10782,30 @@ static void HandleHotKey (HWND hwndDlg, WPARAM wParam) case HK_WIPE_CACHE: WipeCache (hwndDlg, FALSE); break; - case HK_FORCE_DISMOUNT_ALL_AND_WIPE: + case HK_FORCE_UNMOUNT_ALL_AND_WIPE: success = DismountAll (hwndDlg, TRUE, FALSE, UNMOUNT_MAX_AUTO_RETRIES, UNMOUNT_AUTO_RETRY_DELAY); success &= DeviceIoControl (hDriver, TC_IOCTL_WIPE_PASSWORD_CACHE, NULL, 0, NULL, 0, &dwResult, NULL); if (success) { if (bDisplayBalloonOnSuccessfulHkDismount) - InfoBalloon ("SUCCESSFULLY_DISMOUNTED", "VOLUMES_DISMOUNTED_CACHE_WIPED", hwndDlg); + InfoBalloon ("SUCCESSFULLY_UNMOUNTED", "VOLUMES_UNMOUNTED_CACHE_WIPED", hwndDlg); if (bPlaySoundOnSuccessfulHkDismount) MessageBeep (0xFFFFFFFF); } break; - case HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT: + case HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT: success = DismountAll (hwndDlg, TRUE, FALSE, UNMOUNT_MAX_AUTO_RETRIES, UNMOUNT_AUTO_RETRY_DELAY); success &= DeviceIoControl (hDriver, TC_IOCTL_WIPE_PASSWORD_CACHE, NULL, 0, NULL, 0, &dwResult, NULL); if (success) { if (bDisplayBalloonOnSuccessfulHkDismount) - InfoBalloon ("SUCCESSFULLY_DISMOUNTED", "VOLUMES_DISMOUNTED_CACHE_WIPED", hwndDlg); + InfoBalloon ("SUCCESSFULLY_UNMOUNTED", "VOLUMES_UNMOUNTED_CACHE_WIPED", hwndDlg); if (bPlaySoundOnSuccessfulHkDismount) MessageBeep (0xFFFFFFFF); } TaskBarIconRemove (hwndDlg); @@ -10820,12 +10863,12 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const wchar_t * int fBackup = -1; OpenVolumeContext volume; OpenVolumeContext hiddenVolume; Password hiddenVolPassword; int hiddenVolPkcs5 = 0, hiddenVolPim = 0; - CRYPTOPP_ALIGN_DATA(16) byte temporaryKey[MASTER_KEYDATA_SIZE]; - CRYPTOPP_ALIGN_DATA(16) byte originalK2[MASTER_KEYDATA_SIZE]; + CRYPTOPP_ALIGN_DATA(16) uint8 temporaryKey[MASTER_KEYDATA_SIZE]; + CRYPTOPP_ALIGN_DATA(16) uint8 originalK2[MASTER_KEYDATA_SIZE]; int EffectiveVolumePkcs5 = CmdVolumePkcs5; int EffectiveVolumePim = CmdVolumePim; /* Priority is given to command line parameters * Default values used only when nothing specified in command line @@ -10853,11 +10896,11 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const wchar_t * return 0; } if (IsMountedVolume (lpszVolume)) { - Warning ("DISMOUNT_FIRST", hwndDlg); + Warning ("UNMOUNT_FIRST", hwndDlg); goto ret; } if (!VolumePathExists (lpszVolume)) { @@ -10967,11 +11010,11 @@ noHidden: goto error; } // Backup headers - byte backup[TC_VOLUME_HEADER_GROUP_SIZE]; + uint8 backup[TC_VOLUME_HEADER_GROUP_SIZE]; bool legacyVolume = volume.CryptoInfo->LegacyVolume ? true : false; int backupFileSize = legacyVolume ? TC_VOLUME_HEADER_SIZE_LEGACY * 2 : TC_VOLUME_HEADER_GROUP_SIZE; // Fill backup buffer with random data @@ -11015,17 +11058,17 @@ noHidden: nStatus = ERR_PARAMETER_INCORRECT; goto error; } // Store header encrypted with a new key - nStatus = ReEncryptVolumeHeader (hwndDlg, (char *) backup, FALSE, volume.CryptoInfo, &VolumePassword, VolumePim, FALSE); + nStatus = ReEncryptVolumeHeader (hwndDlg, backup, FALSE, volume.CryptoInfo, &VolumePassword, VolumePim, FALSE); if (nStatus != ERR_SUCCESS) goto error; if (hiddenVolume.VolumeIsOpen) { - nStatus = ReEncryptVolumeHeader (hwndDlg, (char *) backup + (legacyVolume ? TC_VOLUME_HEADER_SIZE_LEGACY : TC_VOLUME_HEADER_SIZE), + nStatus = ReEncryptVolumeHeader (hwndDlg, backup + (legacyVolume ? TC_VOLUME_HEADER_SIZE_LEGACY : TC_VOLUME_HEADER_SIZE), FALSE, hiddenVolume.CryptoInfo, &hiddenVolPassword, hiddenVolPim, FALSE); if (nStatus != ERR_SUCCESS) goto error; } @@ -11072,11 +11115,11 @@ error: int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) { int nDosLinkCreated = -1, nStatus = ERR_OS_ERROR; wchar_t szDiskFile[TC_MAX_PATH], szCFDevice[TC_MAX_PATH]; - wchar_t szFileName[TC_MAX_PATH]; + wchar_t szHeaderFileName[TC_MAX_PATH]; wchar_t szDosDevice[TC_MAX_PATH]; void *dev = INVALID_HANDLE_VALUE; DWORD dwError; BOOL bDevice; unsigned __int64 hostSize = 0; @@ -11123,11 +11166,11 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) break; } if (IsMountedVolume (lpszVolume)) { - Warning ("DISMOUNT_FIRST", hwndDlg); + Warning ("UNMOUNT_FIRST", hwndDlg); return 0; } if (!VolumePathExists (lpszVolume)) { @@ -11206,11 +11249,11 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) nStatus = ERROR_SUCCESS; goto error; } // Create a new header with a new salt - char buffer[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; + unsigned char buffer[TC_VOLUME_HEADER_EFFECTIVE_SIZE]; nStatus = ReEncryptVolumeHeader (hwndDlg, buffer, FALSE, volume.CryptoInfo, &VolumePassword, VolumePim, FALSE); if (nStatus != 0) goto error; @@ -11219,11 +11262,11 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) { nStatus = ERR_OS_ERROR; goto error; } - if (!WriteEffectiveVolumeHeader (volume.IsDevice, volume.HostFileHandle, (byte *) buffer)) + if (!WriteEffectiveVolumeHeader (volume.IsDevice, volume.HostFileHandle, (uint8 *) buffer)) { nStatus = ERR_OS_ERROR; goto error; } } @@ -11238,18 +11281,18 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) nStatus = ERR_SUCCESS; goto ret; } /* Select backup file */ - if (!BrowseFiles (hwndDlg, "OPEN_TITLE", szFileName, bHistory, FALSE)) + if (!BrowseFiles (hwndDlg, "OPEN_TITLE", szHeaderFileName, bHistory, FALSE)) { nStatus = ERR_SUCCESS; goto ret; } /* Open the backup file */ - fBackup = CreateFile (szFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + fBackup = CreateFile (szHeaderFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (fBackup == INVALID_HANDLE_VALUE) { nStatus = ERR_OS_ERROR; goto error; } @@ -11366,11 +11409,11 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) hostSize = fileSize.QuadPart; } /* Read the volume header from the backup file */ - char buffer[TC_VOLUME_HEADER_GROUP_SIZE]; + unsigned char buffer[TC_VOLUME_HEADER_GROUP_SIZE]; DWORD bytesRead; if (!ReadFile (fBackup, buffer, sizeof (buffer), &bytesRead, NULL)) { nStatus = ERR_OS_ERROR; @@ -11381,11 +11424,10 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) { nStatus = ERR_VOL_SIZE_WRONG; goto error; } - LARGE_INTEGER headerOffset; LARGE_INTEGER headerBackupOffset; bool legacyBackup; int headerOffsetBackupFile; // Determine the format of the backup file @@ -11445,10 +11487,16 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) goto error; handleError (hwndDlg, nStatus, SRC_POS); } + // display a warning if the master key is vulnerable + if (restoredCryptoInfo->bVulnerableMasterKey) + { + Warning ("ERR_XTS_MASTERKEY_VULNERABLE", hwndDlg); + } + BOOL hiddenVol = restoredCryptoInfo->hiddenVolume; if (legacyBackup) { headerOffset.QuadPart = hiddenVol ? hostSize - TC_HIDDEN_VOLUME_HEADER_OFFSET_LEGACY : TC_VOLUME_HEADER_OFFSET; @@ -11470,11 +11518,11 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) { nStatus = ERR_OS_ERROR; goto error; } - if (!WriteEffectiveVolumeHeader (bDevice, dev, (byte *) buffer)) + if (!WriteEffectiveVolumeHeader (bDevice, dev, (uint8 *) buffer)) { nStatus = ERR_OS_ERROR; goto error; } @@ -11489,11 +11537,11 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume) { nStatus = ERR_OS_ERROR; goto error; } - if (!WriteEffectiveVolumeHeader (bDevice, dev, (byte *) buffer)) + if (!WriteEffectiveVolumeHeader (bDevice, dev, (uint8 *) buffer)) { nStatus = ERR_OS_ERROR; goto error; } } @@ -11692,11 +11740,11 @@ static BOOL CALLBACK PerformanceSettingsDlgProc (HWND hwndDlg, UINT msg, WPARAM BOOL enableCpuRng = IsDlgButtonChecked (hwndDlg, IDC_ENABLE_CPU_RNG); BOOL enableRamEncryption = IsDlgButtonChecked (hwndDlg, IDC_ENABLE_RAM_ENCRYPTION); BOOL enableExtendedIOCTL = IsDlgButtonChecked (hwndDlg, IDC_ENABLE_EXTENDED_IOCTL_SUPPORT); BOOL allowTrimCommand = IsDlgButtonChecked (hwndDlg, IDC_ALLOW_TRIM_NONSYS_SSD); BOOL allowWindowsDefrag = IsDlgButtonChecked (hwndDlg, IDC_ALLOW_WINDOWS_DEFRAG); - BOOL bDisableMemoryProtection = IsDlgButtonChecked (hwndDlg, IDC_DISABLE_MEMORY_PROTECTION); + BOOL disableMemoryProtection = IsDlgButtonChecked (hwndDlg, IDC_DISABLE_MEMORY_PROTECTION); try { VOLUME_PROPERTIES_STRUCT prop; bool rebootRequired = false; @@ -11712,11 +11760,11 @@ static BOOL CALLBACK PerformanceSettingsDlgProc (HWND hwndDlg, UINT msg, WPARAM BootEncStatus.DriveMounted = false; } if (BootEncStatus.DriveMounted && !bSystemIsGPT) { - byte userConfig; + uint8 userConfig; string customUserMessage; uint16 bootLoaderVersion; if (!BootEncObj->ReadBootSectorConfig (nullptr, 0, &userConfig, &customUserMessage, &bootLoaderVersion)) return 1; @@ -11762,13 +11810,13 @@ static BOOL CALLBACK PerformanceSettingsDlgProc (HWND hwndDlg, UINT msg, WPARAM rebootRequired = true; } SetDriverConfigurationFlag (VC_DRIVER_CONFIG_ENABLE_RAM_ENCRYPTION, enableRamEncryption); BOOL originalDisableMemoryProtection = !ReadMemoryProtectionConfig(); - if(originalDisableMemoryProtection != bDisableMemoryProtection) + if(originalDisableMemoryProtection != disableMemoryProtection) rebootRequired = true; - SetMemoryProtectionConfig (!bDisableMemoryProtection); + SetMemoryProtectionConfig (!disableMemoryProtection); DWORD bytesReturned; if (!DeviceIoControl (hDriver, TC_IOCTL_REREAD_DRIVER_CONFIG, NULL, 0, NULL, 0, &bytesReturned, NULL)) handleWin32Error (hwndDlg, SRC_POS); @@ -12115,19 +12163,19 @@ void SecurityTokenPreferencesDialog (HWND hwndDlg) static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { WORD lw = LOWORD (wParam); static std::string platforminfo; - static byte currentUserConfig; + static uint8 currentUserConfig; static string currentCustomUserMessage; switch (msg) { case WM_INITDIALOG: { - BootEncryptionStatus BootEncStatus = BootEncObj->GetStatus(); - if (!BootEncStatus.DriveMounted) + BootEncryptionStatus bootEncStatus = BootEncObj->GetStatus(); + if (!bootEncStatus.DriveMounted) { Warning ("SYS_DRIVE_NOT_ENCRYPTED", hwndDlg); EndDialog (hwndDlg, IDCANCEL); return 1; } @@ -12135,11 +12183,11 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA try { LocalizeDialog (hwndDlg, "IDD_SYSENC_SETTINGS"); uint32 driverConfig = ReadDriverConfigurationFlags(); uint32 serviceConfig = ReadServiceConfigurationFlags(); - byte userConfig; + uint8 userConfig; string customUserMessage; uint16 bootLoaderVersion = 0; BOOL bPasswordCacheEnabled = (driverConfig & TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD)? TRUE : FALSE; BOOL bPimCacheEnabled = (driverConfig & TC_DRIVER_CONFIG_CACHE_BOOT_PIM)? TRUE : FALSE; BOOL bBlockSysEncTrimEnabled = (driverConfig & VC_DRIVER_CONFIG_BLOCK_SYS_TRIM)? TRUE : FALSE; @@ -12312,11 +12360,11 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA char customUserMessage[TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH + 1] = {0}; if (!bSystemIsGPT) GetDlgItemTextA (hwndDlg, IDC_CUSTOM_BOOT_LOADER_MESSAGE, customUserMessage, sizeof (customUserMessage)); - byte userConfig = currentUserConfig; + uint8 userConfig = currentUserConfig; if (IsDlgButtonChecked (hwndDlg, IDC_DISABLE_BOOT_LOADER_PIM_PROMPT)) userConfig |= TC_BOOT_USER_CFG_FLAG_DISABLE_PIM; else userConfig &= ~TC_BOOT_USER_CFG_FLAG_DISABLE_PIM; diff --git a/src/Mount/Mount.h b/src/Mount/Mount.h index cd2636b1..c3dab0ed 100644 --- a/src/Mount/Mount.h +++ b/src/Mount/Mount.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc index 08a89935..0370f3ae 100644 --- a/src/Mount/Mount.rc +++ b/src/Mount/Mount.rc @@ -55,21 +55,21 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,44,188,10 CONTROL "Start VeraCrypt Background Task",IDC_PREF_LOGON_START, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,75,126,10 CONTROL "Mount all device-hosted VeraCrypt volumes",IDC_PREF_LOGON_MOUNT_DEVICES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,75,188,10 - CONTROL "User logs off",IDC_PREF_DISMOUNT_LOGOFF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,104,114,11 - CONTROL "User session locked",IDC_PREF_DISMOUNT_SESSION_LOCKED, + CONTROL "User logs off",IDC_PREF_UNMOUNT_LOGOFF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,104,114,11 + CONTROL "User session locked",IDC_PREF_UNMOUNT_SESSION_LOCKED, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,197,105,130,11 - CONTROL "Screen saver is launched",IDC_PREF_DISMOUNT_SCREENSAVER, + CONTROL "Screen saver is launched",IDC_PREF_UNMOUNT_SCREENSAVER, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,116,114,10 - CONTROL "Entering power saving mode",IDC_PREF_DISMOUNT_POWERSAVING, + CONTROL "Entering power saving mode",IDC_PREF_UNMOUNT_POWERSAVING, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,197,115,130,11 - CONTROL "Auto-dismount volume after no data has been read/written to it for",IDC_PREF_DISMOUNT_INACTIVE, + CONTROL "Auto-unmount volume after no data has been read/written to it for",IDC_PREF_UNMOUNT_INACTIVE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,128,246,11 - EDITTEXT IDC_PREF_DISMOUNT_INACTIVE_TIME,258,127,27,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT - CONTROL "Force auto-dismount even if volume contains open files or directories",IDC_PREF_FORCE_AUTO_DISMOUNT, + EDITTEXT IDC_PREF_UNMOUNT_INACTIVE_TIME,258,127,27,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT + CONTROL "Force auto-unmount even if volume contains open files or directories",IDC_PREF_FORCE_AUTO_UNMOUNT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,141,294,10 CONTROL "Open Explorer window for successfully mounted volume",IDC_PREF_OPEN_EXPLORER, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,171,316,11 CONTROL "Use a different taskbar icon when there are mounted volumes",IDC_PREF_USE_DIFF_TRAY_ICON_IF_VOL_MOUNTED, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,184,314,10 @@ -81,23 +81,23 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,271,146,11 CONTROL "Wipe cached passwords on exit",IDC_PREF_WIPE_CACHE_ON_EXIT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,271,165,11 CONTROL "Temporarily cache password during ""Mount Favorite Volumes"" operations",IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,285,294,11 - CONTROL "Wipe cached passwords on auto-dismount",IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT, + CONTROL "Wipe cached passwords on auto-unmount",IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,299,296,11 CONTROL "Include PIM when caching a password",IDC_PREF_CACHE_PIM, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,313,296,10 PUSHBUTTON "More Settings...",IDC_MORE_SETTINGS,5,331,85,14 DEFPUSHBUTTON "OK",IDOK,225,331,50,14 PUSHBUTTON "Cancel",IDCANCEL,281,331,50,14 GROUPBOX "Windows",IDT_WINDOWS_RELATED_SETTING,4,160,328,97 GROUPBOX "Default Mount Options",IDT_DEFAULT_MOUNT_OPTIONS,4,3,328,26 GROUPBOX "VeraCrypt Background Task",IDT_TASKBAR_ICON,4,33,328,26 - GROUPBOX "Auto-Dismount",IDT_AUTO_DISMOUNT,4,94,328,62 + GROUPBOX "Auto-Unmount",IDT_AUTO_UNMOUNT,4,94,328,62 LTEXT "minutes",IDT_MINUTES,289,129,39,10 - LTEXT "Dismount all when:",IDT_AUTO_DISMOUNT_ON,9,104,71,20 + LTEXT "Unmount all when:",IDT_AUTO_UNMOUNT_ON,9,104,71,20 GROUPBOX "Password Cache",IDT_PW_CACHE_OPTIONS,4,260,328,68 GROUPBOX "Actions to perform upon logon to Windows",IDT_LOGON,4,63,328,28 CONTROL "Don't show wait message dialog when performing operations",IDC_HIDE_WAITING_DIALOG, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,220,316,10 CONTROL "Use Secure Desktop for password entry",IDC_SECURE_DESKTOP_PASSWORD_ENTRY, @@ -254,19 +254,19 @@ BEGIN CONTROL "Ctrl",IDC_HK_MOD_CTRL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,158,46,10,WS_EX_TRANSPARENT CONTROL "Shift",IDC_HK_MOD_SHIFT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,158,49,10,WS_EX_TRANSPARENT CONTROL "Alt",IDC_HK_MOD_ALT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,216,158,43,10,WS_EX_TRANSPARENT CONTROL "Win",IDC_HK_MOD_WIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,266,158,34,10,WS_EX_TRANSPARENT PUSHBUTTON "Remove",IDC_HOTKEY_REMOVE,304,158,59,14 - CONTROL "Play system notification sound after successful hot-key dismount",IDC_HK_DISMOUNT_PLAY_SOUND, + CONTROL "Play system notification sound after successful hot-key unmount",IDC_HK_UNMOUNT_PLAY_SOUND, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,201,348,10 - CONTROL "Display balloon tooltip after successful hot-key dismount",IDC_HK_DISMOUNT_BALLOON_TOOLTIP, + CONTROL "Display balloon tooltip after successful hot-key unmount",IDC_HK_UNMOUNT_BALLOON_TOOLTIP, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,213,351,10,WS_EX_TRANSPARENT DEFPUSHBUTTON "OK",IDOK,260,236,59,14 PUSHBUTTON "Cancel",IDCANCEL,323,236,59,14 PUSHBUTTON "Reset",IDC_RESET_HOTKEYS,7,236,59,14 RTEXT "Key to assign:",IDT_HOTKEY_KEY,15,142,86,8 - GROUPBOX "Hot Key Options",IDT_DISMOUNT_ACTION,7,188,375,42 + GROUPBOX "Hot Key Options",IDT_UNMOUNT_ACTION,7,188,375,42 GROUPBOX "Shortcut",IDT_ASSIGN_HOTKEY,7,127,375,53 END IDD_TOKEN_PREFERENCES DIALOGEX 0, 0, 316, 229 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU @@ -558,12 +558,12 @@ END // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,19,0 + PRODUCTVERSION 1,26,19,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -576,15 +576,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 @@ -649,12 +649,12 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Mount Volume", IDM_MOUNT_VOLUME MENUITEM "Mount Volume with Options", IDM_MOUNT_VOLUME_OPTIONS MENUITEM "Auto-Mount All Device-Hosted Volumes", IDM_MOUNTALL MENUITEM SEPARATOR - MENUITEM "Dismount Volume", IDM_UNMOUNT_VOLUME - MENUITEM "Dismount All Mounted Volumes", IDM_UNMOUNTALL + MENUITEM "Unmount Volume", IDM_UNMOUNT_VOLUME + MENUITEM "Unmount All Mounted Volumes", IDM_UNMOUNTALL MENUITEM SEPARATOR MENUITEM "Change Volume Password...", IDM_CHANGE_PASSWORD MENUITEM "Add/Remove Keyfiles to/from Volume...", IDM_ADD_REMOVE_VOL_KEYFILES MENUITEM "Remove All Keyfiles from Volume...", IDM_REMOVE_ALL_KEYFILES_FROM_VOL MENUITEM "Set Header Key Derivation Algorithm...", IDM_CHANGE_HEADER_KEY_DERIV_ALGO diff --git a/src/Mount/Mount.vcproj b/src/Mount/Mount.vcproj deleted file mode 100644 index c9a6ebc5..00000000 --- a/src/Mount/Mount.vcproj +++ /dev/null @@ -1,1027 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="Mount" - ProjectGUID="{E4C40F94-E7F9-4981-86E4-186B46F993F3}" - RootNamespace="Mount" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="TCMOUNT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - ExceptionHandling="1" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - EnableFunctionLevelLinking="false" - UsePrecompiledHeader="0" - BrowseInformation="0" - BrowseInformationFile="" - WarningLevel="4" - DebugInformationFormat="4" - DisableSpecificWarnings="4057;4100;4127;4201;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\Debug\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCrypt.exe" - LinkIncremental="2" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Mount.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Mount.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\VeraCrypt.exe "..\Debug\Setup Files" >NUL:
" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TargetEnvironment="3" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="TCMOUNT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - MinimalRebuild="true" - ExceptionHandling="1" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - EnableFunctionLevelLinking="false" - UsePrecompiledHeader="0" - BrowseInformation="0" - BrowseInformationFile="" - WarningLevel="4" - DebugInformationFormat="3" - DisableSpecificWarnings="4057;4100;4127;4201;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\x64\Debug\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCrypt.exe" - LinkIncremental="2" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Mount.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Mount.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL:
" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="TCMOUNT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - DebugInformationFormat="0" - DisableSpecificWarnings="4057;4100;4127;4201;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\Release\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCrypt.exe" - LinkIncremental="1" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Mount.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy Release\VeraCrypt.exe "..\Release\Setup Files"" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - AdditionalIncludeDirectories="" - TargetEnvironment="3" - TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb" - OutputDirectory="" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="TCMOUNT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - DebugInformationFormat="0" - DisableSpecificWarnings="4057;4100;4127;4201;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="..\Crypto\x64\Release\crypto.lib mpr.lib" - OutputFile="$(OutDir)/VeraCrypt.exe" - LinkIncremental="1" - GenerateManifest="false" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Mount.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\Favorites.cpp" - > - </File> - <File - RelativePath=".\Hotkeys.c" - > - </File> - <File - RelativePath=".\MainCom.cpp" - > - </File> - <File - RelativePath=".\MainCom.idl" - > - </File> - <File - RelativePath=".\Mount.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\BaseCom.cpp" - > - </File> - <File - RelativePath="..\Common\BootEncryption.cpp" - > - </File> - <File - RelativePath="..\Common\Cmdline.c" - > - </File> - <File - RelativePath="..\Common\Combo.c" - > - </File> - <File - RelativePath="..\Common\Crc.c" - > - </File> - <File - RelativePath="..\Common\Crypto.c" - > - </File> - <File - RelativePath="..\Common\Dictionary.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Dlgcode.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.c" - > - </File> - <File - RelativePath="..\Common\Endian.c" - > - </File> - <File - RelativePath="..\Common\GfMul.c" - > - </File> - <File - RelativePath="..\Common\Keyfiles.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Language.c" - > - </File> - <File - RelativePath="..\Common\Password.c" - > - </File> - <File - RelativePath="..\Common\Pkcs5.c" - > - </File> - <File - RelativePath="..\Common\Random.c" - > - </File> - <File - RelativePath="..\Common\Registry.c" - > - </File> - <File - RelativePath="..\Common\SecurityToken.cpp" - > - </File> - <File - RelativePath="..\Common\Tests.c" - > - </File> - <File - RelativePath="..\Common\Volumes.c" - > - </File> - <File - RelativePath="..\Common\Wipe.c" - > - </File> - <File - RelativePath="..\Common\Wipe.h" - > - </File> - <File - RelativePath="..\Common\Xml.c" - > - </File> - <File - RelativePath="..\Common\Xts.c" - > - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\Common\Apidrvr.h" - > - </File> - <File - RelativePath="..\Common\BaseCom.h" - > - </File> - <File - RelativePath="..\Common\BootEncryption.h" - > - </File> - <File - RelativePath="..\Common\Cmdline.h" - > - </File> - <File - RelativePath="..\Common\Combo.h" - > - </File> - <File - RelativePath="..\Common\Common.h" - > - </File> - <File - RelativePath="..\Common\Crc.h" - > - </File> - <File - RelativePath="..\Common\Crypto.h" - > - </File> - <File - RelativePath="..\Common\Dictionary.h" - > - </File> - <File - RelativePath="..\Common\Dlgcode.h" - > - </File> - <File - RelativePath="..\Common\EncryptionThreadPool.h" - > - </File> - <File - RelativePath="..\Common\Exception.h" - > - </File> - <File - RelativePath=".\Favorites.h" - > - </File> - <File - RelativePath="..\Common\GfMul.h" - > - </File> - <File - RelativePath=".\Hotkeys.h" - > - </File> - <File - RelativePath="..\Common\Keyfiles.h" - > - </File> - <File - RelativePath="..\Common\Language.h" - > - </File> - <File - RelativePath=".\MainCom.h" - > - </File> - <File - RelativePath=".\Mount.h" - > - </File> - <File - RelativePath="..\Common\Password.h" - > - </File> - <File - RelativePath="..\Common\Pkcs5.h" - > - </File> - <File - RelativePath="..\Common\Random.h" - > - </File> - <File - RelativePath="..\Common\Registry.h" - > - </File> - <File - RelativePath="..\Common\Resource.h" - > - </File> - <File - RelativePath=".\resource.h" - > - </File> - <File - RelativePath="..\Common\SecurityToken.h" - > - </File> - <File - RelativePath="..\Common\Tcdefs.h" - > - </File> - <File - RelativePath="..\Common\Tests.h" - > - </File> - <File - RelativePath="..\Common\Volumes.h" - > - </File> - <File - RelativePath="..\Common\Xml.h" - > - </File> - <File - RelativePath="..\Common\Xts.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - <File - RelativePath="..\Boot\Windows\Rescue_Serpent_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_AES_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_AES_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_SHA2\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Twofish_SHA2\BootSector.bin" - > - </File> - <File - RelativePath=".\Drive_icon_96dpi.bmp" - > - </File> - <File - RelativePath=".\Drive_icon_mask_96dpi.bmp" - > - </File> - <File - RelativePath=".\Logo_288dpi.bmp" - > - </File> - <File - RelativePath=".\Logo_96dpi.bmp" - > - </File> - <File - RelativePath=".\Mount.manifest" - > - </File> - <File - RelativePath=".\Mount.rc" - > - </File> - <File - RelativePath=".\Mount.tlb" - > - </File> - <File - RelativePath=".\System_drive_icon_96dpi.bmp" - > - </File> - <File - RelativePath=".\System_drive_icon_mask_96dpi.bmp" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_mounted.ico" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_volume.ico" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Serpent\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_AES\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_AES\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Serpent\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Serpent\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_AES\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Twofish\BootSector.bin" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_AES\BootSector.bin" - > - </File> - <File - RelativePath="..\Common\Common.rc" - > - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Boot\Windows\Release\Decompressor.com" - > - </File> - <File - RelativePath="..\Common\Language.xml" - > - </File> - <File - RelativePath="..\Resources\Texts\License.rtf" - > - </File> - <File - RelativePath="..\Common\Textual_logo_288dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_96dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_background.bmp" - > - </File> - <File - RelativePath="..\Common\VeraCrypt.ico" - > - </File> - </Filter> - </Filter> - <File - RelativePath="..\Boot\Windows\Rescue_AES_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Serpent_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_Twofish_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_AES_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Serpent_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Release_Twofish_SHA2\BootLoader.com.gz" - > - </File> - <File - RelativePath="..\Boot\Windows\Rescue_SHA2\BootLoader.com.gz" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/Mount/Mount.vcxproj b/src/Mount/Mount.vcxproj index 01d013f7..38e63cac 100644 --- a/src/Mount/Mount.vcxproj +++ b/src/Mount/Mount.vcxproj @@ -1,169 +1,138 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> + <ProjectConfiguration Include="ReleaseCustomEFI|ARM64"> <Configuration>ReleaseCustomEFI</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="ReleaseCustomEFI|x64"> <Configuration>ReleaseCustomEFI</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32"> - <Configuration>Release_SkipOsDriverReqCheck</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|x64"> - <Configuration>Release_SkipOsDriverReqCheck</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{E4C40F94-E7F9-4981-86E4-186B46F993F3}</ProjectGuid> <RootNamespace>Mount</RootNamespace> <Keyword>Win32Proj</Keyword> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <ProjectName>Mount</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> + <SpectreMitigation>Spectre</SpectreMitigation> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCrypt</TargetName> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCrypt</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCrypt</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">VeraCrypt</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCrypt</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCrypt</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCrypt</TargetName> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -173,46 +142,50 @@ <MinimalRebuild>true</MinimalRebuild> <ExceptionHandling>Sync</ExceptionHandling> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> + <FunctionLevelLinking> + </FunctionLevelLinking> <PrecompiledHeader> </PrecompiledHeader> <BrowseInformation> </BrowseInformation> <BrowseInformationFile> </BrowseInformationFile> <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Mount.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> + <TargetMachine>MachineX64</TargetMachine> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> <Command>md "..\Debug\Setup Files" 2>NUL: -copy Debug\VeraCrypt.exe "..\Debug\Setup Files" >NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: </Command> </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -222,11 +195,12 @@ copy Debug\VeraCrypt.exe "..\Debug\Setup Files" >NUL: <MinimalRebuild>true</MinimalRebuild> <ExceptionHandling>Sync</ExceptionHandling> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> + <FunctionLevelLinking> + </FunctionLevelLinking> <PrecompiledHeader> </PrecompiledHeader> <BrowseInformation> </BrowseInformation> <BrowseInformationFile> @@ -234,36 +208,36 @@ copy Debug\VeraCrypt.exe "..\Debug\Setup Files" >NUL: <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Mount.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.exe" >NUL: </Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -278,125 +252,39 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCrypt.exe "..\Release\Setup Files"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCrypt.exe "..\Release\Setup Files"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> + <TargetMachine>MachineX64</TargetMachine> </Link> <Manifest> <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy Release\VeraCrypt.exe "..\Release\Setup Files"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -411,36 +299,36 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> </Link> <Manifest> <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> @@ -448,11 +336,11 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: </Midl> <ClCompile> <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> <PrecompiledHeader> </PrecompiledHeader> <AssemblerOutput>All</AssemblerOutput> @@ -460,14 +348,14 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -480,17 +368,16 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: </Manifest> <PostBuildEvent> <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'"> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> <OutputDirectory> </OutputDirectory> </Midl> <ClCompile> @@ -507,31 +394,30 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;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;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> </Link> <Manifest> <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"</Command> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.exe"</Command> </PostBuildEvent> <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\Common\CommandAPDU.cpp" /> <ClCompile Include="..\Common\EMVCard.cpp" /> @@ -547,57 +433,49 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: <ClCompile Include="..\Setup\SelfExtract.c" /> <ClCompile Include="Favorites.cpp" /> <ClCompile Include="Hotkeys.c" /> <ClCompile Include="MainCom.cpp" /> <ClCompile Include="Mount.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\BaseCom.cpp" /> <ClCompile Include="..\Common\BootEncryption.cpp" /> <ClCompile Include="..\Common\Cmdline.c" /> <ClCompile Include="..\Common\Combo.c" /> <ClCompile Include="..\Common\Crc.c" /> <ClCompile Include="..\Common\Crypto.c" /> <ClCompile Include="..\Common\Dictionary.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\Dlgcode.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\EncryptionThreadPool.c" /> <ClCompile Include="..\Common\Endian.c" /> <ClCompile Include="..\Common\GfMul.c" /> <ClCompile Include="..\Common\Keyfiles.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\Language.c" /> <ClCompile Include="..\Common\Password.c" /> <ClCompile Include="..\Common\Pkcs5.c" /> <ClCompile Include="..\Common\Random.c" /> @@ -707,42 +585,30 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: <Manifest Include="Mount.manifest" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="Mount.rc" /> <ResourceCompile Include="..\Common\Common.rc"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild> </ResourceCompile> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> <ProjectReference Include="..\Common\Lzma.vcxproj"> <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> </ProjectReference> <ProjectReference Include="..\Common\Zip.vcxproj"> <Project>{6316ee71-0210-4ca4-bcc7-cfb7a3c090fc}</Project> </ProjectReference> <ProjectReference Include="..\Crypto\Crypto.vcxproj"> <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Driver\Driver.vcxproj"> - <Project>{ef5ef444-18d0-40d7-8dfa-775ec4448602}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> <ProjectReference Include="..\Format\Format.vcxproj"> <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/src/Mount/Mount.vcxproj.user b/src/Mount/Mount.vcxproj.user index 9ab5ba9a..88a55094 100644 --- a/src/Mount/Mount.vcxproj.user +++ b/src/Mount/Mount.vcxproj.user @@ -1,8 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LocalDebuggerCommandArguments> - </LocalDebuggerCommandArguments> - <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> - </PropertyGroup> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> </Project>
\ No newline at end of file diff --git a/src/Mount/Mount_vs2019.vcxproj b/src/Mount/Mount_vs2019.vcxproj deleted file mode 100644 index 4a944eec..00000000 --- a/src/Mount/Mount_vs2019.vcxproj +++ /dev/null @@ -1,812 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|ARM64"> - <Configuration>Debug</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|ARM64"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseCustomEFI|x64"> - <Configuration>ReleaseCustomEFI</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|ARM64"> - <Configuration>Release</Configuration> - <Platform>ARM64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{E4C40F94-E7F9-4981-86E4-186B46F993F3}</ProjectGuid> - <RootNamespace>Mount</RootNamespace> - <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> - <ProjectName>Mount</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v142</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(Platform)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(Platform)\$(Configuration)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest> - <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCrypt</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCrypt</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling>Sync</ExceptionHandling> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> - <BrowseInformation> - </BrowseInformation> - <BrowseInformationFile> - </BrowseInformationFile> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)Mount.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy Debug\VeraCrypt.exe "..\Debug\Setup Files" >NUL: -</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling>Sync</ExceptionHandling> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> - <BrowseInformation> - </BrowseInformation> - <BrowseInformationFile> - </BrowseInformationFile> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)Mount.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: -</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling>Sync</ExceptionHandling> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <FunctionLevelLinking>false</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> - <BrowseInformation> - </BrowseInformation> - <BrowseInformationFile> - </BrowseInformationFile> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)Mount.pdb</ProgramDatabaseFile> - <SubSystem>Windows</SubSystem> - <DataExecutionPrevention>true</DataExecutionPrevention> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>md "..\Debug\Setup Files" 2>NUL: -copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.exe" >NUL: -</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCrypt.exe "..\Release\Setup Files"</Command> - </PostBuildEvent> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy Release\VeraCrypt.exe "..\Release\Setup Files"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TargetEnvironment>X64</TargetEnvironment> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - <TargetMachine>MachineX64</TargetMachine> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'"> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> - <OutputDirectory> - </OutputDirectory> - </Midl> - <ClCompile> - <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <BufferSecurityCheck>true</BufferSecurityCheck> - <PrecompiledHeader> - </PrecompiledHeader> - <AssemblerOutput>All</AssemblerOutput> - <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> - <WarningLevel>Level4</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <DisableSpecificWarnings>4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <GenerateDebugInformation>true</GenerateDebugInformation> - <GenerateMapFile>true</GenerateMapFile> - <SubSystem>Windows</SubSystem> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <RandomizedBaseAddress>true</RandomizedBaseAddress> - <DataExecutionPrevention>true</DataExecutionPrevention> - </Link> - <Manifest> - <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> - </Manifest> - <PostBuildEvent> - <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.exe"</Command> - </PostBuildEvent> - <ResourceCompile> - <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </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="..\Setup\SelfExtract.c" /> - <ClCompile Include="Favorites.cpp" /> - <ClCompile Include="Hotkeys.c" /> - <ClCompile Include="MainCom.cpp" /> - <ClCompile Include="Mount.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\BaseCom.cpp" /> - <ClCompile Include="..\Common\BootEncryption.cpp" /> - <ClCompile Include="..\Common\Cmdline.c" /> - <ClCompile Include="..\Common\Combo.c" /> - <ClCompile Include="..\Common\Crc.c" /> - <ClCompile Include="..\Common\Crypto.c" /> - <ClCompile Include="..\Common\Dictionary.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\Dlgcode.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\EncryptionThreadPool.c" /> - <ClCompile Include="..\Common\Endian.c" /> - <ClCompile Include="..\Common\GfMul.c" /> - <ClCompile Include="..\Common\Keyfiles.c"> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> - <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs> - </ClCompile> - <ClCompile Include="..\Common\Language.c" /> - <ClCompile Include="..\Common\Password.c" /> - <ClCompile Include="..\Common\Pkcs5.c" /> - <ClCompile Include="..\Common\Random.c" /> - <ClCompile Include="..\Common\Registry.c" /> - <ClCompile Include="..\Common\SecurityToken.cpp" /> - <ClCompile Include="..\Common\Tests.c" /> - <ClCompile Include="..\Common\Volumes.c" /> - <ClCompile Include="..\Common\Wipe.c" /> - <ClCompile Include="..\Common\Xml.c" /> - <ClCompile Include="..\Common\Xts.c" /> - </ItemGroup> - <ItemGroup> - <Midl Include="MainCom.idl" /> - </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" /> - <ClInclude Include="..\Common\BootEncryption.h" /> - <ClInclude Include="..\Common\Cmdline.h" /> - <ClInclude Include="..\Common\Combo.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\EncryptionThreadPool.h" /> - <ClInclude Include="..\Common\Exception.h" /> - <ClInclude Include="Favorites.h" /> - <ClInclude Include="..\Common\GfMul.h" /> - <ClInclude Include="Hotkeys.h" /> - <ClInclude Include="..\Common\Keyfiles.h" /> - <ClInclude Include="..\Common\Language.h" /> - <ClInclude Include="MainCom.h" /> - <ClInclude Include="Mount.h" /> - <ClInclude Include="..\Common\Password.h" /> - <ClInclude Include="..\Common\Pkcs5.h" /> - <ClInclude Include="..\Common\Random.h" /> - <ClInclude Include="..\Common\Registry.h" /> - <ClInclude Include="..\Common\Resource.h" /> - <ClInclude Include="resource.h" /> - <ClInclude Include="..\Common\SecurityToken.h" /> - <ClInclude Include="..\Common\Tcdefs.h" /> - <ClInclude Include="..\Common\Tests.h" /> - <ClInclude Include="..\Common\Volumes.h" /> - <ClInclude Include="..\Common\Xml.h" /> - <ClInclude Include="..\Common\Xts.h" /> - </ItemGroup> - <ItemGroup> - <None Include="..\Boot\Windows\Release_Camellia\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Camellia_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Camellia\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Camellia_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Serpent_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_AES_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Twofish_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_AES_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_SHA2\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Twofish_SHA2\BootSector.bin" /> - <None Include="Drive_icon_96dpi.bmp" /> - <None Include="Drive_icon_mask_96dpi.bmp" /> - <None Include="Logo_288dpi.bmp" /> - <None Include="Logo_96dpi.bmp" /> - <None Include="Mount.tlb" /> - <None Include="System_drive_icon_96dpi.bmp" /> - <None Include="System_drive_icon_mask_96dpi.bmp" /> - <None Include="..\Common\VeraCrypt_mounted.ico" /> - <None Include="..\Common\VeraCrypt_volume.ico" /> - <None Include="..\Boot\Windows\Release_Serpent\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Release_AES\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Release\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Release_Twofish\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue_AES\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz" /> - <None Include="..\Boot\Windows\Rescue\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Twofish\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_Serpent\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Serpent\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_AES\BootSector.bin" /> - <None Include="..\Boot\Windows\Release\BootSector.bin" /> - <None Include="..\Boot\Windows\Rescue_Twofish\BootSector.bin" /> - <None Include="..\Boot\Windows\Release_AES\BootSector.bin" /> - <None Include="..\Boot\Windows\Release\Decompressor.com" /> - <None Include="..\Common\Language.xml" /> - <None Include="..\Resources\Texts\License.rtf" /> - <None Include="..\Common\Textual_logo_288dpi.bmp" /> - <None Include="..\Common\Textual_logo_96dpi.bmp" /> - <None Include="..\Common\Textual_logo_background.bmp" /> - <None Include="..\Common\VeraCrypt.ico" /> - </ItemGroup> - <ItemGroup> - <Manifest Include="Mount.manifest" /> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="Mount.rc" /> - <ResourceCompile Include="..\Common\Common.rc"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Common\Lzma_vs2019.vcxproj"> - <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> - </ProjectReference> - <ProjectReference Include="..\Crypto\Crypto_vs2019.vcxproj"> - <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Format\Format_vs2019.vcxproj"> - <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/src/Mount/Mount_vs2019.vcxproj.user b/src/Mount/Mount_vs2019.vcxproj.user deleted file mode 100644 index 88a55094..00000000 --- a/src/Mount/Mount_vs2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup /> -</Project>
\ No newline at end of file diff --git a/src/Mount/Resource.h b/src/Mount/Resource.h index fef9da49..860d4f99 100644 --- a/src/Mount/Resource.h +++ b/src/Mount/Resource.h @@ -37,13 +37,13 @@ #define IDC_ENABLE_NEW_KEYFILES 1012 #define IDC_PRESERVE_TIMESTAMPS 1013 #define IDC_PREF_WIPE_CACHE_ON_EXIT 1014 #define IDC_PREF_CACHE_PASSWORDS 1016 #define IDC_DIRECTORY 1017 -#define IDC_PREF_DISMOUNT_LOGOFF 1018 +#define IDC_PREF_UNMOUNT_LOGOFF 1018 #define IDC_BROWSE_DIRS 1019 -#define IDC_PREF_DISMOUNT_INACTIVE 1020 +#define IDC_PREF_UNMOUNT_INACTIVE 1020 #define IDC_AUTORUN_DISABLE 1021 #define IDC_AUTORUN_START 1022 #define IDC_BENCHMARK 1023 #define IDC_AUTORUN_MOUNT 1024 #define IDC_VOLUME_NAME 1025 @@ -85,35 +85,35 @@ #define IDC_EXIT 1062 #define IDC_TRAVEL_OPEN_EXPLORER 1063 #define IDC_TRAV_CACHE_PASSWORDS 1064 #define IDC_UNMOUNTALL 1065 #define IDT_TASKBAR_ICON 1066 -#define IDT_AUTO_DISMOUNT 1067 -#define IDC_PREF_FORCE_AUTO_DISMOUNT 1068 -#define IDC_PREF_DISMOUNT_INACTIVE_TIME 1069 +#define IDT_AUTO_UNMOUNT 1067 +#define IDC_PREF_FORCE_AUTO_UNMOUNT 1068 +#define IDC_PREF_UNMOUNT_INACTIVE_TIME 1069 #define IDT_MINUTES 1070 -#define IDC_PREF_DISMOUNT_SCREENSAVER 1071 -#define IDC_PREF_DISMOUNT_POWERSAVING 1072 -#define IDT_AUTO_DISMOUNT_ON 1073 -#define IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT 1074 +#define IDC_PREF_UNMOUNT_SCREENSAVER 1071 +#define IDC_PREF_UNMOUNT_POWERSAVING 1072 +#define IDT_AUTO_UNMOUNT_ON 1073 +#define IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT 1074 #define IDC_CLOSE_BKG_TASK_WHEN_NOVOL 1075 #define IDC_MORE_INFO_ON_HW_ACCELERATION 1076 #define IDT_LOGON 1077 #define IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION 1078 #define IDC_PREF_LOGON_START 1079 #define IDC_PREF_LOGON_MOUNT_DEVICES 1080 #define IDC_SHOW_PASSWORD_CHPWD_NEW 1081 -#define IDC_HK_DISMOUNT_BALLOON_TOOLTIP 1082 +#define IDC_HK_UNMOUNT_BALLOON_TOOLTIP 1082 #define IDC_SHOW_PASSWORD_CHPWD_ORI 1083 -#define IDC_HK_DISMOUNT_PLAY_SOUND 1084 +#define IDC_HK_UNMOUNT_PLAY_SOUND 1084 #define IDC_HOTKEY_ASSIGN 1085 #define IDC_HOTKEY_REMOVE 1086 #define IDC_HOTKEY_KEY 1087 #define IDT_HOTKEY_KEY 1088 #define IDC_HOTKEY_LIST 1089 #define IDC_RESET_HOTKEYS 1090 -#define IDT_DISMOUNT_ACTION 1091 +#define IDT_UNMOUNT_ACTION 1091 #define IDT_ASSIGN_HOTKEY 1092 #define IDC_HK_MOD_SHIFT 1093 #define IDC_HK_MOD_CTRL 1094 #define IDC_HK_MOD_ALT 1095 #define IDC_HK_MOD_WIN 1096 @@ -155,11 +155,11 @@ #define IDT_PARALLELIZATION_OPTIONS 1132 #define IDT_LIMIT_ENC_THREAD_POOL_NOTE 1133 #define IDC_FAV_VOL_OPTIONS_GROUP_BOX 1134 #define IDC_FAVORITES_HELP_LINK 1135 #define IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX 1136 -#define IDC_PREF_DISMOUNT_SESSION_LOCKED 1137 +#define IDC_PREF_UNMOUNT_SESSION_LOCKED 1137 #define IDT_NEW_PKCS5_PRF 1138 #define IDC_PKCS5_OLD_PRF_ID 1139 #define IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT 1141 #define IDT_OLD_PIM 1142 #define IDC_OLD_PIM 1143 @@ -1,6 +1,6 @@ -Copyright 2013-2023 IDRIX +Copyright 2013-2025 IDRIX Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/Platform/Buffer.cpp b/src/Platform/Buffer.cpp index 82c2a3f1..412f06a5 100644 --- a/src/Platform/Buffer.cpp +++ b/src/Platform/Buffer.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -42,11 +42,11 @@ namespace VeraCrypt Free(); } try { - DataPtr = static_cast<byte *> ((alignment > 0)? Memory::AllocateAligned (size, alignment) : Memory::Allocate (size)); + DataPtr = static_cast<uint8 *> ((alignment > 0)? Memory::AllocateAligned (size, alignment) : Memory::Allocate (size)); DataSize = size; DataAlignment = alignment; } catch (...) { diff --git a/src/Platform/Buffer.h b/src/Platform/Buffer.h index 1150fcf5..53215bf5 100644 --- a/src/Platform/Buffer.h +++ b/src/Platform/Buffer.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -22,50 +22,50 @@ namespace VeraCrypt class ConstBufferPtr { public: ConstBufferPtr () : DataPtr (nullptr), DataSize (0) { } - ConstBufferPtr (const byte *data, size_t size) + ConstBufferPtr (const uint8 *data, size_t size) : DataPtr (data), DataSize (size) { } virtual ~ConstBufferPtr () { } - operator const byte * () const { return DataPtr; } + operator const uint8 * () const { return DataPtr; } bool IsDataEqual (const ConstBufferPtr &other) const { return Memory::Compare (DataPtr, DataSize, other.DataPtr, other.DataSize) == 0; } - const byte *Get () const { return DataPtr; } + const uint8 *Get () const { return DataPtr; } ConstBufferPtr GetRange (size_t offset, size_t size) const; - void Set (const byte *data, size_t size) { DataPtr = data; DataSize = size; } + void Set (const uint8 *data, size_t size) { DataPtr = data; DataSize = size; } size_t Size () const { return DataSize; } protected: - const byte *DataPtr; + const uint8 *DataPtr; size_t DataSize; }; class BufferPtr { public: BufferPtr () : DataPtr (nullptr), DataSize (0) { } - BufferPtr (byte *data, size_t size) + BufferPtr (uint8 *data, size_t size) : DataPtr (data), DataSize (size) { } virtual ~BufferPtr () { } - operator byte * () const { return DataPtr; } + operator uint8 * () const { return DataPtr; } void CopyFrom (const ConstBufferPtr &bufferPtr) const; void Erase () const { Zero(); } - byte *Get () const { return DataPtr; } + uint8 *Get () const { return DataPtr; } BufferPtr GetRange (size_t offset, size_t size) const; - void Set (byte *data, size_t size) { DataPtr = data; DataSize = size; } + void Set (uint8 *data, size_t size) { DataPtr = data; DataSize = size; } size_t Size () const { return DataSize; } void Zero () const { Memory::Zero (DataPtr, DataSize); } operator ConstBufferPtr () const { return ConstBufferPtr (DataPtr, DataSize); } protected: - byte *DataPtr; + uint8 *DataPtr; size_t DataSize; }; class Buffer { @@ -75,25 +75,25 @@ namespace VeraCrypt Buffer (const ConstBufferPtr &bufferPtr, size_t alignment = 0) { CopyFrom (bufferPtr, alignment); } virtual ~Buffer (); virtual void Allocate (size_t size, size_t alignment = 0); virtual void CopyFrom (const ConstBufferPtr &bufferPtr, size_t alignment = 0); - virtual byte *Ptr () const { return DataPtr; } + virtual uint8 *Ptr () const { return DataPtr; } virtual void Erase (); virtual void Free (); virtual BufferPtr GetRange (size_t offset, size_t size) const; virtual size_t Size () const { return DataSize; } virtual size_t Alignment () const { return DataAlignment; } virtual bool IsAllocated () const { return DataSize != 0; } virtual void Zero (); - virtual operator byte * () const { return DataPtr; } + virtual operator uint8 * () const { return DataPtr; } virtual operator BufferPtr () const { return BufferPtr (DataPtr, DataSize); } virtual operator ConstBufferPtr () const { return ConstBufferPtr (DataPtr, DataSize); } protected: - byte *DataPtr; + uint8 *DataPtr; size_t DataSize; size_t DataAlignment; private: Buffer (const Buffer &); diff --git a/src/Platform/Directory.h b/src/Platform/Directory.h index b960db0e..28eae166 100644 --- a/src/Platform/Directory.h +++ b/src/Platform/Directory.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Event.cpp b/src/Platform/Event.cpp index 86dcdde1..d60b6f4a 100644 --- a/src/Platform/Event.cpp +++ b/src/Platform/Event.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Event.h b/src/Platform/Event.h index 7d1cc2e4..e440a604 100644 --- a/src/Platform/Event.h +++ b/src/Platform/Event.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Exception.cpp b/src/Platform/Exception.cpp index 7bce461f..b6358683 100644 --- a/src/Platform/Exception.cpp +++ b/src/Platform/Exception.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Exception.h b/src/Platform/Exception.h index 36981a74..a768bfda 100644 --- a/src/Platform/Exception.h +++ b/src/Platform/Exception.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -94,11 +94,13 @@ namespace VeraCrypt TC_EXCEPTION (StringConversionFailed); \ TC_EXCEPTION (TerminalNotFound); \ TC_EXCEPTION (TestFailed); \ TC_EXCEPTION (TimeOut); \ TC_EXCEPTION (UnknownException); \ - TC_EXCEPTION (UserAbort) + TC_EXCEPTION (UserAbort); \ + TC_EXCEPTION (MountPointBlocked); \ + TC_EXCEPTION (MountPointNotAllowed) TC_EXCEPTION_SET; #undef TC_EXCEPTION } diff --git a/src/Platform/File.h b/src/Platform/File.h index a8befe38..28e5f6c9 100644 --- a/src/Platform/File.h +++ b/src/Platform/File.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/FileCommon.cpp b/src/Platform/FileCommon.cpp index 11d23dd2..5f493259 100644 --- a/src/Platform/FileCommon.cpp +++ b/src/Platform/FileCommon.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/FileStream.h b/src/Platform/FileStream.h index 0ef40862..7b1dd212 100644 --- a/src/Platform/FileStream.h +++ b/src/Platform/FileStream.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -41,11 +41,11 @@ namespace VeraCrypt { string str; vector <char> buffer (4096); uint64 len; - while ((len = DataFile->Read (BufferPtr (reinterpret_cast <byte *> (&buffer[0]), buffer.size()))) > 0) + while ((len = DataFile->Read (BufferPtr (reinterpret_cast <uint8 *> (&buffer[0]), buffer.size()))) > 0) str.insert (str.end(), buffer.begin(), buffer.begin() + static_cast <int> (len)); return str; } diff --git a/src/Platform/FilesystemPath.h b/src/Platform/FilesystemPath.h index c92f684e..f4ffadd8 100644 --- a/src/Platform/FilesystemPath.h +++ b/src/Platform/FilesystemPath.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Finally.h b/src/Platform/Finally.h index 63f07109..54c9f27b 100644 --- a/src/Platform/Finally.h +++ b/src/Platform/Finally.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/ForEach.h b/src/Platform/ForEach.h index a6131ebb..1f29e196 100644 --- a/src/Platform/ForEach.h +++ b/src/Platform/ForEach.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Functor.h b/src/Platform/Functor.h index e23e12dd..b88af814 100644 --- a/src/Platform/Functor.h +++ b/src/Platform/Functor.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Memory.cpp b/src/Platform/Memory.cpp index c4afed64..05758c14 100644 --- a/src/Platform/Memory.cpp +++ b/src/Platform/Memory.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Memory.h b/src/Platform/Memory.h index e0d4bfe3..441b1da6 100644 --- a/src/Platform/Memory.h +++ b/src/Platform/Memory.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -83,11 +83,11 @@ namespace VeraCrypt }; class Endian { public: - static byte Big (const byte &x) + static uint8 Big (const uint8 &x) { return x; } static uint16 Big (const uint16 &x) @@ -115,11 +115,11 @@ namespace VeraCrypt #else return MirrorBytes (x); #endif } - static byte Little (const byte &x) + static uint8 Little (const uint8 &x) { return x; } static uint16 Little (const uint16 &x) @@ -155,26 +155,26 @@ namespace VeraCrypt return (x << 8) | (x >> 8); } static uint32 MirrorBytes (const uint32 &x) { - uint32 n = (byte) x; - n <<= 8; n |= (byte) (x >> 8); - n <<= 8; n |= (byte) (x >> 16); - return (n << 8) | (byte) (x >> 24); + uint32 n = (uint8) x; + n <<= 8; n |= (uint8) (x >> 8); + n <<= 8; n |= (uint8) (x >> 16); + return (n << 8) | (uint8) (x >> 24); } static uint64 MirrorBytes (const uint64 &x) { - uint64 n = (byte) x; - n <<= 8; n |= (byte) (x >> 8); - n <<= 8; n |= (byte) (x >> 16); - n <<= 8; n |= (byte) (x >> 24); - n <<= 8; n |= (byte) (x >> 32); - n <<= 8; n |= (byte) (x >> 40); - n <<= 8; n |= (byte) (x >> 48); - return (n << 8) | (byte) (x >> 56); + uint64 n = (uint8) x; + n <<= 8; n |= (uint8) (x >> 8); + n <<= 8; n |= (uint8) (x >> 16); + n <<= 8; n |= (uint8) (x >> 24); + n <<= 8; n |= (uint8) (x >> 32); + n <<= 8; n |= (uint8) (x >> 40); + n <<= 8; n |= (uint8) (x >> 48); + return (n << 8) | (uint8) (x >> 56); } }; } #endif // TC_HEADER_Platform_Memory diff --git a/src/Platform/MemoryStream.cpp b/src/Platform/MemoryStream.cpp index 8bf229fe..f750606f 100644 --- a/src/Platform/MemoryStream.cpp +++ b/src/Platform/MemoryStream.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -16,11 +16,11 @@ namespace VeraCrypt { MemoryStream::MemoryStream (const ConstBufferPtr &data) : ReadPosition (0) { - Data = vector <byte> (data.Size()); + Data = vector <uint8> (data.Size()); BufferPtr (&Data[0], Data.size()).CopyFrom (data); } uint64 MemoryStream::Read (const BufferPtr &buffer) { diff --git a/src/Platform/MemoryStream.h b/src/Platform/MemoryStream.h index 3df0bd13..a20b12e0 100644 --- a/src/Platform/MemoryStream.h +++ b/src/Platform/MemoryStream.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -30,11 +30,11 @@ namespace VeraCrypt virtual uint64 Read (const BufferPtr &buffer); virtual void ReadCompleteBuffer (const BufferPtr &buffer); virtual void Write (const ConstBufferPtr &data); protected: - vector <byte> Data; + vector <uint8> Data; size_t ReadPosition; }; } #endif // TC_HEADER_Platform_MemoryStream diff --git a/src/Platform/Mutex.h b/src/Platform/Mutex.h index 83082825..fc58b8cd 100644 --- a/src/Platform/Mutex.h +++ b/src/Platform/Mutex.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Platform.h b/src/Platform/Platform.h index 6f7f791e..72ee9541 100644 --- a/src/Platform/Platform.h +++ b/src/Platform/Platform.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/PlatformBase.h b/src/Platform/PlatformBase.h index 22022dc7..10f0bb21 100644 --- a/src/Platform/PlatformBase.h +++ b/src/Platform/PlatformBase.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -41,21 +41,21 @@ namespace VeraCrypt # ifndef TC_INT_TYPES_DEFINED typedef __int8 int8; typedef __int16 int16; typedef __int32 int32; typedef __int64 int64; - typedef unsigned __int8 byte; + typedef unsigned __int8 uint8; typedef unsigned __int16 uint16; typedef unsigned __int32 uint32; typedef unsigned __int64 uint64; # endif #else typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; - typedef uint8_t byte; + typedef uint8_t uint8; typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; #endif } diff --git a/src/Platform/PlatformTest.cpp b/src/Platform/PlatformTest.cpp index 7362d6bf..df7f447b 100644 --- a/src/Platform/PlatformTest.cpp +++ b/src/Platform/PlatformTest.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -74,11 +74,11 @@ namespace VeraCrypt wstringList.push_back (wstr + L"2"); wstringList.push_back (wstr + L"3"); Buffer buffer (10); for (size_t i = 0; i < buffer.Size(); i++) - buffer[i] = (byte) i; + buffer[i] = (uint8) i; ser.Serialize ("int32", i32); ser.Serialize ("int64", i64); ser.Serialize ("string", str); ser.Serialize ("wstring", wstr); @@ -139,11 +139,11 @@ namespace VeraCrypt } Buffer dbuffer (10); ser.Deserialize ("buffer", buffer); for (size_t i = 0; i < buffer.Size(); i++) - if (buffer[i] != (byte) i) + if (buffer[i] != (uint8) i) throw TestFailed (SRC_POS); shared_ptr <ExecutedProcessFailed> dex = Serializable::DeserializeNew <ExecutedProcessFailed> (stream); if (!dex || dex->GetCommand() != "cmd" @@ -236,11 +236,11 @@ namespace VeraCrypt } bool PlatformTest::TestAll () { // Integer types - if (sizeof (byte) != 1 || sizeof (int8) != 1 || sizeof (__int8) != 1) throw TestFailed (SRC_POS); + if (sizeof (uint8) != 1 || sizeof (int8) != 1 || sizeof (__int8) != 1) throw TestFailed (SRC_POS); if (sizeof (uint16) != 2 || sizeof (int16) != 2 || sizeof (__int16) != 2) throw TestFailed (SRC_POS); if (sizeof (uint32) != 4 || sizeof (int32) != 4 || sizeof (__int32) != 4) throw TestFailed (SRC_POS); if (sizeof (uint64) != 8 || sizeof (int64) != 8) throw TestFailed (SRC_POS); // Exception handling diff --git a/src/Platform/PlatformTest.h b/src/Platform/PlatformTest.h index 64810f85..c17bad7c 100644 --- a/src/Platform/PlatformTest.h +++ b/src/Platform/PlatformTest.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Serializable.cpp b/src/Platform/Serializable.cpp index 4a307e92..ace4a819 100644 --- a/src/Platform/Serializable.cpp +++ b/src/Platform/Serializable.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Serializable.h b/src/Platform/Serializable.h index c92bc170..94b385fb 100644 --- a/src/Platform/Serializable.h +++ b/src/Platform/Serializable.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Serializer.cpp b/src/Platform/Serializer.cpp index b69fe891..ea245436 100644 --- a/src/Platform/Serializer.cpp +++ b/src/Platform/Serializer.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -19,31 +19,31 @@ namespace VeraCrypt { template <typename T> T Serializer::Deserialize () { uint64 size; - DataStream->ReadCompleteBuffer (BufferPtr ((byte *) &size, sizeof (size))); + DataStream->ReadCompleteBuffer (BufferPtr ((uint8 *) &size, sizeof (size))); if (Endian::Big (size) != sizeof (T)) throw ParameterIncorrect (SRC_POS); T data; - DataStream->ReadCompleteBuffer (BufferPtr ((byte *) &data, sizeof (data))); + DataStream->ReadCompleteBuffer (BufferPtr ((uint8 *) &data, sizeof (data))); return Endian::Big (data); } void Serializer::Deserialize (const string &name, bool &data) { ValidateName (name); - data = Deserialize <byte> () == 1; + data = Deserialize <uint8> () == 1; } - void Serializer::Deserialize (const string &name, byte &data) + void Serializer::Deserialize (const string &name, uint8 &data) { ValidateName (name); - data = Deserialize <byte> (); + data = Deserialize <uint8> (); } void Serializer::Deserialize (const string &name, int32 &data) { ValidateName (name); @@ -125,11 +125,11 @@ namespace VeraCrypt string Serializer::DeserializeString () { uint64 size = Deserialize <uint64> (); vector <char> data ((size_t) size); - DataStream->ReadCompleteBuffer (BufferPtr ((byte *) &data[0], (size_t) size)); + DataStream->ReadCompleteBuffer (BufferPtr ((uint8 *) &data[0], (size_t) size)); return string (&data[0]); } string Serializer::DeserializeString (const string &name) @@ -153,11 +153,11 @@ namespace VeraCrypt wstring Serializer::DeserializeWString () { uint64 size = Deserialize <uint64> (); vector <wchar_t> data ((size_t) size / sizeof (wchar_t)); - DataStream->ReadCompleteBuffer (BufferPtr ((byte *) &data[0], (size_t) size)); + DataStream->ReadCompleteBuffer (BufferPtr ((uint8 *) &data[0], (size_t) size)); return wstring (&data[0]); } list <wstring> Serializer::DeserializeWStringList (const string &name) @@ -180,24 +180,24 @@ namespace VeraCrypt template <typename T> void Serializer::Serialize (T data) { uint64 size = Endian::Big (uint64 (sizeof (data))); - DataStream->Write (ConstBufferPtr ((byte *) &size, sizeof (size))); + DataStream->Write (ConstBufferPtr ((uint8 *) &size, sizeof (size))); data = Endian::Big (data); - DataStream->Write (ConstBufferPtr ((byte *) &data, sizeof (data))); + DataStream->Write (ConstBufferPtr ((uint8 *) &data, sizeof (data))); } void Serializer::Serialize (const string &name, bool data) { SerializeString (name); - byte d = data ? 1 : 0; + uint8 d = data ? 1 : 0; Serialize (d); } - void Serializer::Serialize (const string &name, byte data) + void Serializer::Serialize (const string &name, uint8 data) { SerializeString (name); Serialize (data); } @@ -280,18 +280,18 @@ namespace VeraCrypt } void Serializer::SerializeString (const string &data) { Serialize ((uint64) data.size() + 1); - DataStream->Write (ConstBufferPtr ((byte *) (data.data() ? data.data() : data.c_str()), data.size() + 1)); + DataStream->Write (ConstBufferPtr ((uint8 *) (data.data() ? data.data() : data.c_str()), data.size() + 1)); } void Serializer::SerializeWString (const wstring &data) { uint64 size = (data.size() + 1) * sizeof (wchar_t); Serialize (size); - DataStream->Write (ConstBufferPtr ((byte *) (data.data() ? data.data() : data.c_str()), (size_t) size)); + DataStream->Write (ConstBufferPtr ((uint8 *) (data.data() ? data.data() : data.c_str()), (size_t) size)); } void Serializer::ValidateName (const string &name) { string dName = DeserializeString(); diff --git a/src/Platform/Serializer.h b/src/Platform/Serializer.h index c2dac324..81092fe5 100644 --- a/src/Platform/Serializer.h +++ b/src/Platform/Serializer.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -25,11 +25,11 @@ namespace VeraCrypt public: Serializer (shared_ptr <Stream> stream) : DataStream (stream) { } virtual ~Serializer () { } void Deserialize (const string &name, bool &data); - void Deserialize (const string &name, byte &data); + void Deserialize (const string &name, uint8 &data); void Deserialize (const string &name, int32 &data); void Deserialize (const string &name, int64 &data); void Deserialize (const string &name, uint32 &data); void Deserialize (const string &name, uint64 &data); void Deserialize (const string &name, string &data); @@ -43,11 +43,11 @@ namespace VeraCrypt string DeserializeString (const string &name); list <string> DeserializeStringList (const string &name); wstring DeserializeWString (const string &name); list <wstring> DeserializeWStringList (const string &name); void Serialize (const string &name, bool data); - void Serialize (const string &name, byte data); + void Serialize (const string &name, uint8 data); void Serialize (const string &name, const char *data); void Serialize (const string &name, int32 data); void Serialize (const string &name, int64 data); void Serialize (const string &name, uint32 data); void Serialize (const string &name, uint64 data); diff --git a/src/Platform/SerializerFactory.cpp b/src/Platform/SerializerFactory.cpp index 4c7f4f7e..87091583 100644 --- a/src/Platform/SerializerFactory.cpp +++ b/src/Platform/SerializerFactory.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/SerializerFactory.h b/src/Platform/SerializerFactory.h index 9c53d309..a36ffa03 100644 --- a/src/Platform/SerializerFactory.h +++ b/src/Platform/SerializerFactory.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/SharedPtr.h b/src/Platform/SharedPtr.h index f80b2167..9b47388a 100644 --- a/src/Platform/SharedPtr.h +++ b/src/Platform/SharedPtr.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/SharedVal.h b/src/Platform/SharedVal.h index fc64f3f3..b88ca3e2 100644 --- a/src/Platform/SharedVal.h +++ b/src/Platform/SharedVal.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Stream.h b/src/Platform/Stream.h index b9862a50..e74350f1 100644 --- a/src/Platform/Stream.h +++ b/src/Platform/Stream.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/StringConverter.cpp b/src/Platform/StringConverter.cpp index e1a6df98..6a1f23c8 100644 --- a/src/Platform/StringConverter.cpp +++ b/src/Platform/StringConverter.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -383,13 +383,13 @@ namespace VeraCrypt buffer[0] = 0; return; } BufferPtr ( - (byte *) buffer, + (uint8 *) buffer, bufferSize).CopyFrom ( - ConstBufferPtr ((byte *) (wstring (str).c_str()), + ConstBufferPtr ((uint8 *) (wstring (str).c_str()), (str.length() + 1) * sizeof (wchar_t) ) ); } diff --git a/src/Platform/StringConverter.h b/src/Platform/StringConverter.h index 8756d5ba..8bd27251 100644 --- a/src/Platform/StringConverter.h +++ b/src/Platform/StringConverter.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/SyncEvent.h b/src/Platform/SyncEvent.h index fde6380f..bfd9e2d1 100644 --- a/src/Platform/SyncEvent.h +++ b/src/Platform/SyncEvent.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/System.h b/src/Platform/System.h index 5024568f..d5fb0e00 100644 --- a/src/Platform/System.h +++ b/src/Platform/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/SystemException.h b/src/Platform/SystemException.h index ede3c5cf..2c1ab25a 100644 --- a/src/Platform/SystemException.h +++ b/src/Platform/SystemException.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/SystemInfo.h b/src/Platform/SystemInfo.h index 5e1f63c2..57890d46 100644 --- a/src/Platform/SystemInfo.h +++ b/src/Platform/SystemInfo.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/SystemLog.h b/src/Platform/SystemLog.h index cff3f212..a331e966 100644 --- a/src/Platform/SystemLog.h +++ b/src/Platform/SystemLog.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/TextReader.cpp b/src/Platform/TextReader.cpp index 7d6a0c64..2dfc7069 100644 --- a/src/Platform/TextReader.cpp +++ b/src/Platform/TextReader.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -24,11 +24,11 @@ namespace VeraCrypt bool TextReader::ReadLine (string &outputString) { outputString.erase(); char c; - while (InputStream->Read (BufferPtr ((byte *) &c, sizeof (c))) == sizeof (c)) + while (InputStream->Read (BufferPtr ((uint8 *) &c, sizeof (c))) == sizeof (c)) { if (c == '\r') continue; if (c == '\n') diff --git a/src/Platform/TextReader.h b/src/Platform/TextReader.h index bfeaa524..2b96a8db 100644 --- a/src/Platform/TextReader.h +++ b/src/Platform/TextReader.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Thread.h b/src/Platform/Thread.h index 2f16d2a7..6fca11b3 100644 --- a/src/Platform/Thread.h +++ b/src/Platform/Thread.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Time.h b/src/Platform/Time.h index c85b363c..7f82fbcd 100644 --- a/src/Platform/Time.h +++ b/src/Platform/Time.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Directory.cpp b/src/Platform/Unix/Directory.cpp index 50de000b..c27af26a 100644 --- a/src/Platform/Unix/Directory.cpp +++ b/src/Platform/Unix/Directory.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/File.cpp b/src/Platform/Unix/File.cpp index 207efb4e..9c35a2e5 100644 --- a/src/Platform/Unix/File.cpp +++ b/src/Platform/Unix/File.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/FilesystemPath.cpp b/src/Platform/Unix/FilesystemPath.cpp index 1230c2aa..90965448 100644 --- a/src/Platform/Unix/FilesystemPath.cpp +++ b/src/Platform/Unix/FilesystemPath.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Mutex.cpp b/src/Platform/Unix/Mutex.cpp index b69a5c6c..6441ee93 100644 --- a/src/Platform/Unix/Mutex.cpp +++ b/src/Platform/Unix/Mutex.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Pipe.cpp b/src/Platform/Unix/Pipe.cpp index b05acd7c..41ebb506 100644 --- a/src/Platform/Unix/Pipe.cpp +++ b/src/Platform/Unix/Pipe.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Pipe.h b/src/Platform/Unix/Pipe.h index eb79d9dd..b0bf0409 100644 --- a/src/Platform/Unix/Pipe.h +++ b/src/Platform/Unix/Pipe.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Poller.cpp b/src/Platform/Unix/Poller.cpp index 25d2ba71..66ba0ff5 100644 --- a/src/Platform/Unix/Poller.cpp +++ b/src/Platform/Unix/Poller.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Poller.h b/src/Platform/Unix/Poller.h index a46c0359..8ae6e7ae 100644 --- a/src/Platform/Unix/Poller.h +++ b/src/Platform/Unix/Poller.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Process.cpp b/src/Platform/Unix/Process.cpp index 36b01e6b..395d4bc9 100644 --- a/src/Platform/Unix/Process.cpp +++ b/src/Platform/Unix/Process.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -25,16 +25,77 @@ #include "Platform/Unix/Pipe.h" #include "Platform/Unix/Poller.h" namespace VeraCrypt { - string Process::Execute (const string &processName, const list <string> &arguments, int timeOut, ProcessExecFunctor *execFunctor, const Buffer *inputData) + + bool Process::IsExecutable(const std::string& path) { + struct stat sb; + if (stat(path.c_str(), &sb) == 0) { + return S_ISREG(sb.st_mode) && (sb.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)); + } + return false; + } + + // Find executable in system paths + std::string Process::FindSystemBinary(const char* name, std::string& errorMsg) { + if (!name) { + errno = EINVAL; // Invalid argument + errorMsg = "Invalid input: name or paths is NULL"; + return ""; + } + + // Default system directories to search for executables +#ifdef TC_MACOSX + const char* defaultDirs[] = {"/usr/local/bin", "/usr/bin", "/bin", "/user/sbin", "/sbin"}; +#elif TC_FREEBSD + const char* defaultDirs[] = {"/sbin", "/bin", "/usr/sbin", "/usr/bin", "/usr/local/sbin", "/usr/local/bin"}; +#elif TC_OPENBSD + const char* defaultDirs[] = {"/sbin", "/bin", "/usr/sbin", "/usr/bin", "/usr/X11R6/bin", "/usr/local/sbin", "/usr/local/bin"}; +#else + const char* defaultDirs[] = {"/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin"}; +#endif + const size_t defaultDirCount = sizeof(defaultDirs) / sizeof(defaultDirs[0]); + + std::string currentPath(name); + + // If path doesn't start with '/', prepend default directories + if (currentPath[0] != '/') { + for (size_t i = 0; i < defaultDirCount; ++i) { + std::string combinedPath = std::string(defaultDirs[i]) + "/" + currentPath; + if (IsExecutable(combinedPath)) { + return combinedPath; + } + } + } else if (IsExecutable(currentPath)) { + return currentPath; + } + + // Prepare error message + errno = ENOENT; // No such file or directory + errorMsg = std::string(name) + " not found in system directories"; + return ""; + } + + string Process::Execute (const string &processNameArg, const list <string> &arguments, int timeOut, ProcessExecFunctor *execFunctor, const Buffer *inputData) { char *args[32]; if (array_capacity (args) <= (arguments.size() + 1)) throw ParameterTooLarge (SRC_POS); + // if execFunctor is null and processName is not absolute path, find it in system paths + string processName; + if (!execFunctor && (processNameArg[0] != '/')) + { + std::string errorMsg; + processName = FindSystemBinary(processNameArg.c_str(), errorMsg); + if (processName.empty()) + throw SystemException(SRC_POS, errorMsg); + } + else + processName = processNameArg; + #if 0 stringstream dbg; dbg << "exec " << processName; foreach (const string &at, arguments) dbg << " " << at; @@ -172,11 +233,11 @@ namespace VeraCrypt unique_ptr <Serializable> deserializedObject; Exception *deserializedException = nullptr; try { - shared_ptr <Stream> stream (new MemoryStream (ConstBufferPtr ((byte *) &exOutput[0], exOutput.size()))); + shared_ptr <Stream> stream (new MemoryStream (ConstBufferPtr ((uint8 *) &exOutput[0], exOutput.size()))); deserializedObject.reset (Serializable::DeserializeNew (stream)); deserializedException = dynamic_cast <Exception*> (deserializedObject.get()); } catch (...) { } diff --git a/src/Platform/Unix/Process.h b/src/Platform/Unix/Process.h index bb8482f2..83215956 100644 --- a/src/Platform/Unix/Process.h +++ b/src/Platform/Unix/Process.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -29,10 +29,12 @@ namespace VeraCrypt { public: Process (); virtual ~Process (); + static bool IsExecutable(const std::string& path); + static std::string FindSystemBinary(const char* name, std::string& errorMsg); static string Execute (const string &processName, const list <string> &arguments, int timeOut = -1, ProcessExecFunctor *execFunctor = nullptr, const Buffer *inputData = nullptr); protected: private: diff --git a/src/Platform/Unix/SyncEvent.cpp b/src/Platform/Unix/SyncEvent.cpp index 0336164b..f186e555 100644 --- a/src/Platform/Unix/SyncEvent.cpp +++ b/src/Platform/Unix/SyncEvent.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/System.h b/src/Platform/Unix/System.h index 7225dae2..b6a6f092 100644 --- a/src/Platform/Unix/System.h +++ b/src/Platform/Unix/System.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/SystemException.cpp b/src/Platform/Unix/SystemException.cpp index 428edfe7..b29e0370 100644 --- a/src/Platform/Unix/SystemException.cpp +++ b/src/Platform/Unix/SystemException.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/SystemInfo.cpp b/src/Platform/Unix/SystemInfo.cpp index f09674aa..530d3b4b 100644 --- a/src/Platform/Unix/SystemInfo.cpp +++ b/src/Platform/Unix/SystemInfo.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/SystemLog.cpp b/src/Platform/Unix/SystemLog.cpp index 72221375..95b20074 100644 --- a/src/Platform/Unix/SystemLog.cpp +++ b/src/Platform/Unix/SystemLog.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Thread.cpp b/src/Platform/Unix/Thread.cpp index 099c4658..febf9ab2 100644 --- a/src/Platform/Unix/Thread.cpp +++ b/src/Platform/Unix/Thread.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/Unix/Time.cpp b/src/Platform/Unix/Time.cpp index 356dde74..055938f9 100644 --- a/src/Platform/Unix/Time.cpp +++ b/src/Platform/Unix/Time.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Platform/User.h b/src/Platform/User.h index d5b51aad..6ae91fc3 100644 --- a/src/Platform/User.h +++ b/src/Platform/User.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Readme.txt b/src/Readme.txt index be740b73..d5096cbf 100644 --- a/src/Readme.txt +++ b/src/Readme.txt @@ -99,11 +99,11 @@ at https://www.veracrypt.fr/en/CompilingGuidelineLinux.html Requirements for Building VeraCrypt for Linux and Mac OS X: ----------------------------------------------------------- - GNU Make - GNU C++ Compiler 4.0 or compatible -- Apple Xcode (Mac OS X only) +- Apple Xcode or Xcode command line tools (Mac OS X only) - YASM 1.3.0 or newer (Linux only, x86/x64 architecture only) - pkg-config - wxWidgets 3.0 shared library and header files installed or wxWidgets 3.0 library source code (available at https://www.wxwidgets.org) - FUSE library and header files (available at https://github.com/libfuse/libfuse @@ -148,43 +148,60 @@ built using the 'NOGUI' parameter: On MacOSX, building a console-only executable is not supported. Mac OS X specifics: ----------------------------------------------------------- -Under MacOSX, the SDK for OSX 11.3 is used by default. To use another version -of the SDK (i.e. 10.15), you can export the environment variable VC_OSX_TARGET: +Under MacOSX, the lastest installed SDK is used by default. To use a different version +of the SDK when building using make, you can export the environment variable VC_OSX_SDK: - $ export VC_OSX_TARGET=10.15 + $ export VC_OSX_SDK=13.0 +For development dependencies management, you can use homebrew (https://brew.sh). -Before building under MacOSX, pkg-config must be installed if not yet available. -Get it from https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz and + $ brew install pkg-config yasm wxwidgets + +You also need system dependencies + + $ brew install --cask macfuse packages + +After installating dependencies via brew, you can build a local development build + + $ ./src/Build/build_veracrypt_macosx.sh -b + +If you want to build the package, you also need to pass `-p` to the build script above. The built +executable will be in `.src/Main` + +If you prefer to build from sources, or without homebrew, pkg-config and packages must be installed. + +Get pkg-config from https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz and compile using the following commands : - $ ./configure --with-internal-glib + $ CFLAGS="-Wno-int-conversion" CXXFLAGS="-Wno-int-conversion" ./configure --with-internal-glib $ make $ sudo make install After making sure pkg-config is available, download and install OSXFuse from https://osxfuse.github.io/ The script build_veracrypt_macosx.sh available under "src/Build" performs the full build of VeraCrypt including the creation of the installer pkg. It expects -to find the wxWidgets 3.1.2 sources at the same level as where you put +to find the wxWidgets 3.2.5 sources at the same level as where you put VeraCrypt sources (i.e. if "src" path is "/Users/joe/Projects/VeraCrypt/src" -then wxWidgets should be at "/Users/joe/Projects/wxWidgets-3.1.2") +then wxWidgets should be at "/Users/joe/Projects/wxWidgets-3.2.5") -The build process uses Code Signing certificates whose ID is specified in +The make build process uses Code Signing certificates whose ID is specified in src/Main/Main.make (look for lines containing "Developer ID Application" and "Developer ID Installer"). You'll have to modify these lines to put the ID of your Code Signing certificates or comment them if you don't have one. Because of incompatibility issues with OSXFUSE, the SDK 10.9 generates a VeraCrypt binary that has issues communicating with the OSXFUSE kernel extension. Thus, we recommend using a different OSX SDK version for building VeraCrypt. - +To build the installation package, you will need Packages (http://s.sudre.free.fr/Software/Packages/about.html). +The Packages installer that is used for VeraCrypt official build has been notarized by IDRIX and it is available at +https://github.com/idrassi/packages/releases III. FreeBSD ============================ FreeBSD is supported starting from version 11. @@ -213,14 +230,14 @@ V. Legal Information Copyright Information --------------------- This software as a whole: -Copyright (c) 2013-2023 IDRIX. All rights reserved. +Copyright (c) 2013-2025 IDRIX. All rights reserved. Portions of this software: -Copyright (c) 2013-2023 IDRIX. All rights reserved. +Copyright (c) 2013-2025 IDRIX. All rights reserved. Copyright (c) 2003-2012 TrueCrypt Developers Association. All rights reserved. Copyright (c) 1998-2000 Paul Le Roux. All rights reserved. Copyright (c) 1998-2008 Brian Gladman, Worcester, UK. All rights reserved. Copyright (c) 1995-2023 Jean-loup Gailly and Mark Adler. Copyright (c) 2016 Disk Cryptography Services for EFI (DCS), Alex Kolotnikov diff --git a/src/Release/Setup Files/Product64.wxs b/src/Release/Setup Files/Product64.wxs index 6b3f0059..c1c57889 100644 --- a/src/Release/Setup Files/Product64.wxs +++ b/src/Release/Setup Files/Product64.wxs @@ -2,19 +2,19 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <!-- FullProductVersion's first 3 parts MUST BE incremented at each release in order for upgrades to work ; Windows Installer ignores the 4th part --> - <?define var.FullProductVersion = 1.26.7?> + <?define var.FullProductVersion = 1.26.20?> <?define var.ProductName = VeraCrypt $(var.FullProductVersion)?> <!-- Unique GUID identifying this family of product (32-bit and 64-bit have the same) --> <?define var.UpgradeCode = {298F5D2B-3B01-4A13-BEFD-4B3C7BE43BC6}?> <!-- Unique GUID identifying this product release (32-bit and 64-bit have different ones) --> <!-- MUST BE regenerated for each new release --> - <?define var.ProductGuid = {9B45D139-7451-4C93-B694-4AFDCBA4A03D}?> + <?define var.ProductGuid = {206DCF7E-CA28-421D-B5DE-0AD30E1132CD}?> <!-- Unique GUID identifying a particular Windows Installer package --> <!-- When compiling a product, it should not be set in order to allow it to be generated for each build --> <?define var.PackageCode = "*"?> @@ -219,11 +219,19 @@ <!-- Reference C:\Program Files\VeraCrypt\docs\html --> <Directory Id="HTMLDOCSFOLDER" Name="html"> <!-- Reference C:\Program Files\VeraCrypt\docs\html\en --> - <Directory Id="ENHTMLDOCSFOLDER" Name="en"/> + <Directory Id="ENHTMLDOCSFOLDER" Name="en"> + + <!-- Reference C:\Program Files\VeraCrypt\docs\html\en\CompilingGuidelineWin --> + <Directory Id="ENGUIDEHTMLFOLDER" Name="CompilingGuidelineWin"/> + + <!-- Reference C:\Program Files\VeraCrypt\docs\html\en\ru --> + <Directory Id="ENRUHTMLFOLDER" Name="ru"/> + + </Directory> </Directory> </Directory> @@ -250,29 +258,29 @@ <!-- Refer to C:\Program Files\VeraCrypt in order to install files in it --> <DirectoryRef Id="APPLICATIONROOTFOLDER"> <Component Id="LICENSEFile" Guid="{370D29C4-3A58-4B9E-A0D6-A06430FCCA6D}"> - <File Id="LICENSE" Name="LICENSE" Source="$(sys.CURRENTDIR)\LICENSE" KeyPath="yes" DiskId="1" /> + <File Id="LICENSE" Name="LICENSE" Source="$(sys.CURRENTDIR)\LICENSE" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> <Component Id="LicenseTxt" Guid="{14F0F218-FBA2-4C68-820B-376345AB9D33}"> - <File Id="License.txt" Name="License.txt" Source="$(sys.CURRENTDIR)\License.txt" KeyPath="yes" DiskId="1" /> + <File Id="License.txt" Name="License.txt" Source="$(sys.CURRENTDIR)\License.txt" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> <Component Id="NOTICEFile" Guid="{56980D3E-9568-446D-8518-CA381EBE56C4}"> - <File Id="NOTICE" Name="NOTICE" Source="$(sys.CURRENTDIR)\NOTICE" KeyPath="yes" DiskId="1" /> + <File Id="NOTICE" Name="NOTICE" Source="$(sys.CURRENTDIR)\NOTICE" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> <Component Id="VeraCrypt_FormatExe" Guid="{55F89F55-62A6-40D0-A7B4-BC2505C118AA}"> <File Id="VeraCrypt_Format.exe" Name="VeraCrypt Format.exe" Source="$(sys.CURRENTDIR)\VeraCrypt Format-x64.exe" KeyPath="yes" DiskId="1" /> </Component> <Component Id="veracryptCat" Guid="{F1910CF2-3DA7-471D-845E-1A1C20AD3076}"> - <File Id="veracrypt.cat" Name="veracrypt.cat" Source="$(sys.CURRENTDIR)\veracrypt-x64.cat" KeyPath="yes" DiskId="1" /> + <File Id="veracrypt.cat" Name="veracrypt.cat" Source="$(sys.CURRENTDIR)\veracrypt-x64.cat" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> <Component Id="VeraCryptExe" Guid="{9C13F7BE-6ACE-48DE-BD44-714F421ADC2C}"> <File Id="VeraCrypt.exe" Name="VeraCrypt.exe" Source="$(sys.CURRENTDIR)\VeraCrypt-x64.exe" KeyPath="yes" DiskId="1" /> </Component> <Component Id="veracryptInf" Guid="{955B99DC-74C3-476D-8ECE-52FD0916EA34}"> - <File Id="veracrypt.inf" Name="veracrypt.inf" Source="$(sys.CURRENTDIR)\veracrypt.inf" KeyPath="yes" DiskId="1" /> + <File Id="veracrypt.inf" Name="veracrypt.inf" Source="$(sys.CURRENTDIR)\veracrypt.inf" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> <Component Id="veracryptSys" Guid="{5CE01773-01EA-417C-BBA4-8363881763DC}"> <File Id="veracrypt.sys" Name="veracrypt.sys" Source="$(sys.CURRENTDIR)\veracrypt-x64.sys" KeyPath="yes" DiskId="1" /> </Component> <Component Id="VeraCryptExpanderExe" Guid="{FF1F4376-9025-4124-808E-1C4B58024F14}"> @@ -288,785 +296,1397 @@ <!-- Refer to C:\Program Files\VeraCrypt\Languages in order to install files in it --> <!-- Components generated using 'heat dir ".\Translations" -gg -sfrag -template:fragment -out directory.wxs -var "sys.CURRENTDIR"' --> <DirectoryRef Id="LANGUAGESFOLDER"> <Component Id="cmpF27E43A4E59E04A5B095C5101B229139" Guid="{8EB22F2F-AFE2-45E5-92C3-AB50B377935E}"> - <File Id="fil1B0F0BB59C5EE9FC44F8DA3BA57CB272" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ar.xml" DiskId="1" /> + <File Id="fil1B0F0BB59C5EE9FC44F8DA3BA57CB272" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ar.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4350812363930B900E24C845940DF416" Guid="{52F707BF-2C0D-4690-84E8-8C1806BFC740}"> - <File Id="fil7E02C9035678F667086D2D483D8FDF35" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.be.xml" DiskId="1" /> + <File Id="fil7E02C9035678F667086D2D483D8FDF35" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.be.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1DD254125CF07901EACECC70930818B0" Guid="{AD31462E-039E-41CF-B2CF-D73FD4075C76}"> - <File Id="filA52BE38FF2164268AA9562C09281D09B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.bg.xml" DiskId="1" /> + <File Id="filA52BE38FF2164268AA9562C09281D09B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.bg.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp8C9E97CFD69D3BCB44B84D886720F3FC" Guid="{A328C74D-C352-4406-8C75-8BA159210936}"> - <File Id="fil2A31F450F9C022901212461A240C5D17" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ca.xml" DiskId="1" /> + <File Id="fil2A31F450F9C022901212461A240C5D17" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ca.xml" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp8EEB5407564497843BCFB99ECD7450CD" Guid="{2C24BFAF-798B-4480-BCC1-23C766447E26}"> + <File Id="fil05C1472701031E1165B20A1F476071FF" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.co.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2BC45D6EC406DDC470E8501442A7AF68" Guid="{5E99CB8F-33E2-430C-A0B2-A31058D6D449}"> - <File Id="fil0F3AB0CD6266BA1530A0253F059A85DD" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.cs.xml" DiskId="1" /> + <File Id="fil0F3AB0CD6266BA1530A0253F059A85DD" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.cs.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp74A0CA1914A6C6FE33D76DE1C01C676D" Guid="{F1E82507-7C31-41F0-A643-69BB53F3CD41}"> - <File Id="filDED1A10C5657065D291DC62CA9A32FAE" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.da.xml" DiskId="1" /> + <File Id="filDED1A10C5657065D291DC62CA9A32FAE" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.da.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpC186D3472CE1EC872FF1B0CF3682B3B6" Guid="{C23FC0D1-A6B7-4AB1-BA05-EBDC1B4328F9}"> - <File Id="filF4D7849840B295D75BA68B5F6C12F7B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.de.xml" DiskId="1" /> + <File Id="filF4D7849840B295D75BA68B5F6C12F7B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.de.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2AB0B613D25DDEF3466CBC86BD6B878B" Guid="{3757C2DE-FCC8-4970-8CB8-A0D9B2404A1C}"> - <File Id="fil7AECCD25826C51216C12F09DC87F1B22" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.el.xml" DiskId="1" /> + <File Id="fil7AECCD25826C51216C12F09DC87F1B22" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.el.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB09224EB45E097BF511CBC5DBE3E251C" Guid="{70B91FFF-BDB7-48AE-A664-243A057F1EA7}"> - <File Id="filC426C0D58EE0FC49743BDB8AEDA3C6BE" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.es.xml" DiskId="1" /> + <File Id="filC426C0D58EE0FC49743BDB8AEDA3C6BE" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.es.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF24BBBEB613F893CBC5FBF6533CB48C9" Guid="{F578356A-16E1-42CF-8DB2-2DC21B4C154B}"> - <File Id="fil38AB8BFA030ACBECA75C821E3574759A" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.et.xml" DiskId="1" /> + <File Id="fil38AB8BFA030ACBECA75C821E3574759A" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.et.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp50E1DEF37599D2900447B13FC285B7B7" Guid="{1FDF2F45-97F1-40C0-A450-A2342BBF913C}"> - <File Id="fil1BCCDEC84EB4D85DB0380FCD6153D1FA" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.eu.xml" DiskId="1" /> + <File Id="fil1BCCDEC84EB4D85DB0380FCD6153D1FA" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.eu.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp46E5A0DB48A03A91267C97A664BD9BD4" Guid="{07165ABB-1B3C-4C0F-A73E-E3A85AB37B58}"> - <File Id="fil1AC953E5BA23EC81206D212369F1544D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fa.xml" DiskId="1" /> + <File Id="fil1AC953E5BA23EC81206D212369F1544D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fa.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp95BAB91FA0B7E37D5B9343478899CC75" Guid="{F0ADBE30-225D-4EF9-B0F4-1ADEFEF07625}"> - <File Id="filEEF3EF4EEE97747B255238CFB88EAF9C" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fi.xml" DiskId="1" /> + <File Id="filEEF3EF4EEE97747B255238CFB88EAF9C" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fi.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE73E4CCF9F6EC39998B9BE35E43768CC" Guid="{EA4FADF0-BF20-40FD-9BAA-D1023357FD28}"> - <File Id="filFB10C722F275051A8DDB25D4D9AF43E5" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fr.xml" DiskId="1" /> + <File Id="filFB10C722F275051A8DDB25D4D9AF43E5" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fr.xml" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp8E5262918FDC1B2986951E925B0B9AA5" Guid="{C467DF8F-E07D-4C2B-B5D5-1E4B898C4942}"> + <File Id="fil12FBBE0FB30498855B0E7185B5E18A10" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.he.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp28EEAA4B2230460BDDA61DEFBC71A905" Guid="{68D7B2E5-273B-4782-AF3D-65F255BBF9B2}"> - <File Id="filD03BE3868262DD16654690ED91BC89C8" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.hu.xml" DiskId="1" /> + <File Id="filD03BE3868262DD16654690ED91BC89C8" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.hu.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpCFF4CB46421F1A713D45607393ED9B90" Guid="{F96AF79F-0364-4A68-8790-209C751C37FB}"> - <File Id="fil040570D344D75F6A57E5DD5ECB94BD8B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.id.xml" DiskId="1" /> + <File Id="fil040570D344D75F6A57E5DD5ECB94BD8B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.id.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp31601B4199D0CD3977758A3F2B63CDE7" Guid="{9F347364-2673-4184-A069-342A88BAF90C}"> - <File Id="fil5A7288C1B9CC498419FC14D5B12B1D8D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.it.xml" DiskId="1" /> + <File Id="fil5A7288C1B9CC498419FC14D5B12B1D8D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.it.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp8E2E0489348A190B00532591CE0AC325" Guid="{BE526CC3-99F7-4F94-AFC4-C86FCF0D742C}"> - <File Id="fil9DF155D4A63D3AAAFDBF3BEF8C47BBEA" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ja.xml" DiskId="1" /> + <File Id="fil9DF155D4A63D3AAAFDBF3BEF8C47BBEA" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ja.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpEE57E2901F12294E638E66C39F1B39BB" Guid="{C2CAFD97-84B7-4053-A8D0-DE21F4D8F741}"> - <File Id="filFD48E7A9628E7FF9B3D96BD222A3A0D9" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ka.xml" DiskId="1" /> + <File Id="filFD48E7A9628E7FF9B3D96BD222A3A0D9" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ka.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2F1F644C870AFF8970FE18AF2CD151C4" Guid="{96564F4E-7D92-40B3-84F6-84B357EB4F41}"> - <File Id="filF68A13BECFA9D8DD21B371298AF93B5B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ko.xml" DiskId="1" /> + <File Id="filF68A13BECFA9D8DD21B371298AF93B5B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ko.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4B8E0B5A7B7A8BE4267C722B1434E4CF" Guid="{E9AD4FA0-9CD7-43B9-8099-69AD6EB1A305}"> - <File Id="fil23F177B7621D7D78240CAA60E6AB1048" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.lv.xml" DiskId="1" /> + <File Id="fil23F177B7621D7D78240CAA60E6AB1048" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.lv.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp84BB49D30BDBB4212707D14B7A9C13F1" Guid="{B63CC062-CD52-463F-8B30-1E611A90EDA9}"> - <File Id="filA7135961859CF705E28FFF4DA79A28C2" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.my.xml" DiskId="1" /> + <File Id="filA7135961859CF705E28FFF4DA79A28C2" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.my.xml" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6097F5CB407EFCDADFEA02548151AD81" Guid="{1A88CAD2-9C59-4E0E-9915-6006E5907346}"> + <File Id="filC743CCDC4A101E271BA40FDF6F08CC12" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.nb.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp406E3BE632055CDDE1E42F45E31318DC" Guid="{627980E8-F6BE-4794-B9BC-68F96267D721}"> - <File Id="filF46FDB7781620EB1D7491039E4029463" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.nl.xml" DiskId="1" /> + <File Id="filF46FDB7781620EB1D7491039E4029463" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.nl.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4E363AF94947A27A4E9CF57C69E6DE54" Guid="{9D17F34C-4475-4995-A696-FE3EA54F2FBB}"> - <File Id="fil24BA52B3E3209F48021C1D75AF5BBDB4" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.nn.xml" DiskId="1" /> + <File Id="fil24BA52B3E3209F48021C1D75AF5BBDB4" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.nn.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp562F7970AF2F9EF535AC21A84C7229D1" Guid="{9F36CA4F-BF14-40D7-81A2-8ADFCC0EF30B}"> - <File Id="fil8C40C1C5E3776F4C0FCF8BD02D742D70" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.pl.xml" DiskId="1" /> + <File Id="fil8C40C1C5E3776F4C0FCF8BD02D742D70" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.pl.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp19EF976916B5E207A32BA08C3143A281" Guid="{B0EAEA97-9176-4613-9338-41B63B85CB18}"> - <File Id="fil6CC66A3690F008524FCCB68FA1EE1176" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.pt-br.xml" DiskId="1" /> + <File Id="fil6CC66A3690F008524FCCB68FA1EE1176" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.pt-br.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4C9B5090256B2E88D27C9CF7E6CFD9EF" Guid="{8D783A02-023C-4018-8315-79A82BA593E2}"> - <File Id="filA3239DE9C316B9C04171EB42F4F9653D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ro.xml" DiskId="1" /> + <File Id="filA3239DE9C316B9C04171EB42F4F9653D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ro.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp91165C08D5943C21F132A349F8CBAAE7" Guid="{0C3290FF-8000-42CF-8329-92C828AE5A53}"> - <File Id="fil77375796E780F641C2FF5E6E3D4CAFDB" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ru.xml" DiskId="1" /> + <File Id="fil77375796E780F641C2FF5E6E3D4CAFDB" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ru.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4A51B27F9D8DBBABFE4581EC2B162832" Guid="{FB8CCAC7-0EAC-4C1A-B5E5-BEFD8F7B47E6}"> - <File Id="fil414686FD325EB0C5D03FC4693978451D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sk.xml" DiskId="1" /> + <File Id="fil414686FD325EB0C5D03FC4693978451D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sk.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp041827E393D8777802256FD480D377FC" Guid="{7FEB72AD-48CA-4330-A4C9-A22218EC5D8F}"> - <File Id="fil4EABC40F288E8289D4888EB0BE6F07B1" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sl.xml" DiskId="1" /> + <File Id="fil4EABC40F288E8289D4888EB0BE6F07B1" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sl.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp68CC2DB5FA70FC1F6CA959FB5E1B78BF" Guid="{00D9FB47-120C-4061-B2DB-8F3D5D94F221}"> - <File Id="fil90E6ABC4A98B19C0ECCDCC9712928162" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sv.xml" DiskId="1" /> + <File Id="fil90E6ABC4A98B19C0ECCDCC9712928162" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sv.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFF128AFA659D8C2E65E0BE55E0943F83" Guid="{5AB50FC2-867A-4239-850F-AD2C0FCDA2DE}"> - <File Id="fil5BF14221A225DAB25A02463BBC92DC37" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.th.xml" DiskId="1" /> + <File Id="fil5BF14221A225DAB25A02463BBC92DC37" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.th.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1896040764F0DF6F89280C428013ECE7" Guid="{3A2D27E8-4AB3-471A-A574-F148DCDF8D8C}"> - <File Id="filE839661CD956C44F0E95C85AAA11D6FF" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.tr.xml" DiskId="1" /> + <File Id="filE839661CD956C44F0E95C85AAA11D6FF" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.tr.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpA52EAD237A44CBD337E302185BE12FB2" Guid="{4D7A4A01-5AFB-4B37-93C7-91B9DA96BA30}"> - <File Id="fil9E3A6DE502ECEF2025129A97D3F98CA2" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.uk.xml" DiskId="1" /> + <File Id="fil9E3A6DE502ECEF2025129A97D3F98CA2" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.uk.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpBBB82A6228B54372ACAF9B1310CB2025" Guid="{939C9CDD-0CEA-4161-9812-96B77B643C2E}"> - <File Id="fil4B209843380976D1FBEB96B21EB849B5" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.uz.xml" DiskId="1" /> + <File Id="fil4B209843380976D1FBEB96B21EB849B5" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.uz.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4A275EC29DB9B5ECD56CD9C62D358750" Guid="{0E29F3C1-2D27-4F1F-BEC0-C39CA1B4EAAF}"> - <File Id="fil1FD00998B7A757165A03FDFD6D241F14" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.vi.xml" DiskId="1" /> + <File Id="fil1FD00998B7A757165A03FDFD6D241F14" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.vi.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp8DF0B84F470901D8800F8CAB88A90656" Guid="{7B9A6F50-C242-4DAE-BD10-CDF2D63FB4AC}"> - <File Id="fil4EC683D0A468CAA1D4B8FC6FFCBFEAD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-cn.xml" DiskId="1" /> + <File Id="fil4EC683D0A468CAA1D4B8FC6FFCBFEAD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-cn.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp529250BEE557732B5B8CBC47914A0F2A" Guid="{2D4E3902-96E9-4C8B-BF8C-623D10FF7B57}"> - <File Id="fil915C308602F025646FC5A874F74AA475" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-hk.xml" DiskId="1" /> + <File Id="fil915C308602F025646FC5A874F74AA475" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-hk.xml" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp38274F8F5E4F600A9AC5225A0472D656" Guid="{74B65782-BFB6-42CD-B3BA-D736C7B0B3BE}"> - <File Id="filFD4B1ECAE9F0FF855503D800C1A2891A" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-tw.xml" DiskId="1" /> + <File Id="filFD4B1ECAE9F0FF855503D800C1A2891A" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-tw.xml" Checksum="yes" DiskId="1" /> </Component> </DirectoryRef> <!-- Refer to C:\Program Files\VeraCrypt\docs in order to install files in it --> <DirectoryRef Id="DOCSFOLDER"> <Component Id="VCUserGuideChm" Guid="{8CBE67F1-D493-4B33-9141-DB221021C59B}"> - <File Id="VeraCrypt_User_Guide.chm" Name="VeraCrypt User Guide.chm" Source="$(sys.CURRENTDIR)\docs\VeraCrypt User Guide.chm" KeyPath="yes" DiskId="1" /> + <File Id="VeraCrypt_User_Guide.chm" Name="VeraCrypt User Guide.chm" Source="$(sys.CURRENTDIR)\docs\VeraCrypt User Guide.chm" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> </DirectoryRef> <!-- Refer to C:\Program Files\VeraCrypt\docs\EFI-DCS in order to install files in it --> <DirectoryRef Id="EFIDOCSFOLDER"> <Component Id="dcs_tpm_owner_02_pdf" Guid="{DC75D11E-8250-4DDD-9BD2-451194F8717D}"> - <File Id="dcs_tpm_owner_02.pdf" Name="dcs_tpm_owner_02.pdf" Source="$(sys.CURRENTDIR)\docs\EFI-DCS\dcs_tpm_owner_02.pdf" KeyPath="yes" DiskId="1" /> + <File Id="dcs_tpm_owner_02.pdf" Name="dcs_tpm_owner_02.pdf" Source="$(sys.CURRENTDIR)\docs\EFI-DCS\dcs_tpm_owner_02.pdf" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> <Component Id="disk_encryption_v1_2_pdf" Guid="{DFD46CE4-B65B-468A-B236-3E5C43090235}"> - <File Id="disk_encryption_v1_2.pdf" Name="disk_encryption_v1_2.pdf" Source="$(sys.CURRENTDIR)\docs\EFI-DCS\disk_encryption_v1_2.pdf" KeyPath="yes" DiskId="1" /> + <File Id="disk_encryption_v1_2.pdf" Name="disk_encryption_v1_2.pdf" Source="$(sys.CURRENTDIR)\docs\EFI-DCS\disk_encryption_v1_2.pdf" KeyPath="yes" Checksum="yes" DiskId="1" /> </Component> </DirectoryRef> <!-- Refer to C:\Program Files\VeraCrypt\docs\html\en in order to install files in it --> <!-- Components generated using 'heat dir ".\html" -gg -sfrag -template:fragment -out directory.wxs -var "sys.CURRENTDIR"' --> <DirectoryRef Id="ENHTMLDOCSFOLDER"> <Component Id="cmp5A2505C1E4CE33EAC578A8D1C8C505D2" Guid="{EB5FB334-0E04-4DC8-BCA7-9233982B0FF8}"> - <File Id="fil2FC60DD03A8AFECD3E1FB3B2F358CDF5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Acknowledgements.html" DiskId="1" /> + <File Id="fil2FC60DD03A8AFECD3E1FB3B2F358CDF5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Acknowledgements.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE985CD1A96188861286D758A12A1D0A1" Guid="{25ED8C45-E6AF-4582-ADDE-5EDF51BF4EC2}"> - <File Id="fil81B62ADB5DD42B4C9666C61A4F59E00C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Additional Security Requirements and Precautions.html" DiskId="1" /> + <File Id="fil81B62ADB5DD42B4C9666C61A4F59E00C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Additional Security Requirements and Precautions.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp310514F655B6D66F5308A5823B0AB691" Guid="{B18F4EA7-2A2E-4DB2-BA72-E1AE3C090C4D}"> - <File Id="fil8194761219752C0F565AAD6F30B00920" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\AES.html" DiskId="1" /> + <File Id="fil8194761219752C0F565AAD6F30B00920" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\AES.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0664DF8B1FE440C02B1E20D2F23C2CDF" Guid="{2A048A0F-A19B-4EE2-A1FA-2761C8931A29}"> - <File Id="fil6B563B1A4AA551468283EEB5872DD176" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\arrow_right.gif" DiskId="1" /> + <File Id="fil6B563B1A4AA551468283EEB5872DD176" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\arrow_right.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2934E77CB835216789F88BD686160A94" Guid="{084CDB58-6A9F-4985-9818-727FBFF0D95B}"> - <File Id="fil960742ACFA2D79EEC2E6D45D7A93047B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Authenticity and Integrity.html" DiskId="1" /> + <File Id="fil960742ACFA2D79EEC2E6D45D7A93047B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Authenticity and Integrity.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp688E76C9A297923D616068E33A6A4F49" Guid="{63DABE8B-7EE0-479E-890F-701C7E890647}"> - <File Id="filCC9CD11F958A26366B700B8EE8812A65" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Authors.html" DiskId="1" /> + <File Id="filCC9CD11F958A26366B700B8EE8812A65" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Authors.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC40B9AEA2BA26327EDBF8EE050CB076B" Guid="{F3D7A2DA-32AC-4418-997E-B7E2AEF8A099}"> + <File Id="fil2DE49A9DD9C4A7B8D0D3A654CF73A48F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Avoid Third-Party File Extensions.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2ABB10C0A5AC0F1084EDF94E0FDFFD09" Guid="{034D6A64-B712-49C1-9450-5585B207C8AD}"> - <File Id="fil63E5CE3D0A91ACFF543B523A58476CCF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\bank_30x30.png" DiskId="1" /> + <File Id="fil63E5CE3D0A91ACFF543B523A58476CCF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\bank_30x30.png" Checksum="yes" DiskId="1" /> </Component> - <Component Id="cmp32E7F4F5C0F44D00B53E3946E7E1FCF9" Guid="{4A9AD9E2-8ADA-41BF-B2EC-643579DF9B35}"> - <File Id="filD1052E711F1CD089D66C27B04EDD6113" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BCH_Logo_48x30.png" DiskId="1" /> + <Component Id="cmp793A7E676882B650FFCEE4F41B92CB85" Guid="{73A7AE9C-003C-4DF6-AD85-3FE264669165}"> + <File Id="filD1052E711F1CD089D66C27B04EDD6113" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BCH_Logo_30x30.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp989B890D94671F634D04D8F945090F21" Guid="{4C123649-753C-404B-908D-AF1B48CBB844}"> - <File Id="fil02D4C60C8A30C22AE1F14E33DA3DA38C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BC_Logo_30x30.png" DiskId="1" /> + <File Id="fil02D4C60C8A30C22AE1F14E33DA3DA38C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BC_Logo_30x30.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp109BF0667C5A7B7036CCAAD9B29D9449" Guid="{5951DADE-1544-4213-A018-E33CC10AFA5C}"> - <File Id="fil07FA1CE512F8C8605304C23C4DFE264D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial.html" DiskId="1" /> + <File Id="fil07FA1CE512F8C8605304C23C4DFE264D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp82ABD3094B751094F3A49CD338A3713D" Guid="{1D02B8D8-92E6-4E2E-B29B-1C3633C625BB}"> - <File Id="fil4431451829FDF5841BC97BA0A0CA8133" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_001.jpg" DiskId="1" /> + <File Id="fil4431451829FDF5841BC97BA0A0CA8133" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_001.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE6A18205CB9F847CD7C4375AED2196D5" Guid="{D84BA05D-74CB-47CE-8098-C3C27E9292BA}"> - <File Id="fil89FAEFEC223673825DC022EED971C0E0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_002.jpg" DiskId="1" /> + <File Id="fil89FAEFEC223673825DC022EED971C0E0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_002.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpAA4D61C5E17E2A8513EC120AC9B1DB8A" Guid="{62C84C2A-D459-4BE2-84B4-7D43F3C5726E}"> - <File Id="filE334137ACF34B80CE263C7A3868862FE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_003.jpg" DiskId="1" /> + <File Id="filE334137ACF34B80CE263C7A3868862FE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_003.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp39251BC13DA4AD6508E18D90D86DF06D" Guid="{E4095A6D-EAD5-429C-A75F-39758A7F1C87}"> - <File Id="fil924A6AEB99A9EF73D5240117A35F4A73" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_004.jpg" DiskId="1" /> + <File Id="fil924A6AEB99A9EF73D5240117A35F4A73" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_004.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpBABB0BD95FD763E9C72D2F51C325CF15" Guid="{0905EB74-CB03-4479-8D47-D5F1071E6D1C}"> - <File Id="fil2C527AD0D6FF9D8991263AEAEF0028C1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_005.jpg" DiskId="1" /> + <File Id="fil2C527AD0D6FF9D8991263AEAEF0028C1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_005.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2FE3B3719DCC4362AFF8BF7B4CADFF80" Guid="{8F29956A-6555-45C9-B254-F277FD9D0230}"> - <File Id="fil1CCA48715513D4C909E9B413C8D1DDD0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_007.jpg" DiskId="1" /> + <File Id="fil1CCA48715513D4C909E9B413C8D1DDD0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_007.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2FC8BD312D06FEC4E244604E27117B62" Guid="{22F89049-FED2-46D8-A298-E43ECE3226B9}"> - <File Id="fil4F7DCD31A2B30BC40BCC4E76DDCE58C1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_008.jpg" DiskId="1" /> + <File Id="fil4F7DCD31A2B30BC40BCC4E76DDCE58C1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_008.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpAE99FB30CC29DF92E71A31EC39E61EF5" Guid="{C125C0FE-AEC0-455B-A7A6-BD216E712F11}"> - <File Id="fil3E632F1EA36028C0146D810EB2A994BB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_009.jpg" DiskId="1" /> + <File Id="fil3E632F1EA36028C0146D810EB2A994BB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_009.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp535B1A9BACA231F518973D620DC23779" Guid="{35958B4E-683D-4F34-B510-04E5801B4A1C}"> - <File Id="fil820662B184499949D0F2AF8C702010BF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_010.jpg" DiskId="1" /> + <File Id="fil820662B184499949D0F2AF8C702010BF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_010.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpD2ED5F6D8C0A4CA0D26F9F1BB34AB8BA" Guid="{E3CDE6DA-DCC0-418C-926F-406962D00BB7}"> - <File Id="fil0377513CEC808B0549D7B1D3AC22DED8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_011.jpg" DiskId="1" /> + <File Id="fil0377513CEC808B0549D7B1D3AC22DED8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_011.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp5F7E0D8587039E1BA0F236F228C163BD" Guid="{B3E56E0C-7368-42D8-9EEC-56FC2568A649}"> - <File Id="fil07880CC54CBA150765E18E78D707B361" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_012.jpg" DiskId="1" /> + <File Id="fil07880CC54CBA150765E18E78D707B361" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_012.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF4DA2D3DABC768C2040A67A993C53E9E" Guid="{817105D4-7E68-417B-9592-F664A20AD861}"> - <File Id="filA63E7BA341C510BB5F5BE441475173A0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_013.jpg" DiskId="1" /> + <File Id="filA63E7BA341C510BB5F5BE441475173A0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_013.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpC0AD9100DE0F43E8149F8D3271B02D17" Guid="{81CFCB27-3F21-493C-AA7A-836E05157AC3}"> - <File Id="fil1872F82E98E3D4AAE017F70E311912DE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_014.jpg" DiskId="1" /> + <File Id="fil1872F82E98E3D4AAE017F70E311912DE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_014.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp32646E8087D106AE2B62E5DCF2419EDD" Guid="{54C078C1-1641-4A06-BBCA-D6A2C0389695}"> - <File Id="fil0C921426CF20987C0ED9364F11F534F0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_015.jpg" DiskId="1" /> + <File Id="fil0C921426CF20987C0ED9364F11F534F0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_015.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB3C777FAF214F7D304EE7CF907D7FF57" Guid="{C44D9DD8-7803-41C1-9323-4CFD516C2DEB}"> - <File Id="filE9FA9200D40A4970139496FD4D09CC9C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_016.jpg" DiskId="1" /> + <File Id="filE9FA9200D40A4970139496FD4D09CC9C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_016.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp338115DF524F0B412A21AB64F59240DD" Guid="{D4B1FD10-580F-4889-95F4-EDFFFC3C1309}"> - <File Id="fil74DD6EA64196A3168E669A1FF7AE3E0A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_017.jpg" DiskId="1" /> + <File Id="fil74DD6EA64196A3168E669A1FF7AE3E0A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_017.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2F24E0C7B7175D60257F6D01231C8373" Guid="{BF43A78C-C0A8-498E-A3EF-7D0265F1E312}"> - <File Id="fil37771854D19D4FEC1E9E8DB377B24B8D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_018.jpg" DiskId="1" /> + <File Id="fil37771854D19D4FEC1E9E8DB377B24B8D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_018.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpAE9D52ADD94D3A2711AA79FA0C91CA00" Guid="{3EF7862C-7D09-4662-BF1C-67D05EBF9711}"> - <File Id="filEC84ED23804D7FD220C90FF50B92FD7C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_019.jpg" DiskId="1" /> + <File Id="filEC84ED23804D7FD220C90FF50B92FD7C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_019.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0A6270FD26128E8D1CC83E392E91A772" Guid="{5252F18E-BFB7-4FCC-865E-809BBD431C22}"> - <File Id="filBB21339DA6F921A2596897061F9C1F7E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_020.jpg" DiskId="1" /> + <File Id="filBB21339DA6F921A2596897061F9C1F7E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_020.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpEDB0E152195A7EB91BBB28631B689E0B" Guid="{C3750B19-85AF-4B35-98C9-969168C0C19F}"> - <File Id="fil23F7783C38C515A1DAA07F85B306D695" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_021.jpg" DiskId="1" /> + <File Id="fil23F7783C38C515A1DAA07F85B306D695" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_021.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFD76EB6B5546D1C38CC33FABA95FAA15" Guid="{AA874CBC-A2B7-48C6-AC23-654C190C65B0}"> - <File Id="fil769661E570AC147356DE7C8AD17F9F76" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_022.jpg" DiskId="1" /> + <File Id="fil769661E570AC147356DE7C8AD17F9F76" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_022.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpDC4FD19F507A5152351B9F71C8691486" Guid="{5B95B2F6-EF6F-4D08-9014-F4C621EA49D3}"> - <File Id="fil6AD3B2642AC17EBF625FEBC38F376F96" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_023.gif" DiskId="1" /> + <File Id="fil6AD3B2642AC17EBF625FEBC38F376F96" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_023.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9E45BE754042F9DD742A0B7B9F27E786" Guid="{7DD3EFD4-E5DC-4D5A-BCE0-5E2F6FA86E9C}"> - <File Id="fil29A133B2F2F200139A6F8BA5753FD673" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_024.gif" DiskId="1" /> + <File Id="fil29A133B2F2F200139A6F8BA5753FD673" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_024.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB6AC414023A6BDBF855F4A807DAE138C" Guid="{557B4D3A-C503-4EAF-8DFC-5B9177A1F737}"> - <File Id="filE1FF7E56D4D7BAE636B289521CD0C787" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_034.png" DiskId="1" /> + <File Id="filE1FF7E56D4D7BAE636B289521CD0C787" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_034.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpA80F47C0DB1649FE99DA7D449012D2D7" Guid="{E4AB233F-F5AE-4B26-83E5-524108F801B6}"> - <File Id="filC92F8B3C25C841839FF268DAF13ADBCC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BLAKE2s-256.html" DiskId="1" /> + <File Id="filC92F8B3C25C841839FF268DAF13ADBCC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BLAKE2s-256.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp053692809BD5B3F5682AFCC539A767A3" Guid="{C99F1ECB-6AAB-4D06-B4C7-134CD2502104}"> - <File Id="fil9D6A859E5E76057E4E64E35D03BF1739" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Camellia.html" DiskId="1" /> + <File Id="fil9D6A859E5E76057E4E64E35D03BF1739" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Camellia.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9049A791E9E1AB7FF01BD7F08D1CB069" Guid="{F9B7E6CD-6AAB-4FD2-9CCC-8D13191057FA}"> - <File Id="fil768C59AC95806B46E5921E83E17DF406" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Cascades.html" DiskId="1" /> + <File Id="fil768C59AC95806B46E5921E83E17DF406" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Cascades.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4E6F9484484A40645D519F688ED9C21E" Guid="{5231376B-B4D8-4733-8EA9-ECA11DD034BF}"> - <File Id="fil45397F2F396BA3408992A437902E6951" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Changing Passwords and Keyfiles.html" DiskId="1" /> + <File Id="fil45397F2F396BA3408992A437902E6951" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Changing Passwords and Keyfiles.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3CF724F2A2347A2A30C85CB76490F687" Guid="{BB072BB5-3F7F-4F18-B00F-0A75D3AC0F49}"> - <File Id="filF949C326CAEAC18B9572844C807C9D19" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Choosing Passwords and Keyfiles.html" DiskId="1" /> + <File Id="filF949C326CAEAC18B9572844C807C9D19" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Choosing Passwords and Keyfiles.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3858A4BB7577362DE87F4485575DFC99" Guid="{94549BE1-9A7B-4DA7-A66F-17193865335E}"> - <File Id="fil72F9481463D425378DDDD5FCDBCC909B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Command Line Usage.html" DiskId="1" /> + <File Id="fil72F9481463D425378DDDD5FCDBCC909B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Command Line Usage.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpA06B9542AEB64F96BB784F47800158A8" Guid="{87929DDC-82A3-42CF-B610-D625A9EC404A}"> - <File Id="filD596E938BA564F06A23DAAAA0909B229" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineLinux.html" DiskId="1" /> + <File Id="filD596E938BA564F06A23DAAAA0909B229" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineLinux.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpACD4069DDF564A8DAB5D542BB8850131" Guid="{657E9938-9161-4C60-9112-944DD2BF2DE8}"> - <File Id="fil0794C6C86BD24D62883FD840ADE90FC7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelines.html" DiskId="1" /> - </Component> - <Component Id="cmp735FE6B2F10C43019E11256864209EBC" Guid="{F87625DF-E610-4CCF-94E7-7293DDCD35DB}"> - <File Id="filAB026A12CD59448B0346D8FB6BD594EB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\AddNewSystemVar.jpg" DiskId="1" /> - </Component> - <Component Id="cmp89BB363FF83EBA271361A4208E069DA9" Guid="{1E6E3A37-453A-4E81-AC23-45F3BB4800E2}"> - <File Id="filE7535CB597FF0868DC51F9D3E8A1E45C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\CertificateCannotBeVerified.jpg" DiskId="1" /> - </Component> - <Component Id="cmp5115B3C02C1C0CF975E4B7C3152C163A" Guid="{D705F09B-8F81-48FE-A6D6-B46EE47425CE}"> - <File Id="fil8DCBEED9F9CD2F449C888E90DBEC8A0F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\CertVerifyFails.jpg" DiskId="1" /> - </Component> - <Component Id="cmp3E70583F999D652B21E6E2D526666F61" Guid="{EA0DBD20-DFB7-4DF2-B29C-538C7FAE83C3}"> - <File Id="fil8BA636EB3F15CDFBF9B1B07AF40CAF5C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DistributionPackageDamaged.jpg" DiskId="1" /> - </Component> - <Component Id="cmpC2D0D30677874908C48FF8A921712958" Guid="{0CB7D629-B12B-4CCB-B65D-F92BC4099ED1}"> - <File Id="filABD544E660E7612EF24A540F4DAC89DE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DownloadVS2010.jpg" DiskId="1" /> - </Component> - <Component Id="cmp88EB50D9762FA92B2E52313A7C92F2DD" Guid="{BF41CBAB-594C-42FF-BC86-88869CD77445}"> - <File Id="filD123B515FACC275A341B8C7A4DD19074" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DownloadVS2019.jpg" DiskId="1" /> - </Component> - <Component Id="cmp3DABA5B6F2E779D915E1B8D680AE7855" Guid="{203AC826-E013-40E8-A944-9D9622669066}"> - <File Id="fil6BA9B558534B9399EA06F31375A6D8C5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DownloadVSBuildTools.jpg" DiskId="1" /> - </Component> - <Component Id="cmp2EA15F417E5EE9D31E028263C137695F" Guid="{F4EDBAFC-4B84-4502-9AA4-4272281B26B9}"> - <File Id="fil2DD203CD9997BD21FC45EFDF85BECE94" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\gzipCommandLine.jpg" DiskId="1" /> - </Component> - <Component Id="cmp51D438A1152A65EAD414012A5EAEA2CA" Guid="{8B4B3B03-9D19-4D15-9060-1ABB4CF4A80E}"> - <File Id="fil612E91212B4BE3447B34C59AD43D5FC2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\NasmCommandLine.jpg" DiskId="1" /> - </Component> - <Component Id="cmpD52CCEF7A4A330F26D3B3F7355D03646" Guid="{4C764331-E584-49C0-80FA-9251776108E3}"> - <File Id="fil63F42635C3D23E1CC8D9541703F69B96" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-1.jpg" DiskId="1" /> - </Component> - <Component Id="cmp1A9BFDDFF15FF47166075F319B97BB6E" Guid="{F0EF5133-371D-4767-9265-266277E4D939}"> - <File Id="fil609F8FC8F03A7AC92A7DDB6123F2771B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-2.jpg" DiskId="1" /> - </Component> - <Component Id="cmp320762048B274197D27F739096C4A23A" Guid="{118CF290-CD2D-4515-A55D-48AD4DBEF8F0}"> - <File Id="fil08D2CB8983DA4BA20DFFA5471E60CAD3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-3.jpg" DiskId="1" /> - </Component> - <Component Id="cmp952051BDCF309CAEB1D62701560D8F78" Guid="{6BA07F89-BAA5-4E06-BE93-65AF8DF895EC}"> - <File Id="fil335EB17B9D8DE11A9A8E0204C43BB2C7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-4.jpg" DiskId="1" /> - </Component> - <Component Id="cmp6AB232B7503BC35E25CB33C789242482" Guid="{0B2B14B7-2D21-4904-999D-8DA37C7289BE}"> - <File Id="fil9069630D9AA559C8EA243ADEB3DF0B69" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectAdvancedSystemSettings.jpg" DiskId="1" /> - </Component> - <Component Id="cmpE8ABDCD58C9636346FAE7E941A38CA6E" Guid="{2CF0B479-EFAF-499E-8630-AE4E41C8E424}"> - <File Id="filA8C1D27C90C6647C16EB5EE8728DC943" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectEnvironmentVariables.jpg" DiskId="1" /> - </Component> - <Component Id="cmp9CD73EB218D7148E55F141E31AEC9D8C" Guid="{299F81CE-0140-4A97-93C2-C6B2CD3F8514}"> - <File Id="fil8DB747C30552955A70B6FDAC1BC95198" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectPathVariable.jpg" DiskId="1" /> - </Component> - <Component Id="cmpE504F295E3ED5CEBDCF231608F6757B2" Guid="{0B23E02F-0D76-4F41-9081-CCC6A2634F05}"> - <File Id="fil4E06FA5FE9FA09E4F71E22CFA0FC7BA9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectThisPC.jpg" DiskId="1" /> - </Component> - <Component Id="cmp84A8D3A9BF75ED8047B7DEAB02F26003" Guid="{1EE2E63F-CE1F-4D90-97E9-AE186BC6DDA0}"> - <File Id="fil0470CF25D1C5B0A85FD8091673E3E2E0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\upxCommandLine.jpg" DiskId="1" /> - </Component> - <Component Id="cmp63A4BE623C0E3F77B3BFA5B467C33A1A" Guid="{845FE6B7-11D1-4FEB-AFBE-A9EC8B7775DD}"> - <File Id="filDC81CAAEC5DCB86937437877F26C046A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2010BuildSolution.jpg" DiskId="1" /> - </Component> - <Component Id="cmp63CE6B664C7396B79B1B28591EEC72B9" Guid="{E0F7F066-1B4F-48B8-8C02-AB0661E0AFF5}"> - <File Id="filC02619AFFB25501B6AA29599FAA01DEB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2010Win32Config.jpg" DiskId="1" /> - </Component> - <Component Id="cmp4D6100E03DC3B05F17A7E2BA4AAF1EA1" Guid="{3AF8735B-D193-4F71-8C51-E8B1FE71CE5B}"> - <File Id="filF697D096B67A6A8C84BB93AEB4199206" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2010X64Config.jpg" DiskId="1" /> - </Component> - <Component Id="cmpB7641BE40D4D1642AB3647B669008A94" Guid="{15A8F3D3-4364-4499-BBA9-2E29CD19D5C4}"> - <File Id="filBD820E84E255A9B91DDC38D189515EE6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2019ARM64Config.jpg" DiskId="1" /> - </Component> - <Component Id="cmp4DB96DA8172D79B63A7FBE08E016A280" Guid="{E6F2B68D-8CD9-42DE-AC2A-B5A2AB1F5DC1}"> - <File Id="filEFA99F46C962110CBA6A0B14162F1764" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2019BuildSolution.jpg" DiskId="1" /> - </Component> - <Component Id="cmp615D3647A56F3ED6F0766CEEE9EFCF9F" Guid="{7A343344-91E3-4AEA-BD32-5E524AE8BEA4}"> - <File Id="filD10154F2B3C2E7CB1EF84555EDA195C3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\YasmCommandLine.jpg" DiskId="1" /> + <File Id="fil0794C6C86BD24D62883FD840ADE90FC7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelines.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9FDD7E3C06564AF29700B82B19BC0501" Guid="{5DC9861F-1EB1-457D-9FAA-01DB499F6040}"> - <File Id="filC4ADB6F8DFE44319BB70B7089B72BFBF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin.html" DiskId="1" /> + <File Id="filC4ADB6F8DFE44319BB70B7089B72BFBF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp90AB4CF273108F47223E3432838CDE37" Guid="{9510EAF5-F452-4991-9BA2-F1F641C1D697}"> - <File Id="fil1DAD595818432F019735F37E86305500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Contact.html" DiskId="1" /> + <File Id="fil1DAD595818432F019735F37E86305500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Contact.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB9A0461BF7CF75538111B088C986A62F" Guid="{EC931A38-5F11-4C02-AA88-3A072E802C0B}"> - <File Id="fil8ABFD40EA9A1BE1765D794C2B8EAF909" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Contributed Resources.html" DiskId="1" /> + <File Id="fil8ABFD40EA9A1BE1765D794C2B8EAF909" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Contributed Resources.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp33C4617DBE37ED14B978BC4770F0C3F8" Guid="{387DE078-7507-48EF-A5A3-3A72FAAC8301}"> + <File Id="fil07A195AACB6D39C19DFCDC356E01958A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Conversion_Guide_VeraCrypt_1.26_and_Later.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpD8C7B52BC03709FAB2642B93BFE4FFE8" Guid="{1592BAD3-086F-4DDE-8970-199B44FFBD6E}"> - <File Id="filE99ED4C6D87549A1F623A37A5C47552A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Converting TrueCrypt volumes and partitions.html" DiskId="1" /> + <File Id="filE99ED4C6D87549A1F623A37A5C47552A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Converting TrueCrypt volumes and partitions.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFD6EB163EA6B74C4F59FF04D2B3796CC" Guid="{60D5BA7E-7466-4F09-ADB4-571A7502DD7B}"> - <File Id="filBD6D90F11807407F91F2F7AEA5DDC8EA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Converting TrueCrypt volumes and partitions_truecrypt_convertion.jpg" DiskId="1" /> + <File Id="filBD6D90F11807407F91F2F7AEA5DDC8EA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Converting TrueCrypt volumes and partitions_truecrypt_convertion.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp612D2E75E857D164665BE8CA37570D04" Guid="{6D667BD9-F8C1-4C46-BEA0-6AAA44B838CA}"> - <File Id="fil14C75587323CCC7F69E32786D82A5BD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Creating New Volumes.html" DiskId="1" /> + <File Id="fil14C75587323CCC7F69E32786D82A5BD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Creating New Volumes.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF65BF759DA7F65BAD6D74A83FEF9D205" Guid="{08FEF348-778B-42C7-81B9-F62EA5F658A6}"> - <File Id="filDAF1BCFE93CF42677E91DCF5E515D861" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Data Leaks.html" DiskId="1" /> + <File Id="filDAF1BCFE93CF42677E91DCF5E515D861" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Data Leaks.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpA6A249B42C89657DE664B9D88D04DB3F" Guid="{76F64E31-ED27-46A8-8A0D-6CFB4A79B856}"> - <File Id="fil58A7A13A2773C5CDDBF9D85254395A75" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Default Mount Parameters.html" DiskId="1" /> + <File Id="fil58A7A13A2773C5CDDBF9D85254395A75" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Default Mount Parameters.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpEE8A03DA56EF1B35979430E8711A6960" Guid="{034B338B-7719-4E70-B08E-C118CBCD2432}"> - <File Id="fil7D0C9ABA361EB2D263FA1F2EDB839223" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Default Mount Parameters_VeraCrypt_password_using_default_parameters.png" DiskId="1" /> + <File Id="fil7D0C9ABA361EB2D263FA1F2EDB839223" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Default Mount Parameters_VeraCrypt_password_using_default_parameters.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp628E75C5DD0F38348B6F8694D5D5149C" Guid="{B4CA9CED-3087-4115-AC8C-A8E12C3A4383}"> - <File Id="filAFAAE965983C249FC9A818A28333DFA4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Defragmenting.html" DiskId="1" /> + <File Id="filAFAAE965983C249FC9A818A28333DFA4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Defragmenting.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp40BDD4F3CA20DEE006E087930EF3847C" Guid="{696CB75F-F832-4E11-9617-E4F05B6CA29A}"> - <File Id="fil7887EE82BC26C1CFAAC5CD3A29EF5049" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Digital Signatures.html" DiskId="1" /> + <File Id="fil7887EE82BC26C1CFAAC5CD3A29EF5049" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Digital Signatures.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp7AEEABAF151FCE92735664A55F7B8FFA" Guid="{40361F33-E50C-492C-8D5F-9B32B2318FBF}"> - <File Id="filE430D3D4AD453AD90952510D4194438A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Disclaimers.html" DiskId="1" /> + <File Id="filE430D3D4AD453AD90952510D4194438A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Disclaimers.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9380DDE2560B4D8EE9CC363AF4BC7B5F" Guid="{787E2CF2-DF61-4341-94A2-497BCF9882C8}"> - <File Id="fil04BCDEC7438B23A6BBF1C95ACF126266" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Documentation.html" DiskId="1" /> + <File Id="fil04BCDEC7438B23A6BBF1C95ACF126266" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Documentation.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp84A94F04CD486338F57C03B316145945" Guid="{44F12D12-3BB4-4FE5-B829-5D471C05A2AF}"> - <File Id="fil07C7557AAF506EE9095B8C76E9C56776" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation.html" DiskId="1" /> + <File Id="fil07C7557AAF506EE9095B8C76E9C56776" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpDF544847A4B1F86B3BA3468336CD73FE" Guid="{8E46CB17-1956-4E28-B8F4-30DEFCEA1CF6}"> - <File Id="filD27301F6F853ABFC08499D4085599774" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_Bank.html" DiskId="1" /> + <File Id="filD27301F6F853ABFC08499D4085599774" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_Bank.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9A6A861B59A23E534C7407EF95500AA5" Guid="{044EF38F-E86C-4A28-B675-CA7E8E318559}"> - <File Id="fil87AEAF6DE829555C03BF7888DDD40D8F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate.gif" DiskId="1" /> + <File Id="fil87AEAF6DE829555C03BF7888DDD40D8F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp09C34B1CBDE9F2F4E897340B1C67728E" Guid="{CEA5EA37-6E8B-4DC0-A4DC-F95A050D36A1}"> - <File Id="fil2E4790AC38717B6E5E9B77A926CA98C4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_CHF.gif" DiskId="1" /> + <File Id="fil2E4790AC38717B6E5E9B77A926CA98C4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_CHF.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpD3183A7373751A19B4B7C9B041F9035D" Guid="{23A3ADFD-3BC8-4F77-9281-EED6A67CAFFD}"> - <File Id="fil12198C69AEB78A4CDE5C4343E8EE27A7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_Dollars.gif" DiskId="1" /> + <File Id="fil12198C69AEB78A4CDE5C4343E8EE27A7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_Dollars.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3DED9073AB120DC026C48E9CDF9283EB" Guid="{8F9DA5BB-3BFE-4D21-8B79-65AFBFC93ECF}"> - <File Id="filDA4E4CC3AAE26E3ADE9CFF4940975500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_Euros.gif" DiskId="1" /> + <File Id="filDA4E4CC3AAE26E3ADE9CFF4940975500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_Euros.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0FF3027C2662D967ACB4B01BA7BC85F9" Guid="{1B9D2475-C2D0-4695-B51D-AE53BFF05A46}"> - <File Id="filF7C4F27359F58FD995B964FF3B5AAAFF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_GBP.gif" DiskId="1" /> + <File Id="filF7C4F27359F58FD995B964FF3B5AAAFF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_GBP.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3FC9C0126A2074CAABCF73197358F824" Guid="{7AD29EC1-38EF-4F2A-8038-E70A6D360CA0}"> - <File Id="fil0D75D569E37C808031A4217294796BC7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_PLN.gif" DiskId="1" /> + <File Id="fil0D75D569E37C808031A4217294796BC7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_PLN.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1830E220882FBA276350032258B478AA" Guid="{A1A3410C-6B91-44FF-AC33-BDB18F4F2022}"> - <File Id="fil7779997A454E1C0068F2DF292319AA6A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_YEN.gif" DiskId="1" /> + <File Id="fil7779997A454E1C0068F2DF292319AA6A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_YEN.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp433CCCF103F2A8AF57F9FC528232C836" Guid="{D427BFF5-7DC7-4414-A920-51E2CAAAB671}"> + <File Id="fil64A82A6BA01444F0F0AF2BFBFCB524D1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VC_BTC_Sigwit.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE5D6E9DF3EE1301C6D5A4F44362BCE96" Guid="{0811DEAF-F857-4839-A31B-C1B3A2C932FE}"> - <File Id="fil83A3E2E3996B9CC933A606F6E4661FD5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_BitcoinCash.png" DiskId="1" /> + <File Id="fil83A3E2E3996B9CC933A606F6E4661FD5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_BitcoinCash.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB7B429D414CF1DD05A4B70CE94E343F7" Guid="{04490FFA-387E-4FD7-9449-AB6C99886EA9}"> - <File Id="fil25C86292E018E61CB762731F14261986" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Bitcoin_small.png" DiskId="1" /> + <File Id="fil25C86292E018E61CB762731F14261986" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Bitcoin_small.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp00845B9781D5633702C834BCB4EB93D1" Guid="{A41BFAC5-42BF-45DB-BFF9-703F9DBE7346}"> - <File Id="filAD426632459DB7AB1528AC311CE28870" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Ethereum.png" DiskId="1" /> + <File Id="filAD426632459DB7AB1528AC311CE28870" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Ethereum.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp47F92D029E335F7865F8ACB30763FED2" Guid="{A6C96C85-D0E8-442B-8C84-8705F17EE4C7}"> - <File Id="fil155C2578FFCBDBD39679AB6AF62EEA7B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Litecoin.png" DiskId="1" /> + <File Id="fil155C2578FFCBDBD39679AB6AF62EEA7B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Litecoin.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF3B90B0C1F316854E9142B22783ACF19" Guid="{A369FF58-377C-47B9-A2A6-B222CA95898C}"> - <File Id="filBE9E8FB59340806B67751E8BC2E00071" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Monero.png" DiskId="1" /> + <File Id="filBE9E8FB59340806B67751E8BC2E00071" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Monero.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpBD37FB188B29DB82A15EBC9C1DB66F94" Guid="{20A19599-83B8-4DF7-8B42-84F20DFA760F}"> + <File Id="fil8D7D976D180AF0CD0B43FD64BEF15E5B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\EMV Smart Cards.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2EC17F48BC15C5405D2DB40FC6E01745" Guid="{700262B3-5BB2-4482-B96B-A511EA875986}"> - <File Id="filACA26698300072DB7F917CA47A8AB6B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Encryption Algorithms.html" DiskId="1" /> + <File Id="filACA26698300072DB7F917CA47A8AB6B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Encryption Algorithms.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE00F8980768E14DF59474B5CB3D84041" Guid="{45C099F3-92B5-4514-9049-BEA244F0C942}"> - <File Id="fil0B06214692CAA0ACCACC01D1372A93B5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Encryption Scheme.html" DiskId="1" /> + <File Id="fil0B06214692CAA0ACCACC01D1372A93B5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Encryption Scheme.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpD17B73F5892E45458E960025558B3452" Guid="{F974B54B-B964-4B65-A718-DF09BE96F106}"> - <File Id="filAEB57F6A5B5C2593D13AEF942A2C721C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Ethereum_Logo_19x30.png" DiskId="1" /> + <File Id="filAEB57F6A5B5C2593D13AEF942A2C721C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Ethereum_Logo_19x30.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF45A8248FAFA80A8DF62989C477E7C0F" Guid="{9184BA24-53AB-4753-907C-E88D7F56B3FE}"> - <File Id="filA72BC6DCFD81551D166437E20BA8224F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\FAQ.html" DiskId="1" /> + <File Id="filA72BC6DCFD81551D166437E20BA8224F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\FAQ.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpD066CBBD66E8CABB4AD4B928F823A5D2" Guid="{A8B260B0-505C-4948-801F-A03236A0D61D}"> - <File Id="filACB34BF3CCD1B081CBA230C962B4023D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Favorite Volumes.html" DiskId="1" /> + <File Id="filACB34BF3CCD1B081CBA230C962B4023D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Favorite Volumes.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpACFE3B967BB844C3FD0FE21C9E87EE5B" Guid="{46D1B528-C7B7-4AEC-B5AE-0A3F91D4312E}"> - <File Id="fil88A41060BD4F57CB6135E162D4AB5CD7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-au-small.png" DiskId="1" /> + <File Id="fil88A41060BD4F57CB6135E162D4AB5CD7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-au-small.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFAA171DECE81EA4EA99B5570C9FF7D0E" Guid="{6EC15848-F7A8-40B3-88DF-52010E89E634}"> - <File Id="fil16558379B1C9116103DF96CB9C5C36AD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-au.png" DiskId="1" /> + <File Id="fil16558379B1C9116103DF96CB9C5C36AD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-au.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp7C1E782A2C12520E4CACF0D8FD4EAA4E" Guid="{625A778A-7F8A-42D8-A725-85973721DFF0}"> - <File Id="filA16A3EF20ACB7C21ACD09A4D1593A6F1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-eu-small.png" DiskId="1" /> + <File Id="filA16A3EF20ACB7C21ACD09A4D1593A6F1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-eu-small.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE9009D51D7CF4AA8BBA735E91F1D6044" Guid="{58D024BC-047D-44AA-9818-9E68C256D84D}"> - <File Id="filCEC0006C74C3A5D4FB0CDA60EEE61C91" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-eu.png" DiskId="1" /> + <File Id="filCEC0006C74C3A5D4FB0CDA60EEE61C91" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-eu.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp5D46BFDD0D54DD715695756148C22028" Guid="{42A27E61-0190-4654-8996-91B092CC314F}"> - <File Id="filE84495221B2E5A505F3AA4CA4595C7A9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-gb-small.png" DiskId="1" /> + <File Id="filE84495221B2E5A505F3AA4CA4595C7A9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-gb-small.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE34BBB4D255F23D71B0143270915E6D7" Guid="{5E95AE9C-8807-4E4D-81DA-1A83DACDC8A1}"> - <File Id="filECFBF3D126ECCB088B3B313A370D71ED" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-gb.png" DiskId="1" /> + <File Id="filECFBF3D126ECCB088B3B313A370D71ED" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-gb.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpEB665F1BFDB30B20C90142CCD1DA7664" Guid="{DB6617B7-2FEE-4FDB-A2DA-834B33B29C3E}"> - <File Id="fil968867F284C9559835DFF02CFA106E13" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-nz-small.png" DiskId="1" /> + <File Id="fil968867F284C9559835DFF02CFA106E13" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-nz-small.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFDCC994071E7ADACE3EB2CBACC60E34A" Guid="{0494762C-CFB8-4CF7-85AA-0650B2B4E813}"> - <File Id="filF5C5A9923D299431406A6B5D8D2BF34D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-nz.png" DiskId="1" /> + <File Id="filF5C5A9923D299431406A6B5D8D2BF34D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-nz.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp21A3A9B1C7FAA004EF937114F0F41C61" Guid="{2F88A1FE-94B5-46E0-93C2-DE9F9BEE58FF}"> - <File Id="filC1071DD08F53BDD0249A4E15993448D6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-us-small.png" DiskId="1" /> + <File Id="filC1071DD08F53BDD0249A4E15993448D6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-us-small.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFD4A149B4654FEF0542A5ECE211A86B8" Guid="{CC1D951A-2C70-4AE4-AC3C-E2D56789B981}"> - <File Id="fil1120ADD37C4E5039A94D7442675B202D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-us.png" DiskId="1" /> + <File Id="fil1120ADD37C4E5039A94D7442675B202D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-us.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE7CDDDCDA7CD20F1150F2879E0293D1D" Guid="{67630C6C-178E-41CF-A74A-AA086E5B4553}"> - <File Id="filA42CDEA93CCFE721C2569FA3D0786D57" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flattr-badge-large.png" DiskId="1" /> + <File Id="filA42CDEA93CCFE721C2569FA3D0786D57" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flattr-badge-large.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9CDBE7ACC2D5393535D2981C3DD73682" Guid="{97414D97-9C51-419A-9FE2-392223B7600A}"> - <File Id="fil901AA5AF4A010844A1F50A5881B8FD16" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\gf2_mul.gif" DiskId="1" /> + <File Id="fil901AA5AF4A010844A1F50A5881B8FD16" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\gf2_mul.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF09EAA16502FCF137AAD38D70D50B200" Guid="{95BBE9B0-AB65-43FF-A3C4-0D347BE43DF0}"> - <File Id="fil3E73719A927F1E24178C1E3C05DC1384" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hardware Acceleration.html" DiskId="1" /> + <File Id="fil3E73719A927F1E24178C1E3C05DC1384" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hardware Acceleration.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp62D4B7B5DACB58D3EEA9E6D3385769A7" Guid="{285C17A2-418E-4ACD-B0E8-A3940A9E9E61}"> - <File Id="fil05C2A8A0846F0288FDC2580173316E05" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hash Algorithms.html" DiskId="1" /> + <File Id="fil05C2A8A0846F0288FDC2580173316E05" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hash Algorithms.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpBF36D06FA293DFD3AFA1543C43A54E17" Guid="{EC20DE1B-F10D-4F9E-9CEA-8E06170EE71C}"> - <File Id="fil12E28B4819EEC3590C5CFA611E8BAF01" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Header Key Derivation.html" DiskId="1" /> + <File Id="fil12E28B4819EEC3590C5CFA611E8BAF01" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Header Key Derivation.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp7345D3EE0CFEA227E8AA9ADADF95E623" Guid="{F5E2342E-2879-48B1-B3CE-5C626AEDC366}"> - <File Id="fil25DB00F86CBD631E7750B8050A9CC9CD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hibernation File.html" DiskId="1" /> + <File Id="fil25DB00F86CBD631E7750B8050A9CC9CD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hibernation File.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE92C5D4B774B7214B49931528F7EDCF6" Guid="{44B9627E-29EC-4B8E-9B20-3D0ECCC77C1E}"> - <File Id="filA094EFE79FB6AAAEDCCC3C997972E35E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hidden Operating System.html" DiskId="1" /> + <File Id="filA094EFE79FB6AAAEDCCC3C997972E35E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hidden Operating System.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB6A3927A1BE4D2836C1007D3CC989C4B" Guid="{13D8AB5D-0F73-4C29-AB08-9086313EF010}"> - <File Id="filC7CDBCEC9B1D4BA6BCFC0362CE353D51" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hidden Volume.html" DiskId="1" /> + <File Id="filC7CDBCEC9B1D4BA6BCFC0362CE353D51" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hidden Volume.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp28666EA10A3DCEC7D2583ADD52785FDC" Guid="{55E58038-C992-4683-AA9F-9CA4111884FF}"> - <File Id="fil707007462E284E1048B6AB488EFFD466" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_facebook_veracrypt.png" DiskId="1" /> + <File Id="fil707007462E284E1048B6AB488EFFD466" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_facebook_veracrypt.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp08768A6308C114126260614CCDF6F72E" Guid="{30FDB2BD-5E5B-421E-97AE-F819944A4B57}"> - <File Id="filFA4C178FEBD09C0A4D38AA90B4523E9E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_reddit.png" DiskId="1" /> + <File Id="filFA4C178FEBD09C0A4D38AA90B4523E9E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_reddit.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF00E284DEEE43B341D12987E20DB76C5" Guid="{A2160846-E461-4C23-BC88-64531B3D2C59}"> - <File Id="fil4A9EA521DBB6DD5E280E4186CD34FA11" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_utilities-file-archiver-3.png" DiskId="1" /> + <File Id="fil4A9EA521DBB6DD5E280E4186CD34FA11" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_utilities-file-archiver-3.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB75BD74E0F63097DC1777FF4BF440479" Guid="{E2C9732A-0FD0-4A33-9B69-0BCD132AB427}"> - <File Id="filDABCE60F828DEEE9AE5064EA3F71EC67" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_VeraCrypt_Default_Mount_Parameters.png" DiskId="1" /> + <File Id="filDABCE60F828DEEE9AE5064EA3F71EC67" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_VeraCrypt_Default_Mount_Parameters.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1745256A6ECE8FB1779B0DA82CEECAB9" Guid="{1A5FBC9F-430E-4F8D-AEA4-7391D85F2E27}"> - <File Id="fil9C3B9E9CFB06A1F7C162B4941656906A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_VeraCrypt_menu_Default_Mount_Parameters.png" DiskId="1" /> + <File Id="fil9C3B9E9CFB06A1F7C162B4941656906A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_VeraCrypt_menu_Default_Mount_Parameters.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3F248F4BDDB12D98D3CF173FEA01CE24" Guid="{1B2E6370-1DD1-42D8-9E84-6D85922DFA07}"> - <File Id="fil9E39BB9774782EA2337679D8B86AB1A5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hot Keys.html" DiskId="1" /> + <File Id="fil9E39BB9774782EA2337679D8B86AB1A5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hot Keys.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1209E63998A1D1504B062C4ECC45EE07" Guid="{ED60D316-7B35-4622-90B5-938260E9E150}"> - <File Id="fil2B4301AD5F5E385426DEEE0DE166D557" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\How to Back Up Securely.html" DiskId="1" /> + <File Id="fil2B4301AD5F5E385426DEEE0DE166D557" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\How to Back Up Securely.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp035C544DF9B46B9DD7871AD7898B7D36" Guid="{44C5611E-FF00-41F3-B744-E18801513D89}"> - <File Id="filF60B07EAEE2B63ECAA396508EC68858F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Incompatibilities.html" DiskId="1" /> + <File Id="filF60B07EAEE2B63ECAA396508EC68858F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Incompatibilities.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpA891AF32EF72B7AC80533FC31773B604" Guid="{305DB86E-AE27-4634-9CE1-C4C875EF9569}"> - <File Id="fil8F60E744AB05081B8929E635DDF7B733" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Introduction.html" DiskId="1" /> + <File Id="fil8F60E744AB05081B8929E635DDF7B733" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Introduction.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1FC684D1C3742A927228DE9A669A2895" Guid="{EE9D3F20-7EB4-4628-ADE6-51238E60A998}"> - <File Id="fil9BA13C18F0927CFB3AFBFBDA5944B166" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Issues and Limitations.html" DiskId="1" /> + <File Id="fil9BA13C18F0927CFB3AFBFBDA5944B166" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Issues and Limitations.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp265116FC4778248E01BADFB30A2C32A7" Guid="{37C6EB1F-7A7D-4F00-9204-51240EB7FB81}"> - <File Id="filC57676C07D244DB5A336F1D52D978004" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Journaling File Systems.html" DiskId="1" /> + <File Id="filC57676C07D244DB5A336F1D52D978004" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Journaling File Systems.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB2A3FFEE7A15E23A2835A843438E3669" Guid="{BF14B9BF-8AFB-4E5E-80E4-CA2F3D132F51}"> - <File Id="filF08A4DB40EFF11FE0784034B3D70B750" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles in VeraCrypt.html" DiskId="1" /> + <File Id="filF08A4DB40EFF11FE0784034B3D70B750" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles in VeraCrypt.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFC8FB415783E0AA424FBD685EFACF54E" Guid="{01FCB5FD-953B-49D6-B993-6AC117052F6B}"> - <File Id="fil6DA5794E0BA3F26779AFE828D4E41AAC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles in VeraCrypt_Image_040.gif" DiskId="1" /> + <File Id="fil6DA5794E0BA3F26779AFE828D4E41AAC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles in VeraCrypt_Image_040.gif" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2BCEA21755E1C812ACCF15A09210FCCD" Guid="{0CECEA1A-AB6B-49B6-8D07-8D86B452995A}"> - <File Id="fil5450B4F3DD747980B87B30ACEC318F6E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles.html" DiskId="1" /> + <File Id="fil5450B4F3DD747980B87B30ACEC318F6E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9EC1750F7CD9717D3A761FC2930C509D" Guid="{980F49E8-EBCD-4720-8466-C03DC2B3BBD7}"> - <File Id="fil780042F951150166D5D328C10993CE7E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Kuznyechik.html" DiskId="1" /> + <File Id="fil780042F951150166D5D328C10993CE7E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Kuznyechik.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4298A84BD6956E2A2742B5678BCFF173" Guid="{2809427F-697F-48A4-853B-5BE4AE1E720A}"> - <File Id="fil01E37EFCBAF6AB983418B79E3DD75E88" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Language Packs.html" DiskId="1" /> + <File Id="fil01E37EFCBAF6AB983418B79E3DD75E88" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Language Packs.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2D9F7D88EF1F843BDEA5A39D13330B8A" Guid="{7A515A66-AD7E-4B89-8935-62C7B3FCF0A7}"> - <File Id="fil587E308C1A86BF1B8DA5BEFF409C509E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Legal Information.html" DiskId="1" /> + <File Id="fil587E308C1A86BF1B8DA5BEFF409C509E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Legal Information.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp58EAECCB29CB9ABDDDB72F9378E4EE77" Guid="{03CB945A-4EE1-4EC6-8360-56B00FD8C7E8}"> - <File Id="fil76CDD0FA0D1CFE86ABAFDF8ED174B7D5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\liberapay_donate.svg" DiskId="1" /> + <File Id="fil76CDD0FA0D1CFE86ABAFDF8ED174B7D5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\liberapay_donate.svg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp61C660976A230AD4AD8B42A90D4BCC7C" Guid="{7B5EFF52-9EBF-4A15-8117-684E0B40EC9E}"> - <File Id="filE7AA75571211982F69DEE42B8A42D2BA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\LTC_Logo_30x30.png" DiskId="1" /> + <File Id="filE7AA75571211982F69DEE42B8A42D2BA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\LTC_Logo_30x30.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp29A0605ED3FB7D4E2EAC833D56411563" Guid="{A65BBFC8-1956-4F8E-A0C8-74D32230342F}"> - <File Id="fil9DB1C5CAE05C434550F18FEFC614D725" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Main Program Window.html" DiskId="1" /> + <File Id="fil9DB1C5CAE05C434550F18FEFC614D725" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Main Program Window.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4A0EF1CFD1E1DE8B4E7BF698E05680E9" Guid="{273E1197-B7FC-40E4-AFB0-317D1D0AD816}"> - <File Id="fil8F40D01C235606BC89A05FF0956B7146" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Malware.html" DiskId="1" /> + <File Id="fil8F40D01C235606BC89A05FF0956B7146" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Malware.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1E4F8137AD337BEA1B902E6B003AB953" Guid="{6FF05277-1E0B-4885-8AC4-9B3044DA19CA}"> - <File Id="fil1C19C87ED25856F0A34F96A3AA92D695" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Memory Dump Files.html" DiskId="1" /> + <File Id="fil1C19C87ED25856F0A34F96A3AA92D695" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Memory Dump Files.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp8D35F7D61B2B7DF0EDEAE2E56031E7CB" Guid="{41103C48-5692-4593-8042-75B847917265}"> - <File Id="fil03685445FCFED7E0BA2CA91812337283" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Miscellaneous.html" DiskId="1" /> + <File Id="fil03685445FCFED7E0BA2CA91812337283" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Miscellaneous.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpDE2C66707086A509EABD0F9F6E8BDB1A" Guid="{077B9131-7B76-4E56-9895-0A34F2B7DB5A}"> - <File Id="fil52FBC994010BF4A06B7C78261E002986" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Modes of Operation.html" DiskId="1" /> + <File Id="fil52FBC994010BF4A06B7C78261E002986" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Modes of Operation.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpA80443C3767E3E51F3DE88BFD0D7A33B" Guid="{221A050D-548A-42F2-9555-7ECA43D71CB6}"> - <File Id="filD4C6BB0CDA1B086217E6C8B6E4930DEE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Monero_Logo_30x30.png" DiskId="1" /> + <File Id="filD4C6BB0CDA1B086217E6C8B6E4930DEE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Monero_Logo_30x30.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp214446AAABEBAC0C3827B8977083FAE2" Guid="{76AB42FF-2CD5-4CC2-9E32-640FFA611F17}"> - <File Id="fil82C85BB54B2E986169D519B2AAF71A46" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Mounting VeraCrypt Volumes.html" DiskId="1" /> + <File Id="fil82C85BB54B2E986169D519B2AAF71A46" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Mounting VeraCrypt Volumes.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4AF022868FE6883520C700676C43B15D" Guid="{DE7F786D-2B71-4654-86F1-C02CCDA23E23}"> - <File Id="fil1B5039BFF40C7C3BAA602D9AE17668E6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Multi-User Environment.html" DiskId="1" /> + <File Id="fil1B5039BFF40C7C3BAA602D9AE17668E6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Multi-User Environment.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp340BBEC25292C3BE778BA8F158DB87B1" Guid="{34107694-BD63-4466-9317-E2745861F0FE}"> + <File Id="filDF64E26B5CFC7EDB198C7CEA46690CA0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Normal Unmount vs Force Unmount.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpC27AA2C4496C9EFA95DCD663B031B5D0" Guid="{23C15FAB-969E-491A-802E-ADE3255F9002}"> - <File Id="fil5FA8E7B0268E1EF7F9FAFA478FE0C8B1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Notation.html" DiskId="1" /> + <File Id="fil5FA8E7B0268E1EF7F9FAFA478FE0C8B1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Notation.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9CBBC8311BBFC54C8DC1162BB17E5AED" Guid="{9C5C22CF-AB15-4D0C-B715-AF1E31B0AFD0}"> - <File Id="fil7A50CAD8D98A751781AF007ABEE22CD2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Paging File.html" DiskId="1" /> + <File Id="fil7A50CAD8D98A751781AF007ABEE22CD2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Paging File.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp033461B0777614621A2ED7B4E2B08D55" Guid="{1A3135F7-200E-4563-90C3-79E5511394CD}"> - <File Id="fil45662024A9E5B2BEBA51908F9478105E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Parallelization.html" DiskId="1" /> + <File Id="fil45662024A9E5B2BEBA51908F9478105E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Parallelization.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0E43CDBBAE343957423AE2907AC16883" Guid="{5C63387F-3BB8-405A-BA0A-10F87C828F9A}"> - <File Id="fil70B46565AEC42A408480FE289D55EA5E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\paypal_30x30.png" DiskId="1" /> + <File Id="fil70B46565AEC42A408480FE289D55EA5E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\paypal_30x30.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp8A8526D2061A14810E1B7A8A6E527DCD" Guid="{F46FE563-00F0-465E-A7E7-901B1B3F412E}"> - <File Id="filF33DCC20E8AA63F4190D46B9D22D71C6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM).html" DiskId="1" /> + <File Id="filF33DCC20E8AA63F4190D46B9D22D71C6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM).html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpAE2DADEF126C59D8CCD3A18D8CDC49C8" Guid="{EF70E2B7-4109-4327-BE89-0D411119AC4D}"> - <File Id="fil357A891A8A012F17A7B040E444D36B5F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step1.png" DiskId="1" /> + <File Id="fil357A891A8A012F17A7B040E444D36B5F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step1.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp2F972A5C99F7EE708B7C232EE8647672" Guid="{3190ECDC-675E-4845-A885-F12A1DF98B80}"> - <File Id="filF8BC3136E117642C05A9DE926C174FAF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step2.png" DiskId="1" /> + <File Id="filF8BC3136E117642C05A9DE926C174FAF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step2.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB21F7D781FE7B006ABCA7974A21F29E2" Guid="{E07A247C-4600-4FAD-9766-585D2385EA6B}"> - <File Id="fil559077BE31FD160F8A07CC74414D0B6A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step1.png" DiskId="1" /> + <File Id="fil559077BE31FD160F8A07CC74414D0B6A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step1.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF345174585735CD7A31AE138DDE8B439" Guid="{516094A0-18EA-4AA4-806C-DAFC7BAF1245}"> - <File Id="fil191704A44DE6065F1A5919C5EB1D49E1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step2.png" DiskId="1" /> + <File Id="fil191704A44DE6065F1A5919C5EB1D49E1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step2.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp06772C03A0ECA40F11F1D5C5ACD607D8" Guid="{9235C68E-30B0-4B4C-94EB-6BDBC4057677}"> - <File Id="filF226612AEE0B01C8ECE40DDF61B34478" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step1.png" DiskId="1" /> + <File Id="filF226612AEE0B01C8ECE40DDF61B34478" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step1.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp79E890B8891FA87AA5B10A67E15E7E8E" Guid="{E0EA3C67-4624-47E1-A528-9859B868C7A5}"> - <File Id="fil6351515AD3FA423CD458336ABC480500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step2.png" DiskId="1" /> + <File Id="fil6351515AD3FA423CD458336ABC480500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step2.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp89C46AE8EC4175E62A9CFE3DF9DF924A" Guid="{0A572658-4C6A-4F2A-8302-FF92CCEA3FB4}"> - <File Id="fil0435E327F9A0E86EC58E465ED1474BBB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Physical Security.html" DiskId="1" /> + <File Id="fil0435E327F9A0E86EC58E465ED1474BBB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Physical Security.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpC8F860B10D41961424874F69C6D84ED3" Guid="{ED207B14-7958-4933-BF3A-1A1F85ECBA4E}"> - <File Id="fil3B718B54EE1655F0A905435EE96043B9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Pipelining.html" DiskId="1" /> + <File Id="fil3B718B54EE1655F0A905435EE96043B9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Pipelining.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp285021B8CBC8E92B1CBCE4C88731083C" Guid="{86BDBC99-AC0B-4542-B14E-99908DD27628}"> - <File Id="filB7C15B9F7B056DB59B2E536B74F5F1AE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Plausible Deniability.html" DiskId="1" /> + <File Id="filB7C15B9F7B056DB59B2E536B74F5F1AE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Plausible Deniability.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpABE9B0A93A9B14C0732EBD8CD17A11AE" Guid="{5EE9BF82-FFB8-4511-B967-3383965953FB}"> - <File Id="filE75832AA56BFC08BDB777474186CECD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Portable Mode.html" DiskId="1" /> + <File Id="filE75832AA56BFC08BDB777474186CECD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Portable Mode.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpD9B960879A3227B971E33222CE13BC18" Guid="{BD467209-9DA1-4383-BE25-E2EC8C9616ED}"> - <File Id="filFBF0DB894794EFB2376487A579DFED67" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Preface.html" DiskId="1" /> + <File Id="filFBF0DB894794EFB2376487A579DFED67" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Preface.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3B3BB414D13FDBF2B0C7A9CEBD7D98F5" Guid="{2CF8409E-3423-44A2-96FA-54D793EEB3F0}"> - <File Id="fil7F7441447BC07C288597FEFA0D495255" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Program Menu.html" DiskId="1" /> + <File Id="fil7F7441447BC07C288597FEFA0D495255" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Program Menu.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB39B1096387C2617720F515D24953B37" Guid="{48233666-96CF-4C73-9284-259EC39EA2B7}"> - <File Id="filBE0C2BED7FB2DD3D2FC511AC4D7D385A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes.html" DiskId="1" /> + <File Id="filBE0C2BED7FB2DD3D2FC511AC4D7D385A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp493A37205039E2A3A476A1A4F5360EBF" Guid="{3D92A6B0-B03F-4C86-8020-F756FBAADDC8}"> - <File Id="filC70F6B9415FAADA8160DB4529D0BE54D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_027.jpg" DiskId="1" /> + <File Id="filC70F6B9415FAADA8160DB4529D0BE54D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_027.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpF36A771DF9B1C4CD8E82C08A6D3D0786" Guid="{C0D77203-5FAC-4052-A490-ABB0346384AF}"> - <File Id="filE1423115AD04FF5AEC6F63AA963CB4D6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_028.jpg" DiskId="1" /> + <File Id="filE1423115AD04FF5AEC6F63AA963CB4D6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_028.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp63F6A68C5538B45661168554BC3B93D1" Guid="{252A5E82-AD3A-49A7-8185-421735A09DCE}"> - <File Id="fil5286E3B666BFB60D10FBA4CF8D8F6925" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_029.jpg" DiskId="1" /> + <File Id="fil5286E3B666BFB60D10FBA4CF8D8F6925" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_029.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0158A6D8BED6391AC7150B6C6AE2A9F9" Guid="{5A0D3271-1439-4E71-B7F6-D645FEC8FD49}"> - <File Id="fil2C5151D680BC4575AC607487970F87D8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_030.jpg" DiskId="1" /> + <File Id="fil2C5151D680BC4575AC607487970F87D8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_030.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpDE45667E9E3CD9F800EAC1E02B57AAB7" Guid="{333167EF-38B6-49E2-A24A-04E08F7D87BE}"> - <File Id="fil1B03C5F8575364F36A893E5EE4723659" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_031.jpg" DiskId="1" /> + <File Id="fil1B03C5F8575364F36A893E5EE4723659" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_031.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp632453049391BAACDD117A40EC442743" Guid="{75B50C72-2495-4A22-BFDA-5BFE041EB265}"> - <File Id="fil37E6C8BC6738BF93446E4F2D13E312EC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Random Number Generator.html" DiskId="1" /> + <File Id="fil37E6C8BC6738BF93446E4F2D13E312EC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Random Number Generator.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpCE16E453CAD75A461B4FEBF451A51B7B" Guid="{E68D3F57-0A30-4492-9088-F2D1B0C7934A}"> - <File Id="filC3043FC38C97C7B8038FF12DD7882D85" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Reallocated Sectors.html" DiskId="1" /> + <File Id="filC3043FC38C97C7B8038FF12DD7882D85" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Reallocated Sectors.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpC741D187A28A87BD33866C9AC09A1298" Guid="{FB850461-6BD1-495F-9C10-19A34CFA0F16}"> - <File Id="filFFB70B91C00A69849F9E36950C6606B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\References.html" DiskId="1" /> + <File Id="filFFB70B91C00A69849F9E36950C6606B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\References.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB313B00E647A121B2CBE47F3048A18A7" Guid="{5985576D-6F6C-4D96-9B3E-9E0961CF9FAF}"> - <File Id="fil2EB5F87C05CCC55D3964D595C85EF19E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Release Notes.html" DiskId="1" /> + <File Id="fil2EB5F87C05CCC55D3964D595C85EF19E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Release Notes.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp400428F6494DE58618E3B92539548C39" Guid="{0A1869ED-25F1-4430-97A5-4C6EA8CDA7FC}"> - <File Id="filEDEDEF956F04F36B4163989F9AB9285F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removable Medium Volume.html" DiskId="1" /> + <File Id="filEDEDEF956F04F36B4163989F9AB9285F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removable Medium Volume.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFB2313AB16EF2467366ED136C0E61CE6" Guid="{CFEC9559-9F85-46C6-9E98-AEBB573B96FE}"> - <File Id="filE496203C4727FDF47F8352CB9722A8C7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removing Encryption.html" DiskId="1" /> + <File Id="filE496203C4727FDF47F8352CB9722A8C7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removing Encryption.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB4C7B1A7A3EC0CB2DE805AC5CC5FC0D7" Guid="{4534E8B2-114E-4173-AE3E-75E0D96EB573}"> - <File Id="fil8CFD1CFDCBE261B6F91D9E587F8720C0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Model.html" DiskId="1" /> + <File Id="fil8CFD1CFDCBE261B6F91D9E587F8720C0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Model.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp00540BF93A805E0B9996945B61E1BC2F" Guid="{1D5B7A85-87F3-45AF-9C09-BA7E088A835D}"> - <File Id="filA7A29851126AC571C090BB0FBEE83CB5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements and Precautions.html" DiskId="1" /> + <File Id="filA7A29851126AC571C090BB0FBEE83CB5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements and Precautions.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp4C46C6668AD830D543AFE593D51676B3" Guid="{4CD21E9D-243F-4A58-A535-AA8EF9D2BFD1}"> - <File Id="fil440C5158A3CD96689918C976DC917325" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements for Hidden Volumes.html" DiskId="1" /> + <File Id="fil440C5158A3CD96689918C976DC917325" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements for Hidden Volumes.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp6EE914124966E3A0F695359116413DD4" Guid="{724FA79D-49BC-4075-ABF4-0C318AE39855}"> - <File Id="filD229058EB41E2E150C0CA4D0EC1DF39B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Tokens & Smart Cards.html" DiskId="1" /> + <File Id="filD229058EB41E2E150C0CA4D0EC1DF39B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Tokens & Smart Cards.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp28E29B4CA17AB51913B756CD9397EEFE" Guid="{1B9083B9-8E76-44CA-AE3E-0771B1ABA62B}"> - <File Id="filC173058120D357E87951F41755A9210B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Serpent.html" DiskId="1" /> + <File Id="filC173058120D357E87951F41755A9210B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Serpent.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp5DF24509F284FABC600232197F803DE5" Guid="{120A40CF-E44A-4F4F-9072-93248DABACA2}"> - <File Id="fil01F3ACD810057C4A059A5C424E1B79E1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\SHA-256.html" DiskId="1" /> + <File Id="fil01F3ACD810057C4A059A5C424E1B79E1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\SHA-256.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp09E31B885345FBEA1F473AF7A10FD88D" Guid="{1B1C80CF-6C3C-4C7D-BE7B-579042701D0F}"> - <File Id="fil2E702CC679444D8DDB66A3FBDB32C807" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\SHA-512.html" DiskId="1" /> + <File Id="fil2E702CC679444D8DDB66A3FBDB32C807" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\SHA-512.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpAE05C79A35A43ECCAC995A711DC4D60B" Guid="{151A493F-38A5-4EF1-9740-255B610B4117}"> - <File Id="fil167B9CF3B9CD2FA5458778733095F780" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Sharing over Network.html" DiskId="1" /> + <File Id="fil167B9CF3B9CD2FA5458778733095F780" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Sharing over Network.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB6D91209A93313D08150643F1738DED8" Guid="{270DF8A0-8859-49F3-BF05-2F155C3CA428}"> - <File Id="filF3B75776C2FEC0F4397274BCA02330DB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Source Code.html" DiskId="1" /> + <File Id="filF3B75776C2FEC0F4397274BCA02330DB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Source Code.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpDB66E821EC13977824FB1069DF5DAA69" Guid="{D08B0614-2B88-4445-9B47-52BEA0E29E77}"> - <File Id="filA67FBF7D25BFBA155A0E4570F404CBEE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Standard Compliance.html" DiskId="1" /> + <File Id="filA67FBF7D25BFBA155A0E4570F404CBEE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Standard Compliance.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp159AB26E32632FC87229090B3AA89BF8" Guid="{B35B4FD4-D82C-47E9-BB2A-5539115F40CC}"> - <File Id="filBFED47E502C7539F724D68EAF73A554D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Streebog.html" DiskId="1" /> + <File Id="filBFED47E502C7539F724D68EAF73A554D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Streebog.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp5BE3E12343551B853E1B143371CBEBE6" Guid="{5ACC0589-AD8D-4BAC-BD40-201BAD7D07BC}"> - <File Id="filA40C816E149FB745F49DAF482DF97F3B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\styles.css" DiskId="1" /> + <File Id="filA40C816E149FB745F49DAF482DF97F3B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\styles.css" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0E081D9499DA225BB788494A1D86893D" Guid="{A79816FA-0683-4097-988B-75FB49DF3265}"> - <File Id="filB5B2E158090CD673A8FE9D55020AFC48" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Supported Operating Systems.html" DiskId="1" /> + <File Id="filB5B2E158090CD673A8FE9D55020AFC48" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Supported Operating Systems.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpBC7134AF21BAE309E9FD1A52ADF92527" Guid="{9570C06B-324A-4216-8D39-57AE06CAC70A}"> - <File Id="fil6D85A49AF2B16D6EE47465F315B140EF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Supported Systems for System Encryption.html" DiskId="1" /> + <File Id="fil6D85A49AF2B16D6EE47465F315B140EF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Supported Systems for System Encryption.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB586F01E9F9657C498F2AB64E1F51BD7" Guid="{9E7FE222-18AC-48E5-ADAD-2A45BD498DAB}"> - <File Id="fil4943B1ACB69010EBD9EC4E9D4E010E11" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\System Encryption.html" DiskId="1" /> + <File Id="fil4943B1ACB69010EBD9EC4E9D4E010E11" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\System Encryption.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp6EB049078039C276CADA69E7B79FDFA8" Guid="{8BDEFB8D-9143-45EE-8095-65B5F4C95417}"> - <File Id="fil5A3E287172F44E471AE59AE8AB15B797" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\System Favorite Volumes.html" DiskId="1" /> + <File Id="fil5A3E287172F44E471AE59AE8AB15B797" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\System Favorite Volumes.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3135BB68A1F44DDD9FE19B7D5FB4ED7B" Guid="{00ED20A0-F1D4-443F-91EE-646A14B229BA}"> - <File Id="fil2C3C74388CBEB07327ED4D549C0067FE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Technical Details.html" DiskId="1" /> + <File Id="fil2C3C74388CBEB07327ED4D549C0067FE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Technical Details.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp98ECAD990DF7B535B05EF6E840B7B2DF" Guid="{1827AFAB-C8B0-46BF-B281-88662B87E583}"> - <File Id="filAB4D4629FE812B0E1CDB1E3CBFB4A297" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Trim Operation.html" DiskId="1" /> + <File Id="filAB4D4629FE812B0E1CDB1E3CBFB4A297" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Trim Operation.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpFE417CCCB859A1C3E4FB90A9C4E132F0" Guid="{A03D9719-6170-4239-9E67-5857521417C3}"> - <File Id="filECA5FD7DEC2F3112CF19DB201F4DD774" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Troubleshooting.html" DiskId="1" /> + <File Id="filECA5FD7DEC2F3112CF19DB201F4DD774" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Troubleshooting.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpD91C00B1B2AACF38761B45D0574884D7" Guid="{52CD1733-C124-401A-9830-56AECD35F8DF}"> - <File Id="fil524C8D572AD8121392C6584496A57345" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\TrueCrypt Support.html" DiskId="1" /> + <File Id="fil524C8D572AD8121392C6584496A57345" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\TrueCrypt Support.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp590EDE3CE6E09D0D43B35287E849B75A" Guid="{5A433701-05CD-4972-9B85-B318BFD5D8DD}"> - <File Id="fil35D6691D20085B8A5F8941864C44EC0C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\TrueCrypt Support_truecrypt_mode_gui.jpg" DiskId="1" /> + <File Id="fil35D6691D20085B8A5F8941864C44EC0C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\TrueCrypt Support_truecrypt_mode_gui.jpg" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9D6F95F912C3B9C95E92E39BA1CE6BC9" Guid="{95929E0A-1AB1-44BC-A86D-F4F4B552121F}"> - <File Id="filE04EC2E8B20706A01283B31462E0DB0F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\twitter_veracrypt.PNG" DiskId="1" /> + <File Id="filE04EC2E8B20706A01283B31462E0DB0F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\twitter_veracrypt.PNG" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpAD429D8A050A0D31B661626BDCA9C952" Guid="{6437B9F6-6024-4ACA-8FF1-23A613E2373E}"> - <File Id="filC71BF1DDF8EB4C886801C1E95CD42F31" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Twofish.html" DiskId="1" /> + <File Id="filC71BF1DDF8EB4C886801C1E95CD42F31" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Twofish.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp3BDE199844AB81673ABB0E5E61E9B7B5" Guid="{95B5F172-3BBE-4620-B68A-F2D3473C066C}"> - <File Id="filD2BC6D56B2FF1A44DB6FF7B24B594430" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Unencrypted Data in RAM.html" DiskId="1" /> + <File Id="filD2BC6D56B2FF1A44DB6FF7B24B594430" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Unencrypted Data in RAM.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0A4AB9AEF0D351FA5E63BCD67DC00607" Guid="{CF5B6BB4-4263-4354-BA4F-ADF283A0F238}"> - <File Id="fil82416621AEEFEB29EFA3DE265214EA14" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Uninstalling VeraCrypt.html" DiskId="1" /> + <File Id="fil82416621AEEFEB29EFA3DE265214EA14" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Uninstalling VeraCrypt.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpCC25F1CB6A1C9D8B47C407B818F73B59" Guid="{5E74CF1D-85A3-4A4F-B1D8-E965912E00DA}"> - <File Id="fil9D6D114ED531555871AD956FCBA5B7DC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Using VeraCrypt Without Administrator Privileges.html" DiskId="1" /> + <File Id="fil9D6D114ED531555871AD956FCBA5B7DC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Using VeraCrypt Without Administrator Privileges.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE0F5E8A2D6FEF181686370F0E1EAC632" Guid="{FDF54DAD-73B4-4D06-A292-353E3AFC27F7}"> - <File Id="fil980276E3BC07E82993537096C68872EF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Background Task.html" DiskId="1" /> + <File Id="fil980276E3BC07E82993537096C68872EF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Background Task.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp46B2E8BCD50BD668153E793EB737BC39" Guid="{A899B8CF-2847-4BC2-BDD5-4B9C77EC13F9}"> - <File Id="filF1064BAE73402AAE56CBD0BED505159D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Hidden Operating System.html" DiskId="1" /> + <File Id="filF1064BAE73402AAE56CBD0BED505159D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Hidden Operating System.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0305CC2824E44F697B402E56A0CD1754" Guid="{4A81FE38-C1CE-430D-855B-2126B865A643}"> - <File Id="filB279C24D2499DFD0899469188292D02E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt License.html" DiskId="1" /> + <File Id="filB279C24D2499DFD0899469188292D02E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt License.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp9DD3085A37E22E035A65C74A5B9C209E" Guid="{B7D36E91-D8FE-4E85-A69F-0A3A381C1C65}"> + <File Id="filAB85146302AE4E183B91C079E609D501" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Memory Protection.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp1FFF1F3DF3F162C4AEDA7871C7886618" Guid="{8178164B-C657-40BC-854D-55E06F002939}"> + <File Id="fil045BED1ADE4CE7CDFCC60D97F1C5C2E4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt RAM Encryption.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp0E00CBDCB82A904FD6AD82E458CA6AA7" Guid="{54998F1F-E717-4881-B63E-A3493B3EB7FD}"> - <File Id="fil069503600DD8A66DCDA448933183871D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Rescue Disk.html" DiskId="1" /> + <File Id="fil069503600DD8A66DCDA448933183871D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Rescue Disk.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp594B5E68E63675F4986F6717BC1F5950" Guid="{1216918B-2AEE-48BE-B956-9BF6F9AA568E}"> - <File Id="fil3AB9FDA0E3D8D0A0BD0C321E1779EC14" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt System Files.html" DiskId="1" /> + <File Id="fil3AB9FDA0E3D8D0A0BD0C321E1779EC14" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt System Files.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp62748E79EC04EBE33DC46770AD65CDCE" Guid="{6A32F378-04F7-42B4-A9B2-7A500BB34071}"> - <File Id="filB21E0ACBD1948FFB662842F1F6A86DAB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Volume Format Specification.html" DiskId="1" /> + <File Id="filB21E0ACBD1948FFB662842F1F6A86DAB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Volume Format Specification.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpE1265CF3CC5E0B487E99D9D5936BB3F4" Guid="{ADFAD315-C3D8-4084-A7F3-FA957429C5F1}"> - <File Id="filDFCE636A6439CD7F236E004E67DBCD23" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Volume.html" DiskId="1" /> + <File Id="filDFCE636A6439CD7F236E004E67DBCD23" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Volume.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp1C162513D52824629D7C9FAF96054182" Guid="{8772B5F9-85B5-4DB9-AD86-AF6FB0FECF13}"> - <File Id="fil0CC62FF0B0565DF602BDF277B36D1696" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt128x128.png" DiskId="1" /> + <File Id="fil0CC62FF0B0565DF602BDF277B36D1696" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt128x128.png" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpB5FA2A488D2C7E59E0B52D18820CE00A" Guid="{CF1BAE7D-281D-49DB-A096-51C3B3DFC40F}"> - <File Id="filCEA5B6C14C18E120FCFF7BBD6791B9FD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Volume Clones.html" DiskId="1" /> + <File Id="filCEA5B6C14C18E120FCFF7BBD6791B9FD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Volume Clones.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmpBB1A4A1EB3FBBE5B2BF2752C302CDC2D" Guid="{69F8D869-FB10-436B-8D13-DBBA92BA4B29}"> - <File Id="fil78A530A8C9B138112029FBCC58AE22E7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Wear-Leveling.html" DiskId="1" /> + <File Id="fil78A530A8C9B138112029FBCC58AE22E7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Wear-Leveling.html" Checksum="yes" DiskId="1" /> </Component> <Component Id="cmp9D908DF026E6297D51B6C4A6700092F1" Guid="{567314CF-BEA8-4AA7-A9EF-F0C776EF80E1}"> - <File Id="fil21EEF98CAEE8AF1A7263353EE9D83C38" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Whirlpool.html" DiskId="1" /> + <File Id="fil21EEF98CAEE8AF1A7263353EE9D83C38" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Whirlpool.html" Checksum="yes" DiskId="1" /> </Component> </DirectoryRef> + <DirectoryRef Id="ENGUIDEHTMLFOLDER"> + <Component Id="cmpD07393B381E6260DBC0496E0A2B3FDA3" Guid="{C61BFF9C-4570-41C9-A145-F1B271DEB2AA}"> + <File Id="fil45D44F58FC42A92ED1B70EEBBF5E5844" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\AddNewSystemVar.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp1731A59A75547D8FA04524DDC7AD2988" Guid="{2C8CB716-7D9E-4F50-B9C8-EA1C71E31D48}"> + <File Id="fil478EA0687A41B5B80BC6BF504A376432" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\CertificateCannotBeVerified.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7FFBD1C115BC0813B91129B4078705CF" Guid="{1AA16711-12DB-4B24-9BB6-3E6FB3707516}"> + <File Id="filCA6B7745E3D514309BF2980CAD6AB81A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\CertVerifyFails.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD7F278D2B4ABBD3373A66252A80FF41C" Guid="{CF6447A0-DAF5-45D9-A0A9-F2341D4A4061}"> + <File Id="fil90040C32C21366278AF4F9B0770BB25F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DistributionPackageDamaged.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA3CA3666C6CCD54031801DA1FF7D7AF3" Guid="{AF6C1FA9-6075-4792-A8B5-4F994C94DD06}"> + <File Id="filEC7C429726D3A10F5E8482C64F649E02" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DownloadVS2010.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpE90376C911384CD5AE71D0E60076C55E" Guid="{09FB6D81-A013-4EC8-96C9-6F3530570555}"> + <File Id="fil9DAFD0DFC5C2FD1CA5B558445885EE11" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DownloadVS2019.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2F53ACA5C5C155121B87F5D6E8A68D40" Guid="{F9F2E740-0F1F-4A07-96FA-10A10C1132EF}"> + <File Id="fil8B115B29D371466A76CB62B7AD5560A2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\DownloadVSBuildTools.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp843B9A72B11653FC613E6888545A2914" Guid="{1E547014-186F-4925-903B-6CB62664647F}"> + <File Id="filF0BF15D8539245F90B27EEEB3133F103" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\gzipCommandLine.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5AF6BA98113B1A6C1B9EB20C78BA4ABF" Guid="{E48105F3-0AF3-4E51-B213-C3FB2DFF5D8C}"> + <File Id="fil055DE3608BF413F80BA1EC0678EDAB73" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\NasmCommandLine.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpB235C44A240AB4854F159B87373D335B" Guid="{1FE23DB9-D54B-4D87-BF6A-93E617240040}"> + <File Id="fil0DB2655878FFFEDA44CEC84F76FA2FF7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-1.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6F71C2116891CBBDE64C81A41B85C674" Guid="{BE9D55D0-2777-426B-810D-3F00D7EE2A2E}"> + <File Id="fil281EAD12D3A9AA60B13D898D2B3A8A2D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-2.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp9DEEBC6C9B984AFFF4F946DBE6084FB3" Guid="{758D1278-6BB5-4E45-9B5E-F6F3A34A6B23}"> + <File Id="fil853E3417AFE131726F5D73ABC94A0C9E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-3.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD474D105652697A5807E9CBF4B0A0AD0" Guid="{CA7287C0-9F39-4E87-96C3-C72B40B7047B}"> + <File Id="fil69F96FBCAB78BCA39AFF3FE63A0464A1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\RegeditPermissions-4.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp451C53B55201540C7B07BBE0A73A6F69" Guid="{7B7D3DB2-8718-44D3-83F5-CAF12773BBEE}"> + <File Id="fil5E97C4B70EB432B740CA4737AC988C13" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectAdvancedSystemSettings.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp75EA034E68DFB3C765DBA38C1EBEA351" Guid="{9DE6B724-30C2-4FD2-9E35-B8F6BF1CF8F7}"> + <File Id="filED3D1BEAF21EAB3BC54BE5C5DCB23F08" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectEnvironmentVariables.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5691E0C2C85E2E1EDE1E41214E222640" Guid="{E86BFFA0-1542-44E5-9FBD-DD986193863E}"> + <File Id="filF6B7FD6E909E158F3D20366602DCE5BA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectPathVariable.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2C05B384BC73DF32992E4B57F3F48AF5" Guid="{E76F018E-CF7B-4713-905E-C39D507AEFC9}"> + <File Id="filF451A122A259FDA8F0302673E33E393B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\SelectThisPC.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp4B12B4AD977CC6FE0C361B0C98C6A236" Guid="{9B3FB9E4-B494-47DB-BFA8-FE8D3B75DEE8}"> + <File Id="fil3FDE27E383E01656E08AE2D9260C0BD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\upxCommandLine.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp41B2B2449677DAA52A41DC7795E8C33B" Guid="{30500157-0CFC-4CA2-BDFF-1971593C8977}"> + <File Id="filCD8D226F949DCFC55EF0A6729661BD58" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2010BuildSolution.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp22F9BF579449876818B8F5773E181345" Guid="{8CE9FBF5-01EA-484E-B3EA-3C4FDC25B314}"> + <File Id="filABE76B7A556C14CD856E0633C9772570" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2010Win32Config.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp82302DD1E595AFE99785A70427299C19" Guid="{FB7BBA9C-0585-4818-BCCA-B4AC014814F8}"> + <File Id="filAEE42E97BCFF0018F4B6A833F9B86C75" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2010X64Config.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp18D83E4B99481D3D79B9D2F79E287226" Guid="{4FF6ACE3-D92E-4111-B18C-414B9B4FDA70}"> + <File Id="fil11F306D0D13B2899353C15034177A76C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2019ARM64Config.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2BDF1EA1DD0D9D8D7E67AF7BA1FB0822" Guid="{6F466AFC-FF88-4B98-AEDA-4C42DC342B44}"> + <File Id="fil2AE15ED2C657441A1C5C5B533C846A70" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\VS2019BuildSolution.jpg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp817AF448E496E79AE0E03C16657AE14E" Guid="{6274C2E2-46EF-4C61-8E64-B52862B79206}"> + <File Id="filDBECC226A37181B82CA8C4E0B7C8DE8B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\CompilingGuidelineWin\YasmCommandLine.jpg" Checksum="yes" DiskId="1" /> + </Component> + </DirectoryRef> + + <DirectoryRef Id="ENRUHTMLFOLDER"> + <Component Id="cmp98E10412F1F15FEA92DA14D5D072CC76" Guid="{1E46D8C7-3B34-4500-BA58-F4568C76F8E9}"> + <File Id="filE7158AD1CC1F2BCB188A5C16A3790D24" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Acknowledgements.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA1262CC2F2086CCA8E3EE8DDA77FF086" Guid="{37CFD927-8FD8-4492-AC66-6BFA4BB30057}"> + <File Id="fil00957996E9B98730DB94A7A4B2B8EF74" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Additional Security Requirements and Precautions.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2DDBA3B10DB23CB1F8EA928B46CCA181" Guid="{D6EC8961-CA94-4CEC-BE7D-D775E5632DBF}"> + <File Id="filF02367149B3227BB79F3302B40C135FF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\AES.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp0020DEB1B692BF8C113BCDD9C35CFDAE" Guid="{243B1975-E40B-4922-B01F-E1DF79D9DCC2}"> + <File Id="filF344A4E68FC8509A979BB35B089860B8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\arrow_right.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2ED752BBF695DA0426DC658681B0246F" Guid="{BB1CFCA6-3545-4996-A247-936EF8E2436F}"> + <File Id="fil712F67BC00D210FE2DC6FE54D8330494" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Authenticity and Integrity.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC2831D4EDB2C6161E9AFFA4E118B4690" Guid="{267F1CEA-6284-404A-A515-BE8DB1297CAB}"> + <File Id="fil3994915D664715F5E1D6B8036277443E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Authors.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC8A17F149AF21481048D7258418DBDA4" Guid="{E4DCA4B4-4DD8-4226-A300-FE27FAB153B6}"> + <File Id="filE221B653D1A3D5D92DCF93954A475DCD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Avoid Third-Party File Extensions.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp9D4113D4E0B7F3BA260B8B2B533E299C" Guid="{053CD221-5DEA-4B4E-8D72-D4198E8B0098}"> + <File Id="fil12D7FEE7232612FE63E08ADEC345D47A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\bank_30x30.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp84EEBEA4353C6BB7FAFBC651A3044D91" Guid="{DBFC0956-2133-4921-801F-0FF9A81C9579}"> + <File Id="fil3B8C024F8DB19366E87F3C5B4D08E1FD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\BCH_Logo_30x30.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpE3AD138F57F6B7D59BEA109296613C6A" Guid="{FA3C180E-2F56-49BE-BEEA-87EBF0CF7C34}"> + <File Id="fil7F8D2098D3946F3A50507359AA79957F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\BC_Logo_30x30.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp9C042008F4284C90B114419C6CAEF43C" Guid="{F7B88459-EEB2-48B4-A5A0-D78FF622604F}"> + <File Id="filA38BA4FD3CBD520C4BD1311E55B6270B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp776BD71B225596C1F5DDCBAFBEDC3D8A" Guid="{AA0FAD8B-1DA3-4231-BC21-8D976A89B747}"> + <File Id="fil95352C343D200A572CCA9B5F3216734C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_001.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp71F37A3E4D3EAAE76DDD223623EFEFF3" Guid="{EE33699A-E18F-4EA7-A3CC-7F5164D6B9AC}"> + <File Id="fil515D9625F30D9AA3341D887EB7243A15" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_002.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7B45DBB2FDDDBAAE80C9BED8518D5162" Guid="{03825687-9E7F-43A5-872D-232A6030670B}"> + <File Id="fil26CA7E302A716630C9E25D3222398391" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_003.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp11BA4D17FE816D5B509E1340905776C1" Guid="{512D95A8-5D46-4676-8BE5-8A2043F4FFB1}"> + <File Id="fil7CC8B3097101E0815AB2FAB58EFD1FAD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_004.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp030C129762387E5309D0ECB8DAF65212" Guid="{68CBF198-6F90-42DB-A610-CF6752359A04}"> + <File Id="filD847DDCA3C9A01BFCFC279CE475E38CF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_005.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpAC9DB62D88BBBAE847557DB06BD10C23" Guid="{C2B39D01-686B-4628-A562-FE9CE19EE324}"> + <File Id="fil9F166ECFFD49484817A6A83F22A4EB62" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_007.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp4A6D2989B95765B61974E1E22E2ACF78" Guid="{8CC30554-7833-45CB-8F06-3C5CA07941F2}"> + <File Id="fil046DA564BF688137EBC3D8293A148A62" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_008.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD359378B1A7405FAF65C49BE76F981C5" Guid="{DD22690F-0113-4FE0-9EFA-73E0286743A7}"> + <File Id="fil445D2473E8262D0A415272A40D0F92BE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_009.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp70D8557BE97B70FD9EECAAA0EF5CD03D" Guid="{F2991DD2-1070-4268-AAE9-0A067FD4A7B3}"> + <File Id="filC97FA3E5B5F62D52A279889568A19229" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_010.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpDEBA4E7882793204DA1CC9999C05F964" Guid="{1141FB98-70E8-4537-AD6B-E3DA782DD993}"> + <File Id="fil51D1A64B9108C442EF04556269639C8C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_011.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF516F4196B3085018BC093FCBCB58A4C" Guid="{7EEF4F94-A793-4C4C-A380-5059BB91734F}"> + <File Id="fil485A1A150DC757712ED1D373271356C2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_012.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpAC8162634F24C0C33B2E3C6864DA4A2A" Guid="{8D4F4D5E-6CCD-4F3A-A9D7-F86FC6678184}"> + <File Id="filB503C8CE72B1330C0F3A7832E62759B8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_013.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpB081741BBB46FA24327C9DB71A7B02B8" Guid="{8BEC6350-9486-43F2-8A9F-3C957D4C76AC}"> + <File Id="fil3EE96533748DCCD69CE6AADE0015DF54" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_014.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD4723B9A6D4909DFC0E1B4B4EE660C09" Guid="{262A559D-11E1-44E0-9870-8DF73F86CFBF}"> + <File Id="filB08CDB0AE9AE7A1F9A4F57F341F8DB7B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_015.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp39E9D88B683EA4F12640DA0A65DE3549" Guid="{7BFBE955-1A72-4658-A0F5-245038DA588B}"> + <File Id="fil898074D01F195541018A9ED1241021DA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_016.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp0F2F30410D88E2533026D3C3E4744E34" Guid="{6BAD98D5-E079-4825-8D96-A266EB104820}"> + <File Id="fil6230D2280E85D4BBC55E3BA6A19F1599" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_017.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpB5D683C358B00897FA9F0FF22F315D7B" Guid="{305AAA8B-927A-41F2-AB74-9582B16A78AB}"> + <File Id="fil626B6666F3D264B65D1380788A3424C4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_018.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD3CD0A2A3035277B8D5C83DDD56EEC09" Guid="{24C5AF5D-BCF1-4582-AADE-A06ED51E6016}"> + <File Id="fil1C095262FAAF04439797181DF2BCD399" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_019.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpFAF93B91B7847306F97A8F13C9237BBF" Guid="{281FA34F-4494-4EC0-A5AB-206715464D4F}"> + <File Id="fil399630611E57ED34FF5F55A58F6A6EA8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_020.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp110F96A11106F1AC7DD0DB03480BC3AD" Guid="{5328DB01-C257-4D67-A843-BB3CAF7BD6C5}"> + <File Id="fil3D26C3623F74441149A46AF79BDEFBBA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_021.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD14CBD246BD84D409AC5C9435CB93C69" Guid="{7BF37DFB-6E5C-48C6-A5A5-49F980C62D80}"> + <File Id="fil7430394DC66200EC9A37F3EAA89C5F4B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_022.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp338A05D33900D38A2218604CA622D528" Guid="{FE1A076C-BD66-4AD3-BAFC-F4B729F27453}"> + <File Id="fil6B82AC858902DDA6B13CB462FCA8C2FC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_023.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6AE588318312858B13C37DBB81243BB4" Guid="{EBFDED23-3C6A-4D64-A975-0F5906F1DD03}"> + <File Id="fil143CBEFBDE83CBE94970CA93A007D362" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_024.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp40450814BCB759314CC3FDE6C648C0C4" Guid="{0350A675-CF91-4686-A3EF-1DEAB8F22764}"> + <File Id="fil90C779622EBB339C3AB90FCF647FB159" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Beginner's Tutorial_Image_034.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp8D0D5C8F66B9E9213FACEB65D779E93B" Guid="{823A3D60-4534-497E-88E9-A23C7DAE7B29}"> + <File Id="fil7C200F86B78E2A91BB493FF5F651CEB4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\BLAKE2s-256.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp1969CFCA4E8E6853AB60C3E5E84EC96C" Guid="{0636E6EC-8C7D-477E-BF1A-85FB37C9CF76}"> + <File Id="filF963F35BD28A778D78CBD6DACA37987D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Camellia.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp0BF1FE522880BBDA428837E3B646DA5D" Guid="{74D1739C-F0C6-428E-B86B-ED6E77784B6E}"> + <File Id="fil0ACFE35E496076BAFFD2359D7E95CE6C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Cascades.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2ADCCFAA99C96B7E74D50F58AA2DDAFA" Guid="{457851C3-1FB6-4580-8D73-3761F7CF08F6}"> + <File Id="filD0542209DDFBCDFC2ABD1237FBEE184E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Changing Passwords and Keyfiles.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp0E448FAC0CED589DD138E162986FC0DE" Guid="{035ECEC0-9B4E-41FF-A4A4-8EC14B2FB947}"> + <File Id="filA793DC75E1D0F03F15CC0F4D341D43BE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Choosing Passwords and Keyfiles.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp06C8D9A3457DEA62A19ACB286B2E32EF" Guid="{400FCE30-08DD-48AF-9025-6FFFFCBE5D09}"> + <File Id="filED12CF7F85BA168570C78F70F348013F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Command Line Usage.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7447D492A3894509DC750B48E7DCF613" Guid="{9B804653-B3F6-4FCD-98E3-FB314555737B}"> + <File Id="filA6BC7A2C35BF2D2985FC723FD56D3ACF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\CompilingGuidelineLinux.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5C2B87E203BB5FCA4F77B19D3E6BA307" Guid="{7A0933C7-384F-4DAE-B571-D16D1F9EEBB1}"> + <File Id="filA3657AC1CCAAD3DD9B2B804FFC97369E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\CompilingGuidelines.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA5748D4E937680A92DBAE78CE5B2F28C" Guid="{B62CC2F2-FACD-4EBD-BDF6-7CE826624805}"> + <File Id="fil5DB2B097D4C2BADED0282CCCBB289955" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\CompilingGuidelineWin.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6FAAD943919CED1962892A80342F6791" Guid="{A9914433-E735-40E1-A95C-A5B76131C400}"> + <File Id="fil1CF8CA43DFF75AA00E095B0A70374FA3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Contact.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp948EA396F48A342F4EF23F2210CB5B4F" Guid="{7D17553E-3229-4748-99E4-429CAEF47D0A}"> + <File Id="fil9C60823BB1AA224FE34CD4D700B43BC5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Contributed Resources.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp29F827B72EB9BA3A4BBF4135346BFB3F" Guid="{B828A496-9C99-48E6-AE06-729F28EF3E71}"> + <File Id="fil7C98F44466206CB68570E9E352608D5E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Conversion_Guide_VeraCrypt_1.26_and_Later.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA6461FAA6FF2B690A1950611770B4238" Guid="{6B5E731B-CFFF-4A5A-96AE-73868F17389C}"> + <File Id="fil342E8576E5BD6E8EC8117C02301B29AC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Converting TrueCrypt volumes and partitions.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA386DE1E79E889FA61290114537BDEE3" Guid="{5CAD6EE0-E4B0-459A-B90A-665F13BFAA9B}"> + <File Id="filE3DC8BDB3EF17E11B5B23A05E0A24779" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Converting TrueCrypt volumes and partitions_truecrypt_convertion.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF78CD517DB1E24484B5CC82B2DDD5E9C" Guid="{4E848927-689A-4649-8A22-760F5E52E679}"> + <File Id="filAA3E420FD899F39B025E177868028D1F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Creating New Volumes.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpBA0D70B7A50226DCD8144689A79ABDCA" Guid="{E57A9C60-1140-4AAA-A1A0-701D1A21B053}"> + <File Id="fil5AD3CE9C014F011BC53CA40A9E6045F6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Data Leaks.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp589D4976F5CF94C27910A8F4EBF29FD5" Guid="{B4BAB52C-05BC-450A-9EAF-537FF9A46DD3}"> + <File Id="filEC6FB28FFC2CD1E5CB26F25B71BA629A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Default Mount Parameters.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpDEF5E40C0360414577A9FB6E9D209C31" Guid="{26B9A786-BA73-4666-A374-7E5CC0592203}"> + <File Id="fil5FDF31D27DD1BDB73A9E5A4C2D589A7C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Default Mount Parameters_VeraCrypt_password_using_default_parameters.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC0FF4C2C070C62B0E55BA14B329A58FD" Guid="{EB3A59EE-B573-4920-BC6A-9151B4B8AED8}"> + <File Id="fil23768A1C9C05F83DB735D9295E237A2B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Defragmenting.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5F3D5E0970DA4DCB5655AEC4AD1C94C5" Guid="{0E1D5043-3EC2-41A8-93C8-3A84310449A5}"> + <File Id="filAC9A11620C67DBAF2AD27878B9C9A2CF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Digital Signatures.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp14BBB28777FE8A9914F4BB38B50C0311" Guid="{6AB068A5-D95F-47D2-BE6B-B7F59867E192}"> + <File Id="fil0E7CF18F39AC92ACA3367FBB71E1C693" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Disclaimers.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp10C79CC28991F4E8A3E33C66D7280D88" Guid="{F6CE703A-6A93-42C1-B40D-3CAF643B5A4A}"> + <File Id="fil251DD3CBCB210AF49D6BD4EBE80CAFC3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Documentation.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7E0AF9A50799D06DE12C94A60C834F5D" Guid="{A69B4D59-88C2-43E4-ADA4-9AF2EBEA1B45}"> + <File Id="fil88AE8F1D1D73320B20A12E91039B1D93" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC547B50DD1AB37E959FB18D1AFD9C051" Guid="{B998C0C8-3AB5-4A28-9775-44704A059A5C}"> + <File Id="filD0D938903C2CBD5A5C816A84B0916199" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_Bank.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp716240038B6F46034428E43768E32CA7" Guid="{3F6B140B-980E-4C77-8F23-3042F0DE1232}"> + <File Id="fil81D7649C6E479DA68C7CE5A9FAABD5B6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_donate.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpEF2FE09A2E8F60EB28ECBA7BEE5E9026" Guid="{FACD44DF-1AFE-47BC-B040-7314EF8901FB}"> + <File Id="filD1253F529C397B15FE6B1C21D2E083B2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_donate_CHF.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp4DE7E89729EE1EE9EEA042F80B412D3D" Guid="{4ED6286F-296E-454D-8C1E-B675F267F0A1}"> + <File Id="fil56E8C2BE62B8D5FBF24CAC9D2BE338F7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_donate_Dollars.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpBC866AF7B9269946668A324AD39D08A7" Guid="{2CBC09D3-3308-47D0-9DDC-8F06E1F513F3}"> + <File Id="filC467D47EEF3B27D242F8D55BEC0C3B45" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_donate_Euros.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp59C951F15FE54CBB5EF2528D4AA6F73C" Guid="{6EB86A24-5DED-498B-BC73-7A7F1DDA3048}"> + <File Id="fil311C93950CD02E7B5C437C150B7E11D8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_donate_GBP.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp1BCCBDD405E75313F3B3CE6EE8DA86B5" Guid="{DC9B1FCE-BA6E-4B38-8FD5-3E68CEC9B122}"> + <File Id="fil1A20E57E9AE32470876005B2246B9C9D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_donate_PLN.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp3E991C4739DF1DE5475ECE135EE98D0E" Guid="{FA9C68EB-D745-427A-982A-251CA386B625}"> + <File Id="fil5B40D49C27FF86BFF5CC8CDD9D34B25D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_donate_YEN.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF6A11C5F07AADC2DF98D1549024AA5D8" Guid="{C63CD654-EFD2-4C67-AF32-CD69ADF0CE0B}"> + <File Id="fil7804A7A2C59A4FEDB9469EBCC705C5C4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_VC_BTC_Sigwit.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp92387146C4EDCAC1653A2FDD573D2695" Guid="{6E26E556-D86B-405F-8772-41B57A62CF0E}"> + <File Id="fil43B20F7F00EF4AF79D0F82FB86BDF1A3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_VeraCrypt_BitcoinCash.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpAD29968DFA6888826A5718FF6533D96B" Guid="{E26BF267-9896-4A32-B3B1-52FF1771DA1B}"> + <File Id="fil6997FE1AC19191CA5556C409A2B06A66" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_VeraCrypt_Bitcoin_small.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpECD5EF9F2075A8512411DC0C4A5249D0" Guid="{3225A53B-22E0-4BCA-99A0-E2C1604DDF74}"> + <File Id="filFBCFEB2644899D7672ED7C8B4B93583C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_VeraCrypt_Ethereum.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpCB8D27F16124CAAC7244A48FFA4AFB7D" Guid="{7E07BDF4-422E-4740-B2B4-D35ECE68FFFA}"> + <File Id="fil5E96F5FACBC48E4D44AF52E7017EDE2E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_VeraCrypt_Litecoin.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC65A16FF1BC895E90BBB53B78E68DFD9" Guid="{F06D8C06-FFAD-41BA-9EB6-9B4152D1C5D0}"> + <File Id="fil99117693F262D29831F855AE5C5BE2FB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Donation_VeraCrypt_Monero.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp87F512AEE17E1578EAAE94230A2D42F8" Guid="{39BC9692-4381-4634-928D-1A0DF36CEF23}"> + <File Id="fil849BF471E22B7E5A8E6028B9CE71D955" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\EMV Smart Cards.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp97920FB49AE81562FA7ABFFA9A5DE439" Guid="{4CD7F374-7ABF-4818-B904-415E1ABE4C87}"> + <File Id="filB1351FC0C4B53047D98C8D2C2E74B76F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Encryption Algorithms.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC57C3FF497FC91DB80B6398E7FEE7A64" Guid="{69676767-4954-4E36-BF2C-C8C57E283809}"> + <File Id="fil999EA9470381ED95774B2F30327F42CC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Encryption Scheme.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpACDA6D0F0078725DD4A8708187C76CD3" Guid="{94D0E529-D973-4608-AED7-9BF84D153B93}"> + <File Id="filACFA702EC92AAF197E324F8A4670925F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Ethereum_Logo_19x30.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpCEB5D33CBF8513543D361078523B750C" Guid="{B03D987A-5F64-498D-81C5-8931210167FD}"> + <File Id="fil9DF0E4F06C4CC28FE82B68EA719CA7A8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\FAQ.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5FC13AB774FAACB290717853ADC20FCD" Guid="{5D5F86EF-D567-45BB-9042-C8ACC0D1A64C}"> + <File Id="filC6B2CBE7C0D68BA11C5ABBB141BF9C13" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Favorite Volumes.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp725B9ABA14E65E9EFE49157CA4FC128B" Guid="{3F54B3BD-731F-4862-80C6-9B8610DA6C34}"> + <File Id="filF10F025AC0583B894E3286096A01D86C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-au-small.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpBD55DC12534E09C8553C28F5B5C0FA4E" Guid="{38080305-F2F4-4B27-9416-7D66A6778A5B}"> + <File Id="filAA95BAC6F92E0C3E60810688DFD29980" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-au.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7C45FE83120EA12DB05FC171A06B30AE" Guid="{44347474-FEB5-42B6-B784-DEA6588E94A3}"> + <File Id="fil567D7AAE5C7AD34C3E9CCD97F45A7DA9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-eu-small.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA76542EBEEBAFF2C7A5BF5AB2741D4FE" Guid="{52AB5852-823F-44F8-BAAE-6E45841053A3}"> + <File Id="fil0C410338570867504C800558921DF547" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-eu.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp9B9F529CBDC007E9FA5CF79E8867DA67" Guid="{660D3EB9-69E9-4C09-A80B-61B685164865}"> + <File Id="filA65F8408CB5D977DB1FB2F2D213C9C1B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-gb-small.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp87244E466A2EB7ABF13AA619B977BF78" Guid="{B5D6863C-CB4D-4547-AE1A-1589D58ED59C}"> + <File Id="fil8E1098F49A784F0A7BB739B645B79486" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-gb.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp712EA51FB151C694292EA58C5A578BA6" Guid="{0690E629-B61A-4529-968E-111F8B76CC3A}"> + <File Id="fil051335FB12568EC0300D3074923E2FC7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-nz-small.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp870CD5E9E23CF6C9067DEADE20C9FC35" Guid="{2C9B1C3B-A64C-4702-BF0A-6A841EA5DE07}"> + <File Id="fil58E6588D8192387A80BBC90A47D15F5A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-nz.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpB006A7FF853B4EBD76D04C32E9455C4B" Guid="{0875F9DA-30F6-4C1F-B8DD-FF0F3DB5322E}"> + <File Id="fil10D204C1119D321DB710C753AE3FCD84" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-us-small.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp472CDC24D7DCA0786CBD55DD01B3C326" Guid="{C9019907-5646-477C-9C10-42E3BAEFB5D4}"> + <File Id="fil7033CEBEB76DFF2B46660583C49940C0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flag-us.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp89C6FF5C5AC2CD9880C5409B5AB83825" Guid="{06FD875A-5E07-497B-B597-6B58C380FDE0}"> + <File Id="filC477A3F4D76A8B461F5C190234398634" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\flattr-badge-large.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6C831E6A491B7EB59D88781A5BFE9F15" Guid="{EB98758E-25C9-46FC-A862-EA5D70B8F995}"> + <File Id="filA731163EA92A35C96170C2E03BB425A4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\gf2_mul.gif" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp60679C4F1990149DFE8EBD00D7C156DA" Guid="{9BD3D120-BDDF-4674-98B2-41AD9EF6AB63}"> + <File Id="filD0CC24199C304D7A8A858CBA7A654B2C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Hardware Acceleration.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6382DF988EB9E433728A02875F366B29" Guid="{08193FF0-DE93-4D2D-88FD-EF79D1485504}"> + <File Id="fil190EAE3EEB7E8D6D25C505DF88F3E4A3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Hash Algorithms.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6ED341130E7BC5619B617E61C4DB60A8" Guid="{EE5A73E1-801E-4D35-B003-7DD3FA395578}"> + <File Id="filF859FB60E1E6FCFE2743075386E7C44B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Header Key Derivation.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp216B8D95DCCC0DBA860DA22728386441" Guid="{9DE55946-949E-4B69-ABCC-9C2CB28D0F60}"> + <File Id="fil67764638227AC03759557FA84F4E45A7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Hibernation File.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpE4595A43F5FE7BD7D162F3652BA6C266" Guid="{EC6DD328-04BD-40BF-82D4-352C38A83BD9}"> + <File Id="filA7C6D42B98E460E939BC11C81965F139" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Hidden Operating System.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7D5BE6FDEA3DE19095769A66D0AE29A8" Guid="{730C3E41-3612-40D4-90F3-CE31171737A1}"> + <File Id="fil0781238BA710BA7239906B2C6683D2E3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Hidden Volume.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp61565372125F227105B9AE44241F1967" Guid="{CB7C0BBC-C81E-40B0-B804-868BD85D7176}"> + <File Id="fil78AAC896C033D0BD64B2A21C0375B4A6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Home_facebook_veracrypt.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpBC1662DFA34FC9A8F203FDC51697C8A5" Guid="{ECB71BBB-96FC-4118-B23C-15EAC0EF8201}"> + <File Id="fil87BEE86BAAA572C9FCE0B78D72488EF7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Home_reddit.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5EF5D5F4FEB4B57BF58C3046BAD8A1E1" Guid="{27F5DF12-28FB-41CC-9DA8-B2C285095A90}"> + <File Id="fil3F75AFE90F61500851F4A30816C1C0DC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Home_utilities-file-archiver-3.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpE9488D44ACC744E76E072585F84C491B" Guid="{9C3FC852-677B-416B-81D0-30C50AFCC315}"> + <File Id="filFDD8D99DEF8FD2AA50A4119C26F6F020" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Home_VeraCrypt_Default_Mount_Parameters.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp4228F912DE70A8E8A341A3B3EB232186" Guid="{7B4D1332-FEF5-4C7E-9F1F-334EF1E3DF23}"> + <File Id="fil1018564094D177036DAC90EED085B81A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Home_VeraCrypt_menu_Default_Mount_Parameters.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp661A873DCAADCA5D6DE5658C1AF6238D" Guid="{7EC01292-7052-43A0-A3D2-4AFB95B17C20}"> + <File Id="filCFEB6318D5A8BE5C7567C50DA1291A8D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Hot Keys.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF8C6E0267E7995D280B8E7F4172C7F18" Guid="{4437A3A8-E9DE-4A0C-8F37-5F87FAE787F5}"> + <File Id="fil6ADBDC7868E643C76B763489C2E6A7A6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\How to Back Up Securely.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6004A52073268319FB67C09279279ACD" Guid="{643BB248-5A1A-419D-B100-35577D6977FD}"> + <File Id="fil24F63F6B8CB269B5C337242605B0CE5D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Incompatibilities.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpEEC16C2DA6C942B7F814FE2ECE9AAF65" Guid="{5FDCA6FF-29D4-4FEA-ACBA-C40632316DDB}"> + <File Id="filB96837EB023E33E1EE33E0B9FD3D2EEE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Introduction.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA116A7CF851D562952FD8F362EF4F15E" Guid="{A40EDCBA-F529-4FE3-A5FA-38443537A282}"> + <File Id="fil09B76C17ACCD566BA33B58E3783195CB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Issues and Limitations.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpAA28C1518620F4CA7377132D083B5E31" Guid="{FC4C3276-6E1F-4667-A9D2-B30A5A048DC4}"> + <File Id="fil7363E637A85FB040AE31A8C10D9EA95E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Journaling File Systems.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC384B9F228D8242650A1A48FDE46FADB" Guid="{4C811F2A-F3A7-46DB-9918-1CF2DEB4A21C}"> + <File Id="fil8131C5093DE56CDE509DFC7DADB0393D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Keyfiles in VeraCrypt.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD858F6459F1D5BE26754F7B9A6B256FB" Guid="{0549963C-5BFE-471B-BF1C-3913C2AE310C}"> + <File Id="fil5ABC9680196CA5F82BE0317CCFE7AE4C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Keyfiles in VeraCrypt_Image_040.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD935A23E00BC5621253BAF554A60C48A" Guid="{C69045AC-0379-4C49-B7C7-CC595F754574}"> + <File Id="filA1D369E59AFCAD94F135D1A53959F488" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Keyfiles.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpCA290469DDC2BF237F81DDD5B1767EED" Guid="{AF232DD2-C9E9-43B2-BA21-C653C3D78B17}"> + <File Id="fil707DCE82E2DB960CA32D798C9D58BFD0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Kuznyechik.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp72EE25B25C5C68F03DF9176C2D3F8BDD" Guid="{E162CD5B-C72D-4DEE-BD06-048CAB209743}"> + <File Id="fil30D8E2286343AA063BB31ADDD09E8B79" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Language Packs.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp29F705976D3FE416CA69F9A85F81E453" Guid="{6AA40E35-18C4-497A-97B8-1B5739FE9BD9}"> + <File Id="fil8F0F4FE7BE9BC18EB89888D49028E7E7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Legal Information.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp3092B4A3F28D76A5F41FB2DC967976BF" Guid="{0C7EEAB5-C208-43A0-B276-7803E104A241}"> + <File Id="filFA23C1DA863D0B428EB6C84728997DB3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\liberapay_donate.svg" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp05C4713E55D9E8032EF515CC96771B98" Guid="{06C44F0D-F6EC-4D04-AFB3-BCC88EF5DC0E}"> + <File Id="fil3EA3BDDE6D7CD02134F6440990EA9D22" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\LTC_Logo_30x30.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD979C33BE6277C13010EF93D9FB338C8" Guid="{598B57FA-D03A-41CF-9543-CF7C167A1C41}"> + <File Id="fil460751D6D3A89545E7ADB68946BC9E50" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Main Program Window.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpBDF94D6F72E05F0E90815BA6CA48AEAA" Guid="{F3831D53-D041-4BBE-A8F5-5183E1B511C7}"> + <File Id="filB6A639CD358B2CAEC5D91CC50C4BEB6C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Malware.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5F801DCC01F26894D68A6EA08E45B76B" Guid="{ECA81186-9645-4814-A4DB-2423B3E44D50}"> + <File Id="fil5B5FD576468A05E387E8451479346039" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Memory Dump Files.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp1F82E220BB2635E789DB76D708745EDD" Guid="{E46AADEA-AC47-4B33-9018-9A4B37107388}"> + <File Id="fil33F329D72F3E01B18BD0E9711CB53724" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Miscellaneous.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp9FEF6DBD25CA9AFF6103A75B72D304B2" Guid="{AA5775F0-3653-4146-9CA9-8D832CB20084}"> + <File Id="fil4987E346273D390365EC2E924844B6F6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Modes of Operation.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp1710916CD3A94FB29C9213789A147AE0" Guid="{3BE0A3F7-0B98-4877-B598-F13C3D809D29}"> + <File Id="fil3B8702069522EEF4C41709CEF88CD320" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Monero_Logo_30x30.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpAA303E0AEBC0E1EB8C2472B1ED65324A" Guid="{18BF4762-B5B2-44DD-809D-47E2500FF274}"> + <File Id="fil5DBD024B36EE31AE69F3FCD351434D83" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Mounting VeraCrypt Volumes.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpACAD2B0C89247F272E42D86D48ED6ECC" Guid="{29EE17AF-B34A-456D-BFBF-6CE3884EAD3F}"> + <File Id="filD2991527BE5D0C1F42F6C69FD01376B1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Multi-User Environment.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp4BC713FA989ECC8EC884548781C4F29D" Guid="{191AF27B-1811-4149-9713-2B3913422D32}"> + <File Id="filB4D109A8E9F7C159C41DA988EF4AE5BD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Normal Unmount vs Force Unmount.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2CF52C3BBF31CCD0752A49C11FF294A7" Guid="{0C07FB83-253B-4229-809C-4E1DA30C3626}"> + <File Id="fil4E4C69B10DB0A7BA934182EE4EEBE7A0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Notation.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpE60FAB408B216C9ED62A362BC7EE475D" Guid="{E9977A92-ED5A-41B8-8145-A16EE57C3B9C}"> + <File Id="fil02CC195577742491580A891153510D87" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Paging File.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpAB7AC6D28286103D7E729673FEDFCD5C" Guid="{BA71446E-7917-42BE-BAFD-B60F970DE576}"> + <File Id="fil5CD332253AF628426FF803CFA3EEB00E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Parallelization.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp3E980DF980C84895107EA078801D25F6" Guid="{8BAEEAE1-E52B-468A-8B0A-848F28F9A158}"> + <File Id="fil75BBCC1F9D06DC266552E73F1AD37E55" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\paypal_30x30.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpC84F22C32C2455E14F0833097B100309" Guid="{5B966B3C-CC2C-42CA-AD4B-3B6E61AA8CD6}"> + <File Id="filB60DDE7D449498811CB4503EBFD1627A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Personal Iterations Multiplier (PIM).html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp13BEB53EDC29960F3AD13DEEAB9C92C1" Guid="{EF5A7914-9A73-40CC-8281-C39515F32CF6}"> + <File Id="fil9F16EA0C514E74BABDFA16FF779B2366" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step1.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6DA588A2041707855690C560C64C438D" Guid="{6E7A34E8-409E-4A6C-ABCC-A083EF0D85C8}"> + <File Id="fil0FDB5B4BB86CB0DC3DD9A47601F969E4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step2.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpB03F168BA9DD4275F206E53CED02A12A" Guid="{0448D47D-EA99-49B9-AEF3-ECA71AAF3170}"> + <File Id="fil01744A7B2BAC5451C4CADEA956C6496F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step1.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp673ABA162209C25819DE3CACF4E612D4" Guid="{BD77BAE3-8403-4EEA-8253-53E99452BC4C}"> + <File Id="fil095B72AE4ABC141C50AFC0DFBB6FDE75" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step2.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2198CDB3A37522808F3C0FE67FEE31BF" Guid="{5C718434-79C6-4A36-9872-9BBAE0E3FD5A}"> + <File Id="fil47899B71D3625A90E35636946C2F9E8A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step1.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6CEA0C62D82A3B53499C2D4EF2C3B5F0" Guid="{EE5F98B8-8F0B-4102-80EE-D019827B79DA}"> + <File Id="filF0DDC36B8AFF23D140418C8E83CC7E7F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step2.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7FBF805189D05F4E3E1197B6024D6583" Guid="{37E0E34D-7428-4F2B-B1A5-B5A5E447A54D}"> + <File Id="fil02F7FC5545130C979CAE47352812B471" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Physical Security.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp37C51862BC6949DB6195DC1A9FC37855" Guid="{E64AAA0F-4F7C-467E-8D46-EBDF6A21B6CD}"> + <File Id="fil3388DF9F080840CA1803899800611431" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Pipelining.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpB12223A6EEF742CCFB738D9C8B708ED9" Guid="{72C5B029-9A91-41B1-951A-35C2F6DE8212}"> + <File Id="fil011529FF2DB96D173D1A002C4ED91EA2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Plausible Deniability.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF4B2DDF581FADDF14E3613D517675CE0" Guid="{6244D574-96CE-49E3-9CEE-AC6BC0073C7E}"> + <File Id="fil3CBD4B3C22495E5B593AE08E3A25FAD8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Portable Mode.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpBCCD12E77FAEA515D6C1555B7823E169" Guid="{9AC6C96F-2972-465D-BA9D-27CA21657D44}"> + <File Id="fil96C282D40ED5948DB9DE6EE18087FDB1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Preface.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp32627BA5A52D1C2FD2648C6907F4A00E" Guid="{CA2EE0D9-F48F-4955-90FF-CDE3EC30A414}"> + <File Id="filF6F199A516A1E59EDAFF7B2C94125326" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Program Menu.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7A44CB40DFC859E66D7CC2582EF9948D" Guid="{7ED5946B-15C3-4319-9392-745E1993CD7E}"> + <File Id="filE29BD05D74CF7147C16015D26E0D0965" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Protection of Hidden Volumes.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpE819E5D393DD7BCB4D1C101FFFE6FB0E" Guid="{D0ACBBAE-6836-4C13-B7DB-B0F4C7814963}"> + <File Id="filE8C345D68AC9CD17F27D1775FE52DFA8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Protection of Hidden Volumes_Image_027.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA29ACAD11D850472C56137504F770B8F" Guid="{92B65549-F99C-425F-AC08-B241A4D489D4}"> + <File Id="filFAE8075438DD33C16F4374B435420976" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Protection of Hidden Volumes_Image_028.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA2581CD77714E8D6C2A4DAA258590E29" Guid="{CE7715E9-7231-45B4-A467-D9C4E57C3DC9}"> + <File Id="filCC0A38CA5F69C4A5769E47C179450A09" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Protection of Hidden Volumes_Image_029.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp3F6C602C80B5711DE3EDD2FE8EAFD00C" Guid="{CE514A3A-3FA7-4709-BF44-9AA7983E2085}"> + <File Id="filC9627DF124341B321750B55B59E0DE93" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Protection of Hidden Volumes_Image_030.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp30C5A7CA791767CAD2E9E124826EE047" Guid="{20BF8298-08F8-45D4-B3F8-711CCF7D232B}"> + <File Id="fil3F8845ED4FC6FB48333245942CFCF281" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Protection of Hidden Volumes_Image_031.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp770DEAD9D0C6D2439CA86800A5709567" Guid="{8E54D7E5-AD67-4821-A89E-82CD481383FE}"> + <File Id="fil53F6F8C9562DA16D04B3676A819074DE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Random Number Generator.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF8CB44545962DB01EC6DD9DFADA36FEF" Guid="{A0BCF67F-F6BD-43AA-8621-509DC4C098FF}"> + <File Id="fil926AD3DE34292736661E4121511E2C33" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Reallocated Sectors.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp8468AE251FAE8743371ADE14FEA935F7" Guid="{1107B9A1-0CD0-42EC-BB0E-FD9B36C2B389}"> + <File Id="fil94E6A42A2F5941B37BFA7B89E0013269" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\References.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD2BCE21F32CF98AF542769B408047D4E" Guid="{0211D943-81B4-41F1-986B-BC7C1F67BB12}"> + <File Id="fil369EA0C6D2CD0395EB1867686381962B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Release Notes.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA1B275EE180C48643BFF410ED187E170" Guid="{702881C1-BF01-41FF-9E2F-41B41D7DCA41}"> + <File Id="filCA203D40F4E3E621019FDB803CCAC360" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Removable Medium Volume.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2458A9EEA35AAC6F7AA66C71F2C8E500" Guid="{82D7913B-B2EB-4721-AD4F-8C6C3A0E4205}"> + <File Id="fil7B2E2AC531EAA5E908E9FFE7B78141F9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Removing Encryption.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp725AEB3BD6705908D3DDDC49D446EEDA" Guid="{FBABFED7-B8A0-4118-8E71-78BBB5C9727E}"> + <File Id="filCB5E6D9EAC9BDF471001523E6BCDE4F9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Security Model.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp84C361E84DB09C711566B58D9822B3A4" Guid="{EB330FA8-0E12-4840-AD03-7490B7A379D8}"> + <File Id="fil69B171CC7FFA1445028EBBD77CC5C07A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Security Requirements and Precautions.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpEAC38538AB52AD68B5B36DEBE9310DDE" Guid="{7A28FE9A-1921-441B-BDB5-A587A8C232B4}"> + <File Id="filFAA0F1D9008EE05BEF57A6F603A76E56" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Security Requirements for Hidden Volumes.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7B700E12FA433825A9ED08182F8CF6A6" Guid="{DC0198A1-6AA0-4D03-8BEC-6046C0619847}"> + <File Id="fil651B93A431120CEA3EC491F3C5FC86C9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Security Tokens & Smart Cards.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp8548A76FB3F15F37E8690D54D9E37153" Guid="{8334F668-DBC2-42BC-8000-B4306206F69A}"> + <File Id="filFC7609F5E8D8B008DC89C72B23DD087A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Serpent.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp84AFAC0919E0FDAB5B0C943837BB10FB" Guid="{1C918891-7177-4955-B617-01A03190C47B}"> + <File Id="fil661E94A96B6BEF3A4929BC4C817D8D61" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\SHA-256.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7E863093EB77CAFCE23926751F601D06" Guid="{C9915AF7-A108-45EB-B2D2-8DF7FFE208D6}"> + <File Id="filEA2C97401DDFC0ECF10A85463E6A9ACB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\SHA-512.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp88CC92142E3E491F76F7BE7582508F44" Guid="{B6C13DA0-2B05-4A3F-8B47-3FD0CE40336D}"> + <File Id="fil4FD6057086DCA9E013B009CD28709AB1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Sharing over Network.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA65F33B67588CC31BC7CAE2E2C651CB6" Guid="{B68A85A8-7B2B-4A64-9ADB-C0C0172A6204}"> + <File Id="fil16376E30B9EFAD82C45D2317FC963F7B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Source Code.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp78D7D716B5B1FE70B04CF6A10B38E34F" Guid="{AEC8783E-96C2-4655-9EF2-27B26B43DEC9}"> + <File Id="fil508F4406283C4BD07CF4DBE0DAEB7FC1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Standard Compliance.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF86B2467041088054881E7ED51D3AA2F" Guid="{DC9E4430-E848-4FCB-BDB5-40760F9F986B}"> + <File Id="fil4AD4BCDE7BA1C473CC4B8B6D8041DE57" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Streebog.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp219FFB7AC8A9CAE559B96D663382362F" Guid="{B926CCF9-C3C8-4A62-BED8-C2AF0B7CE1F6}"> + <File Id="fil9772FD94EFCC6A8BC4FE0C976F15653C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\styles.css" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpCEA5EA46BBB2A62A8D881B31198C3386" Guid="{999DF0BE-0315-4E9D-99B7-A475AD95B12A}"> + <File Id="fil893681FE743A9EAE666520EE9F91C330" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Supported Operating Systems.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp491B948F4AC657873C77A063196DE773" Guid="{8D0D4082-3C1A-442B-8FCF-215B528AE79B}"> + <File Id="fil665656A640FCE92565333BD4E2254E5D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Supported Systems for System Encryption.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpEE20C9B71CFB2E466F13C6FC9BF04E09" Guid="{F29CA5C6-3F60-456B-8B2F-59E4D98B61D2}"> + <File Id="fil94ACC853FABE497736A2E73C65A6669C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\System Encryption.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp2B15CF0AFC8F3437B3049F59B0EF7601" Guid="{0C1EBA52-CC88-4A22-A707-F231FFB26915}"> + <File Id="fil1AA50714A76A911B470753E3FD5451F9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\System Favorite Volumes.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp785E1DB76BBDEBFD70EA4BF62650054A" Guid="{49494907-7147-465F-96CA-7BA67E2D3BE0}"> + <File Id="fil0746875D7F30D72D84AE6F83F41B3215" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Technical Details.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp5F637265DB84736905EE09ED2ECC69A6" Guid="{5FF3DAAE-0A13-4602-AED4-344CB6876831}"> + <File Id="fil10E1AD2C9A7D2F295A4DCA9818BA5B3C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Trim Operation.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpCBFB249454B517E4B7449B61557EACC9" Guid="{C89253D6-DE56-4052-A7D6-11FA96A9A1BE}"> + <File Id="filCE15EF3AA58605A26EB7AAE54A24FB28" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Troubleshooting.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp81CCD244B1F892AE169DD7F2A41000C5" Guid="{D079F524-A3BE-4689-8A2D-731031B3AABB}"> + <File Id="filAEB2FE1EAE65A54C48CD0ADC3944A226" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\TrueCrypt Support.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp233B1C3979F13771F5C1FD8DFF4D4606" Guid="{16A99EC8-4714-4AAF-A5C9-382A644B2EA3}"> + <File Id="filD07969409DE262F565120CE8C0039DF4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\TrueCrypt Support_truecrypt_mode_gui.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp21805FDD48B222E6357FC4461C6F3102" Guid="{A19DAAB6-54C4-4D43-992B-2FBEF3CBC4CD}"> + <File Id="filE17C724D3B33C0C3E547D99AFF866301" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\twitter_veracrypt.PNG" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp0D80FF102A8D89F5A82D722082F11599" Guid="{5DF42C4E-903A-4738-931D-FDD1CFBB761F}"> + <File Id="fil166CE41AE74FFA92BC4E3646C557F0B2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Twofish.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp6D7F31C4B7308F5BA7E90B1ADD7038F0" Guid="{14D2850F-3AC3-4140-AF74-A640013A6CB5}"> + <File Id="fil38CE2A927CF9846606D0621A7D6A0FDD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Unencrypted Data in RAM.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7F598B7CD8D0338B1D394D65C681B267" Guid="{C17FBA85-E06C-4B94-9752-18DED3B73621}"> + <File Id="fil17BFC70CA94E4EBC98B25B5C8BD92541" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Uninstalling VeraCrypt.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpD9A9E41D1F43ECC44D1385DAF2D8FB60" Guid="{70C90DB6-D380-4EEE-81EC-F8277951FF95}"> + <File Id="fil969A4AE7B65954FDEC10561CE141BDBF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Using VeraCrypt Without Administrator Privileges.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp9B9A53A0C6DD95A6630C0210F3BB18E3" Guid="{0B15B80D-CBED-4819-B443-4D8E2993F489}"> + <File Id="fil84C3A46EE20192B924C3D7A490BC1D80" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt Background Task.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpB930876C3A86169D30AD296E2E8C8BB5" Guid="{83162AE8-15C0-4CD8-BD2E-7443B1DCF9B6}"> + <File Id="fil6C374CD9BC01F8F027BAB95107ABF7AD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt Hidden Operating System.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp02C9FCDEDD4174BB86092C3FC74686F0" Guid="{BF81515A-3967-4F72-BDAA-E34D98889079}"> + <File Id="fil6AE74A78DE657603388F9429170F121A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt License.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp851C5E0A0D76AE035089E9529277A1F0" Guid="{6C87B442-D74A-4337-AAB1-967B2C1E05A9}"> + <File Id="fil07431A77C5E9494D4C4B945BB32F65AC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt Memory Protection.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpE6741DB4F8619935F0A2A35131BD3237" Guid="{E2230E40-DF2F-4A1A-8C65-A0F24DC8BB9B}"> + <File Id="fil8024C54A5F73498199A9DD6A357AD5C4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt RAM Encryption.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp661B947BA59FB91045269E4D99CF8CD5" Guid="{FC919CFE-CBDF-4E2F-8D01-1084A209356A}"> + <File Id="filC33A33ED6A2F9A8C3E8E529D88698CD4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt Rescue Disk.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp7FE90DA6D2CB3D2F620DFB67DBE5FBD7" Guid="{89C70FA3-77EB-4376-BF5A-528B616529A0}"> + <File Id="filA87A6F40D58E4DCFDE65BA47AD254E7D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt System Files.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp03CC22A1DFFB0DB0AE4FBE6BDD0EB1AD" Guid="{0B11D197-21A6-4B9D-9FA8-551891F5BEE1}"> + <File Id="fil5D04F8DF1FECF8D4F4632DDF068F5B46" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt Volume Format Specification.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp747C6DC3F1F94C8C379E8894CB58CC1E" Guid="{376A3808-5C87-42B1-B99F-A66EBBAF5AF0}"> + <File Id="fil2F7DDAEFCD182B864F9EF2F68E64FF90" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt Volume.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmp568BC886045DD9FA8CF128F42A72561F" Guid="{EFF6758A-D620-4A1C-A36C-F5F85C5FB513}"> + <File Id="fil944946E61E0A28EDE45AEDF5C637842F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\VeraCrypt128x128.png" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpF58038EF3D3DCDDB51D498784BD02F0E" Guid="{8D8C09C0-8AD6-461C-9F64-8946CEDAF6A4}"> + <File Id="fil66E62E8A04016A2B6EC83AB990C5D219" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Volume Clones.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpA10ECE6646C3403587F5EA05B65F9E07" Guid="{E55A3BBF-F1DE-451E-9479-1A4987C17F45}"> + <File Id="fil52462FF21FC5B0BD710796D4FF9CA66C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Wear-Leveling.html" Checksum="yes" DiskId="1" /> + </Component> + <Component Id="cmpCB7AD9B47FC8C557168958B7EC0363D5" Guid="{5FC67C64-1AE4-49E0-8341-438316E349E9}"> + <File Id="fil025AA83D381AD8CED0AB1CA421211A87" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\ru\Whirlpool.html" Checksum="yes" DiskId="1" /> + </Component> + </DirectoryRef> + <!-- Refer to Desktop folder in order to install files in it (shortcut) --> <DirectoryRef Id="DesktopFolder"> <!-- Creating an advertised shortcut : enhances resiliency by verifying that all the components in the feature are installed when the shortcut is activated --> <Component Id="VCShortcutDesktop" Guid="C7EBBEFB-8E9C-48D6-8014-2BBA1C7D1957"> @@ -1269,28 +1889,31 @@ <!-- C:\Program Files\VeraCrypt\Languages --> <ComponentRef Id="cmpF27E43A4E59E04A5B095C5101B229139" /> <ComponentRef Id="cmp4350812363930B900E24C845940DF416" /> <ComponentRef Id="cmp1DD254125CF07901EACECC70930818B0" /> <ComponentRef Id="cmp8C9E97CFD69D3BCB44B84D886720F3FC" /> + <ComponentRef Id="cmp8EEB5407564497843BCFB99ECD7450CD" /> <ComponentRef Id="cmp2BC45D6EC406DDC470E8501442A7AF68" /> <ComponentRef Id="cmp74A0CA1914A6C6FE33D76DE1C01C676D" /> <ComponentRef Id="cmpC186D3472CE1EC872FF1B0CF3682B3B6" /> <ComponentRef Id="cmp2AB0B613D25DDEF3466CBC86BD6B878B" /> <ComponentRef Id="cmpB09224EB45E097BF511CBC5DBE3E251C" /> <ComponentRef Id="cmpF24BBBEB613F893CBC5FBF6533CB48C9" /> <ComponentRef Id="cmp50E1DEF37599D2900447B13FC285B7B7" /> <ComponentRef Id="cmp46E5A0DB48A03A91267C97A664BD9BD4" /> <ComponentRef Id="cmp95BAB91FA0B7E37D5B9343478899CC75" /> <ComponentRef Id="cmpE73E4CCF9F6EC39998B9BE35E43768CC" /> + <ComponentRef Id="cmp8E5262918FDC1B2986951E925B0B9AA5" /> <ComponentRef Id="cmp28EEAA4B2230460BDDA61DEFBC71A905" /> <ComponentRef Id="cmpCFF4CB46421F1A713D45607393ED9B90" /> <ComponentRef Id="cmp31601B4199D0CD3977758A3F2B63CDE7" /> <ComponentRef Id="cmp8E2E0489348A190B00532591CE0AC325" /> <ComponentRef Id="cmpEE57E2901F12294E638E66C39F1B39BB" /> <ComponentRef Id="cmp2F1F644C870AFF8970FE18AF2CD151C4" /> <ComponentRef Id="cmp4B8E0B5A7B7A8BE4267C722B1434E4CF" /> <ComponentRef Id="cmp84BB49D30BDBB4212707D14B7A9C13F1" /> + <ComponentRef Id="cmp6097F5CB407EFCDADFEA02548151AD81" /> <ComponentRef Id="cmp406E3BE632055CDDE1E42F45E31318DC" /> <ComponentRef Id="cmp4E363AF94947A27A4E9CF57C69E6DE54" /> <ComponentRef Id="cmp562F7970AF2F9EF535AC21A84C7229D1" /> <ComponentRef Id="cmp19EF976916B5E207A32BA08C3143A281" /> <ComponentRef Id="cmp4C9B5090256B2E88D27C9CF7E6CFD9EF" /> @@ -1318,18 +1941,20 @@ <!-- C:\Program Files\VeraCrypt\docs\EFI-DCS --> <ComponentRef Id="dcs_tpm_owner_02_pdf" /> <ComponentRef Id="disk_encryption_v1_2_pdf" /> + <!-- C:\Program Files\VeraCrypt\docs\html\en --> <ComponentRef Id="cmp5A2505C1E4CE33EAC578A8D1C8C505D2" /> <ComponentRef Id="cmpE985CD1A96188861286D758A12A1D0A1" /> <ComponentRef Id="cmp310514F655B6D66F5308A5823B0AB691" /> <ComponentRef Id="cmp0664DF8B1FE440C02B1E20D2F23C2CDF" /> <ComponentRef Id="cmp2934E77CB835216789F88BD686160A94" /> <ComponentRef Id="cmp688E76C9A297923D616068E33A6A4F49" /> + <ComponentRef Id="cmpC40B9AEA2BA26327EDBF8EE050CB076B" /> <ComponentRef Id="cmp2ABB10C0A5AC0F1084EDF94E0FDFFD09" /> - <ComponentRef Id="cmp32E7F4F5C0F44D00B53E3946E7E1FCF9" /> + <ComponentRef Id="cmp793A7E676882B650FFCEE4F41B92CB85" /> <ComponentRef Id="cmp989B890D94671F634D04D8F945090F21" /> <ComponentRef Id="cmp109BF0667C5A7B7036CCAAD9B29D9449" /> <ComponentRef Id="cmp82ABD3094B751094F3A49CD338A3713D" /> <ComponentRef Id="cmpE6A18205CB9F847CD7C4375AED2196D5" /> <ComponentRef Id="cmpAA4D61C5E17E2A8513EC120AC9B1DB8A" /> @@ -1360,37 +1985,14 @@ <ComponentRef Id="cmp4E6F9484484A40645D519F688ED9C21E" /> <ComponentRef Id="cmp3CF724F2A2347A2A30C85CB76490F687" /> <ComponentRef Id="cmp3858A4BB7577362DE87F4485575DFC99" /> <ComponentRef Id="cmpA06B9542AEB64F96BB784F47800158A8" /> <ComponentRef Id="cmpACD4069DDF564A8DAB5D542BB8850131" /> - <ComponentRef Id="cmp735FE6B2F10C43019E11256864209EBC" /> - <ComponentRef Id="cmp89BB363FF83EBA271361A4208E069DA9" /> - <ComponentRef Id="cmp5115B3C02C1C0CF975E4B7C3152C163A" /> - <ComponentRef Id="cmp3E70583F999D652B21E6E2D526666F61" /> - <ComponentRef Id="cmpC2D0D30677874908C48FF8A921712958" /> - <ComponentRef Id="cmp88EB50D9762FA92B2E52313A7C92F2DD" /> - <ComponentRef Id="cmp3DABA5B6F2E779D915E1B8D680AE7855" /> - <ComponentRef Id="cmp2EA15F417E5EE9D31E028263C137695F" /> - <ComponentRef Id="cmp51D438A1152A65EAD414012A5EAEA2CA" /> - <ComponentRef Id="cmpD52CCEF7A4A330F26D3B3F7355D03646" /> - <ComponentRef Id="cmp1A9BFDDFF15FF47166075F319B97BB6E" /> - <ComponentRef Id="cmp320762048B274197D27F739096C4A23A" /> - <ComponentRef Id="cmp952051BDCF309CAEB1D62701560D8F78" /> - <ComponentRef Id="cmp6AB232B7503BC35E25CB33C789242482" /> - <ComponentRef Id="cmpE8ABDCD58C9636346FAE7E941A38CA6E" /> - <ComponentRef Id="cmp9CD73EB218D7148E55F141E31AEC9D8C" /> - <ComponentRef Id="cmpE504F295E3ED5CEBDCF231608F6757B2" /> - <ComponentRef Id="cmp84A8D3A9BF75ED8047B7DEAB02F26003" /> - <ComponentRef Id="cmp63A4BE623C0E3F77B3BFA5B467C33A1A" /> - <ComponentRef Id="cmp63CE6B664C7396B79B1B28591EEC72B9" /> - <ComponentRef Id="cmp4D6100E03DC3B05F17A7E2BA4AAF1EA1" /> - <ComponentRef Id="cmpB7641BE40D4D1642AB3647B669008A94" /> - <ComponentRef Id="cmp4DB96DA8172D79B63A7FBE08E016A280" /> - <ComponentRef Id="cmp615D3647A56F3ED6F0766CEEE9EFCF9F" /> <ComponentRef Id="cmp9FDD7E3C06564AF29700B82B19BC0501" /> <ComponentRef Id="cmp90AB4CF273108F47223E3432838CDE37" /> <ComponentRef Id="cmpB9A0461BF7CF75538111B088C986A62F" /> + <ComponentRef Id="cmp33C4617DBE37ED14B978BC4770F0C3F8" /> <ComponentRef Id="cmpD8C7B52BC03709FAB2642B93BFE4FFE8" /> <ComponentRef Id="cmpFD6EB163EA6B74C4F59FF04D2B3796CC" /> <ComponentRef Id="cmp612D2E75E857D164665BE8CA37570D04" /> <ComponentRef Id="cmpF65BF759DA7F65BAD6D74A83FEF9D205" /> <ComponentRef Id="cmpA6A249B42C89657DE664B9D88D04DB3F" /> @@ -1406,15 +2008,17 @@ <ComponentRef Id="cmpD3183A7373751A19B4B7C9B041F9035D" /> <ComponentRef Id="cmp3DED9073AB120DC026C48E9CDF9283EB" /> <ComponentRef Id="cmp0FF3027C2662D967ACB4B01BA7BC85F9" /> <ComponentRef Id="cmp3FC9C0126A2074CAABCF73197358F824" /> <ComponentRef Id="cmp1830E220882FBA276350032258B478AA" /> + <ComponentRef Id="cmp433CCCF103F2A8AF57F9FC528232C836" /> <ComponentRef Id="cmpE5D6E9DF3EE1301C6D5A4F44362BCE96" /> <ComponentRef Id="cmpB7B429D414CF1DD05A4B70CE94E343F7" /> <ComponentRef Id="cmp00845B9781D5633702C834BCB4EB93D1" /> <ComponentRef Id="cmp47F92D029E335F7865F8ACB30763FED2" /> <ComponentRef Id="cmpF3B90B0C1F316854E9142B22783ACF19" /> + <ComponentRef Id="cmpBD37FB188B29DB82A15EBC9C1DB66F94" /> <ComponentRef Id="cmp2EC17F48BC15C5405D2DB40FC6E01745" /> <ComponentRef Id="cmpE00F8980768E14DF59474B5CB3D84041" /> <ComponentRef Id="cmpD17B73F5892E45458E960025558B3452" /> <ComponentRef Id="cmpF45A8248FAFA80A8DF62989C477E7C0F" /> <ComponentRef Id="cmpD066CBBD66E8CABB4AD4B928F823A5D2" /> @@ -1461,10 +2065,11 @@ <ComponentRef Id="cmp8D35F7D61B2B7DF0EDEAE2E56031E7CB" /> <ComponentRef Id="cmpDE2C66707086A509EABD0F9F6E8BDB1A" /> <ComponentRef Id="cmpA80443C3767E3E51F3DE88BFD0D7A33B" /> <ComponentRef Id="cmp214446AAABEBAC0C3827B8977083FAE2" /> <ComponentRef Id="cmp4AF022868FE6883520C700676C43B15D" /> + <ComponentRef Id="cmp340BBEC25292C3BE778BA8F158DB87B1" /> <ComponentRef Id="cmpC27AA2C4496C9EFA95DCD663B031B5D0" /> <ComponentRef Id="cmp9CBBC8311BBFC54C8DC1162BB17E5AED" /> <ComponentRef Id="cmp033461B0777614621A2ED7B4E2B08D55" /> <ComponentRef Id="cmp0E43CDBBAE343957423AE2907AC16883" /> <ComponentRef Id="cmp8A8526D2061A14810E1B7A8A6E527DCD" /> @@ -1519,19 +2124,241 @@ <ComponentRef Id="cmp0A4AB9AEF0D351FA5E63BCD67DC00607" /> <ComponentRef Id="cmpCC25F1CB6A1C9D8B47C407B818F73B59" /> <ComponentRef Id="cmpE0F5E8A2D6FEF181686370F0E1EAC632" /> <ComponentRef Id="cmp46B2E8BCD50BD668153E793EB737BC39" /> <ComponentRef Id="cmp0305CC2824E44F697B402E56A0CD1754" /> + <ComponentRef Id="cmp9DD3085A37E22E035A65C74A5B9C209E" /> + <ComponentRef Id="cmp1FFF1F3DF3F162C4AEDA7871C7886618" /> <ComponentRef Id="cmp0E00CBDCB82A904FD6AD82E458CA6AA7" /> <ComponentRef Id="cmp594B5E68E63675F4986F6717BC1F5950" /> <ComponentRef Id="cmp62748E79EC04EBE33DC46770AD65CDCE" /> <ComponentRef Id="cmpE1265CF3CC5E0B487E99D9D5936BB3F4" /> <ComponentRef Id="cmp1C162513D52824629D7C9FAF96054182" /> <ComponentRef Id="cmpB5FA2A488D2C7E59E0B52D18820CE00A" /> <ComponentRef Id="cmpBB1A4A1EB3FBBE5B2BF2752C302CDC2D" /> <ComponentRef Id="cmp9D908DF026E6297D51B6C4A6700092F1" /> + <!-- C:\Program Files\VeraCrypt\docs\html\en\CompilingGuidelineWin --> + <ComponentRef Id="cmpD07393B381E6260DBC0496E0A2B3FDA3" /> + <ComponentRef Id="cmp1731A59A75547D8FA04524DDC7AD2988" /> + <ComponentRef Id="cmp7FFBD1C115BC0813B91129B4078705CF" /> + <ComponentRef Id="cmpD7F278D2B4ABBD3373A66252A80FF41C" /> + <ComponentRef Id="cmpA3CA3666C6CCD54031801DA1FF7D7AF3" /> + <ComponentRef Id="cmpE90376C911384CD5AE71D0E60076C55E" /> + <ComponentRef Id="cmp2F53ACA5C5C155121B87F5D6E8A68D40" /> + <ComponentRef Id="cmp843B9A72B11653FC613E6888545A2914" /> + <ComponentRef Id="cmp5AF6BA98113B1A6C1B9EB20C78BA4ABF" /> + <ComponentRef Id="cmpB235C44A240AB4854F159B87373D335B" /> + <ComponentRef Id="cmp6F71C2116891CBBDE64C81A41B85C674" /> + <ComponentRef Id="cmp9DEEBC6C9B984AFFF4F946DBE6084FB3" /> + <ComponentRef Id="cmpD474D105652697A5807E9CBF4B0A0AD0" /> + <ComponentRef Id="cmp451C53B55201540C7B07BBE0A73A6F69" /> + <ComponentRef Id="cmp75EA034E68DFB3C765DBA38C1EBEA351" /> + <ComponentRef Id="cmp5691E0C2C85E2E1EDE1E41214E222640" /> + <ComponentRef Id="cmp2C05B384BC73DF32992E4B57F3F48AF5" /> + <ComponentRef Id="cmp4B12B4AD977CC6FE0C361B0C98C6A236" /> + <ComponentRef Id="cmp41B2B2449677DAA52A41DC7795E8C33B" /> + <ComponentRef Id="cmp22F9BF579449876818B8F5773E181345" /> + <ComponentRef Id="cmp82302DD1E595AFE99785A70427299C19" /> + <ComponentRef Id="cmp18D83E4B99481D3D79B9D2F79E287226" /> + <ComponentRef Id="cmp2BDF1EA1DD0D9D8D7E67AF7BA1FB0822" /> + <ComponentRef Id="cmp817AF448E496E79AE0E03C16657AE14E" /> + + <!-- C:\Program Files\VeraCrypt\docs\html\en\ru --> + <ComponentRef Id="cmp98E10412F1F15FEA92DA14D5D072CC76" /> + <ComponentRef Id="cmpA1262CC2F2086CCA8E3EE8DDA77FF086" /> + <ComponentRef Id="cmp2DDBA3B10DB23CB1F8EA928B46CCA181" /> + <ComponentRef Id="cmp0020DEB1B692BF8C113BCDD9C35CFDAE" /> + <ComponentRef Id="cmp2ED752BBF695DA0426DC658681B0246F" /> + <ComponentRef Id="cmpC2831D4EDB2C6161E9AFFA4E118B4690" /> + <ComponentRef Id="cmpC8A17F149AF21481048D7258418DBDA4" /> + <ComponentRef Id="cmp9D4113D4E0B7F3BA260B8B2B533E299C" /> + <ComponentRef Id="cmp84EEBEA4353C6BB7FAFBC651A3044D91" /> + <ComponentRef Id="cmpE3AD138F57F6B7D59BEA109296613C6A" /> + <ComponentRef Id="cmp9C042008F4284C90B114419C6CAEF43C" /> + <ComponentRef Id="cmp776BD71B225596C1F5DDCBAFBEDC3D8A" /> + <ComponentRef Id="cmp71F37A3E4D3EAAE76DDD223623EFEFF3" /> + <ComponentRef Id="cmp7B45DBB2FDDDBAAE80C9BED8518D5162" /> + <ComponentRef Id="cmp11BA4D17FE816D5B509E1340905776C1" /> + <ComponentRef Id="cmp030C129762387E5309D0ECB8DAF65212" /> + <ComponentRef Id="cmpAC9DB62D88BBBAE847557DB06BD10C23" /> + <ComponentRef Id="cmp4A6D2989B95765B61974E1E22E2ACF78" /> + <ComponentRef Id="cmpD359378B1A7405FAF65C49BE76F981C5" /> + <ComponentRef Id="cmp70D8557BE97B70FD9EECAAA0EF5CD03D" /> + <ComponentRef Id="cmpDEBA4E7882793204DA1CC9999C05F964" /> + <ComponentRef Id="cmpF516F4196B3085018BC093FCBCB58A4C" /> + <ComponentRef Id="cmpAC8162634F24C0C33B2E3C6864DA4A2A" /> + <ComponentRef Id="cmpB081741BBB46FA24327C9DB71A7B02B8" /> + <ComponentRef Id="cmpD4723B9A6D4909DFC0E1B4B4EE660C09" /> + <ComponentRef Id="cmp39E9D88B683EA4F12640DA0A65DE3549" /> + <ComponentRef Id="cmp0F2F30410D88E2533026D3C3E4744E34" /> + <ComponentRef Id="cmpB5D683C358B00897FA9F0FF22F315D7B" /> + <ComponentRef Id="cmpD3CD0A2A3035277B8D5C83DDD56EEC09" /> + <ComponentRef Id="cmpFAF93B91B7847306F97A8F13C9237BBF" /> + <ComponentRef Id="cmp110F96A11106F1AC7DD0DB03480BC3AD" /> + <ComponentRef Id="cmpD14CBD246BD84D409AC5C9435CB93C69" /> + <ComponentRef Id="cmp338A05D33900D38A2218604CA622D528" /> + <ComponentRef Id="cmp6AE588318312858B13C37DBB81243BB4" /> + <ComponentRef Id="cmp40450814BCB759314CC3FDE6C648C0C4" /> + <ComponentRef Id="cmp8D0D5C8F66B9E9213FACEB65D779E93B" /> + <ComponentRef Id="cmp1969CFCA4E8E6853AB60C3E5E84EC96C" /> + <ComponentRef Id="cmp0BF1FE522880BBDA428837E3B646DA5D" /> + <ComponentRef Id="cmp2ADCCFAA99C96B7E74D50F58AA2DDAFA" /> + <ComponentRef Id="cmp0E448FAC0CED589DD138E162986FC0DE" /> + <ComponentRef Id="cmp06C8D9A3457DEA62A19ACB286B2E32EF" /> + <ComponentRef Id="cmp7447D492A3894509DC750B48E7DCF613" /> + <ComponentRef Id="cmp5C2B87E203BB5FCA4F77B19D3E6BA307" /> + <ComponentRef Id="cmpA5748D4E937680A92DBAE78CE5B2F28C" /> + <ComponentRef Id="cmp6FAAD943919CED1962892A80342F6791" /> + <ComponentRef Id="cmp948EA396F48A342F4EF23F2210CB5B4F" /> + <ComponentRef Id="cmp29F827B72EB9BA3A4BBF4135346BFB3F" /> + <ComponentRef Id="cmpA6461FAA6FF2B690A1950611770B4238" /> + <ComponentRef Id="cmpA386DE1E79E889FA61290114537BDEE3" /> + <ComponentRef Id="cmpF78CD517DB1E24484B5CC82B2DDD5E9C" /> + <ComponentRef Id="cmpBA0D70B7A50226DCD8144689A79ABDCA" /> + <ComponentRef Id="cmp589D4976F5CF94C27910A8F4EBF29FD5" /> + <ComponentRef Id="cmpDEF5E40C0360414577A9FB6E9D209C31" /> + <ComponentRef Id="cmpC0FF4C2C070C62B0E55BA14B329A58FD" /> + <ComponentRef Id="cmp5F3D5E0970DA4DCB5655AEC4AD1C94C5" /> + <ComponentRef Id="cmp14BBB28777FE8A9914F4BB38B50C0311" /> + <ComponentRef Id="cmp10C79CC28991F4E8A3E33C66D7280D88" /> + <ComponentRef Id="cmp7E0AF9A50799D06DE12C94A60C834F5D" /> + <ComponentRef Id="cmpC547B50DD1AB37E959FB18D1AFD9C051" /> + <ComponentRef Id="cmp716240038B6F46034428E43768E32CA7" /> + <ComponentRef Id="cmpEF2FE09A2E8F60EB28ECBA7BEE5E9026" /> + <ComponentRef Id="cmp4DE7E89729EE1EE9EEA042F80B412D3D" /> + <ComponentRef Id="cmpBC866AF7B9269946668A324AD39D08A7" /> + <ComponentRef Id="cmp59C951F15FE54CBB5EF2528D4AA6F73C" /> + <ComponentRef Id="cmp1BCCBDD405E75313F3B3CE6EE8DA86B5" /> + <ComponentRef Id="cmp3E991C4739DF1DE5475ECE135EE98D0E" /> + <ComponentRef Id="cmpF6A11C5F07AADC2DF98D1549024AA5D8" /> + <ComponentRef Id="cmp92387146C4EDCAC1653A2FDD573D2695" /> + <ComponentRef Id="cmpAD29968DFA6888826A5718FF6533D96B" /> + <ComponentRef Id="cmpECD5EF9F2075A8512411DC0C4A5249D0" /> + <ComponentRef Id="cmpCB8D27F16124CAAC7244A48FFA4AFB7D" /> + <ComponentRef Id="cmpC65A16FF1BC895E90BBB53B78E68DFD9" /> + <ComponentRef Id="cmp87F512AEE17E1578EAAE94230A2D42F8" /> + <ComponentRef Id="cmp97920FB49AE81562FA7ABFFA9A5DE439" /> + <ComponentRef Id="cmpC57C3FF497FC91DB80B6398E7FEE7A64" /> + <ComponentRef Id="cmpACDA6D0F0078725DD4A8708187C76CD3" /> + <ComponentRef Id="cmpCEB5D33CBF8513543D361078523B750C" /> + <ComponentRef Id="cmp5FC13AB774FAACB290717853ADC20FCD" /> + <ComponentRef Id="cmp725B9ABA14E65E9EFE49157CA4FC128B" /> + <ComponentRef Id="cmpBD55DC12534E09C8553C28F5B5C0FA4E" /> + <ComponentRef Id="cmp7C45FE83120EA12DB05FC171A06B30AE" /> + <ComponentRef Id="cmpA76542EBEEBAFF2C7A5BF5AB2741D4FE" /> + <ComponentRef Id="cmp9B9F529CBDC007E9FA5CF79E8867DA67" /> + <ComponentRef Id="cmp87244E466A2EB7ABF13AA619B977BF78" /> + <ComponentRef Id="cmp712EA51FB151C694292EA58C5A578BA6" /> + <ComponentRef Id="cmp870CD5E9E23CF6C9067DEADE20C9FC35" /> + <ComponentRef Id="cmpB006A7FF853B4EBD76D04C32E9455C4B" /> + <ComponentRef Id="cmp472CDC24D7DCA0786CBD55DD01B3C326" /> + <ComponentRef Id="cmp89C6FF5C5AC2CD9880C5409B5AB83825" /> + <ComponentRef Id="cmp6C831E6A491B7EB59D88781A5BFE9F15" /> + <ComponentRef Id="cmp60679C4F1990149DFE8EBD00D7C156DA" /> + <ComponentRef Id="cmp6382DF988EB9E433728A02875F366B29" /> + <ComponentRef Id="cmp6ED341130E7BC5619B617E61C4DB60A8" /> + <ComponentRef Id="cmp216B8D95DCCC0DBA860DA22728386441" /> + <ComponentRef Id="cmpE4595A43F5FE7BD7D162F3652BA6C266" /> + <ComponentRef Id="cmp7D5BE6FDEA3DE19095769A66D0AE29A8" /> + <ComponentRef Id="cmp61565372125F227105B9AE44241F1967" /> + <ComponentRef Id="cmpBC1662DFA34FC9A8F203FDC51697C8A5" /> + <ComponentRef Id="cmp5EF5D5F4FEB4B57BF58C3046BAD8A1E1" /> + <ComponentRef Id="cmpE9488D44ACC744E76E072585F84C491B" /> + <ComponentRef Id="cmp4228F912DE70A8E8A341A3B3EB232186" /> + <ComponentRef Id="cmp661A873DCAADCA5D6DE5658C1AF6238D" /> + <ComponentRef Id="cmpF8C6E0267E7995D280B8E7F4172C7F18" /> + <ComponentRef Id="cmp6004A52073268319FB67C09279279ACD" /> + <ComponentRef Id="cmpEEC16C2DA6C942B7F814FE2ECE9AAF65" /> + <ComponentRef Id="cmpA116A7CF851D562952FD8F362EF4F15E" /> + <ComponentRef Id="cmpAA28C1518620F4CA7377132D083B5E31" /> + <ComponentRef Id="cmpC384B9F228D8242650A1A48FDE46FADB" /> + <ComponentRef Id="cmpD858F6459F1D5BE26754F7B9A6B256FB" /> + <ComponentRef Id="cmpD935A23E00BC5621253BAF554A60C48A" /> + <ComponentRef Id="cmpCA290469DDC2BF237F81DDD5B1767EED" /> + <ComponentRef Id="cmp72EE25B25C5C68F03DF9176C2D3F8BDD" /> + <ComponentRef Id="cmp29F705976D3FE416CA69F9A85F81E453" /> + <ComponentRef Id="cmp3092B4A3F28D76A5F41FB2DC967976BF" /> + <ComponentRef Id="cmp05C4713E55D9E8032EF515CC96771B98" /> + <ComponentRef Id="cmpD979C33BE6277C13010EF93D9FB338C8" /> + <ComponentRef Id="cmpBDF94D6F72E05F0E90815BA6CA48AEAA" /> + <ComponentRef Id="cmp5F801DCC01F26894D68A6EA08E45B76B" /> + <ComponentRef Id="cmp1F82E220BB2635E789DB76D708745EDD" /> + <ComponentRef Id="cmp9FEF6DBD25CA9AFF6103A75B72D304B2" /> + <ComponentRef Id="cmp1710916CD3A94FB29C9213789A147AE0" /> + <ComponentRef Id="cmpAA303E0AEBC0E1EB8C2472B1ED65324A" /> + <ComponentRef Id="cmpACAD2B0C89247F272E42D86D48ED6ECC" /> + <ComponentRef Id="cmp4BC713FA989ECC8EC884548781C4F29D" /> + <ComponentRef Id="cmp2CF52C3BBF31CCD0752A49C11FF294A7" /> + <ComponentRef Id="cmpE60FAB408B216C9ED62A362BC7EE475D" /> + <ComponentRef Id="cmpAB7AC6D28286103D7E729673FEDFCD5C" /> + <ComponentRef Id="cmp3E980DF980C84895107EA078801D25F6" /> + <ComponentRef Id="cmpC84F22C32C2455E14F0833097B100309" /> + <ComponentRef Id="cmp13BEB53EDC29960F3AD13DEEAB9C92C1" /> + <ComponentRef Id="cmp6DA588A2041707855690C560C64C438D" /> + <ComponentRef Id="cmpB03F168BA9DD4275F206E53CED02A12A" /> + <ComponentRef Id="cmp673ABA162209C25819DE3CACF4E612D4" /> + <ComponentRef Id="cmp2198CDB3A37522808F3C0FE67FEE31BF" /> + <ComponentRef Id="cmp6CEA0C62D82A3B53499C2D4EF2C3B5F0" /> + <ComponentRef Id="cmp7FBF805189D05F4E3E1197B6024D6583" /> + <ComponentRef Id="cmp37C51862BC6949DB6195DC1A9FC37855" /> + <ComponentRef Id="cmpB12223A6EEF742CCFB738D9C8B708ED9" /> + <ComponentRef Id="cmpF4B2DDF581FADDF14E3613D517675CE0" /> + <ComponentRef Id="cmpBCCD12E77FAEA515D6C1555B7823E169" /> + <ComponentRef Id="cmp32627BA5A52D1C2FD2648C6907F4A00E" /> + <ComponentRef Id="cmp7A44CB40DFC859E66D7CC2582EF9948D" /> + <ComponentRef Id="cmpE819E5D393DD7BCB4D1C101FFFE6FB0E" /> + <ComponentRef Id="cmpA29ACAD11D850472C56137504F770B8F" /> + <ComponentRef Id="cmpA2581CD77714E8D6C2A4DAA258590E29" /> + <ComponentRef Id="cmp3F6C602C80B5711DE3EDD2FE8EAFD00C" /> + <ComponentRef Id="cmp30C5A7CA791767CAD2E9E124826EE047" /> + <ComponentRef Id="cmp770DEAD9D0C6D2439CA86800A5709567" /> + <ComponentRef Id="cmpF8CB44545962DB01EC6DD9DFADA36FEF" /> + <ComponentRef Id="cmp8468AE251FAE8743371ADE14FEA935F7" /> + <ComponentRef Id="cmpD2BCE21F32CF98AF542769B408047D4E" /> + <ComponentRef Id="cmpA1B275EE180C48643BFF410ED187E170" /> + <ComponentRef Id="cmp2458A9EEA35AAC6F7AA66C71F2C8E500" /> + <ComponentRef Id="cmp725AEB3BD6705908D3DDDC49D446EEDA" /> + <ComponentRef Id="cmp84C361E84DB09C711566B58D9822B3A4" /> + <ComponentRef Id="cmpEAC38538AB52AD68B5B36DEBE9310DDE" /> + <ComponentRef Id="cmp7B700E12FA433825A9ED08182F8CF6A6" /> + <ComponentRef Id="cmp8548A76FB3F15F37E8690D54D9E37153" /> + <ComponentRef Id="cmp84AFAC0919E0FDAB5B0C943837BB10FB" /> + <ComponentRef Id="cmp7E863093EB77CAFCE23926751F601D06" /> + <ComponentRef Id="cmp88CC92142E3E491F76F7BE7582508F44" /> + <ComponentRef Id="cmpA65F33B67588CC31BC7CAE2E2C651CB6" /> + <ComponentRef Id="cmp78D7D716B5B1FE70B04CF6A10B38E34F" /> + <ComponentRef Id="cmpF86B2467041088054881E7ED51D3AA2F" /> + <ComponentRef Id="cmp219FFB7AC8A9CAE559B96D663382362F" /> + <ComponentRef Id="cmpCEA5EA46BBB2A62A8D881B31198C3386" /> + <ComponentRef Id="cmp491B948F4AC657873C77A063196DE773" /> + <ComponentRef Id="cmpEE20C9B71CFB2E466F13C6FC9BF04E09" /> + <ComponentRef Id="cmp2B15CF0AFC8F3437B3049F59B0EF7601" /> + <ComponentRef Id="cmp785E1DB76BBDEBFD70EA4BF62650054A" /> + <ComponentRef Id="cmp5F637265DB84736905EE09ED2ECC69A6" /> + <ComponentRef Id="cmpCBFB249454B517E4B7449B61557EACC9" /> + <ComponentRef Id="cmp81CCD244B1F892AE169DD7F2A41000C5" /> + <ComponentRef Id="cmp233B1C3979F13771F5C1FD8DFF4D4606" /> + <ComponentRef Id="cmp21805FDD48B222E6357FC4461C6F3102" /> + <ComponentRef Id="cmp0D80FF102A8D89F5A82D722082F11599" /> + <ComponentRef Id="cmp6D7F31C4B7308F5BA7E90B1ADD7038F0" /> + <ComponentRef Id="cmp7F598B7CD8D0338B1D394D65C681B267" /> + <ComponentRef Id="cmpD9A9E41D1F43ECC44D1385DAF2D8FB60" /> + <ComponentRef Id="cmp9B9A53A0C6DD95A6630C0210F3BB18E3" /> + <ComponentRef Id="cmpB930876C3A86169D30AD296E2E8C8BB5" /> + <ComponentRef Id="cmp02C9FCDEDD4174BB86092C3FC74686F0" /> + <ComponentRef Id="cmp851C5E0A0D76AE035089E9529277A1F0" /> + <ComponentRef Id="cmpE6741DB4F8619935F0A2A35131BD3237" /> + <ComponentRef Id="cmp661B947BA59FB91045269E4D99CF8CD5" /> + <ComponentRef Id="cmp7FE90DA6D2CB3D2F620DFB67DBE5FBD7" /> + <ComponentRef Id="cmp03CC22A1DFFB0DB0AE4FBE6BDD0EB1AD" /> + <ComponentRef Id="cmp747C6DC3F1F94C8C379E8894CB58CC1E" /> + <ComponentRef Id="cmp568BC886045DD9FA8CF128F42A72561F" /> + <ComponentRef Id="cmpF58038EF3D3DCDDB51D498784BD02F0E" /> + <ComponentRef Id="cmpA10ECE6646C3403587F5EA05B65F9E07" /> + <ComponentRef Id="cmpCB7AD9B47FC8C557168958B7EC0363D5" /> + </Feature> <Feature Id="Install_Registry" Absent="disallow" Level="1"> @@ -1812,6 +2639,6 @@ </InstallExecuteSequence> </Product> -</Wix>
\ No newline at end of file +</Wix> diff --git a/src/Release/Setup Files/build_msi_x64.bat b/src/Release/Setup Files/build_msi_x64.bat index e610160a..8d5a5449 100644 --- a/src/Release/Setup Files/build_msi_x64.bat +++ b/src/Release/Setup Files/build_msi_x64.bat @@ -1,17 +1,19 @@ ::------------------------------------ ::Define search paths here for Wix ToolSet and SDK (and SignTool optionnally) ::------------------------------------ -@set SEARCH_WIX_PATH=C:\Program Files (x86)\WiX Toolset v3.11\bin - -@set SEARCH_VC_DIR_PLATFORMSDK_1=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86 -@set SEARCH_VC_DIR_PLATFORMSDK_2=C:\Program Files (x86)\Windows Kits\10\bin\x86 -@set SEARCH_VC_DIR_PLATFORMSDK_3=C:\Program Files\Microsoft Platform SDK\bin -@set SEARCH_VC_DIR_PLATFORMSDK_4=C:\Program Files (x86)\Windows Kits\8.1\bin\x86 -@set SEARCH_VC_DIR_PLATFORMSDK_5=C:\Program Files (x86)\Windows Kits\8.0\bin\x86 -@set SEARCH_VC_DIR_PLATFORMSDK_6=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin +@set SEARCH_WIX_PATH=C:\Program Files (x86)\WiX Toolset v3.14\bin + +@set SEARCH_VC_DIR_PLATFORMSDK_1=C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_2=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_3=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_4=C:\Program Files (x86)\Windows Kits\10\bin\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_5=C:\Program Files\Microsoft Platform SDK\bin +@set SEARCH_VC_DIR_PLATFORMSDK_6=C:\Program Files (x86)\Windows Kits\8.1\bin\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_7=C:\Program Files (x86)\Windows Kits\8.0\bin\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_8=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin ::end of search paths set MSI_BUILDPATH=%~dp0 cd %MSI_BUILDPATH% diff --git a/src/Release/Setup Files/veracrypt-arm64.cat b/src/Release/Setup Files/veracrypt-arm64.cat Binary files differindex 2e9ee4ad..e9c001f2 100644 --- a/src/Release/Setup Files/veracrypt-arm64.cat +++ b/src/Release/Setup Files/veracrypt-arm64.cat diff --git a/src/Release/Setup Files/veracrypt-arm64.sys b/src/Release/Setup Files/veracrypt-arm64.sys Binary files differindex ff02e44d..524f8b26 100644 --- a/src/Release/Setup Files/veracrypt-arm64.sys +++ b/src/Release/Setup Files/veracrypt-arm64.sys diff --git a/src/Release/Setup Files/veracrypt-x64.cat b/src/Release/Setup Files/veracrypt-x64.cat Binary files differindex 6a1edaf5..ba3958c0 100644 --- a/src/Release/Setup Files/veracrypt-x64.cat +++ b/src/Release/Setup Files/veracrypt-x64.cat diff --git a/src/Release/Setup Files/veracrypt-x64.sys b/src/Release/Setup Files/veracrypt-x64.sys Binary files differindex 0417e885..f65fb677 100644 --- a/src/Release/Setup Files/veracrypt-x64.sys +++ b/src/Release/Setup Files/veracrypt-x64.sys diff --git a/src/Release/Setup Files/veracrypt.Inf b/src/Release/Setup Files/veracrypt.Inf index c122e813..a6bb0d1a 100644 --- a/src/Release/Setup Files/veracrypt.Inf +++ b/src/Release/Setup Files/veracrypt.Inf @@ -1,20 +1,20 @@ ;;; ;;; VeraCrypt ;;; ;;; -;;; Copyright (c) 2023, IDRIX +;;; Copyright (c) 2025, IDRIX ;;; [Version] signature = "$Windows NT$" Class = "Encryption" ;This is determined by the work this filter driver does ClassGuid = {a0a701c0-a511-42ff-aa6c-06dc0395576f} ;This value is determined by the Class Provider = %ProviderString% -DriverVer = 09/29/2023,1.26.7.0 +DriverVer = 02/03/2025,1.26.20.0 CatalogFile = veracrypt.cat - +PnpLockdown = 1 [DestinationDirs] DefaultDestDir = 12 veracrypt.DriverFiles = 12 ;%windir%\system32\drivers diff --git a/src/Release/Setup Files/veracrypt.cat b/src/Release/Setup Files/veracrypt.cat Binary files differdeleted file mode 100644 index f8101907..00000000 --- a/src/Release/Setup Files/veracrypt.cat +++ /dev/null diff --git a/src/Release/Setup Files/veracrypt.sys b/src/Release/Setup Files/veracrypt.sys Binary files differdeleted file mode 100644 index ef946cc8..00000000 --- a/src/Release/Setup Files/veracrypt.sys +++ /dev/null diff --git a/src/Setup/ComSetup.cpp b/src/Setup/ComSetup.cpp index 96734303..8c0e93af 100644 --- a/src/Setup/ComSetup.cpp +++ b/src/Setup/ComSetup.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -21,12 +21,17 @@ #include <statreg.h> #include <windows.h> #include "ComSetup.h" #include "Dlgcode.h" #include "Resource.h" -#include "../Mount/MainCom_i.c" -#include "../Format/FormatCom_i.c" + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} + +// Define GUIDs of "VeraCrypt.exe and" "VeraCrypt Format.exe" type libraries +MIDL_DEFINE_GUID(GUID, LIBID_TrueCryptMainCom, 0x9ACF6176, 0x5FC4, 0x4690, 0xA0, 0x25, 0xB3, 0x30, 0x6A, 0x50, 0xEB, 0x6A); +MIDL_DEFINE_GUID(GUID, LIBID_TrueCryptFormatCom, 0x56327DDA, 0xF1A7, 0x4e13, 0xB1, 0x28, 0x52, 0x0D, 0x12, 0x9B, 0xDE, 0xF6); extern "C" BOOL RegisterComServers (wchar_t *modulePath) { BOOL ret = TRUE; diff --git a/src/Setup/ComSetup.h b/src/Setup/ComSetup.h index 85d0f249..f8253dca 100644 --- a/src/Setup/ComSetup.h +++ b/src/Setup/ComSetup.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Setup/Dir.c b/src/Setup/Dir.c index 3275567f..01c9c36e 100644 --- a/src/Setup/Dir.c +++ b/src/Setup/Dir.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -63,60 +63,60 @@ mkfulldir (wchar_t *oriPath, BOOL bCheckonly) return 0; } int -mkfulldir_internal (wchar_t *path) +mkfulldir_internal(wchar_t* path) { - wchar_t *token; - struct _stat st; - static wchar_t tokpath[_MAX_PATH]; - static wchar_t trail[_MAX_PATH]; - - if (wcslen(path) >= _MAX_PATH) - { - // directory name will be truncated so return failure to avoid unexepected behavior - return -1; - } - - StringCbCopyW (tokpath, _MAX_PATH, path); - trail[0] = L'\0'; - - token = wcstok (tokpath, L"\\/"); - - if (tokpath[0] == L'\\' && tokpath[1] == L'\\') - { /* unc */ - trail[0] = tokpath[0]; - trail[1] = tokpath[1]; - trail[2] = L'\0'; - if (token) - { - StringCbCatW (trail, _MAX_PATH, token); - StringCbCatW (trail, _MAX_PATH, L"\\"); - token = wcstok (NULL, L"\\/"); - if (token) - { /* get share name */ - StringCbCatW (trail, _MAX_PATH, token); - StringCbCatW (trail, _MAX_PATH, L"\\"); - } - token = wcstok (NULL, L"\\/"); - } - } - - if (tokpath[1] == L':') - { /* drive letter */ - StringCbCatW (trail, _MAX_PATH, tokpath); - StringCbCatW (trail, _MAX_PATH, L"\\"); - token = wcstok (NULL, L"\\/"); - } - - while (token != NULL) - { - int x; - StringCbCatW (trail, _MAX_PATH, token); - x = _wmkdir (trail); - StringCbCatW (trail, _MAX_PATH, L"\\"); - token = wcstok (NULL, L"\\/"); - } - - return _wstat (path, &st); -} + wchar_t* token; + wchar_t* next_token = NULL; + struct _stat st; + static wchar_t tokpath[_MAX_PATH]; + static wchar_t trail[_MAX_PATH]; + + if (wcslen(path) >= _MAX_PATH) + { + // directory name will be truncated so return failure to avoid unexpected behavior + return -1; + } + + StringCbCopyW(tokpath, _MAX_PATH, path); + trail[0] = L'\0'; + + token = wcstok_s(tokpath, L"\\/", &next_token); + if (tokpath[0] == L'\\' && tokpath[1] == L'\\') + { /* unc */ + trail[0] = tokpath[0]; + trail[1] = tokpath[1]; + trail[2] = L'\0'; + if (token) + { + StringCbCatW(trail, _MAX_PATH, token); + StringCbCatW(trail, _MAX_PATH, L"\\"); + token = wcstok_s(NULL, L"\\/", &next_token); + if (token) + { /* get share name */ + StringCbCatW(trail, _MAX_PATH, token); + StringCbCatW(trail, _MAX_PATH, L"\\"); + } + token = wcstok_s(NULL, L"\\/", &next_token); + } + } + + if (tokpath[1] == L':') + { /* drive letter */ + StringCbCatW(trail, _MAX_PATH, tokpath); + StringCbCatW(trail, _MAX_PATH, L"\\"); + token = wcstok_s(NULL, L"\\/", &next_token); + } + + while (token != NULL) + { + int x; + StringCbCatW(trail, _MAX_PATH, token); + x = _wmkdir(trail); + StringCbCatW(trail, _MAX_PATH, L"\\"); + token = wcstok_s(NULL, L"\\/", &next_token); + } + + return _wstat(path, &st); +}
\ No newline at end of file diff --git a/src/Setup/Dir.h b/src/Setup/Dir.h index fb9dfc6b..68bb44f0 100644 --- a/src/Setup/Dir.h +++ b/src/Setup/Dir.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus diff --git a/src/Setup/FreeBSD/veracrypt_install_template.sh b/src/Setup/FreeBSD/veracrypt_install_template.sh index 2d5dbcf9..1ebc7672 100644 --- a/src/Setup/FreeBSD/veracrypt_install_template.sh +++ b/src/Setup/FreeBSD/veracrypt_install_template.sh @@ -91,11 +91,11 @@ show_message() then gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo $*; read A\"" else if [ $KTERM -eq 1 ] then - konsole --title 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo $*; read A" + konsole --qwindowtitle 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo $*; read A" fi fi fi fi fi @@ -1072,11 +1072,11 @@ then then exec gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A\"" else if [ $KTERM -eq 1 ] then - exec konsole --title 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A" + exec konsole --qwindowtitle 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A" fi fi fi else echo 'Installing package...' diff --git a/src/Setup/Linux/veracrypt_install_template.sh b/src/Setup/Linux/veracrypt_install_template.sh index bc84a896..e4615966 100644 --- a/src/Setup/Linux/veracrypt_install_template.sh +++ b/src/Setup/Linux/veracrypt_install_template.sh @@ -95,11 +95,11 @@ show_message() then gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo $*; read A\"" else if [ $KTERM -eq 1 ] then - konsole --title 'VeraCrypt Setup' -e sh -c "echo $*; read A" + konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo $*; read A" fi fi fi fi fi @@ -1076,11 +1076,11 @@ then then exec gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A\"" else if [ $KTERM -eq 1 ] then - exec konsole --title 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A" + exec konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A" fi fi fi else echo 'Installing package...' diff --git a/src/Setup/MacOSX/VeraCrypt.entitlements.plist b/src/Setup/MacOSX/VeraCrypt.entitlements.plist new file mode 100644 index 00000000..123d12a5 --- /dev/null +++ b/src/Setup/MacOSX/VeraCrypt.entitlements.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>com.apple.security.cs.disable-library-validation</key> + <true/> +</dict> +</plist> diff --git a/src/Setup/MacOSX/notarize.sh b/src/Setup/MacOSX/notarize.sh new file mode 100755 index 00000000..c3e2ff05 --- /dev/null +++ b/src/Setup/MacOSX/notarize.sh @@ -0,0 +1,140 @@ +#!/bin/bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Directory where the script is located +BUNDLE_PATH="${SCRIPT_DIR}/../../Main/VeraCrypt.app" # Path to the VeraCrypt.app bundle +APPLE_ID="appleid" # Apple ID +APP_SPECIFIC_PASSWORD="password" # app-specific password +TEAM_ID="teamid" # team ID +SIGNING_ID="signingid" # Signing ID + +# Check if VeraCrypt.app bundle exists +if [ ! -d "$BUNDLE_PATH" ]; then + echo "VeraCrypt.app bundle not found: $BUNDLE_PATH" + exit 1 +fi + +# Retrieve the version of VeraCrypt from Info.plist +VC_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${BUNDLE_PATH}/Contents/Info.plist") + +echo "Notarizing VeraCrypt ${VC_VERSION}..." + +# Change to the script directory +cd "${SCRIPT_DIR}" + +xattr -rc "$BUNDLE_PATH" +codesign --timestamp --option runtime --deep --force --entitlements "${SCRIPT_DIR}/VeraCrypt.entitlements.plist" --sign "${SIGNING_ID}" "$BUNDLE_PATH" + +# Check dependencies of the VeraCrypt binary +VC_BINARY="$BUNDLE_PATH/Contents/MacOS/VeraCrypt" +DEPENDENCY_OUTPUT=$(otool -L "$VC_BINARY" | grep libfuse-t.dylib) + +# Determine the correct .pkgproj file based on the dependency +PKGPROJ_FILE="${SCRIPT_DIR}/veracrypt.pkgproj" +DMG_LABEL="VeraCrypt_${VC_VERSION}.dmg" +if [[ "$DEPENDENCY_OUTPUT" != "" ]]; then + echo "VeraCrypt is linked against FUSE-T." + PKGPROJ_FILE="${SCRIPT_DIR}/veracrypt_fuse-t.pkgproj" + DMG_LABEL="VeraCrypt_FUSE-T_${VC_VERSION}.dmg" +else + echo "VeraCrypt is linked against standard MacFUSE." +fi + +/usr/local/bin/packagesbuild "$PKGPROJ_FILE" + +PKG_PATH="${SCRIPT_DIR}/VeraCrypt_${VC_VERSION}.pkg" # Constructed path to the VeraCrypt pkg +productsign --sign "Developer ID Installer: IDRIX (Z933746L2S)" --timestamp "${SCRIPT_DIR}/VeraCrypt ${VC_VERSION}.pkg" "$PKG_PATH" + +if [ ! -f "$PKG_PATH" ]; then + echo "pkg file not found: $PKG_PATH" + exit 1 +fi + +# Step 1: Upload PKG to Apple for notarization +echo "Uploading PKG to Apple for notarization..." +xcrun notarytool submit "$PKG_PATH" --apple-id "$APPLE_ID" --password "$APP_SPECIFIC_PASSWORD" --team-id "$TEAM_ID" --wait --output-format json > notarization_result.json + +# Check if the notarization submission was successful +if [ $? -ne 0 ]; then + echo "Failed to submit PKG for notarization." + cat notarization_result.json + exit 1 +fi + +# Extract the notarization UUID from the result +REQUEST_UUID=$(grep -o '"id":"[^"]*' notarization_result.json | sed 's/"id":"//') +echo "Notarization Request UUID: $REQUEST_UUID" + +# Step 2: Check the notarization status +echo "Checking notarization status..." +STATUS=$(grep -o '"status":"[^"]*' notarization_result.json | sed 's/"status":"//' | sed 's/"}//') +echo "Initial status: $STATUS" + +while [ "$STATUS" == "in progress" ]; do + sleep 30 + xcrun notarytool info "$REQUEST_UUID" --apple-id "$APPLE_ID" --password "$APP_SPECIFIC_PASSWORD" --team-id "$TEAM_ID" --output-format json > notarization_status.json + + if [ ! -f notarization_status.json ]; then + echo "Failed to retrieve notarization status." + exit 1 + fi + + STATUS=$(grep -o '"status":"[^"]*' notarization_status.json | sed 's/"status":"//' | sed 's/"}//') + echo "Current status: $STATUS" +done + +# Step 3: Staple the notarization ticket to the pkg or retrieve the log +if [ "$STATUS" == "Accepted" ]; then + echo "Stapling the notarization ticket to the pkg..." + # Staple the notarization ticket to the installer package + xcrun stapler staple "$PKG_PATH" + echo "Notarization and stapling completed successfully." + + # Clean up any existing temporary files and directories + rm -f template.dmg + rm -fr VeraCrypt_dmg + + # Create a directory to mount the template DMG + echo "Creating directory to mount the template DMG..." + mkdir -p VeraCrypt_dmg + + # Decompress the template DMG file + echo "Decompressing the template DMG file..." + bunzip2 -k -f template.dmg.bz2 + + # Attach the template DMG to the system, mount it at VeraCrypt_dmg directory + echo "Attaching the template DMG to the system..." + hdiutil attach template.dmg -noautoopen -quiet -mountpoint VeraCrypt_dmg + + # Copy the notarized installer package into the mounted DMG + echo "Copying the notarized installer package into the mounted DMG..." + cp "VeraCrypt_${VC_VERSION}.pkg" VeraCrypt_dmg/VeraCrypt_Installer.pkg + + # Detach the DMG, ensuring all changes are saved and it's unmounted + echo "Detaching the DMG..." + hdiutil detach VeraCrypt_dmg -quiet -force + + # Convert the DMG back to a compressed format (UDZO) and create the final DMG file + echo "Converting the DMG back to a compressed format..." + rm -f "${DMG_LABEL}" + hdiutil convert template.dmg -quiet -format UDZO -imagekey zlib-level=9 -o "${DMG_LABEL}" + + # Sign the final DMG file + echo "Signing the final DMG file..." + codesign -s "${SIGNING_ID}" --timestamp "${DMG_LABEL}" + + # Clean up temporary files and directories + rm -f template.dmg + rm -fr VeraCrypt_dmg +else + echo "Notarization failed. Retrieving log for more details..." + # Retrieve the notarization log for details on why it failed + xcrun notarytool log "$REQUEST_UUID" --apple-id "$APPLE_ID" --password "$APP_SPECIFIC_PASSWORD" --team-id "$TEAM_ID" --output-format json > notarization_log.json + cat notarization_log.json +fi + +# Clean up temporary files +rm -f notarization_result.json +rm -f notarization_status.json +rm -f notarization_log.json + +exit 0
\ No newline at end of file diff --git a/src/Setup/MacOSX/postinstall_fuse-t.sh b/src/Setup/MacOSX/postinstall_fuse-t.sh new file mode 100755 index 00000000..fb799b91 --- /dev/null +++ b/src/Setup/MacOSX/postinstall_fuse-t.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +chmod -R go-w /Applications/VeraCrypt.app + +exit 0 diff --git a/src/Setup/MacOSX/template.dmg.bz2 b/src/Setup/MacOSX/template.dmg.bz2 Binary files differindex fe945152..d22b1578 100644 --- a/src/Setup/MacOSX/template.dmg.bz2 +++ b/src/Setup/MacOSX/template.dmg.bz2 diff --git a/src/Setup/MacOSX/veracrypt.pkgproj b/src/Setup/MacOSX/veracrypt.pkgproj index f2ca6ac0..d300fb6f 100755 --- a/src/Setup/MacOSX/veracrypt.pkgproj +++ b/src/Setup/MacOSX/veracrypt.pkgproj @@ -555,11 +555,11 @@ <key>RELOCATABLE</key> <false/> <key>USE_HFS+_COMPRESSION</key> <false/> <key>VERSION</key> - <string>1.26.8</string> + <string>1.26.20</string> </dict> <key>TYPE</key> <integer>0</integer> <key>UUID</key> <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string> @@ -1023,11 +1023,11 @@ https://osxfuse.github.io/ <key>SEPARATOR</key> <true/> </dict> </array> <key>NAME</key> - <string>VeraCrypt 1.26.8</string> + <string>VeraCrypt 1.26.20</string> <key>PAYLOAD_ONLY</key> <false/> <key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key> <false/> </dict> diff --git a/src/Setup/MacOSX/veracrypt_Legacy.pkgproj b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj index 5f9abec4..24d0db36 100755 --- a/src/Setup/MacOSX/veracrypt_Legacy.pkgproj +++ b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj @@ -555,11 +555,11 @@ <key>RELOCATABLE</key> <false/> <key>USE_HFS+_COMPRESSION</key> <false/> <key>VERSION</key> - <string>1.26.8</string> + <string>1.26.20</string> </dict> <key>TYPE</key> <integer>0</integer> <key>UUID</key> <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string> @@ -1060,11 +1060,11 @@ https://osxfuse.github.io/ <key>SEPARATOR</key> <true/> </dict> </array> <key>NAME</key> - <string>VeraCrypt Legacy 1.26.8</string> + <string>VeraCrypt Legacy 10</string> <key>PAYLOAD_ONLY</key> <false/> <key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key> <false/> </dict> diff --git a/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj b/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj new file mode 100755 index 00000000..e209843f --- /dev/null +++ b/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj @@ -0,0 +1,1044 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>PACKAGES</key> + <array> + <dict> + <key>MUST-CLOSE-APPLICATION-ITEMS</key> + <array/> + <key>MUST-CLOSE-APPLICATIONS</key> + <false/> + <key>PACKAGE_FILES</key> + <dict> + <key>DEFAULT_INSTALL_LOCATION</key> + <string>/</string> + <key>HIERARCHY</key> + <dict> + <key>CHILDREN</key> + <array> + <dict> + <key>CHILDREN</key> + <array> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>80</integer> + <key>PATH</key> + <string>Utilities</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>BUNDLE_CAN_DOWNGRADE</key> + <true/> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>80</integer> + <key>PATH</key> + <string>../../Main/VeraCrypt.app</string> + <key>PATH_TYPE</key> + <integer>1</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>3</integer> + <key>UID</key> + <integer>0</integer> + </dict> + </array> + <key>GID</key> + <integer>80</integer> + <key>PATH</key> + <string>Applications</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>509</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>80</integer> + <key>PATH</key> + <string>Application Support</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Documentation</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Filesystems</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Frameworks</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Input Methods</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Internet Plug-Ins</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>LaunchAgents</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>LaunchDaemons</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>PreferencePanes</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Preferences</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>80</integer> + <key>PATH</key> + <string>Printers</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>PrivilegedHelperTools</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>1005</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>QuickLook</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>QuickTime</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Screen Savers</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Scripts</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Services</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Widgets</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Automator</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Extensions</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + </array> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Library</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array> + <dict> + <key>CHILDREN</key> + <array> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Extensions</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + </array> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Library</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + </array> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>System</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Shared</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>1023</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + </array> + <key>GID</key> + <integer>80</integer> + <key>PATH</key> + <string>Users</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + </array> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>/</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <key>PAYLOAD_TYPE</key> + <integer>0</integer> + <key>PRESERVE_EXTENDED_ATTRIBUTES</key> + <false/> + <key>SHOW_INVISIBLE</key> + <false/> + <key>SPLIT_FORKS</key> + <true/> + <key>TREAT_MISSING_FILES_AS_WARNING</key> + <false/> + <key>VERSION</key> + <integer>5</integer> + </dict> + <key>PACKAGE_SCRIPTS</key> + <dict> + <key>POSTINSTALL_PATH</key> + <dict> + <key>PATH</key> + <string>postinstall_fuse-t.sh</string> + <key>PATH_TYPE</key> + <integer>1</integer> + </dict> + <key>PREINSTALL_PATH</key> + <dict> + <key>PATH_TYPE</key> + <integer>0</integer> + </dict> + <key>RESOURCES</key> + <array/> + </dict> + <key>PACKAGE_SETTINGS</key> + <dict> + <key>AUTHENTICATION</key> + <integer>1</integer> + <key>CONCLUSION_ACTION</key> + <integer>0</integer> + <key>FOLLOW_SYMBOLIC_LINKS</key> + <false/> + <key>IDENTIFIER</key> + <string>com.idrix.pkg.veracrypt</string> + <key>LOCATION</key> + <integer>0</integer> + <key>NAME</key> + <string>veracrypt</string> + <key>OVERWRITE_PERMISSIONS</key> + <false/> + <key>PAYLOAD_SIZE</key> + <integer>-1</integer> + <key>REFERENCE_PATH</key> + <string></string> + <key>RELOCATABLE</key> + <false/> + <key>USE_HFS+_COMPRESSION</key> + <false/> + <key>VERSION</key> + <string>1.26.20</string> + </dict> + <key>TYPE</key> + <integer>0</integer> + <key>UUID</key> + <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string> + </dict> + </array> + <key>PROJECT</key> + <dict> + <key>PROJECT_COMMENTS</key> + <dict> + <key>NOTES</key> + <data> + PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1M + IDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQv + c3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1l + cXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7 + IGNoYXJzZXQ9VVRGLTgiPgo8bWV0YSBodHRwLWVxdWl2PSJDb250 + ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp + dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u + dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD + b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjExMzguNTEiPgo8c3R5bGUg + dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5 + Pgo8L2JvZHk+CjwvaHRtbD4K + </data> + </dict> + <key>PROJECT_PRESENTATION</key> + <dict> + <key>BACKGROUND</key> + <dict> + <key>APPAREANCES</key> + <dict> + <key>DARK_AQUA</key> + <dict/> + <key>LIGHT_AQUA</key> + <dict/> + </dict> + <key>SHARED_SETTINGS_FOR_ALL_APPAREANCES</key> + <true/> + </dict> + <key>INSTALLATION TYPE</key> + <dict> + <key>HIERARCHIES</key> + <dict> + <key>INSTALLER</key> + <dict> + <key>LIST</key> + <array> + <dict> + <key>DESCRIPTION</key> + <array/> + <key>OPTIONS</key> + <dict> + <key>HIDDEN</key> + <false/> + <key>STATE</key> + <integer>1</integer> + </dict> + <key>PACKAGE_UUID</key> + <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string> + <key>TITLE</key> + <array/> + <key>TOOLTIP</key> + <array/> + <key>TYPE</key> + <integer>0</integer> + <key>UUID</key> + <string>4F1ACCF7-AA2A-4C80-A42F-274D410A13D1</string> + </dict> + </array> + <key>REMOVED</key> + <dict/> + </dict> + </dict> + <key>MODE</key> + <integer>0</integer> + </dict> + <key>INSTALLATION_STEPS</key> + <array> + <dict> + <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key> + <string>ICPresentationViewIntroductionController</string> + <key>INSTALLER_PLUGIN</key> + <string>Introduction</string> + <key>LIST_TITLE_KEY</key> + <string>InstallerSectionTitle</string> + </dict> + <dict> + <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key> + <string>ICPresentationViewReadMeController</string> + <key>INSTALLER_PLUGIN</key> + <string>ReadMe</string> + <key>LIST_TITLE_KEY</key> + <string>InstallerSectionTitle</string> + </dict> + <dict> + <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key> + <string>ICPresentationViewLicenseController</string> + <key>INSTALLER_PLUGIN</key> + <string>License</string> + <key>LIST_TITLE_KEY</key> + <string>InstallerSectionTitle</string> + </dict> + <dict> + <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key> + <string>ICPresentationViewDestinationSelectController</string> + <key>INSTALLER_PLUGIN</key> + <string>TargetSelect</string> + <key>LIST_TITLE_KEY</key> + <string>InstallerSectionTitle</string> + </dict> + <dict> + <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key> + <string>ICPresentationViewInstallationTypeController</string> + <key>INSTALLER_PLUGIN</key> + <string>PackageSelection</string> + <key>LIST_TITLE_KEY</key> + <string>InstallerSectionTitle</string> + </dict> + <dict> + <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key> + <string>ICPresentationViewInstallationController</string> + <key>INSTALLER_PLUGIN</key> + <string>Install</string> + <key>LIST_TITLE_KEY</key> + <string>InstallerSectionTitle</string> + </dict> + <dict> + <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key> + <string>ICPresentationViewSummaryController</string> + <key>INSTALLER_PLUGIN</key> + <string>Summary</string> + <key>LIST_TITLE_KEY</key> + <string>InstallerSectionTitle</string> + </dict> + </array> + <key>INTRODUCTION</key> + <dict> + <key>LOCALIZATIONS</key> + <array/> + </dict> + <key>LICENSE</key> + <dict> + <key>LOCALIZATIONS</key> + <array> + <dict> + <key>LANGUAGE</key> + <string>English</string> + <key>VALUE</key> + <dict> + <key>PATH</key> + <string>../../License.txt</string> + <key>PATH_TYPE</key> + <integer>1</integer> + </dict> + </dict> + </array> + <key>MODE</key> + <integer>0</integer> + </dict> + <key>README</key> + <dict> + <key>LOCALIZATIONS</key> + <array/> + </dict> + <key>SUMMARY</key> + <dict> + <key>LOCALIZATIONS</key> + <array/> + </dict> + <key>TITLE</key> + <dict> + <key>LOCALIZATIONS</key> + <array> + <dict> + <key>LANGUAGE</key> + <string>French</string> + <key>VALUE</key> + <string></string> + </dict> + </array> + </dict> + </dict> + <key>PROJECT_REQUIREMENTS</key> + <dict> + <key>LIST</key> + <array> + <dict> + <key>BEHAVIOR</key> + <integer>3</integer> + <key>DICTIONARY</key> + <dict> + <key>IC_REQUIREMENT_OS_DISK_TYPE</key> + <integer>1</integer> + <key>IC_REQUIREMENT_OS_DISTRIBUTION_TYPE</key> + <integer>0</integer> + <key>IC_REQUIREMENT_OS_MINIMUM_VERSION</key> + <integer>119900</integer> + </dict> + <key>IC_REQUIREMENT_CHECK_TYPE</key> + <integer>0</integer> + <key>IDENTIFIER</key> + <string>fr.whitebox.Packages.requirement.os</string> + <key>MESSAGE</key> + <array> + <dict> + <key>LANGUAGE</key> + <string>English</string> + <key>VALUE</key> + <string>VeraCrypt requires MacOSX 12 and above.</string> + </dict> + <dict> + <key>LANGUAGE</key> + <string>French</string> + <key>VALUE</key> + <string>VeraCrypt nécessite MacOSX 12 et supérieur.</string> + </dict> + </array> + <key>NAME</key> + <string>Operating System</string> + <key>STATE</key> + <true/> + </dict> + <dict> + <key>BEHAVIOR</key> + <integer>3</integer> + <key>DICTIONARY</key> + <dict> + <key>IC_REQUIREMENT_FILES_CONDITION</key> + <integer>0</integer> + <key>IC_REQUIREMENT_FILES_DISK_TYPE</key> + <integer>1</integer> + <key>IC_REQUIREMENT_FILES_LIST</key> + <array> + <string>/usr/local/lib/libfuse-t.dylib</string> + </array> + <key>IC_REQUIREMENT_FILES_SELECTOR</key> + <integer>0</integer> + </dict> + <key>IC_REQUIREMENT_CHECK_TYPE</key> + <integer>0</integer> + <key>IDENTIFIER</key> + <string>fr.whitebox.Packages.requirement.files</string> + <key>MESSAGE</key> + <array> + <dict> + <key>LANGUAGE</key> + <string>English</string> + <key>SECONDARY_VALUE</key> + <string></string> + <key>VALUE</key> + <string>FUSE-T seems to be missing on your machine. VeraCrypt requires FUSE-T 1.0 or above. +Please download the latest FUSE-T version from : +https://github.com/macos-fuse-t/fuse-t/releases</string> + </dict> + <dict> + <key>LANGUAGE</key> + <string>French</string> + <key>SECONDARY_VALUE</key> + <string></string> + <key>VALUE</key> + <string>FUSE-T semble ne pas être installé sur votre machine. VeraCrypt nécessite FUSE-T 1.0 ou supérieur. +Merci de télécharger la dernière version de FUSE-T à partir de : +https://github.com/macos-fuse-t/fuse-t/releases + +</string> + </dict> + </array> + <key>NAME</key> + <string>FUSE-T</string> + <key>STATE</key> + <true/> + </dict> + </array> + <key>RESOURCES</key> + <array/> + <key>ROOT_VOLUME_ONLY</key> + <false/> + </dict> + <key>PROJECT_SETTINGS</key> + <dict> + <key>ADVANCED_OPTIONS</key> + <dict> + <key>installer-script.options:hostArchitectures</key> + <array> + <string>x86_64,arm64</string> + </array> + </dict> + <key>BUILD_FORMAT</key> + <integer>0</integer> + <key>BUILD_PATH</key> + <dict> + <key>PATH</key> + <string>.</string> + <key>PATH_TYPE</key> + <integer>1</integer> + </dict> + <key>EXCLUDED_FILES</key> + <array> + <dict> + <key>PATTERNS_ARRAY</key> + <array> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>.DS_Store</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + </array> + <key>PROTECTED</key> + <true/> + <key>PROXY_NAME</key> + <string>Remove .DS_Store files</string> + <key>PROXY_TOOLTIP</key> + <string>Remove ".DS_Store" files created by the Finder.</string> + <key>STATE</key> + <true/> + </dict> + <dict> + <key>PATTERNS_ARRAY</key> + <array> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>.pbdevelopment</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + </array> + <key>PROTECTED</key> + <true/> + <key>PROXY_NAME</key> + <string>Remove .pbdevelopment files</string> + <key>PROXY_TOOLTIP</key> + <string>Remove ".pbdevelopment" files created by ProjectBuilder or Xcode.</string> + <key>STATE</key> + <true/> + </dict> + <dict> + <key>PATTERNS_ARRAY</key> + <array> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>CVS</string> + <key>TYPE</key> + <integer>1</integer> + </dict> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>.cvsignore</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>.cvspass</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>.svn</string> + <key>TYPE</key> + <integer>1</integer> + </dict> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>.git</string> + <key>TYPE</key> + <integer>1</integer> + </dict> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>.gitignore</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + </array> + <key>PROTECTED</key> + <true/> + <key>PROXY_NAME</key> + <string>Remove SCM metadata</string> + <key>PROXY_TOOLTIP</key> + <string>Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems.</string> + <key>STATE</key> + <true/> + </dict> + <dict> + <key>PATTERNS_ARRAY</key> + <array> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>classes.nib</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>designable.db</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>info.nib</string> + <key>TYPE</key> + <integer>0</integer> + </dict> + </array> + <key>PROTECTED</key> + <true/> + <key>PROXY_NAME</key> + <string>Optimize nib files</string> + <key>PROXY_TOOLTIP</key> + <string>Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles.</string> + <key>STATE</key> + <true/> + </dict> + <dict> + <key>PATTERNS_ARRAY</key> + <array> + <dict> + <key>REGULAR_EXPRESSION</key> + <false/> + <key>STRING</key> + <string>Resources Disabled</string> + <key>TYPE</key> + <integer>1</integer> + </dict> + </array> + <key>PROTECTED</key> + <true/> + <key>PROXY_NAME</key> + <string>Remove Resources Disabled folders</string> + <key>PROXY_TOOLTIP</key> + <string>Remove "Resources Disabled" folders.</string> + <key>STATE</key> + <true/> + </dict> + <dict> + <key>SEPARATOR</key> + <true/> + </dict> + </array> + <key>NAME</key> + <string>VeraCrypt 1.26.20</string> + <key>PAYLOAD_ONLY</key> + <false/> + <key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key> + <false/> + </dict> + </dict> + <key>SHARED_GLOBAL_DATA</key> + <dict> + <key>IC_REQUIREMENT_JAVASCRIPT_SHARED_SOURCE_CODE</key> + <string></string> + </dict> + <key>TYPE</key> + <integer>0</integer> + <key>VERSION</key> + <integer>2</integer> +</dict> +</plist> diff --git a/src/Setup/Portable.rc b/src/Setup/Portable.rc index eeefa3cd..03afff77 100644 --- a/src/Setup/Portable.rc +++ b/src/Setup/Portable.rc @@ -24,12 +24,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -42,15 +42,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Portable" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt Portable.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 @@ -100,10 +100,11 @@ IDR_LANG_HE LANGUAGES "..\\..\\Translations\\Language. IDR_LANG_HU LANGUAGES "..\\..\\Translations\\Language.hu.xml" IDR_LANG_ID LANGUAGES "..\\..\\Translations\\Language.id.xml" IDR_LANG_KA LANGUAGES "..\\..\\Translations\\Language.ka.xml" IDR_LANG_KO LANGUAGES "..\\..\\Translations\\Language.ko.xml" IDR_LANG_LV LANGUAGES "..\\..\\Translations\\Language.lv.xml" +IDR_LANG_NB LANGUAGES "..\\..\\Translations\\Language.nb.xml" IDR_LANG_NN LANGUAGES "..\\..\\Translations\\Language.nn.xml" IDR_LANG_PTBR LANGUAGES "..\\..\\Translations\\Language.pt-br.xml" IDR_LANG_SK LANGUAGES "..\\..\\Translations\\Language.sk.xml" IDR_LANG_SL LANGUAGES "..\\..\\Translations\\Language.sl.xml" IDR_LANG_SV LANGUAGES "..\\..\\Translations\\Language.sv.xml" diff --git a/src/Setup/Portable.vcxproj b/src/Setup/Portable.vcxproj index 1c758b2b..d60f68cc 100644 --- a/src/Setup/Portable.vcxproj +++ b/src/Setup/Portable.vcxproj @@ -20,31 +20,33 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}</ProjectGuid> <RootNamespace>Portable</RootNamespace> <Keyword>Win32Proj</Keyword> + <ProjectName>Portable</ProjectName> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> @@ -64,21 +66,21 @@ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PortableDebug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PortableDebug\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)PortableDebug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)PortableDebug\Int\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">PortableRelease\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">PortableRelease\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)PortableRelease\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)PortableRelease\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)PortableRelease\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)PortableRelease\Int\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)PortableRelease\Int\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)PortableRelease\Int\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest> @@ -103,20 +105,21 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>libcmtd.lib;atls.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile> <UACExecutionLevel>AsInvoker</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Portable.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> <TargetMachine>MachineX86</TargetMachine> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> @@ -138,17 +141,18 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>atls.lib;mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile> <UACExecutionLevel>AsInvoker</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -179,14 +183,14 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile> <UACExecutionLevel>AsInvoker</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -217,14 +221,14 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile> <UACExecutionLevel>AsInvoker</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -316,30 +320,9 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> </ResourceCompile> <ResourceCompile Include="Portable.rc" /> </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Common\Lzma.vcxproj"> - <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> - </ProjectReference> - <ProjectReference Include="..\ExpandVolume\ExpandVolume.vcxproj"> - <Project>{9715ff1d-599b-4bbc-ad96-bef6e08ff827}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Format\Format.vcxproj"> - <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Mount\Mount.vcxproj"> - <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/Setup/Resource.h b/src/Setup/Resource.h index b5b7d466..62246068 100644 --- a/src/Setup/Resource.h +++ b/src/Setup/Resource.h @@ -41,10 +41,11 @@ #define IDR_LANG_TH 55 #define IDR_LANG_TR 56 #define IDR_LANG_UK 57 #define IDR_LANG_UZ 58 #define IDR_LANG_ZHTW 59 +#define IDR_LANG_NB 60 #define IDD_INSTALL 101 #define IDD_INSTALL_OPTIONS_PAGE_DLG 102 #define IDD_UNINSTALL 103 #define IDI_SETUP 104 #define IDR_SETUP_RSRC_HEADER 105 diff --git a/src/Setup/SelfExtract.c b/src/Setup/SelfExtract.c index c672c364..6a2ce21c 100644 --- a/src/Setup/SelfExtract.c +++ b/src/Setup/SelfExtract.c @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Setup/SelfExtract.h b/src/Setup/SelfExtract.h index bcdb6fdb..25491661 100644 --- a/src/Setup/SelfExtract.h +++ b/src/Setup/SelfExtract.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c index fe25a412..4e1812f6 100644 --- a/src/Setup/Setup.c +++ b/src/Setup/Setup.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -763,10 +763,13 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) wchar_t szTmp[TC_MAX_PATH]; BOOL bOK = TRUE; int i, x, fileNo; wchar_t curFileName [TC_MAX_PATH] = {0}; +#ifndef PORTABLE + PRIVILEGE_STATE originalPrivileges = { 0 }; +#endif if (!bUninstall && !bDevm) { // Self-extract all files to memory @@ -781,13 +784,17 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) return FALSE; if (szDestDir[x - 1] != L'\\') StringCbCatW (szDestDir, MAX_PATH, L"\\"); +#ifndef PORTABLE + EnableRequiredSetupPrivileges(&originalPrivileges); +#endif + for (i = 0; i < sizeof (szFiles) / sizeof (szFiles[0]); i++) { - BOOL bResult, driver64 = FALSE, zipFile = FALSE; + BOOL bResult, zipFile = FALSE; wchar_t szDir[TC_MAX_PATH]; if (wcsstr (szFiles[i], L"VeraCrypt Setup") != 0) { if (bUninstall) @@ -799,24 +806,24 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) if ((*szFiles[i] == L'A') || (*szFiles[i] == L'X')) StringCbCopyW (szDir, sizeof(szDir), szDestDir); else if (*szFiles[i] == L'D') { - if (Is64BitOs ()) - driver64 = TRUE; - if (!GetSystemDirectory (szDir, ARRAYSIZE (szDir))) StringCbCopyW(szDir, sizeof(szDir), L"C:\\Windows\\System32"); x = wcslen (szDir); if (szDir[x - 1] != L'\\') StringCbCatW (szDir, sizeof(szDir), L"\\"); StringCbCatW (szDir, sizeof(szDir), L"Drivers\\"); } else if (*szFiles[i] == L'W') - GetWindowsDirectory (szDir, ARRAYSIZE (szDir)); + { + if (!GetWindowsDirectory(szDir, ARRAYSIZE(szDir))) + StringCbCopyW(szDir, sizeof(szDir), L"C:\\Windows"); + } if (*szFiles[i] == L'I') continue; if (*szFiles[i] == L'X') @@ -852,48 +859,43 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) else { StringCchCopyNW (curFileName, ARRAYSIZE(curFileName), szFiles[i] + 1, wcslen (szFiles[i]) - 1); curFileName [wcslen (szFiles[i]) - 1] = 0; - if (Is64BitOs () - && ((wcscmp (szFiles[i], L"Dveracrypt.sys") == 0) || (wcscmp (szFiles[i], L"Averacrypt.sys") == 0))) + if ((wcscmp (szFiles[i], L"Dveracrypt.sys") == 0) || (wcscmp (szFiles[i], L"Averacrypt.sys") == 0)) { if (IsARM()) StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-arm64.sys", sizeof(L"veracrypt-arm64.sys")); else - StringCbCopyNW (curFileName, sizeof(curFileName), FILENAME_64BIT_DRIVER, sizeof (FILENAME_64BIT_DRIVER)); + StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-x64.sys", sizeof(L"veracrypt-x64.sys")); } - if (Is64BitOs () - && wcscmp (szFiles[i], L"Averacrypt.cat") == 0) + if (wcscmp (szFiles[i], L"Averacrypt.cat") == 0) { if (IsARM()) StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-arm64.cat", sizeof(L"veracrypt-arm64.cat")); else StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-x64.cat", sizeof (L"veracrypt-x64.cat")); } - if (Is64BitOs () - && wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0) + if (wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0) { if (IsARM()) StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt-arm64.exe", sizeof(L"VeraCrypt-arm64.exe")); else StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt-x64.exe", sizeof (L"VeraCrypt-x64.exe")); } - if (Is64BitOs () - && wcscmp (szFiles[i], L"AVeraCryptExpander.exe") == 0) + if (wcscmp (szFiles[i], L"AVeraCryptExpander.exe") == 0) { if (IsARM()) StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCryptExpander-arm64.exe", sizeof(L"VeraCryptExpander-arm64.exe")); else StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCryptExpander-x64.exe", sizeof (L"VeraCryptExpander-x64.exe")); } - if (Is64BitOs () - && wcscmp (szFiles[i], L"AVeraCrypt Format.exe") == 0) + if (wcscmp (szFiles[i], L"AVeraCrypt Format.exe") == 0) { if (IsARM()) StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt Format-arm64.exe", sizeof(L"VeraCrypt Format-arm64.exe")); else StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt Format-x64.exe", sizeof (L"VeraCrypt Format-x64.exe")); @@ -912,11 +914,11 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) curFileName, Decompressed_Files[fileNo].fileName, min (wcslen (curFileName), (size_t) Decompressed_Files[fileNo].fileNameLength)) == 0) { // Dump filter driver cannot be installed to SysWOW64 directory - if (driver64 && !EnableWow64FsRedirection (FALSE)) + if (!EnableWow64FsRedirection (FALSE)) { handleWin32Error (hwndDlg, SRC_POS); bResult = FALSE; goto err; } @@ -937,50 +939,44 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) Decompressed_Files[fileNo].fileLength, FALSE, TRUE); } - if (driver64) - { - if (!EnableWow64FsRedirection (TRUE)) - { - handleWin32Error (hwndDlg, SRC_POS); - bResult = FALSE; - goto err; - } - - if (!bResult) - goto err; + if (!EnableWow64FsRedirection (TRUE)) + { + handleWin32Error (hwndDlg, SRC_POS); + bResult = FALSE; + goto err; } + if (!bResult) + goto err; + break; } } } else { - if (driver64) - EnableWow64FsRedirection (FALSE); + EnableWow64FsRedirection (FALSE); bResult = TCCopyFile (curFileName, szTmp); - if (driver64) - EnableWow64FsRedirection (TRUE); + EnableWow64FsRedirection (TRUE); } if (bResult && wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0) { - if (Is64BitOs ()) - EnableWow64FsRedirection (FALSE); + EnableWow64FsRedirection (FALSE); wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false); wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true); wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false); wstring favoritesLegacyFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, true); - if (bResult && Is64BitOs () + if (bResult && FileExists (favoritesLegacyFile.c_str()) && !FileExists (favoritesFile.c_str())) { // copy the favorites XML file to the native system directory bResult = CopyFile (favoritesLegacyFile.c_str(), favoritesFile.c_str(), FALSE); @@ -1025,45 +1021,39 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) } } catch (...) {} } - if (Is64BitOs ()) + // delete files from legacy path + if (FileExists (favoritesLegacyFile.c_str())) { - // delete files from legacy path - if (FileExists (favoritesLegacyFile.c_str())) - { - RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str()); - ForceDeleteFile (favoritesLegacyFile.c_str()); - } - - if (FileExists (serviceLegacyPath.c_str())) - { - RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str()); - ForceDeleteFile (serviceLegacyPath.c_str()); - } + RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str()); + ForceDeleteFile (favoritesLegacyFile.c_str()); + } - EnableWow64FsRedirection (TRUE); + if (FileExists (serviceLegacyPath.c_str())) + { + RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str()); + ForceDeleteFile (serviceLegacyPath.c_str()); } + + EnableWow64FsRedirection (TRUE); } } } else { - if (driver64) - EnableWow64FsRedirection (FALSE); + EnableWow64FsRedirection (FALSE); if (zipFile) bResult = StatRemoveDirectory (szTmp); else bResult = StatDeleteFile (szTmp, TRUE); - if (driver64) - EnableWow64FsRedirection (TRUE); + EnableWow64FsRedirection (TRUE); if (bResult && wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0) { - if (Is64BitOs ()) - EnableWow64FsRedirection (FALSE); + EnableWow64FsRedirection (FALSE); wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false); wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true); wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false); wstring favoritesLegacyFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, true); @@ -1079,26 +1069,23 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) { RemoveMessage (hwndDlg, (wchar_t *) servicePath.c_str()); ForceDeleteFile (servicePath.c_str()); } - if (Is64BitOs ()) + if (FileExists (favoritesLegacyFile.c_str())) { - if (FileExists (favoritesLegacyFile.c_str())) - { - RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str()); - ForceDeleteFile (favoritesLegacyFile.c_str()); - } - - if (FileExists (serviceLegacyPath.c_str())) - { - RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str()); - ForceDeleteFile (serviceLegacyPath.c_str()); - } + RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str()); + ForceDeleteFile (favoritesLegacyFile.c_str()); + } - EnableWow64FsRedirection (TRUE); + if (FileExists (serviceLegacyPath.c_str())) + { + RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str()); + ForceDeleteFile (serviceLegacyPath.c_str()); } + + EnableWow64FsRedirection (TRUE); } } err: if (bResult == FALSE) @@ -1132,14 +1119,23 @@ err: else StringCbPrintfW (szTmp2, sizeof(szTmp2), GetString ("UNINSTALL_OF_FAILED"), szTmp, pszDesc); if (lpMsgBuf) LocalFree (lpMsgBuf); - if (!Silent && MessageBoxW (hwndDlg, szTmp2, lpszTitle, MB_YESNO | MB_ICONHAND) != IDYES) + if (!Silent && MessageBoxW(hwndDlg, szTmp2, lpszTitle, MB_YESNO | MB_ICONHAND) != IDYES) + { +#ifndef PORTABLE + RestorePrivilegeState(&originalPrivileges); +#endif return FALSE; + } } } + +#ifndef PORTABLE + RestorePrivilegeState(&originalPrivileges); +#endif if (bUninstall == FALSE) { WIN32_FIND_DATA f; HANDLE h; @@ -1644,11 +1640,10 @@ BOOL DoDriverUnload (HWND hwndDlg) } } if (hDriver != INVALID_HANDLE_VALUE) { - MOUNT_LIST_STRUCT driver; LONG driverVersion = VERSION_NUM; int refCount; DWORD dwResult; BOOL bResult; @@ -1723,11 +1718,11 @@ BOOL DoDriverUnload (HWND hwndDlg) if (bResult) { if (volumesMounted != 0) { bOK = FALSE; - MessageBoxW (hwndDlg, GetString ("DISMOUNT_ALL_FIRST"), lpszTitle, MB_ICONHAND); + MessageBoxW (hwndDlg, GetString ("UNMOUNT_ALL_FIRST"), lpszTitle, MB_ICONHAND); } } else { bOK = FALSE; @@ -1893,19 +1888,19 @@ error: OleUninitialize (); return bOK; } -BOOL DoShortcutsInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bProgGroup, BOOL bDesktopIcon) +BOOL DoShortcutsInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bProgGroup, BOOL bUseDesktopIcon) { wchar_t szLinkDir[TC_MAX_PATH], szDir[TC_MAX_PATH]; wchar_t szTmp[TC_MAX_PATH], szTmp2[TC_MAX_PATH]; BOOL bSlash, bOK = FALSE; HRESULT hOle; int x; - if (bProgGroup == FALSE && bDesktopIcon == FALSE) + if (bProgGroup == FALSE && bUseDesktopIcon == FALSE) return TRUE; hOle = OleInitialize (NULL); GetProgramPath (hwndDlg, szLinkDir); @@ -1980,11 +1975,11 @@ BOOL DoShortcutsInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bProgGroup, BOOL StringCbPrintfW (szTmp2, sizeof(szTmp2), L"%s%s", szLinkDir, L"\\VeraCrypt User's Guide.lnk"); StatDeleteFile (szTmp2, FALSE); } - if (bDesktopIcon) + if (bUseDesktopIcon) { StringCbCopyW (szDir, sizeof(szDir), szDestDir); x = wcslen (szDestDir); if (szDestDir[x - 1] == L'\\') bSlash = TRUE; @@ -2014,10 +2009,41 @@ error: OleUninitialize (); return bOK; } +void RemoveLegacyFiles (wchar_t *szDestDir) +{ + const wchar_t* oldFileNames[] = { + L"docs\\html\\en\\BCH_Logo_48x30.png", + L"docs\\html\\en\\LinuxPrepAndBuild.sh", + L"docs\\html\\en\\LinuxPrepAndBuild.zip", + L"docs\\html\\en\\RIPEMD-160.html", + L"docs\\html\\en\\ru\\BCH_Logo_48x30.png", + L"Languages\\Language.ru - Copy.xml", + }; + wchar_t szDir[TC_MAX_PATH]; + wchar_t oldPath[TC_MAX_PATH]; + BOOL bSlash; + size_t x, i; + + StringCbCopyW (szDir, sizeof(szDir), szDestDir); + x = wcslen (szDestDir); + if (szDestDir[x - 1] == L'\\') + bSlash = TRUE; + else + bSlash = FALSE; + + if (bSlash == FALSE) + StringCbCatW (szDir, sizeof(szDir), L"\\"); + + for (i = 0; i < ARRAYSIZE(oldFileNames); i++) + { + StringCbPrintfW (oldPath, sizeof(oldPath), L"%s%s", szDestDir, oldFileNames[i]); + StatDeleteFile (oldPath, FALSE); + } +} void OutcomePrompt (HWND hwndDlg, BOOL bOK) { if (bOK) { @@ -2197,11 +2223,10 @@ void DoUninstall (void *arg) void DoInstall (void *arg) { HWND hwndDlg = (HWND) arg; BOOL bOK = TRUE; wchar_t path[MAX_PATH]; - BootEncryption bootEnc (hwndDlg); // Refresh the main GUI (wizard thread) InvalidateRect (MainDlg, NULL, TRUE); @@ -2341,10 +2366,16 @@ void DoInstall (void *arg) { WriteMemoryProtectionConfig(bDisableMemoryProtection? FALSE : TRUE); bRestartRequired = TRUE; // Restart is required to apply the new memory protection settings } + if (bOK && bUpgrade) + { + // delete legacy files + RemoveLegacyFiles (InstallationPath); + } + if (bOK) { UpdateProgressBarProc(100); UninstallBatch[0] = 0; StatusMessage (hwndDlg, "INSTALL_COMPLETED"); @@ -2576,10 +2607,11 @@ static tLanguageEntry g_languagesEntries[] = { {L"Italiano", IDR_LANG_IT, LANG_ITALIAN, "it", NULL}, {L"日本語", IDR_LANG_JA, LANG_JAPANESE, "ja", NULL}, {L"ქáƒáƒ თული", IDR_LANG_KA, LANG_GEORGIAN, "ka", NULL}, {L"í•œêµì–´", IDR_LANG_KO, LANG_KOREAN, "ko", NULL}, {L"LatvieÅ¡u", IDR_LANG_LV, LANG_LATVIAN, "lv", NULL}, + {L"Norsk BokmÃ¥l", IDR_LANG_NB, LANG_NORWEGIAN, "nb", NULL}, {L"Nederlands", IDR_LANG_NL, LANG_DUTCH, "nl", NULL}, {L"Norsk Nynorsk", IDR_LANG_NN, LANG_NORWEGIAN, "nn", NULL}, {L"Polski", IDR_LANG_PL, LANG_POLISH, "pl", NULL}, {L"Română", IDR_LANG_RO, LANG_ROMANIAN, "ro", NULL}, {L"РуÑÑкий", IDR_LANG_RU, LANG_RUSSIAN, "ru", NULL}, @@ -2591,11 +2623,11 @@ static tLanguageEntry g_languagesEntries[] = { {L"Türkçe", IDR_LANG_TR, LANG_TURKISH, "tr", NULL}, {L"УкраїнÑька", IDR_LANG_UK, LANG_UKRAINIAN, "uk", NULL}, {L"Ўзбекча", IDR_LANG_UZ, LANG_UZBEK, "uz", NULL}, {L"Tiếng Việt", IDR_LANG_VI, LANG_VIETNAMESE, "vi", NULL}, {L"简体ä¸æ–‡", IDR_LANG_ZHCN, LANG_CHINESE, "zh-cn", L"zh-CN"}, - {L"ç¹é«”ä¸æ–‡", IDR_LANG_ZHHK, LANG_CHINESE, "zh-hk", L"zh-HK"}, + {L"ç¹é«”ä¸æ–‡(香港)", IDR_LANG_ZHHK, LANG_CHINESE, "zh-hk", L"zh-HK"}, {L"ç¹é«”ä¸æ–‡", IDR_LANG_ZHTW, LANG_CHINESE, "zh-tw", L"zh-TW"}, }; typedef int (WINAPI *LCIDToLocaleNameFn)( LCID Locale, diff --git a/src/Setup/Setup.h b/src/Setup/Setup.h index 70a04555..e2f455ae 100644 --- a/src/Setup/Setup.h +++ b/src/Setup/Setup.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef SETUP_H @@ -40,22 +40,17 @@ static wchar_t *szFiles[]= static wchar_t *szCompressedFiles[]= { L"License.txt", L"LICENSE", L"NOTICE", - L"VeraCrypt.exe", - L"VeraCryptExpander.exe", - L"VeraCrypt Format.exe", L"VeraCrypt-x64.exe", L"VeraCryptExpander-x64.exe", L"VeraCrypt Format-x64.exe", L"VeraCrypt-arm64.exe", L"VeraCryptExpander-arm64.exe", L"VeraCrypt Format-arm64.exe", L"veracrypt.inf", - L"veracrypt.cat", - L"veracrypt.sys", L"veracrypt-x64.cat", L"veracrypt-x64.sys", L"veracrypt-arm64.cat", L"veracrypt-arm64.sys", L"Languages.zip", @@ -72,11 +67,10 @@ static wchar_t *szLegacyFiles[]= L"VeraCryptExpander-x64.exe", L"VeraCrypt Format-x64.exe", L"veracrypt-x64.sys", }; -#define FILENAME_64BIT_DRIVER L"veracrypt-x64.sys" #define NBR_COMPRESSED_FILES (sizeof(szCompressedFiles) / sizeof(szCompressedFiles[0])) void localcleanup (void); BOOL StatDeleteFile ( wchar_t *lpszFile, BOOL bCheckForOldFile ); BOOL StatRemoveDirectory ( wchar_t *lpszDir ); diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc index 286fcdc6..56aa751d 100644 --- a/src/Setup/Setup.rc +++ b/src/Setup/Setup.rc @@ -26,12 +26,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -44,15 +44,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Setup" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt Setup.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 @@ -107,10 +107,11 @@ IDR_LANG_HE LANGUAGES "..\\..\\Translations\\Language. IDR_LANG_HU LANGUAGES "..\\..\\Translations\\Language.hu.xml" IDR_LANG_ID LANGUAGES "..\\..\\Translations\\Language.id.xml" IDR_LANG_KA LANGUAGES "..\\..\\Translations\\Language.ka.xml" IDR_LANG_KO LANGUAGES "..\\..\\Translations\\Language.ko.xml" IDR_LANG_LV LANGUAGES "..\\..\\Translations\\Language.lv.xml" +IDR_LANG_NB LANGUAGES "..\\..\\Translations\\Language.nb.xml" IDR_LANG_NN LANGUAGES "..\\..\\Translations\\Language.nn.xml" IDR_LANG_PTBR LANGUAGES "..\\..\\Translations\\Language.pt-br.xml" IDR_LANG_SK LANGUAGES "..\\..\\Translations\\Language.sk.xml" IDR_LANG_SL LANGUAGES "..\\..\\Translations\\Language.sl.xml" IDR_LANG_SV LANGUAGES "..\\..\\Translations\\Language.sv.xml" diff --git a/src/Setup/Setup.vcproj b/src/Setup/Setup.vcproj deleted file mode 100644 index a1a6a81f..00000000 --- a/src/Setup/Setup.vcproj +++ /dev/null @@ -1,484 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="Setup" - ProjectGUID="{DF5F654D-BD44-4E31-B92E-B68074DC37A8}" - RootNamespace="Setup" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="SETUP;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - WarningLevel="4" - DebugInformationFormat="4" - DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/NODEFAULTLIB:LIBCMTD" - AdditionalDependencies="libcmtd.lib atlsd.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptSetup.exe" - LinkIncremental="2" - GenerateManifest="false" - UACExecutionLevel="2" - DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Setup.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Setup.manifest" - EmbedManifest="true" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL:
" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="SETUP;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - DebugInformationFormat="0" - DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/IGNORE:4089" - AdditionalDependencies="mpr.lib" - OutputFile="$(OutDir)/VeraCryptSetup.exe" - LinkIncremental="1" - GenerateManifest="false" - UACExecutionLevel="2" - DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Setup.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe"" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\ComSetup.cpp" - > - </File> - <File - RelativePath=".\ComSetup.rgs" - > - </File> - <File - RelativePath=".\Dir.c" - > - </File> - <File - RelativePath=".\SelfExtract.c" - > - </File> - <File - RelativePath=".\Setup.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\Wizard.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Xml.c" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\BootEncryption.cpp" - > - </File> - <File - RelativePath="..\Common\Crc.c" - > - </File> - <File - RelativePath="..\Common\Dictionary.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Dlgcode.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Endian.c" - > - </File> - <File - RelativePath="..\Common\Inflate.c" - > - </File> - <File - RelativePath="..\Common\Language.c" - > - </File> - <File - RelativePath="..\Common\Registry.c" - > - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\Common\Apidrvr.h" - > - </File> - <File - RelativePath="..\Common\Combo.h" - > - </File> - <File - RelativePath=".\ComSetup.h" - > - </File> - <File - RelativePath="..\Common\Crc.h" - > - </File> - <File - RelativePath=".\Dir.h" - > - </File> - <File - RelativePath="..\Common\Dlgcode.h" - > - </File> - <File - RelativePath="..\Common\Exception.h" - > - </File> - <File - RelativePath="..\Common\Inflate.h" - > - </File> - <File - RelativePath="..\Common\Language.h" - > - </File> - <File - RelativePath="..\Common\Registry.h" - > - </File> - <File - RelativePath="..\Common\Resource.h" - > - </File> - <File - RelativePath=".\Resource.h" - > - </File> - <File - RelativePath=".\SelfExtract.h" - > - </File> - <File - RelativePath=".\Setup.h" - > - </File> - <File - RelativePath="..\Common\Tcdefs.h" - > - </File> - <File - RelativePath=".\Wizard.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - <File - RelativePath=".\Setup.ico" - > - </File> - <File - RelativePath=".\Setup.manifest" - > - </File> - <File - RelativePath=".\Setup.rc" - > - </File> - <File - RelativePath="..\Common\VeraCrypt.ico" - > - </File> - <File - RelativePath=".\VeraCrypt_setup.bmp" - > - </File> - <File - RelativePath=".\VeraCrypt_setup_background.bmp" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_Volume.ico" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\Common.rc" - > - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Language.xml" - > - </File> - <File - RelativePath="..\Resources\Texts\License.rtf" - > - </File> - <File - RelativePath="..\Common\Textual_logo_288dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_96dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_background.bmp" - > - </File> - </Filter> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/Setup/Setup.vcxproj b/src/Setup/Setup.vcxproj index d1159c0b..2d10ba22 100644 --- a/src/Setup/Setup.vcxproj +++ b/src/Setup/Setup.vcxproj @@ -20,31 +20,33 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{DF5F654D-BD44-4E31-B92E-B68074DC37A8}</ProjectGuid> <RootNamespace>Setup</RootNamespace> <Keyword>Win32Proj</Keyword> + <ProjectName>Setup</ProjectName> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> @@ -64,21 +66,21 @@ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)Debug\Int\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)Release\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)Release\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)Release\Int\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)Release\Int\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)Release\Int\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest> @@ -103,20 +105,21 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>libcmtd.lib;atls.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Setup.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> <TargetMachine>MachineX86</TargetMachine> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> @@ -139,17 +142,18 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>atls.lib;mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -180,14 +184,14 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -218,14 +222,14 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -320,29 +324,13 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> </ResourceCompile> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> <ProjectReference Include="..\Common\Lzma.vcxproj"> <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> </ProjectReference> - <ProjectReference Include="..\ExpandVolume\ExpandVolume.vcxproj"> - <Project>{9715ff1d-599b-4bbc-ad96-bef6e08ff827}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Format\Format.vcxproj"> - <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Mount\Mount.vcxproj"> - <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c index abf76f69..e00e4475 100644 --- a/src/Setup/Wizard.c +++ b/src/Setup/Wizard.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" diff --git a/src/Setup/Wizard.h b/src/Setup/Wizard.h index 40ff0353..c91c7c70 100644 --- a/src/Setup/Wizard.h +++ b/src/Setup/Wizard.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus diff --git a/src/SetupDLL/ComSetup.cpp b/src/SetupDLL/ComSetup.cpp index 07c3360a..e1ab2cfd 100644 --- a/src/SetupDLL/ComSetup.cpp +++ b/src/SetupDLL/ComSetup.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -21,12 +21,17 @@ #include <statreg.h> #include <windows.h> #include "ComSetup.h" #include "Dlgcode.h" #include "Resource.h" -#include "../Mount/MainCom_i.c" -#include "../Format/FormatCom_i.c" + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} + +// Define GUIDs of "VeraCrypt.exe and" "VeraCrypt Format.exe" type libraries +MIDL_DEFINE_GUID(GUID, LIBID_TrueCryptMainCom, 0x9ACF6176, 0x5FC4, 0x4690, 0xA0, 0x25, 0xB3, 0x30, 0x6A, 0x50, 0xEB, 0x6A); +MIDL_DEFINE_GUID(GUID, LIBID_TrueCryptFormatCom, 0x56327DDA, 0xF1A7, 0x4e13, 0xB1, 0x28, 0x52, 0x0D, 0x12, 0x9B, 0xDE, 0xF6); /* * Same as RegisterComServers() in Setup project, but * instead of using GetModuleFileNameW() to get this * DLL's path as setupModule which will not work because diff --git a/src/SetupDLL/ComSetup.h b/src/SetupDLL/ComSetup.h index 85d0f249..f8253dca 100644 --- a/src/SetupDLL/ComSetup.h +++ b/src/SetupDLL/ComSetup.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/SetupDLL/Dir.c b/src/SetupDLL/Dir.c index 3275567f..1451ee9f 100644 --- a/src/SetupDLL/Dir.c +++ b/src/SetupDLL/Dir.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -63,60 +63,60 @@ mkfulldir (wchar_t *oriPath, BOOL bCheckonly) return 0; } int -mkfulldir_internal (wchar_t *path) +mkfulldir_internal(wchar_t* path) { - wchar_t *token; - struct _stat st; - static wchar_t tokpath[_MAX_PATH]; - static wchar_t trail[_MAX_PATH]; - - if (wcslen(path) >= _MAX_PATH) - { - // directory name will be truncated so return failure to avoid unexepected behavior - return -1; - } - - StringCbCopyW (tokpath, _MAX_PATH, path); - trail[0] = L'\0'; - - token = wcstok (tokpath, L"\\/"); - - if (tokpath[0] == L'\\' && tokpath[1] == L'\\') - { /* unc */ - trail[0] = tokpath[0]; - trail[1] = tokpath[1]; - trail[2] = L'\0'; - if (token) - { - StringCbCatW (trail, _MAX_PATH, token); - StringCbCatW (trail, _MAX_PATH, L"\\"); - token = wcstok (NULL, L"\\/"); - if (token) - { /* get share name */ - StringCbCatW (trail, _MAX_PATH, token); - StringCbCatW (trail, _MAX_PATH, L"\\"); - } - token = wcstok (NULL, L"\\/"); - } - } - - if (tokpath[1] == L':') - { /* drive letter */ - StringCbCatW (trail, _MAX_PATH, tokpath); - StringCbCatW (trail, _MAX_PATH, L"\\"); - token = wcstok (NULL, L"\\/"); - } - - while (token != NULL) - { - int x; - StringCbCatW (trail, _MAX_PATH, token); - x = _wmkdir (trail); - StringCbCatW (trail, _MAX_PATH, L"\\"); - token = wcstok (NULL, L"\\/"); - } - - return _wstat (path, &st); + wchar_t* token; + wchar_t* next_token = NULL; + struct _stat st; + static wchar_t tokpath[_MAX_PATH]; + static wchar_t trail[_MAX_PATH]; + + if (wcslen(path) >= _MAX_PATH) + { + // directory name will be truncated so return failure to avoid unexpected behavior + return -1; + } + + StringCbCopyW(tokpath, _MAX_PATH, path); + trail[0] = L'\0'; + + token = wcstok_s(tokpath, L"\\/", &next_token); + if (tokpath[0] == L'\\' && tokpath[1] == L'\\') + { /* unc */ + trail[0] = tokpath[0]; + trail[1] = tokpath[1]; + trail[2] = L'\0'; + if (token) + { + StringCbCatW(trail, _MAX_PATH, token); + StringCbCatW(trail, _MAX_PATH, L"\\"); + token = wcstok_s(NULL, L"\\/", &next_token); + if (token) + { /* get share name */ + StringCbCatW(trail, _MAX_PATH, token); + StringCbCatW(trail, _MAX_PATH, L"\\"); + } + token = wcstok_s(NULL, L"\\/", &next_token); + } + } + + if (tokpath[1] == L':') + { /* drive letter */ + StringCbCatW(trail, _MAX_PATH, tokpath); + StringCbCatW(trail, _MAX_PATH, L"\\"); + token = wcstok_s(NULL, L"\\/", &next_token); + } + + while (token != NULL) + { + int x; + StringCbCatW(trail, _MAX_PATH, token); + x = _wmkdir(trail); + StringCbCatW(trail, _MAX_PATH, L"\\"); + token = wcstok_s(NULL, L"\\/", &next_token); + } + + return _wstat(path, &st); } diff --git a/src/SetupDLL/Dir.h b/src/SetupDLL/Dir.h index fb9dfc6b..68bb44f0 100644 --- a/src/SetupDLL/Dir.h +++ b/src/SetupDLL/Dir.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifdef __cplusplus diff --git a/src/SetupDLL/Resource.h b/src/SetupDLL/Resource.h index b5b7d466..62246068 100644 --- a/src/SetupDLL/Resource.h +++ b/src/SetupDLL/Resource.h @@ -41,10 +41,11 @@ #define IDR_LANG_TH 55 #define IDR_LANG_TR 56 #define IDR_LANG_UK 57 #define IDR_LANG_UZ 58 #define IDR_LANG_ZHTW 59 +#define IDR_LANG_NB 60 #define IDD_INSTALL 101 #define IDD_INSTALL_OPTIONS_PAGE_DLG 102 #define IDD_UNINSTALL 103 #define IDI_SETUP 104 #define IDR_SETUP_RSRC_HEADER 105 diff --git a/src/SetupDLL/Setup.c b/src/SetupDLL/Setup.c index 1c3782dd..1f6f414d 100644 --- a/src/SetupDLL/Setup.c +++ b/src/SetupDLL/Setup.c @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Tcdefs.h" @@ -1468,11 +1468,11 @@ BOOL DoDriverUnload_Dll (MSIHANDLE hInstaller, HWND hwnd) if (bResult) { if (volumesMounted != 0) { bOK = FALSE; - MSILogAndShow(hInstaller, MSI_WARNING_LEVEL, GetString ("DISMOUNT_ALL_FIRST")); + MSILogAndShow(hInstaller, MSI_WARNING_LEVEL, GetString ("UNMOUNT_ALL_FIRST")); } } else { bOK = FALSE; @@ -2334,10 +2334,42 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller) BootEncryption bootEnc(NULL); std::wstring szInstallDir = L""; UINT uiRet = ERROR_INSTALL_FAILURE; BOOL bOK = TRUE; WCHAR szCurrentDir[MAX_PATH]; + const wchar_t* oldFileNames[] = { + L"docs\\html\\en\\AddNewSystemVar.jpg", + L"docs\\html\\en\\CertificateCannotBeVerified.jpg", + L"docs\\html\\en\\CertVerifyFails.jpg", + L"docs\\html\\en\\DistributionPackageDamaged.jpg", + L"docs\\html\\en\\DownloadVS2010.jpg", + L"docs\\html\\en\\DownloadVS2019.jpg", + L"docs\\html\\en\\DownloadVSBuildTools.jpg", + L"docs\\html\\en\\gzipCommandLine.jpg", + L"docs\\html\\en\\NasmCommandLine.jpg", + L"docs\\html\\en\\RegeditPermissions-1.jpg", + L"docs\\html\\en\\RegeditPermissions-2.jpg", + L"docs\\html\\en\\RegeditPermissions-3.jpg", + L"docs\\html\\en\\RegeditPermissions-4.jpg", + L"docs\\html\\en\\SelectAdvancedSystemSettings.jpg", + L"docs\\html\\en\\SelectEnvironmentVariables.jpg", + L"docs\\html\\en\\SelectPathVariable.jpg", + L"docs\\html\\en\\SelectThisPC.jpg", + L"docs\\html\\en\\upxCommandLine.jpg", + L"docs\\html\\en\\VS2010BuildSolution.jpg", + L"docs\\html\\en\\VS2010Win32Config.jpg", + L"docs\\html\\en\\VS2010X64Config.jpg", + L"docs\\html\\en\\VS2019ARM64Config.jpg", + L"docs\\html\\en\\VS2019BuildSolution.jpg", + L"docs\\html\\en\\YasmCommandLine.jpg", + L"docs\\html\\en\\BCH_Logo_48x30.png", + L"docs\\html\\en\\LinuxPrepAndBuild.sh", + L"docs\\html\\en\\LinuxPrepAndBuild.zip", + L"docs\\html\\en\\RIPEMD-160.html", + L"docs\\html\\en\\ru\\BCH_Logo_48x30.png", + L"Languages\\Language.ru - Copy.xml", + }; MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_PostInstall"); // Get INSTALLDIR to see where we're being installed. uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), (LPWSTR)TEXT(""), &cchValueBuf); @@ -2444,30 +2476,39 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller) { BOOL bResult = FALSE; WIN32_FIND_DATA f; HANDLE h; wchar_t szTmp[TC_MAX_PATH]; + size_t i; // delete "VeraCrypt Setup.exe" if it exists StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), L"VeraCrypt Setup.exe"); if (FileExists(szTmp)) { ForceDeleteFile(szTmp); } + // delete files wrongly installed by previous versions in installation folder + for (i = 0; i < ARRAYSIZE(oldFileNames); i++) + { + StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), oldFileNames[i]); + if (FileExists(szTmp)) + { + ForceDeleteFile(szTmp); + } + } + StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), L"VeraCrypt.exe"); - if (Is64BitOs ()) - EnableWow64FsRedirection (FALSE); + EnableWow64FsRedirection (FALSE); wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false); wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true); wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false); wstring favoritesLegacyFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, true); - if (Is64BitOs () - && FileExists (favoritesLegacyFile.c_str()) + if (FileExists (favoritesLegacyFile.c_str()) && !FileExists (favoritesFile.c_str())) { // copy the favorites XML file to the native system directory bResult = CopyFile (favoritesLegacyFile.c_str(), favoritesFile.c_str(), FALSE); } @@ -2520,28 +2561,25 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller) } } catch (...) {} } - if (Is64BitOs ()) + // delete files from legacy path + if (FileExists (favoritesLegacyFile.c_str())) { - // delete files from legacy path - if (FileExists (favoritesLegacyFile.c_str())) - { - MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: REMOVING %s", favoritesLegacyFile.c_str()); - ForceDeleteFile (favoritesLegacyFile.c_str()); - } - - if (FileExists (serviceLegacyPath.c_str())) - { - MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: REMOVING %s", serviceLegacyPath.c_str()); - ForceDeleteFile (serviceLegacyPath.c_str()); - } + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: REMOVING %s", favoritesLegacyFile.c_str()); + ForceDeleteFile (favoritesLegacyFile.c_str()); + } - EnableWow64FsRedirection (TRUE); + if (FileExists (serviceLegacyPath.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: REMOVING %s", serviceLegacyPath.c_str()); + ForceDeleteFile (serviceLegacyPath.c_str()); } + EnableWow64FsRedirection (TRUE); + if (bResult == FALSE) { LPVOID lpMsgBuf; DWORD dwError = GetLastError (); wchar_t szTmp2[700]; @@ -2609,11 +2647,11 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller) FindClose (h); } // remvove legacy files that are not needed anymore - for (int i = 0; i < sizeof (szLegacyFiles) / sizeof (szLegacyFiles[0]); i++) + for (i = 0; i < sizeof (szLegacyFiles) / sizeof (szLegacyFiles[0]); i++) { StatDeleteFile (szLegacyFiles [i], TRUE); } SetCurrentDirectory(szCurrentDir); @@ -2975,10 +3013,74 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PreUninstall(MSIHANDLE hInstaller) end: MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_PreUninstall"); return uiRet; } +static BOOL DirectoryExists (const wchar_t *dirName) +{ + DWORD attrib = GetFileAttributes (dirName); + return (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY)); +} + +static BOOL DeleteContentsOnReboot(LPCTSTR pszDir) { + TCHAR szPath[MAX_PATH]; + TCHAR szSubPath[MAX_PATH]; + WIN32_FIND_DATA FindFileData; + HANDLE hFind; + BOOL bHasBackslash = FALSE; + // check if pszDir ends with a backslash + if (pszDir[_tcslen(pszDir) - 1] == '\\') + { + bHasBackslash = TRUE; + } + + // Prepare the path for FindFirstFile + if (bHasBackslash) + StringCchPrintf(szPath, MAX_PATH, TEXT("%s*"), pszDir); + else + StringCchPrintf(szPath, MAX_PATH, TEXT("%s\\*"), pszDir); + + hFind = FindFirstFile(szPath, &FindFileData); + if (hFind == INVALID_HANDLE_VALUE) { + return FALSE; + } + + BOOL result = TRUE; + + do { + if (_tcscmp(FindFileData.cFileName, TEXT(".")) != 0 && + _tcscmp(FindFileData.cFileName, TEXT("..")) != 0) { + + if (bHasBackslash) + StringCchPrintf(szSubPath, MAX_PATH, TEXT("%s%s"), pszDir, FindFileData.cFileName); + else + StringCchPrintf(szSubPath, MAX_PATH, TEXT("%s\\%s"), pszDir, FindFileData.cFileName); + + if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + // Recursive call to handle subdirectories + if (!DeleteContentsOnReboot(szSubPath)) { + result = FALSE; // Track failures but attempt to continue + } + } else { + // Schedule the file for deletion + if (!MoveFileEx(szSubPath, NULL, MOVEFILE_DELAY_UNTIL_REBOOT)) { + result = FALSE; // Track failures + } + } + } + } while (FindNextFile(hFind, &FindFileData) != 0); + + FindClose(hFind); + + // Schedule the root directory for deletion, only if not done already + if (!MoveFileEx(pszDir, NULL, MOVEFILE_DELAY_UNTIL_REBOOT)) { + result = FALSE; + } + + return result; +} + /* * Same as Setup.c, function DoUninstall(), but * without the actual installation, it only performs * post install operations (after DoFilesInstall and last parts * of DoFilesInstall / DoRegUninstall). @@ -3114,12 +3216,11 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostUninstall(MSIHANDLE hInstaller) DoServiceUninstall_Dll (hInstaller, hwndDlg, L"VeraCryptService"); } // Last part of DoFilesInstall() { - if (Is64BitOs ()) - EnableWow64FsRedirection (FALSE); + EnableWow64FsRedirection (FALSE); wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false); wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true); wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false); wstring favoritesLegacyFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, true); @@ -3135,25 +3236,49 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostUninstall(MSIHANDLE hInstaller) { MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", servicePath.c_str()); ForceDeleteFile (servicePath.c_str()); } - if (Is64BitOs ()) + if (FileExists (favoritesLegacyFile.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", favoritesLegacyFile.c_str()); + ForceDeleteFile (favoritesLegacyFile.c_str()); + } + + if (FileExists (serviceLegacyPath.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", serviceLegacyPath.c_str()); + ForceDeleteFile (serviceLegacyPath.c_str()); + } + + EnableWow64FsRedirection (TRUE); + + // remove the installation folder is case it remains after uninstall + if (DirectoryExists (szInstallDir.c_str())) { - if (FileExists (favoritesLegacyFile.c_str())) + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", szInstallDir.c_str()); + if(DeleteDirectory (szInstallDir.c_str())) { - MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", favoritesLegacyFile.c_str()); - ForceDeleteFile (favoritesLegacyFile.c_str()); + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: %s removed", szInstallDir.c_str()); } - - if (FileExists (serviceLegacyPath.c_str())) + else { - MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", serviceLegacyPath.c_str()); - ForceDeleteFile (serviceLegacyPath.c_str()); + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: %s could not be removed. Scheduling removal on reboot", szInstallDir.c_str()); + if (DeleteContentsOnReboot(szInstallDir.c_str())) + { + bRestartRequired = TRUE; + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: %s scheduled for removal on reboot", szInstallDir.c_str()); + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: %s could not be scheduled for removal on reboot", szInstallDir.c_str()); + } } - - EnableWow64FsRedirection (TRUE); + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: %s does not exist", szInstallDir.c_str()); } } if (bSystemRestore && !bTempSkipSysRestore) SetSystemRestorePoint_Dll (hInstaller, TRUE); @@ -3354,10 +3479,11 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_DoChecks(MSIHANDLE hInstaller) if (bRestartRequired) { if (bDisableReboot) { MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: reboot is required but it is disabled because \"REBOOT\" specifies ReallySuppress"); + uiRet = ERROR_SUCCESS; } else { MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: reboot is required"); uiRet = MsiSetProperty(hInstaller, L"ISREBOOTREQUIRED", L"1"); @@ -3390,6 +3516,6 @@ DllMain( * in Dlgcode.c, MapResource() function. */ hInst = hInstDLL; return TRUE; -}
\ No newline at end of file +} diff --git a/src/SetupDLL/Setup.h b/src/SetupDLL/Setup.h index e38dd75a..19448f40 100644 --- a/src/SetupDLL/Setup.h +++ b/src/SetupDLL/Setup.h @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef SETUP_H @@ -40,22 +40,17 @@ static wchar_t *szFiles[]= static wchar_t *szCompressedFiles[]= { L"License.txt", L"LICENSE", L"NOTICE", - L"VeraCrypt.exe", - L"VeraCryptExpander.exe", - L"VeraCrypt Format.exe", L"VeraCrypt-x64.exe", L"VeraCryptExpander-x64.exe", L"VeraCrypt Format-x64.exe", L"VeraCrypt-arm64.exe", L"VeraCryptExpander-arm64.exe", L"VeraCrypt Format-arm64.exe", L"veracrypt.inf", - L"veracrypt.cat", - L"veracrypt.sys", L"veracrypt-x64.cat", L"veracrypt-x64.sys", L"veracrypt-arm64.cat", L"veracrypt-arm64.sys", L"Languages.zip", @@ -72,11 +67,10 @@ static wchar_t *szLegacyFiles[]= L"VeraCryptExpander-x64.exe", L"VeraCrypt Format-x64.exe", L"veracrypt-x64.sys", }; -#define FILENAME_64BIT_DRIVER L"veracrypt-x64.sys" #define NBR_COMPRESSED_FILES (sizeof(szCompressedFiles) / sizeof(szCompressedFiles[0])) void localcleanup (void); BOOL StatDeleteFile ( wchar_t *lpszFile, BOOL bCheckForOldFile ); BOOL StatRemoveDirectory ( wchar_t *lpszDir ); diff --git a/src/SetupDLL/Setup.rc b/src/SetupDLL/Setup.rc index 5fd26482..26a3d4fc 100644 --- a/src/SetupDLL/Setup.rc +++ b/src/SetupDLL/Setup.rc @@ -26,12 +26,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // // Version // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,8,0 - PRODUCTVERSION 1,26,8,0 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L @@ -44,15 +44,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCryptSetup" - VALUE "FileVersion", "1.26.8" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCryptSetup.dll" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.8" + VALUE "ProductVersion", "1.26.20" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 @@ -107,10 +107,11 @@ IDR_LANG_HE LANGUAGES "..\\..\\Translations\\Language. IDR_LANG_HU LANGUAGES "..\\..\\Translations\\Language.hu.xml" IDR_LANG_ID LANGUAGES "..\\..\\Translations\\Language.id.xml" IDR_LANG_KA LANGUAGES "..\\..\\Translations\\Language.ka.xml" IDR_LANG_KO LANGUAGES "..\\..\\Translations\\Language.ko.xml" IDR_LANG_LV LANGUAGES "..\\..\\Translations\\Language.lv.xml" +IDR_LANG_NB LANGUAGES "..\\..\\Translations\\Language.nb.xml" IDR_LANG_NN LANGUAGES "..\\..\\Translations\\Language.nn.xml" IDR_LANG_PTBR LANGUAGES "..\\..\\Translations\\Language.pt-br.xml" IDR_LANG_SK LANGUAGES "..\\..\\Translations\\Language.sk.xml" IDR_LANG_SL LANGUAGES "..\\..\\Translations\\Language.sl.xml" IDR_LANG_SV LANGUAGES "..\\..\\Translations\\Language.sv.xml" diff --git a/src/SetupDLL/Setup.vcxproj.filters b/src/SetupDLL/Setup.vcxproj.filters deleted file mode 100644 index d747363f..00000000 --- a/src/SetupDLL/Setup.vcxproj.filters +++ /dev/null @@ -1,162 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> - <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - <Filter Include="Source Files\Common"> - <UniqueIdentifier>{6073052c-2d95-47a0-95d8-5960d4c1d1c0}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - <Filter Include="Resource Files"> - <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions> - </Filter> - <Filter Include="Resource Files\Common"> - <UniqueIdentifier>{a540fb0a-850b-4cb9-85f9-ade0112ebb50}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="ComSetup.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="Dir.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="SelfExtract.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="Setup.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="Wizard.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Common\Xml.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Common\BootEncryption.cpp"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Crc.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Dictionary.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Dlgcode.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Language.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Registry.c"> - <Filter>Source Files\Common</Filter> - </ClCompile> - <ClCompile Include="..\Common\Endian.c"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <None Include="ComSetup.rgs"> - <Filter>Source Files</Filter> - </None> - <None Include="Setup.ico"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\VeraCrypt.ico"> - <Filter>Resource Files</Filter> - </None> - <None Include="VeraCrypt_setup.bmp"> - <Filter>Resource Files</Filter> - </None> - <None Include="VeraCrypt_setup_background.bmp"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\VeraCrypt_Volume.ico"> - <Filter>Resource Files</Filter> - </None> - <None Include="..\Common\Language.xml"> - <Filter>Resource Files\Common</Filter> - </None> - <None Include="..\Resources\Texts\License.rtf"> - <Filter>Resource Files\Common</Filter> - </None> - <None Include="..\Common\Textual_logo_288dpi.bmp"> - <Filter>Resource Files\Common</Filter> - </None> - <None Include="..\Common\Textual_logo_96dpi.bmp"> - <Filter>Resource Files\Common</Filter> - </None> - <None Include="..\Common\Textual_logo_background.bmp"> - <Filter>Resource Files\Common</Filter> - </None> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\Common\Apidrvr.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Combo.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="ComSetup.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Crc.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Dir.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Dlgcode.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Exception.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Inflate.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Language.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Registry.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Resource.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Resource.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="SelfExtract.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Setup.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\Common\Tcdefs.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="Wizard.h"> - <Filter>Header Files</Filter> - </ClInclude> - </ItemGroup> - <ItemGroup> - <Manifest Include="Setup.manifest"> - <Filter>Resource Files</Filter> - </Manifest> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="Setup.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - <ResourceCompile Include="..\Common\Common.rc"> - <Filter>Resource Files\Common</Filter> - </ResourceCompile> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/src/SetupDLL/Setup.vcxproj.user b/src/SetupDLL/Setup.vcxproj.user deleted file mode 100644 index ace9a86a..00000000 --- a/src/SetupDLL/Setup.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> -</Project>
\ No newline at end of file diff --git a/src/SetupDLL/SetupDLL.vcproj b/src/SetupDLL/SetupDLL.vcproj deleted file mode 100644 index a1a6a81f..00000000 --- a/src/SetupDLL/SetupDLL.vcproj +++ /dev/null @@ -1,484 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="Setup" - ProjectGUID="{DF5F654D-BD44-4E31-B92E-B68074DC37A8}" - RootNamespace="Setup" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="SETUP;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - WarningLevel="4" - DebugInformationFormat="4" - DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/NODEFAULTLIB:LIBCMTD" - AdditionalDependencies="libcmtd.lib atlsd.lib mpr.lib" - OutputFile="$(OutDir)/VeraCryptSetup.exe" - LinkIncremental="2" - GenerateManifest="false" - UACExecutionLevel="2" - DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Setup.pdb" - SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Setup.manifest" - EmbedManifest="true" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL:
" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/w34189" - Optimization="2" - AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" - PreprocessorDefinitions="SETUP;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS" - RuntimeLibrary="0" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - AssemblerOutput="2" - AssemblerListingLocation="$(IntDir)/" - WarningLevel="4" - DebugInformationFormat="0" - DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/IGNORE:4089" - AdditionalDependencies="mpr.lib" - OutputFile="$(OutDir)/VeraCryptSetup.exe" - LinkIncremental="1" - GenerateManifest="false" - UACExecutionLevel="2" - DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll" - GenerateDebugInformation="false" - GenerateMapFile="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - AdditionalManifestFiles="Setup.manifest" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - CommandLine="copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe"" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\ComSetup.cpp" - > - </File> - <File - RelativePath=".\ComSetup.rgs" - > - </File> - <File - RelativePath=".\Dir.c" - > - </File> - <File - RelativePath=".\SelfExtract.c" - > - </File> - <File - RelativePath=".\Setup.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\Wizard.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Xml.c" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\BootEncryption.cpp" - > - </File> - <File - RelativePath="..\Common\Crc.c" - > - </File> - <File - RelativePath="..\Common\Dictionary.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Dlgcode.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="2" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Endian.c" - > - </File> - <File - RelativePath="..\Common\Inflate.c" - > - </File> - <File - RelativePath="..\Common\Language.c" - > - </File> - <File - RelativePath="..\Common\Registry.c" - > - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\Common\Apidrvr.h" - > - </File> - <File - RelativePath="..\Common\Combo.h" - > - </File> - <File - RelativePath=".\ComSetup.h" - > - </File> - <File - RelativePath="..\Common\Crc.h" - > - </File> - <File - RelativePath=".\Dir.h" - > - </File> - <File - RelativePath="..\Common\Dlgcode.h" - > - </File> - <File - RelativePath="..\Common\Exception.h" - > - </File> - <File - RelativePath="..\Common\Inflate.h" - > - </File> - <File - RelativePath="..\Common\Language.h" - > - </File> - <File - RelativePath="..\Common\Registry.h" - > - </File> - <File - RelativePath="..\Common\Resource.h" - > - </File> - <File - RelativePath=".\Resource.h" - > - </File> - <File - RelativePath=".\SelfExtract.h" - > - </File> - <File - RelativePath=".\Setup.h" - > - </File> - <File - RelativePath="..\Common\Tcdefs.h" - > - </File> - <File - RelativePath=".\Wizard.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - <File - RelativePath=".\Setup.ico" - > - </File> - <File - RelativePath=".\Setup.manifest" - > - </File> - <File - RelativePath=".\Setup.rc" - > - </File> - <File - RelativePath="..\Common\VeraCrypt.ico" - > - </File> - <File - RelativePath=".\VeraCrypt_setup.bmp" - > - </File> - <File - RelativePath=".\VeraCrypt_setup_background.bmp" - > - </File> - <File - RelativePath="..\Common\VeraCrypt_Volume.ico" - > - </File> - <Filter - Name="Common" - > - <File - RelativePath="..\Common\Common.rc" - > - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - ExcludedFromBuild="true" - > - <Tool - Name="VCResourceCompilerTool" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\Common\Language.xml" - > - </File> - <File - RelativePath="..\Resources\Texts\License.rtf" - > - </File> - <File - RelativePath="..\Common\Textual_logo_288dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_96dpi.bmp" - > - </File> - <File - RelativePath="..\Common\Textual_logo_background.bmp" - > - </File> - </Filter> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/src/SetupDLL/SetupDLL.vcxproj b/src/SetupDLL/SetupDLL.vcxproj index 7eb24a66..576738d4 100644 --- a/src/SetupDLL/SetupDLL.vcxproj +++ b/src/SetupDLL/SetupDLL.vcxproj @@ -17,26 +17,27 @@ <PropertyGroup Label="Globals"> <ProjectGuid>{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}</ProjectGuid> <RootNamespace>Setup</RootNamespace> <Keyword>Win32Proj</Keyword> <ProjectName>SetupDLL</ProjectName> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> @@ -52,19 +53,19 @@ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)Debug\SetupDLL\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)Release\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)Release\SetupDLL\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)Release\SetupDLL\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptSetup</TargetName> @@ -86,21 +87,22 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>version.lib;msi.lib;libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>version.lib;msi.lib;libcmtd.lib;atls.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptSetup.dll</OutputFile> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Setup.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> <TargetMachine>MachineX86</TargetMachine> <ModuleDefinitionFile>SetupDLL.def</ModuleDefinitionFile> + <GenerateMapFile>true</GenerateMapFile> </Link> <Manifest> <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> @@ -122,17 +124,18 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" >NUL: <AssemblerOutput>All</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4995;4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <ControlFlowGuard>Guard</ControlFlowGuard> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>version.lib;msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>version.lib;atls.lib;msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptSetup.dll</OutputFile> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -151,11 +154,11 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" >NUL: <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> <ClCompile> <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>SETUP;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>SETUP_DLL;SETUP;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> <PrecompiledHeader> </PrecompiledHeader> <AssemblerOutput>All</AssemblerOutput> @@ -164,14 +167,14 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" >NUL: <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>version.lib;msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile> + <AdditionalDependencies>version.lib;msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptSetup.dll</OutputFile> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> - <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>true</GenerateMapFile> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -253,27 +256,9 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" >NUL: <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> </ResourceCompile> </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> - <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\ExpandVolume\ExpandVolume.vcxproj"> - <Project>{9715ff1d-599b-4bbc-ad96-bef6e08ff827}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Format\Format.vcxproj"> - <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - <ProjectReference Include="..\Mount\Mount.vcxproj"> - <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/src/Signing/sign.bat b/src/Signing/sign.bat index 669d34e0..1ddb1a70 100644 --- a/src/Signing/sign.bat +++ b/src/Signing/sign.bat @@ -1,18 +1,18 @@ -PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip +PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86 -set VC_VERSION=1.26.8 -set VC_VERSION_NBRE=1.26.8 +set VC_VERSION=1.26.20 +set VC_VERSION_NBRE=1.26.20 set SIGNINGPATH=%~dp0 cd %SIGNINGPATH% -call "..\..\doc\chm\create_chm.bat" +rem call "..\..\doc\chm\create_chm.bat" cd %SIGNINGPATH% rem sign using SHA-256 -signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCryptSetup.dll" +signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCryptSetup.dll" rem create setup and MSI cd "..\Release\Setup Files\" copy ..\..\LICENSE . copy ..\..\License.txt . @@ -23,11 +23,27 @@ copy ..\..\Setup\VeraCrypt_setup_background.bmp . copy ..\..\Setup\VeraCrypt_setup.bmp . copy ..\..\Setup\Setup.ico . del *.xml rmdir /S /Q Languages mkdir Languages -copy /V /Y ..\..\..\Translations\*.xml Languages\. + +@echo off +setlocal + +rem Define the source and target directories +set "SOURCE_DIR=..\..\..\Translations" +set "TARGET_DIR=Languages" + +rem Copy files matching Language.xx.xml where xx is any two characters +copy /V /Y "%SOURCE_DIR%\Language.??.xml" "%TARGET_DIR%\." + +rem Copy files matching Language.xx-yy.xml where xx and yy are any two characters +copy /V /Y "%SOURCE_DIR%\Language.??-??.xml" "%TARGET_DIR%\." + +endlocal +@echo on + del Languages.zip 7z a -y Languages.zip Languages rmdir /S /Q docs mkdir docs\html\en mkdir docs\EFI-DCS diff --git a/src/Signing/sign_TESTSIGNING.bat b/src/Signing/sign_TESTSIGNING.bat index 858fa442..ce56de3c 100644 --- a/src/Signing/sign_TESTSIGNING.bat +++ b/src/Signing/sign_TESTSIGNING.bat @@ -1,16 +1,16 @@ PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip -set VC_VERSION=1.26-TESTSIGNING -set VC_VERSION_NBRE=1.26.0 +set VC_VERSION=1.26.20 +set VC_VERSION_NBRE=1.26.20 set SIGNINGPATH=%~dp0 cd %SIGNINGPATH% rem sign using SHA-256 -signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" +signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\veracrypt-arm64.sys" -signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" "..\Release\Setup Files\VeraCryptSetup.dll" +signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" "..\Release\Setup Files\VeraCryptSetup.dll" rem create setup and MSI cd "..\Release\Setup Files\" copy ..\..\LICENSE . copy ..\..\License.txt . diff --git a/src/Signing/sign_test.bat b/src/Signing/sign_test.bat index 2187e8f0..4af038a4 100644 --- a/src/Signing/sign_test.bat +++ b/src/Signing/sign_test.bat @@ -1,8 +1,8 @@ PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip -set VC_VERSION=1.26.8 -set VC_VERSION_NBRE=1.26.8 +set VC_VERSION=1.26.20 +set VC_VERSION_NBRE=1.26.20 set PFXNAME=TestCertificate\idrix_codeSign.pfx set PFXPASSWORD=idrix set PFXCA=TestCertificate\idrix_TestRootCA.crt set SHA256PFXNAME=TestCertificate\idrix_Sha256CodeSign.pfx set SHA256PFXPASSWORD=idrix @@ -14,16 +14,16 @@ cd %SIGNINGPATH% call "..\..\doc\chm\create_chm.bat" cd %SIGNINGPATH% rem sign using SHA-1 -signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" +signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\veracrypt-arm64.sys" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" timeout /t 10 rem sign using SHA-256 -signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\veracrypt-arm64.sys" "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" +signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\veracrypt-arm64.sys" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" rem create setup and MSI cd "..\Release\Setup Files\" copy ..\..\LICENSE . copy ..\..\License.txt . diff --git a/src/Signing/sign_test_debug.bat b/src/Signing/sign_test_debug.bat index 2391f167..bdf3cc31 100644 --- a/src/Signing/sign_test_debug.bat +++ b/src/Signing/sign_test_debug.bat @@ -1,8 +1,8 @@ PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip -set VC_VERSION=1.26.8 -set VC_VERSION_NBRE=1.26.8 +set VC_VERSION=1.26.20 +set VC_VERSION_NBRE=1.26.20 set PFXNAME=TestCertificate\idrix_codeSign.pfx set PFXPASSWORD=idrix set PFXCA=TestCertificate\idrix_TestRootCA.crt set SHA256PFXNAME=TestCertificate\idrix_Sha256CodeSign.pfx set SHA256PFXPASSWORD=idrix @@ -15,11 +15,11 @@ call "..\..\doc\chm\create_chm.bat" cd %SIGNINGPATH% rem sign using SHA-256 -signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\veracrypt-arm64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt-arm64.exe" "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" "..\Debug\Setup Files\VeraCrypt COMReg.exe" +signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\veracrypt-arm64.sys" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt-arm64.exe" "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" "..\Debug\Setup Files\VeraCrypt COMReg.exe" rem create setup and MSI cd "..\Debug\Setup Files\" copy ..\..\LICENSE . copy ..\..\License.txt . diff --git a/src/VeraCrypt.sln b/src/VeraCrypt.sln index b3915f6f..fe3c6ddb 100644 --- a/src/VeraCrypt.sln +++ b/src/VeraCrypt.sln @@ -1,951 +1,339 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35431.28 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto", "Crypto\Crypto.vcxproj", "{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Driver", "Driver\Driver.vcxproj", "{EF5EF444-18D0-40D7-8DFA-775EC4448602}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boot", "Boot\Windows\Boot.vcxproj", "{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Format", "Format\Format.vcxproj", "{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}" - ProjectSection(ProjectDependencies) = postProject - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lzma", "Common\Lzma.vcxproj", "{B896FE1F-6BF3-4F75-9148-F841829073D9}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mount", "Mount\Mount.vcxproj", "{E4C40F94-E7F9-4981-86E4-186B46F993F3}" - ProjectSection(ProjectDependencies) = postProject - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zip", "Common\Zip.vcxproj", "{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Setup", "Setup\Setup.vcxproj", "{DF5F654D-BD44-4E31-B92E-B68074DC37A8}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "COMReg", "COMReg\COMReg.vcxproj", "{C8914211-32AC-4F48-ACD9-8212E8DE53F3}" ProjectSection(ProjectDependencies) = postProject - {C8914211-32AC-4F48-ACD9-8212E8DE53F3} = {C8914211-32AC-4F48-ACD9-8212E8DE53F3} - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boot", "Boot\Windows\Boot.vcxproj", "{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Driver", "Driver\Driver.vcxproj", "{B5F6C878-6C9E-48A7-91E3-7137A7B85896}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExpandVolume", "ExpandVolume\ExpandVolume.vcxproj", "{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Format", "Format\Format.vcxproj", "{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mount", "Mount\Mount.vcxproj", "{E4C40F94-E7F9-4981-86E4-186B46F993F3}" ProjectSection(ProjectDependencies) = postProject - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zip", "Common\Zip.vcxproj", "{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Portable", "Setup\Portable.vcxproj", "{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}" ProjectSection(ProjectDependencies) = postProject - {C8914211-32AC-4F48-ACD9-8212E8DE53F3} = {C8914211-32AC-4F48-ACD9-8212E8DE53F3} + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E} = {8B7F059F-E4C7-4E11-88F5-EE8B8433072E} {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Setup", "Setup\Setup.vcxproj", "{DF5F654D-BD44-4E31-B92E-B68074DC37A8}" + ProjectSection(ProjectDependencies) = postProject {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E} = {8B7F059F-E4C7-4E11-88F5-EE8B8433072E} + {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} + {C8914211-32AC-4F48-ACD9-8212E8DE53F3} = {C8914211-32AC-4F48-ACD9-8212E8DE53F3} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SetupDLL", "SetupDLL\SetupDLL.vcxproj", "{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "COMReg", "COMReg\COMReg.vcxproj", "{C8914211-32AC-4F48-ACD9-8212E8DE53F3}" ProjectSection(ProjectDependencies) = postProject - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E} = {8B7F059F-E4C7-4E11-88F5-EE8B8433072E} + {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} + {C8914211-32AC-4F48-ACD9-8212E8DE53F3} = {C8914211-32AC-4F48-ACD9-8212E8DE53F3} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lzma", "Common\Lzma.vcxproj", "{B896FE1F-6BF3-4F75-9148-F841829073D9}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - All CustomEFI|Win32 = All CustomEFI|Win32 - All CustomEFI|x64 = All CustomEFI|x64 - All Debug|Win32 = All Debug|Win32 - All Debug|x64 = All Debug|x64 - All_SkipOsDriverReqCheck|Win32 = All_SkipOsDriverReqCheck|Win32 - All_SkipOsDriverReqCheck|x64 = All_SkipOsDriverReqCheck|x64 - All|Win32 = All|Win32 - All|x64 = All|x64 - Boot Loader|Win32 = Boot Loader|Win32 - Boot Loader|x64 = Boot Loader|x64 - Boot|Win32 = Boot|Win32 - Boot|x64 = Boot|x64 + Debug|ARM64 = Debug|ARM64 Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 - Driver Debug|Win32 = Driver Debug|Win32 - Driver Debug|x64 = Driver Debug|x64 - Driver x64 Debug|Win32 = Driver x64 Debug|Win32 - Driver x64 Debug|x64 = Driver x64 Debug|x64 - Driver x64|Win32 = Driver x64|Win32 - Driver x64|x64 = Driver x64|x64 - Driver x86 Debug|Win32 = Driver x86 Debug|Win32 - Driver x86 Debug|x64 = Driver x86 Debug|x64 - Driver x86|Win32 = Driver x86|Win32 - Driver x86|x64 = Driver x86|x64 - Driver|Win32 = Driver|Win32 - Driver|x64 = Driver|x64 - Format Debug|Win32 = Format Debug|Win32 - Format Debug|x64 = Format Debug|x64 - Format|Win32 = Format|Win32 - Format|x64 = Format|x64 - Mount Debug|Win32 = Mount Debug|Win32 - Mount Debug|x64 = Mount Debug|x64 - Mount|Win32 = Mount|Win32 - Mount|x64 = Mount|x64 - Portable Debug|Win32 = Portable Debug|Win32 - Portable Debug|x64 = Portable Debug|x64 - Portable|Win32 = Portable|Win32 - Portable|x64 = Portable|x64 + Release_SkipOsDriverReqCheck|ARM64 = Release_SkipOsDriverReqCheck|ARM64 + Release_SkipOsDriverReqCheck|Win32 = Release_SkipOsDriverReqCheck|Win32 + Release_SkipOsDriverReqCheck|x64 = Release_SkipOsDriverReqCheck|x64 + Release|ARM64 = Release|ARM64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 + ReleaseCustomEFI|ARM64 = ReleaseCustomEFI|ARM64 ReleaseCustomEFI|Win32 = ReleaseCustomEFI|Win32 ReleaseCustomEFI|x64 = ReleaseCustomEFI|x64 - Setup Debug|Win32 = Setup Debug|Win32 - Setup Debug|x64 = Setup Debug|x64 - Setup|Win32 = Setup|Win32 - Setup|x64 = Setup|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|Win32.Build.0 = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|Win32.Build.0 = Debug|Win32 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|ARM64.Build.0 = Debug|ARM64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|Win32.ActiveCfg = Debug|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|x64.ActiveCfg = Debug|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|Win32.Build.0 = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|Win32.Build.0 = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|Win32.Build.0 = Release|Win32 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release|ARM64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release|ARM64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|ARM64.ActiveCfg = Release|ARM64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|ARM64.Build.0 = Release|ARM64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|Win32.ActiveCfg = Release|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|x64.ActiveCfg = Release|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|x64.Build.0 = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|ARM64.ActiveCfg = Release|ARM64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|ARM64.Build.0 = Release|ARM64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|Win32.ActiveCfg = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|Win32.Build.0 = Release|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|x64.ActiveCfg = Release|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|x64.Build.0 = Release|x64 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All CustomEFI|Win32.Build.0 = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All CustomEFI|x64.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All Debug|Win32.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All Debug|Win32.Build.0 = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All|x64.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Boot Loader|x64.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Boot|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Boot|x64.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Debug|Win32.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Debug|Win32.Build.0 = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver Debug|Win32.Build.0 = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x64 Debug|Win32.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x64 Debug|Win32.Build.0 = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x64|Win32.ActiveCfg = Release x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x64|Win32.Build.0 = Release x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x64|x64.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x86 Debug|Win32.ActiveCfg = Debug x86|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x86 Debug|Win32.Build.0 = Debug x86|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x86|Win32.ActiveCfg = Release x86|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x86|Win32.Build.0 = Release x86|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver x86|x64.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver|Win32.Build.0 = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Driver|x64.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Format Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Format|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Format|x64.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Mount|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Mount|x64.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Portable|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Portable|x64.ActiveCfg = Debug x64|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Release|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Release|Win32.Build.0 = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Release|x64.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.ReleaseCustomEFI|x64.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Setup|Win32.ActiveCfg = Release|Win32 - {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Setup|x64.ActiveCfg = Debug x64|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|Win32.Build.0 = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|Win32.Build.0 = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|Win32.Build.0 = Debug|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Debug|ARM64.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Debug|Win32.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Debug|Win32.Build.0 = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Debug|x64.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|ARM64.ActiveCfg = Release|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|Win32.ActiveCfg = Release|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|x64.ActiveCfg = Release|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|ARM64.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|ARM64.Build.0 = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|Win32.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|Win32.Build.0 = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|x64.ActiveCfg = Release Loader|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|x64.Build.0 = Release Loader|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|ARM64.Build.0 = Debug|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|Win32.Build.0 = Debug|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|x64.ActiveCfg = Debug|x64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|x64.Build.0 = Debug|x64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release|x64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|ARM64.ActiveCfg = Release|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|ARM64.Build.0 = Release|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|Win32.ActiveCfg = Release|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|Win32.Build.0 = Release|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|x64.ActiveCfg = Release|x64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|x64.Build.0 = Release|x64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|ARM64.ActiveCfg = Release|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|ARM64.Build.0 = Release|ARM64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|x64.ActiveCfg = Release|x64 + {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|x64.Build.0 = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|ARM64.Build.0 = Debug|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|Win32.Build.0 = Debug|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|x64.ActiveCfg = Debug|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|x64.Build.0 = Debug|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|ARM64.ActiveCfg = Release|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|ARM64.Build.0 = Release|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.ActiveCfg = Release|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.Build.0 = Release|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|x64.ActiveCfg = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|x64.Build.0 = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|ARM64.ActiveCfg = Release|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|ARM64.Build.0 = Release|ARM64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|x64.ActiveCfg = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|x64.Build.0 = Release|x64 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Debug|ARM64.ActiveCfg = Debug|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Debug|Win32.Build.0 = Debug|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Debug|x64.ActiveCfg = Debug|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release|ARM64.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release|Win32.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release|Win32.Build.0 = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release|x64.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|ARM64.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|ARM64.Build.0 = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|x64.ActiveCfg = Release|Win32 + {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|x64.Build.0 = Release|Win32 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Debug|ARM64.Build.0 = Debug|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Debug|Win32.ActiveCfg = Debug|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Debug|x64.ActiveCfg = Debug|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Debug|x64.Build.0 = Debug|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Debug|x64.Deploy.0 = Debug|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|ARM64.Deploy.0 = Release|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|Win32.Deploy.0 = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release_SkipOsDriverReqCheck|x64.Deploy.0 = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release|ARM64.ActiveCfg = Release|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release|Win32.ActiveCfg = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.Release|x64.ActiveCfg = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|ARM64.ActiveCfg = Release|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|ARM64.Build.0 = Release|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|ARM64.Deploy.0 = Release|ARM64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|Win32.ActiveCfg = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|Win32.Build.0 = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|Win32.Deploy.0 = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|x64.ActiveCfg = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|x64.Build.0 = Release|x64 + {B5F6C878-6C9E-48A7-91E3-7137A7B85896}.ReleaseCustomEFI|x64.Deploy.0 = Release|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|ARM64.Build.0 = Debug|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|Win32.ActiveCfg = Debug|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|x64.ActiveCfg = Debug|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|x64.Build.0 = Debug|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = ReleaseCustomEFI|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release_SkipOsDriverReqCheck|Win32.Build.0 = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release_SkipOsDriverReqCheck|x64.Build.0 = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|ARM64.ActiveCfg = Release|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|ARM64.Build.0 = Release|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|Win32.ActiveCfg = Release|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.ActiveCfg = Release|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.Build.0 = Release|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|ARM64.Build.0 = ReleaseCustomEFI|ARM64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|ARM64.Build.0 = Debug|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|Win32.ActiveCfg = Debug|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|x64.ActiveCfg = Debug|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|Win32.Build.0 = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|Win32.Build.0 = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|Win32.Build.0 = Release|Win32 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = ReleaseCustomEFI|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = ReleaseCustomEFI|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release_SkipOsDriverReqCheck|Win32.Build.0 = ReleaseCustomEFI|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = ReleaseCustomEFI|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release_SkipOsDriverReqCheck|x64.Build.0 = ReleaseCustomEFI|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|ARM64.ActiveCfg = Release|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|ARM64.Build.0 = Release|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|Win32.ActiveCfg = Release|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|x64.ActiveCfg = Release|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|ARM64.Build.0 = ReleaseCustomEFI|ARM64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|Win32.Build.0 = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|Win32.Build.0 = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|Win32.Build.0 = Debug|Win32 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|ARM64.Build.0 = Debug|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|Win32.ActiveCfg = Debug|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|x64.ActiveCfg = Debug|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|Win32.Build.0 = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|Win32.Build.0 = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|Win32.Build.0 = Release|Win32 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = ReleaseCustomEFI|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = ReleaseCustomEFI|x64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release_SkipOsDriverReqCheck|Win32.Build.0 = ReleaseCustomEFI|x64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = ReleaseCustomEFI|x64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release_SkipOsDriverReqCheck|x64.Build.0 = ReleaseCustomEFI|x64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|ARM64.ActiveCfg = Release|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|ARM64.Build.0 = Release|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|Win32.ActiveCfg = Release|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|x64.ActiveCfg = Release|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|ARM64.Build.0 = ReleaseCustomEFI|ARM64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|x64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|x64.Build.0 = Release|x64 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All Debug|Win32.Build.0 = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All|Win32.Build.0 = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All|x64.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Boot Loader|x64.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Boot|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Boot|x64.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Debug|Win32.Build.0 = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x64|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x64|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x86|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver x86|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Driver|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Format Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Format|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Format|x64.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Mount|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Mount|x64.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Portable Debug|Win32.Build.0 = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Portable|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Portable|Win32.Build.0 = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Portable|x64.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|Win32.Build.0 = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|x64.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup Debug|Win32.Build.0 = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup|Win32.ActiveCfg = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup|Win32.Build.0 = Release|Win32 - {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup|x64.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All CustomEFI|Win32.Build.0 = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All CustomEFI|x64.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All Debug|Win32.Build.0 = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All|x64.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Boot Loader|Win32.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Boot Loader|Win32.Build.0 = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Boot Loader|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Boot|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Boot|Win32.Build.0 = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Boot|x64.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Debug|Win32.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Debug|Win32.Build.0 = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x64 Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x64 Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x64|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x64|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x86 Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x86 Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x86|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver x86|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Driver|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Format Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Format Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Format|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Format|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Mount Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Mount Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Mount|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Mount|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Portable Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Portable Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Portable|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Portable|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|Win32.Build.0 = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|x64.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|x64.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Setup Debug|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Setup Debug|x64.ActiveCfg = Release Loader|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Setup|Win32.ActiveCfg = Release|Win32 - {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Setup|x64.ActiveCfg = Release Loader|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|x64.ActiveCfg = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|x64.ActiveCfg = Debug|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|x64.Build.0 = Debug|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|x64.ActiveCfg = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|Win32.ActiveCfg = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|x64.ActiveCfg = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|x64.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All|Win32.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All|Win32.Build.0 = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All|x64.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Boot Loader|Win32.Build.0 = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Boot Loader|x64.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Boot|Win32.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Boot|Win32.Build.0 = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Boot|x64.ActiveCfg = Release|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Debug|ARM64.ActiveCfg = Debug|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Debug|Win32.ActiveCfg = Debug|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Debug|Win32.Build.0 = Debug|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x64|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x64|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x86|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver x86|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Driver|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Format Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Format Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Format|Win32.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Format|Win32.Build.0 = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Format|x64.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Mount Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Mount|Win32.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Mount|Win32.Build.0 = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Mount|x64.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Portable Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Portable|Win32.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Portable|Win32.Build.0 = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Portable|x64.ActiveCfg = Release|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release_SkipOsDriverReqCheck|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release|ARM64.ActiveCfg = Release|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release|Win32.ActiveCfg = Release|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release|Win32.Build.0 = Release|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release|x64.ActiveCfg = Release|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|ARM64.Build.0 = ReleaseCustomEFI|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup Debug|Win32.Build.0 = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup|Win32.ActiveCfg = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup|Win32.Build.0 = Release|Win32 - {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup|x64.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All CustomEFI|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All CustomEFI|x64.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|x64.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot Loader|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot Loader|x64.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot|x64.ActiveCfg = Release|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Debug|ARM64.ActiveCfg = Debug|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Debug|Win32.Build.0 = Debug|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Debug|x64.ActiveCfg = Debug|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = Release_SkipOsDriverReqCheck|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|ARM64.ActiveCfg = Release|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|Win32.ActiveCfg = Release|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|Win32.Build.0 = Release|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|x64.ActiveCfg = Release|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|ARM64.Build.0 = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Debug|ARM64.ActiveCfg = Debug|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Debug|Win32.ActiveCfg = Debug|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Debug|Win32.Build.0 = Debug|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format|x64.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount|x64.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release_SkipOsDriverReqCheck|ARM64.ActiveCfg = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release_SkipOsDriverReqCheck|ARM64.Build.0 = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release_SkipOsDriverReqCheck|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release_SkipOsDriverReqCheck|Win32.Build.0 = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release_SkipOsDriverReqCheck|x64.ActiveCfg = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release_SkipOsDriverReqCheck|x64.Build.0 = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release|ARM64.ActiveCfg = Release|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release|Win32.ActiveCfg = Release|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release|Win32.Build.0 = Release|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|ARM64.Build.0 = ReleaseCustomEFI|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup Debug|Win32.Build.0 = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup|Win32.ActiveCfg = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup|Win32.Build.0 = Release|Win32 - {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All CustomEFI|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All CustomEFI|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.All|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Boot Loader|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Boot Loader|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Boot|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Boot|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Boot|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x64|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x64|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x86|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver x86|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Driver|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Format Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Format Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Format|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Format|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Format|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Mount Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Mount|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Mount|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Mount|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Portable Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Portable|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Portable|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Portable|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Release|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.ReleaseCustomEFI|x64.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Setup Debug|Win32.Build.0 = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Setup|Win32.ActiveCfg = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Setup|Win32.Build.0 = Release|Win32 - {C8914211-32AC-4F48-ACD9-8212E8DE53F3}.Setup|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|x64.ActiveCfg = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|x64.Build.0 = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All_SkipOsDriverReqCheck|x64.Build.0 = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|x64.ActiveCfg = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|x64.Build.0 = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.ReleaseCustomEFI|x64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D8F5611E-704C-4CD2-B8E9-633B8478D150} + EndGlobalSection EndGlobal diff --git a/src/VeraCrypt_vs2019.sln b/src/VeraCrypt_vs2019.sln deleted file mode 100644 index 5c440480..00000000 --- a/src/VeraCrypt_vs2019.sln +++ /dev/null @@ -1,912 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30711.63 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto", "Crypto\Crypto_vs2019.vcxproj", "{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Format", "Format\Format_vs2019.vcxproj", "{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}" - ProjectSection(ProjectDependencies) = postProject - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mount", "Mount\Mount_vs2019.vcxproj", "{E4C40F94-E7F9-4981-86E4-186B46F993F3}" - ProjectSection(ProjectDependencies) = postProject - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExpandVolume", "ExpandVolume\ExpandVolume_vs2019.vcxproj", "{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}" - ProjectSection(ProjectDependencies) = postProject - {B896FE1F-6BF3-4F75-9148-F841829073D9} = {B896FE1F-6BF3-4F75-9148-F841829073D9} - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zip", "Common\Zip_vs2019.vcxproj", "{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "driver", "Driver\veracrypt_vs2019.vcxproj", "{4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lzma", "Common\Lzma_vs2019.vcxproj", "{B896FE1F-6BF3-4F75-9148-F841829073D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - All CustomEFI|ARM64 = All CustomEFI|ARM64 - All CustomEFI|Win32 = All CustomEFI|Win32 - All CustomEFI|x64 = All CustomEFI|x64 - All Debug|ARM64 = All Debug|ARM64 - All Debug|Win32 = All Debug|Win32 - All Debug|x64 = All Debug|x64 - All|ARM64 = All|ARM64 - All|Win32 = All|Win32 - All|x64 = All|x64 - Boot Loader|ARM64 = Boot Loader|ARM64 - Boot Loader|Win32 = Boot Loader|Win32 - Boot Loader|x64 = Boot Loader|x64 - Boot|ARM64 = Boot|ARM64 - Boot|Win32 = Boot|Win32 - Boot|x64 = Boot|x64 - Debug|ARM64 = Debug|ARM64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Driver Debug|ARM64 = Driver Debug|ARM64 - Driver Debug|Win32 = Driver Debug|Win32 - Driver Debug|x64 = Driver Debug|x64 - Driver x64 Debug|ARM64 = Driver x64 Debug|ARM64 - Driver x64 Debug|Win32 = Driver x64 Debug|Win32 - Driver x64 Debug|x64 = Driver x64 Debug|x64 - Driver x64|ARM64 = Driver x64|ARM64 - Driver x64|Win32 = Driver x64|Win32 - Driver x64|x64 = Driver x64|x64 - Driver x86 Debug|ARM64 = Driver x86 Debug|ARM64 - Driver x86 Debug|Win32 = Driver x86 Debug|Win32 - Driver x86 Debug|x64 = Driver x86 Debug|x64 - Driver x86|ARM64 = Driver x86|ARM64 - Driver x86|Win32 = Driver x86|Win32 - Driver x86|x64 = Driver x86|x64 - Driver|ARM64 = Driver|ARM64 - Driver|Win32 = Driver|Win32 - Driver|x64 = Driver|x64 - Format Debug|ARM64 = Format Debug|ARM64 - Format Debug|Win32 = Format Debug|Win32 - Format Debug|x64 = Format Debug|x64 - Format|ARM64 = Format|ARM64 - Format|Win32 = Format|Win32 - Format|x64 = Format|x64 - Mount Debug|ARM64 = Mount Debug|ARM64 - Mount Debug|Win32 = Mount Debug|Win32 - Mount Debug|x64 = Mount Debug|x64 - Mount|ARM64 = Mount|ARM64 - Mount|Win32 = Mount|Win32 - Mount|x64 = Mount|x64 - Portable Debug|ARM64 = Portable Debug|ARM64 - Portable Debug|Win32 = Portable Debug|Win32 - Portable Debug|x64 = Portable Debug|x64 - Portable|ARM64 = Portable|ARM64 - Portable|Win32 = Portable|Win32 - Portable|x64 = Portable|x64 - Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Setup Debug|ARM64 = Setup Debug|ARM64 - Setup Debug|Win32 = Setup Debug|Win32 - Setup Debug|x64 = Setup Debug|x64 - Setup|ARM64 = Setup|ARM64 - Setup|Win32 = Setup|Win32 - Setup|x64 = Setup|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All CustomEFI|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|Win32.Build.0 = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|ARM64.ActiveCfg = Release|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|ARM64.Build.0 = Release|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|ARM64.Deploy.0 = Release|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot Loader|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Boot|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|Win32.Build.0 = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x64|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver x86|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Driver|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|Win32.Build.0 = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Format|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|Win32.Build.0 = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Mount|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Portable|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|ARM64.ActiveCfg = Release|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|ARM64.Build.0 = Release|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|Win32.Build.0 = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|x64.Build.0 = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|x64.ActiveCfg = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|x64.Build.0 = Debug|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|ARM64.ActiveCfg = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|ARM64.Build.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|ARM64.Deploy.0 = Debug|ARM64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|Win32.ActiveCfg = Release|Win32 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|x64.ActiveCfg = Release|x64 - {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All CustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|Win32.Build.0 = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|ARM64.ActiveCfg = Release|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|ARM64.Build.0 = Release|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|Win32.Build.0 = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot Loader|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Boot|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|Win32.Build.0 = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x64|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver x86|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Driver|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|Win32.Build.0 = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|Win32.Build.0 = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Format|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Mount|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Portable|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|ARM64.ActiveCfg = Release|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|ARM64.Build.0 = Release|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|Win32.Build.0 = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|x64.Build.0 = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|ARM64.ActiveCfg = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|ARM64.Build.0 = Debug|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|x64.ActiveCfg = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|x64.Build.0 = Debug|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|Win32.ActiveCfg = Release|Win32 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|x64.ActiveCfg = Release|x64 - {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All CustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|Win32.Build.0 = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|ARM64.ActiveCfg = Release|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|ARM64.Build.0 = Release|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|Win32.Build.0 = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot Loader|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Boot|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|Win32.Build.0 = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x64|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver x86|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Driver|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Format|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|Win32.Build.0 = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|Win32.Build.0 = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Mount|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Portable|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|ARM64.ActiveCfg = Release|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|ARM64.Build.0 = Release|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|Win32.Build.0 = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|x64.Build.0 = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|ARM64.ActiveCfg = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|ARM64.Build.0 = Debug|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|x64.ActiveCfg = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|x64.Build.0 = Debug|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|Win32.ActiveCfg = Release|Win32 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|x64.ActiveCfg = Release|x64 - {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All CustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|ARM64.ActiveCfg = Release|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|ARM64.Build.0 = Release|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot Loader|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Boot|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x64|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver x86|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Driver|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Format|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Mount|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Portable|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|ARM64.ActiveCfg = Release|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|ARM64.Build.0 = Release|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|Win32.Build.0 = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.Build.0 = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|ARM64.ActiveCfg = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|ARM64.Build.0 = Debug|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|Win32.Build.0 = Debug|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|x64.ActiveCfg = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|x64.Build.0 = Debug|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|ARM64.ActiveCfg = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|ARM64.Build.0 = ReleaseCustomEFI|ARM64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|Win32.ActiveCfg = Release|Win32 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|x64.ActiveCfg = Release|x64 - {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|x64.ActiveCfg = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All CustomEFI|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|x64.ActiveCfg = Debug|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|x64.Build.0 = Debug|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|ARM64.ActiveCfg = Release|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|ARM64.Build.0 = Release|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|x64.ActiveCfg = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|x64.Build.0 = Release|x64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot Loader|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Boot|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x64|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver x86|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Driver|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Format|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Mount|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Portable|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|ARM64.ActiveCfg = Release|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|ARM64.Build.0 = Release|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|x64.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|Win32.Build.0 = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|x64.ActiveCfg = Debug|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|ARM64.ActiveCfg = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|ARM64.Build.0 = Debug|ARM64 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|Win32.ActiveCfg = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|Win32.Build.0 = Release|Win32 - {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup|x64.ActiveCfg = Release|Win32 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All CustomEFI|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All CustomEFI|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All CustomEFI|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All Debug|Win32.ActiveCfg = Debug|Win32 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All Debug|x64.ActiveCfg = Debug|x64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All|ARM64.ActiveCfg = Release|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All|Win32.ActiveCfg = Release|Win32 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.All|x64.ActiveCfg = Release|x64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot Loader|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot Loader|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot Loader|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot Loader|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot Loader|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Boot|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64 Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64 Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64 Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64 Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64 Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x64|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86 Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86 Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86 Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86 Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86 Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver x86|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Driver|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Format|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Mount|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Portable|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Release|ARM64.ActiveCfg = Release|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Release|ARM64.Build.0 = Release|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Release|ARM64.Deploy.0 = Release|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Release|Win32.ActiveCfg = Release|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Release|x64.ActiveCfg = Release|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup Debug|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup Debug|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup Debug|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup Debug|x64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup|ARM64.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup|ARM64.Build.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup|ARM64.Deploy.0 = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup|Win32.ActiveCfg = Debug|ARM64 - {4B41C7B5-75C6-40A2-AF4D-55BC1E012BCD}.Setup|x64.ActiveCfg = Debug|ARM64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|ARM64.ActiveCfg = Release|ARM64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|x64.ActiveCfg = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All CustomEFI|x64.Build.0 = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|ARM64.ActiveCfg = Debug|ARM64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|ARM64.Build.0 = Debug|ARM64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|ARM64.ActiveCfg = Release|ARM64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|ARM64.Build.0 = Release|ARM64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|x64.ActiveCfg = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.All|x64.Build.0 = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot Loader|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Boot|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64 Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x64|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86 Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver x86|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Driver|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Format|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Mount|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Portable|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|ARM64.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|Win32.ActiveCfg = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|Win32.Build.0 = Release|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|x64.ActiveCfg = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Release|x64.Build.0 = Release|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup Debug|x64.Build.0 = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|ARM64.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|ARM64.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|Win32.ActiveCfg = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|Win32.Build.0 = Debug|Win32 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|x64.ActiveCfg = Debug|x64 - {B896FE1F-6BF3-4F75-9148-F841829073D9}.Setup|x64.Build.0 = Debug|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9318E49F-7067-4C2C-BE24-6EB573800B7D} - EndGlobalSection -EndGlobal diff --git a/src/Volume/Cipher.cpp b/src/Volume/Cipher.cpp index 8c6ce390..54bce73d 100644 --- a/src/Volume/Cipher.cpp +++ b/src/Volume/Cipher.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -47,19 +47,19 @@ namespace VeraCrypt Cipher::~Cipher () { } - void Cipher::DecryptBlock (byte *data) const + void Cipher::DecryptBlock (uint8 *data) const { if (!Initialized) throw NotInitialized (SRC_POS); Decrypt (data); } - void Cipher::DecryptBlocks (byte *data, size_t blockCount) const + void Cipher::DecryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); while (blockCount-- > 0) @@ -67,19 +67,19 @@ namespace VeraCrypt Decrypt (data); data += GetBlockSize(); } } - void Cipher::EncryptBlock (byte *data) const + void Cipher::EncryptBlock (uint8 *data) const { if (!Initialized) throw NotInitialized (SRC_POS); Encrypt (data); } - void Cipher::EncryptBlocks (byte *data, size_t blockCount) const + void Cipher::EncryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); while (blockCount-- > 0) @@ -92,15 +92,16 @@ namespace VeraCrypt CipherList Cipher::GetAvailableCiphers () { CipherList l; l.push_back (shared_ptr <Cipher> (new CipherAES ())); + #ifndef WOLFCRYPT_BACKEND l.push_back (shared_ptr <Cipher> (new CipherSerpent ())); l.push_back (shared_ptr <Cipher> (new CipherTwofish ())); l.push_back (shared_ptr <Cipher> (new CipherCamellia ())); l.push_back (shared_ptr <Cipher> (new CipherKuznyechik ())); - + #endif return l; } void Cipher::SetKey (const ConstBufferPtr &key) { @@ -113,29 +114,60 @@ namespace VeraCrypt SetCipherKey (key); Key.CopyFrom (key); Initialized = true; } + #ifdef WOLFCRYPT_BACKEND + void Cipher::SetKeyXTS (const ConstBufferPtr &key) + { + if (key.Size() != GetKeySize ()) + throw ParameterIncorrect (SRC_POS); + + if (!Initialized) + ScheduledKey.Allocate (GetScheduledKeySize ()); + + SetCipherKeyXTS (key); + Key.CopyFrom (key); + Initialized = true; + } + + void Cipher::EncryptBlockXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const + { + if (!Initialized) + throw NotInitialized (SRC_POS); + + EncryptXTS (data, length, startDataUnitNo); + } + + void Cipher::DecryptBlockXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const + { + if (!Initialized) + throw NotInitialized (SRC_POS); + + DecryptXTS (data, length, startDataUnitNo); + } + #endif + #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) #undef TC_EXCEPTION_NODECL #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (CipherException); // AES - void CipherAES::Decrypt (byte *data) const + void CipherAES::Decrypt (uint8 *data) const { #ifdef TC_AES_HW_CPU if (IsHwSupportAvailable()) aes_hw_cpu_decrypt (ScheduledKey.Ptr() + sizeof (aes_encrypt_ctx), data); else #endif aes_decrypt (data, data, (aes_decrypt_ctx *) (ScheduledKey.Ptr() + sizeof (aes_encrypt_ctx))); } - void CipherAES::DecryptBlocks (byte *data, size_t blockCount) const + void CipherAES::DecryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #ifdef TC_AES_HW_CPU @@ -153,21 +185,21 @@ namespace VeraCrypt else #endif Cipher::DecryptBlocks (data, blockCount); } - void CipherAES::Encrypt (byte *data) const + void CipherAES::Encrypt (uint8 *data) const { #ifdef TC_AES_HW_CPU if (IsHwSupportAvailable()) aes_hw_cpu_encrypt (ScheduledKey.Ptr(), data); else #endif aes_encrypt (data, data, (aes_encrypt_ctx *) ScheduledKey.Ptr()); } - void CipherAES::EncryptBlocks (byte *data, size_t blockCount) const + void CipherAES::EncryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #ifdef TC_AES_HW_CPU @@ -184,10 +216,30 @@ namespace VeraCrypt } else #endif Cipher::EncryptBlocks (data, blockCount); } + #ifdef WOLFCRYPT_BACKEND + void CipherAES::EncryptXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const + { + xts_encrypt (data, data, length, startDataUnitNo, (aes_encrypt_ctx *) ScheduledKey.Ptr()); + } + + void CipherAES::DecryptXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const + { + xts_decrypt (data, data, length, startDataUnitNo, (aes_decrypt_ctx *) (ScheduledKey.Ptr() + sizeof (aes_encrypt_ctx))); + } + + void CipherAES::SetCipherKeyXTS (const uint8 *key) + { + if (xts_encrypt_key256 (key, (aes_encrypt_ctx *) ScheduledKey.Ptr()) != EXIT_SUCCESS) + throw CipherInitError (SRC_POS); + + if (xts_decrypt_key256 (key, (aes_decrypt_ctx *) (ScheduledKey.Ptr() + sizeof (aes_encrypt_ctx))) != EXIT_SUCCESS) + throw CipherInitError (SRC_POS); + } + #endif size_t CipherAES::GetScheduledKeySize () const { return sizeof(aes_encrypt_ctx) + sizeof(aes_decrypt_ctx); } @@ -207,41 +259,42 @@ namespace VeraCrypt #else return false; #endif } - void CipherAES::SetCipherKey (const byte *key) + void CipherAES::SetCipherKey (const uint8 *key) { if (aes_encrypt_key256 (key, (aes_encrypt_ctx *) ScheduledKey.Ptr()) != EXIT_SUCCESS) throw CipherInitError (SRC_POS); if (aes_decrypt_key256 (key, (aes_decrypt_ctx *) (ScheduledKey.Ptr() + sizeof (aes_encrypt_ctx))) != EXIT_SUCCESS) throw CipherInitError (SRC_POS); } + #ifndef WOLFCRYPT_BACKEND // Serpent - void CipherSerpent::Decrypt (byte *data) const + void CipherSerpent::Decrypt (uint8 *data) const { serpent_decrypt (data, data, ScheduledKey); } - void CipherSerpent::Encrypt (byte *data) const + void CipherSerpent::Encrypt (uint8 *data) const { serpent_encrypt (data, data, ScheduledKey); } size_t CipherSerpent::GetScheduledKeySize () const { return 140*4; } - void CipherSerpent::SetCipherKey (const byte *key) + void CipherSerpent::SetCipherKey (const uint8 *key) { serpent_set_key (key, ScheduledKey); } - void CipherSerpent::EncryptBlocks (byte *data, size_t blockCount) const + void CipherSerpent::EncryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(CRYPTOPP_DISABLE_ASM) @@ -253,11 +306,11 @@ namespace VeraCrypt else #endif Cipher::EncryptBlocks (data, blockCount); } - void CipherSerpent::DecryptBlocks (byte *data, size_t blockCount) const + void CipherSerpent::DecryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(CRYPTOPP_DISABLE_ASM) @@ -288,31 +341,31 @@ namespace VeraCrypt #endif } // Twofish - void CipherTwofish::Decrypt (byte *data) const + void CipherTwofish::Decrypt (uint8 *data) const { twofish_decrypt ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *)data, (unsigned int *)data); } - void CipherTwofish::Encrypt (byte *data) const + void CipherTwofish::Encrypt (uint8 *data) const { twofish_encrypt ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *)data, (unsigned int *)data); } size_t CipherTwofish::GetScheduledKeySize () const { return TWOFISH_KS; } - void CipherTwofish::SetCipherKey (const byte *key) + void CipherTwofish::SetCipherKey (const uint8 *key) { twofish_set_key ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *) key); } - void CipherTwofish::EncryptBlocks (byte *data, size_t blockCount) const + void CipherTwofish::EncryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) @@ -320,11 +373,11 @@ namespace VeraCrypt #else Cipher::EncryptBlocks (data, blockCount); #endif } - void CipherTwofish::DecryptBlocks (byte *data, size_t blockCount) const + void CipherTwofish::DecryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) @@ -342,31 +395,31 @@ namespace VeraCrypt return false; #endif } // Camellia - void CipherCamellia::Decrypt (byte *data) const + void CipherCamellia::Decrypt (uint8 *data) const { camellia_decrypt (data, data, ScheduledKey.Ptr()); } - void CipherCamellia::Encrypt (byte *data) const + void CipherCamellia::Encrypt (uint8 *data) const { camellia_encrypt (data, data, ScheduledKey.Ptr()); } size_t CipherCamellia::GetScheduledKeySize () const { return CAMELLIA_KS; } - void CipherCamellia::SetCipherKey (const byte *key) + void CipherCamellia::SetCipherKey (const uint8 *key) { camellia_set_key (key, ScheduledKey.Ptr()); } - void CipherCamellia::EncryptBlocks (byte *data, size_t blockCount) const + void CipherCamellia::EncryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) @@ -374,11 +427,11 @@ namespace VeraCrypt #else Cipher::EncryptBlocks (data, blockCount); #endif } - void CipherCamellia::DecryptBlocks (byte *data, size_t blockCount) const + void CipherCamellia::DecryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM) @@ -396,30 +449,30 @@ namespace VeraCrypt return false; #endif } // Kuznyechik - void CipherKuznyechik::Decrypt (byte *data) const + void CipherKuznyechik::Decrypt (uint8 *data) const { kuznyechik_decrypt_block (data, data, (kuznyechik_kds *) ScheduledKey.Ptr()); } - void CipherKuznyechik::Encrypt (byte *data) const + void CipherKuznyechik::Encrypt (uint8 *data) const { kuznyechik_encrypt_block (data, data, (kuznyechik_kds *) ScheduledKey.Ptr()); } size_t CipherKuznyechik::GetScheduledKeySize () const { return KUZNYECHIK_KS; } - void CipherKuznyechik::SetCipherKey (const byte *key) + void CipherKuznyechik::SetCipherKey (const uint8 *key) { kuznyechik_set_key (key, (kuznyechik_kds *) ScheduledKey.Ptr()); } - void CipherKuznyechik::EncryptBlocks (byte *data, size_t blockCount) const + void CipherKuznyechik::EncryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE @@ -431,11 +484,11 @@ namespace VeraCrypt else #endif Cipher::EncryptBlocks (data, blockCount); } - void CipherKuznyechik::DecryptBlocks (byte *data, size_t blockCount) const + void CipherKuznyechik::DecryptBlocks (uint8 *data, size_t blockCount) const { if (!Initialized) throw NotInitialized (SRC_POS); #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE @@ -463,7 +516,8 @@ namespace VeraCrypt return state; #else return false; #endif } - bool Cipher::HwSupportEnabled = true; + #endif + bool Cipher::HwSupportEnabled = true; } diff --git a/src/Volume/Cipher.h b/src/Volume/Cipher.h index 31a519a5..4c0d4893 100644 --- a/src/Volume/Cipher.h +++ b/src/Volume/Cipher.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -24,15 +24,22 @@ namespace VeraCrypt class Cipher { public: virtual ~Cipher (); - virtual void DecryptBlock (byte *data) const; - virtual void DecryptBlocks (byte *data, size_t blockCount) const; - static void EnableHwSupport (bool enable) { HwSupportEnabled = enable; } - virtual void EncryptBlock (byte *data) const; - virtual void EncryptBlocks (byte *data, size_t blockCount) const; + virtual void DecryptBlock (uint8 *data) const; + virtual void DecryptBlocks (uint8 *data, size_t blockCount) const; + #ifndef WOLFCRYPT_BACKEND + static void EnableHwSupport (bool enable) { HwSupportEnabled = enable; } + #else + static void EnableHwSupport (bool enable) { HwSupportEnabled = false; } + virtual void EncryptBlockXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const; + virtual void DecryptBlockXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const; + virtual void SetKeyXTS (const ConstBufferPtr &key); + #endif + virtual void EncryptBlock (uint8 *data) const; + virtual void EncryptBlocks (uint8 *data, size_t blockCount) const; static CipherList GetAvailableCiphers (); virtual size_t GetBlockSize () const = 0; virtual const SecureBuffer &GetKey () const { return Key; } virtual size_t GetKeySize () const = 0; virtual wstring GetName () const = 0; @@ -44,14 +51,19 @@ namespace VeraCrypt static const int MaxBlockSize = 16; protected: Cipher (); - virtual void Decrypt (byte *data) const = 0; - virtual void Encrypt (byte *data) const = 0; + virtual void Decrypt (uint8 *data) const = 0; + virtual void Encrypt (uint8 *data) const = 0; virtual size_t GetScheduledKeySize () const = 0; - virtual void SetCipherKey (const byte *key) = 0; + virtual void SetCipherKey (const uint8 *key) = 0; + #ifdef WOLFCRYPT_BACKEND + virtual void DecryptXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const = 0; + virtual void EncryptXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const = 0; + virtual void SetCipherKeyXTS (const uint8 *key) = 0; + #endif static bool HwSupportEnabled; bool Initialized; SecureBuffer Key; SecureBuffer ScheduledKey; @@ -67,10 +79,11 @@ namespace VeraCrypt CipherException () { } CipherException (const string &message) : Exception (message) { } CipherException (const string &message, const wstring &subject) : Exception (message, subject) { } }; +#ifdef WOLFCRYPT_BACKEND #define TC_CIPHER(NAME, BLOCK_SIZE, KEY_SIZE) \ class TC_JOIN (Cipher,NAME) : public Cipher \ { \ public: \ @@ -82,23 +95,54 @@ namespace VeraCrypt virtual wstring GetName () const { return L###NAME; }; \ virtual shared_ptr <Cipher> GetNew () const { return shared_ptr <Cipher> (new TC_JOIN (Cipher,NAME)()); } \ TC_CIPHER_ADD_METHODS \ \ protected: \ - virtual void Decrypt (byte *data) const; \ - virtual void Encrypt (byte *data) const; \ + virtual void Decrypt (uint8 *data) const; \ + virtual void Encrypt (uint8 *data) const; \ virtual size_t GetScheduledKeySize () const; \ - virtual void SetCipherKey (const byte *key); \ + virtual void SetCipherKey (const uint8 *key); \ + virtual void DecryptXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const; \ + virtual void SetCipherKeyXTS (const uint8 *key); \ + virtual void EncryptXTS (uint8 *data, uint64 length, uint64 startDataUnitNo) const; \ \ private: \ TC_JOIN (Cipher,NAME) (const TC_JOIN (Cipher,NAME) &); \ TC_JOIN (Cipher,NAME) &operator= (const TC_JOIN (Cipher,NAME) &); \ } +#else + +#define TC_CIPHER(NAME, BLOCK_SIZE, KEY_SIZE) \ + class TC_JOIN (Cipher,NAME) : public Cipher \ + { \ + public: \ + TC_JOIN (Cipher,NAME) () { } \ + virtual ~TC_JOIN (Cipher,NAME) () { } \ +\ + virtual size_t GetBlockSize () const { return BLOCK_SIZE; }; \ + virtual size_t GetKeySize () const { return KEY_SIZE; }; \ + virtual wstring GetName () const { return L###NAME; }; \ + virtual shared_ptr <Cipher> GetNew () const { return shared_ptr <Cipher> (new TC_JOIN (Cipher,NAME)()); } \ + TC_CIPHER_ADD_METHODS \ +\ + protected: \ + virtual void Decrypt (uint8 *data) const; \ + virtual void Encrypt (uint8 *data) const; \ + virtual size_t GetScheduledKeySize () const; \ + virtual void SetCipherKey (const uint8 *key); \ +\ + private: \ + TC_JOIN (Cipher,NAME) (const TC_JOIN (Cipher,NAME) &); \ + TC_JOIN (Cipher,NAME) &operator= (const TC_JOIN (Cipher,NAME) &); \ + } + +#endif + #define TC_CIPHER_ADD_METHODS \ - virtual void DecryptBlocks (byte *data, size_t blockCount) const; \ - virtual void EncryptBlocks (byte *data, size_t blockCount) const; \ + virtual void DecryptBlocks (uint8 *data, size_t blockCount) const; \ + virtual void EncryptBlocks (uint8 *data, size_t blockCount) const; \ virtual bool IsHwSupportAvailable () const; TC_CIPHER (AES, 16, 32); TC_CIPHER (Serpent, 16, 32); TC_CIPHER (Twofish, 16, 32); diff --git a/src/Volume/Crc32.h b/src/Volume/Crc32.h index ced20457..4b1ee045 100644 --- a/src/Volume/Crc32.h +++ b/src/Volume/Crc32.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -24,18 +24,18 @@ namespace VeraCrypt Crc32 () : CrcValue (0xffffFFFF) { }; virtual ~Crc32 () { }; uint32 Get () const { return CrcValue ^ 0xffffFFFF; } - uint32 Process (byte data) + uint32 Process (uint8 data) { - return CrcValue = crc_32_tab[(byte) (CrcValue ^ data)] ^ (CrcValue >> 8); + return CrcValue = crc_32_tab[(uint8) (CrcValue ^ data)] ^ (CrcValue >> 8); } static uint32 ProcessBuffer (const ConstBufferPtr &buffer) { - return ::GetCrc32 (const_cast<byte *> (buffer.Get()), static_cast<int> (buffer.Size())); + return ::GetCrc32 (const_cast<uint8 *> (buffer.Get()), static_cast<int> (buffer.Size())); } protected: uint32 CrcValue; diff --git a/src/Volume/EncryptionAlgorithm.cpp b/src/Volume/EncryptionAlgorithm.cpp index 85d9be1c..5090a254 100644 --- a/src/Volume/EncryptionAlgorithm.cpp +++ b/src/Volume/EncryptionAlgorithm.cpp @@ -2,18 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "EncryptionAlgorithm.h" #include "EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "EncryptionModeWolfCryptXTS.h" +#endif namespace VeraCrypt { EncryptionAlgorithm::EncryptionAlgorithm () : Deprecated (false) { @@ -21,49 +24,50 @@ namespace VeraCrypt EncryptionAlgorithm::~EncryptionAlgorithm () { } - void EncryptionAlgorithm::Decrypt (byte *data, uint64 length) const + void EncryptionAlgorithm::Decrypt (uint8 *data, uint64 length) const { if_debug (ValidateState ()); Mode->Decrypt (data, length); } void EncryptionAlgorithm::Decrypt (const BufferPtr &data) const { Decrypt (data, data.Size()); } - void EncryptionAlgorithm::DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + void EncryptionAlgorithm::DecryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const { if_debug (ValidateState()); Mode->DecryptSectors (data, sectorIndex, sectorCount, sectorSize); } - void EncryptionAlgorithm::Encrypt (byte *data, uint64 length) const + void EncryptionAlgorithm::Encrypt (uint8 *data, uint64 length) const { if_debug (ValidateState()); Mode->Encrypt (data, length); } void EncryptionAlgorithm::Encrypt (const BufferPtr &data) const { Encrypt (data, data.Size()); } - void EncryptionAlgorithm::EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + void EncryptionAlgorithm::EncryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const { if_debug (ValidateState ()); Mode->EncryptSectors (data, sectorIndex, sectorCount, sectorSize); } EncryptionAlgorithmList EncryptionAlgorithm::GetAvailableAlgorithms () { EncryptionAlgorithmList l; l.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); + #ifndef WOLFCRYPT_BACKEND l.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); @@ -74,11 +78,11 @@ namespace VeraCrypt l.push_back (shared_ptr <EncryptionAlgorithm> (new KuznyechikSerpentCamellia ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new KuznyechikTwofish ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ())); - + #endif return l; } size_t EncryptionAlgorithm::GetLargestKeySize (const EncryptionAlgorithmList &algorithms) { @@ -213,24 +217,47 @@ namespace VeraCrypt c.SetKey (key.GetRange (keyOffset, c.GetKeySize())); keyOffset += c.GetKeySize(); } } - void EncryptionAlgorithm::ValidateState () const + #ifdef WOLFCRYPT_BACKEND + void EncryptionAlgorithm::SetKeyXTS (const ConstBufferPtr &key) + { + if (Ciphers.size() < 1) + throw NotInitialized (SRC_POS); + + if (GetKeySize() != key.Size()) + throw ParameterIncorrect (SRC_POS); + + size_t keyOffset = 0; + foreach_ref (Cipher &c, Ciphers) + { + c.SetKeyXTS (key.GetRange (keyOffset, c.GetKeySize())); + keyOffset += c.GetKeySize(); + } + } + #endif + + void EncryptionAlgorithm::ValidateState () const { if (Ciphers.size() < 1 || Mode.get() == nullptr) throw NotInitialized (SRC_POS); } // AES AES::AES () { Ciphers.push_back (shared_ptr <Cipher> (new CipherAES())); + #ifdef WOLFCRYPT_BACKEND + SupportedModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeWolfCryptXTS ())); + #else SupportedModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); - } + #endif + } +#ifndef WOLFCRYPT_BACKEND // AES-Twofish AESTwofish::AESTwofish () { Ciphers.push_back (shared_ptr <Cipher> (new CipherTwofish ())); Ciphers.push_back (shared_ptr <Cipher> (new CipherAES ())); @@ -351,6 +378,7 @@ namespace VeraCrypt Ciphers.push_back (shared_ptr <Cipher> (new CipherSerpent ())); Ciphers.push_back (shared_ptr <Cipher> (new CipherCamellia ())); SupportedModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); } +#endif } diff --git a/src/Volume/EncryptionAlgorithm.h b/src/Volume/EncryptionAlgorithm.h index 56642146..7b6f83dc 100644 --- a/src/Volume/EncryptionAlgorithm.h +++ b/src/Volume/EncryptionAlgorithm.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -25,16 +25,16 @@ namespace VeraCrypt class EncryptionAlgorithm { public: virtual ~EncryptionAlgorithm (); - virtual void Decrypt (byte *data, uint64 length) const; + virtual void Decrypt (uint8 *data, uint64 length) const; virtual void Decrypt (const BufferPtr &data) const; - virtual void DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; - virtual void Encrypt (byte *data, uint64 length) const; + virtual void DecryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual void Encrypt (uint8 *data, uint64 length) const; virtual void Encrypt (const BufferPtr &data) const; - virtual void EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual void EncryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; static EncryptionAlgorithmList GetAvailableAlgorithms (); virtual const CipherList &GetCiphers () const { return Ciphers; } virtual shared_ptr <EncryptionAlgorithm> GetNew () const = 0; virtual size_t GetMaxBlockSize () const; virtual size_t GetMinBlockSize () const; @@ -44,11 +44,14 @@ namespace VeraCrypt virtual wstring GetName (bool forGuiDisplay = false) const; bool IsDeprecated () const { return Deprecated; } virtual bool IsModeSupported (const EncryptionMode &mode) const; virtual bool IsModeSupported (const shared_ptr <EncryptionMode> mode) const; virtual void SetKey (const ConstBufferPtr &key); - virtual void SetMode (shared_ptr <EncryptionMode> mode); + #ifdef WOLFCRYPT_BACKEND + virtual void SetKeyXTS (const ConstBufferPtr &key); + #endif + virtual void SetMode (shared_ptr <EncryptionMode> mode); protected: EncryptionAlgorithm (); void ValidateState () const; diff --git a/src/Volume/EncryptionMode.cpp b/src/Volume/EncryptionMode.cpp index b7e5cc02..5519f36a 100644 --- a/src/Volume/EncryptionMode.cpp +++ b/src/Volume/EncryptionMode.cpp @@ -2,18 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "EncryptionMode.h" #include "EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "EncryptionModeWolfCryptXTS.h" +#endif #include "EncryptionThreadPool.h" namespace VeraCrypt { EncryptionMode::EncryptionMode () : KeySet (false), SectorOffset (0) @@ -22,42 +25,46 @@ namespace VeraCrypt EncryptionMode::~EncryptionMode () { } - void EncryptionMode::DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + void EncryptionMode::DecryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const { EncryptionThreadPool::DoWork (EncryptionThreadPool::WorkType::DecryptDataUnits, this, data, sectorIndex, sectorCount, sectorSize); } - void EncryptionMode::EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + void EncryptionMode::EncryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const { EncryptionThreadPool::DoWork (EncryptionThreadPool::WorkType::EncryptDataUnits, this, data, sectorIndex, sectorCount, sectorSize); } EncryptionModeList EncryptionMode::GetAvailableModes () { EncryptionModeList l; + #ifdef WOLFCRYPT_BACKEND + l.push_back (shared_ptr <EncryptionMode> (new EncryptionModeWolfCryptXTS ())); + #else l.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); + #endif return l; } void EncryptionMode::ValidateState () const { if (!KeySet || Ciphers.size() < 1) throw NotInitialized (SRC_POS); } - void EncryptionMode::ValidateParameters (byte *data, uint64 length) const + void EncryptionMode::ValidateParameters (uint8 *data, uint64 length) const { if ((Ciphers.size() > 0 && (length % Ciphers.front()->GetBlockSize()) != 0)) throw ParameterIncorrect (SRC_POS); } - void EncryptionMode::ValidateParameters (byte *data, uint64 sectorCount, size_t sectorSize) const + void EncryptionMode::ValidateParameters (uint8 *data, uint64 sectorCount, size_t sectorSize) const { if (sectorCount == 0 || sectorSize == 0 || (sectorSize % EncryptionDataUnitSize) != 0) throw ParameterIncorrect (SRC_POS); } } diff --git a/src/Volume/EncryptionMode.h b/src/Volume/EncryptionMode.h index a629d6b7..bc9d0a06 100644 --- a/src/Volume/EncryptionMode.h +++ b/src/Volume/EncryptionMode.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -25,16 +25,16 @@ namespace VeraCrypt class EncryptionMode { public: virtual ~EncryptionMode (); - virtual void Decrypt (byte *data, uint64 length) const = 0; - virtual void DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; - virtual void DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const = 0; - virtual void Encrypt (byte *data, uint64 length) const = 0; - virtual void EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; - virtual void EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const = 0; + virtual void Decrypt (uint8 *data, uint64 length) const = 0; + virtual void DecryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual void DecryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const = 0; + virtual void Encrypt (uint8 *data, uint64 length) const = 0; + virtual void EncryptSectors (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual void EncryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const = 0; static EncryptionModeList GetAvailableModes (); virtual const SecureBuffer &GetKey () const { throw NotApplicable (SRC_POS); } virtual size_t GetKeySize () const = 0; virtual wstring GetName () const = 0; virtual shared_ptr <EncryptionMode> GetNew () const = 0; @@ -46,12 +46,12 @@ namespace VeraCrypt protected: EncryptionMode (); virtual void ValidateState () const; - void ValidateParameters (byte *data, uint64 length) const; - virtual void ValidateParameters (byte *data, uint64 sectorCount, size_t sectorSize) const; + void ValidateParameters (uint8 *data, uint64 length) const; + virtual void ValidateParameters (uint8 *data, uint64 sectorCount, size_t sectorSize) const; static const size_t EncryptionDataUnitSize = ENCRYPTION_DATA_UNIT_SIZE; CipherList Ciphers; bool KeySet; diff --git a/src/Volume/EncryptionModeWolfCryptXTS.cpp b/src/Volume/EncryptionModeWolfCryptXTS.cpp new file mode 100644 index 00000000..878ad042 --- /dev/null +++ b/src/Volume/EncryptionModeWolfCryptXTS.cpp @@ -0,0 +1,119 @@ + +#include "Crypto/cpu.h" +#include "Crypto/misc.h" +#include "EncryptionModeWolfCryptXTS.h" +#include "Common/Crypto.h" + +namespace VeraCrypt +{ + void EncryptionModeWolfCryptXTS::Encrypt (uint8 *data, uint64 length) const + { + EncryptBuffer (data, length, 0); + } + + void EncryptionModeWolfCryptXTS::EncryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const + { + if_debug (ValidateState()); + + CipherList::const_iterator iSecondaryCipher = SecondaryCiphers.begin(); + + for (CipherList::const_iterator iCipher = Ciphers.begin(); iCipher != Ciphers.end(); ++iCipher) + { + EncryptBufferXTS (**iCipher, **iSecondaryCipher, data, length, startDataUnitNo, 0); + ++iSecondaryCipher; + } + + assert (iSecondaryCipher == SecondaryCiphers.end()); + } + + void EncryptionModeWolfCryptXTS::EncryptBufferXTS (Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const + { + cipher.EncryptBlockXTS(buffer, length, startDataUnitNo); + } + + void EncryptionModeWolfCryptXTS::EncryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + { + EncryptBuffer (data, sectorCount * sectorSize, sectorIndex * sectorSize / ENCRYPTION_DATA_UNIT_SIZE); + } + + size_t EncryptionModeWolfCryptXTS::GetKeySize () const + { + if (Ciphers.empty()) + throw NotInitialized (SRC_POS); + + size_t keySize = 0; + foreach_ref (const Cipher &cipher, SecondaryCiphers) + { + keySize += cipher.GetKeySize(); + } + + return keySize; + } + + void EncryptionModeWolfCryptXTS::Decrypt (uint8 *data, uint64 length) const + { + DecryptBuffer (data, length, 0); + } + + void EncryptionModeWolfCryptXTS::DecryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const + { + if_debug (ValidateState()); + + CipherList::const_iterator iSecondaryCipher = SecondaryCiphers.end(); + + for (CipherList::const_reverse_iterator iCipher = Ciphers.rbegin(); iCipher != Ciphers.rend(); ++iCipher) + { + --iSecondaryCipher; + DecryptBufferXTS (**iCipher, **iSecondaryCipher, data, length, startDataUnitNo, 0); + } + + assert (iSecondaryCipher == SecondaryCiphers.begin()); + } + + void EncryptionModeWolfCryptXTS::DecryptBufferXTS (Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const + { + cipher.DecryptBlockXTS(buffer, length, startDataUnitNo); + } + + void EncryptionModeWolfCryptXTS::DecryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + { + DecryptBuffer (data, sectorCount * sectorSize, sectorIndex * sectorSize / ENCRYPTION_DATA_UNIT_SIZE); + } + + void EncryptionModeWolfCryptXTS::SetCiphers (const CipherList &ciphers) + { + EncryptionMode::SetCiphers (ciphers); + + SecondaryCiphers.clear(); + + foreach_ref (const Cipher &cipher, ciphers) + { + SecondaryCiphers.push_back (cipher.GetNew()); + } + + if (SecondaryKey.Size() > 0) + SetSecondaryCipherKeys(); + } + + void EncryptionModeWolfCryptXTS::SetKey (const ConstBufferPtr &key) + { + SecondaryKey.Allocate (key.Size()); + SecondaryKey.CopyFrom (key); + + if (!SecondaryCiphers.empty()) + SetSecondaryCipherKeys(); + + } + + void EncryptionModeWolfCryptXTS::SetSecondaryCipherKeys () + { + size_t keyOffset = 0; + foreach_ref (Cipher &cipher, SecondaryCiphers) + { + cipher.SetKeyXTS (SecondaryKey.GetRange (keyOffset, cipher.GetKeySize())); + keyOffset += cipher.GetKeySize(); + } + + KeySet = true; + } +} diff --git a/src/Volume/EncryptionModeWolfCryptXTS.h b/src/Volume/EncryptionModeWolfCryptXTS.h new file mode 100644 index 00000000..e19a5d23 --- /dev/null +++ b/src/Volume/EncryptionModeWolfCryptXTS.h @@ -0,0 +1,54 @@ +/* + Derived from source code of TrueCrypt 7.1a, which is + Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed + by the TrueCrypt License 3.0. + + Modifications and additions to the original source code (contained in this file) + and all other portions of this file are Copyright (c) 2013-2025 IDRIX + and are governed by the Apache License 2.0 the full text of which is + contained in the file License.txt included in VeraCrypt binary and source + code distribution packages. +*/ + +#ifndef TC_HEADER_Volume_EncryptionModeWolfCryptXTS +#define TC_HEADER_Volume_EncryptionModeWolfCryptXTS + +#include "Platform/Platform.h" +#include "EncryptionMode.h" + +namespace VeraCrypt +{ + class EncryptionModeWolfCryptXTS : public EncryptionMode + { + public: + EncryptionModeWolfCryptXTS () { } + virtual ~EncryptionModeWolfCryptXTS () { } + + virtual void Decrypt (uint8 *data, uint64 length) const; + virtual void DecryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual void Encrypt (uint8 *data, uint64 length) const; + virtual void EncryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual const SecureBuffer &GetKey () const { return SecondaryKey; } + virtual size_t GetKeySize () const; + virtual wstring GetName () const { return L"XTS"; }; + virtual shared_ptr <EncryptionMode> GetNew () const { return shared_ptr <EncryptionMode> (new EncryptionModeWolfCryptXTS); } + virtual void SetCiphers (const CipherList &ciphers); + virtual void SetKey (const ConstBufferPtr &key); + + protected: + void DecryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const; + void DecryptBufferXTS (Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const; + void EncryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const; + void EncryptBufferXTS (Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const; + void SetSecondaryCipherKeys (); + + SecureBuffer SecondaryKey; + CipherList SecondaryCiphers; + + private: + EncryptionModeWolfCryptXTS (const EncryptionModeWolfCryptXTS &); + EncryptionModeWolfCryptXTS &operator= (const EncryptionModeWolfCryptXTS &); + }; +} + +#endif // TC_HEADER_Volume_EncryptionModeWolfCryptXTS diff --git a/src/Volume/EncryptionModeXTS.cpp b/src/Volume/EncryptionModeXTS.cpp index 66f0ff62..96427e0c 100644 --- a/src/Volume/EncryptionModeXTS.cpp +++ b/src/Volume/EncryptionModeXTS.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -45,16 +45,16 @@ #endif namespace VeraCrypt { - void EncryptionModeXTS::Encrypt (byte *data, uint64 length) const + void EncryptionModeXTS::Encrypt (uint8 *data, uint64 length) const { EncryptBuffer (data, length, 0); } - void EncryptionModeXTS::EncryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const + void EncryptionModeXTS::EncryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const { if_debug (ValidateState()); CipherList::const_iterator iSecondaryCipher = SecondaryCiphers.begin(); @@ -65,16 +65,16 @@ namespace VeraCrypt } assert (iSecondaryCipher == SecondaryCiphers.end()); } - void EncryptionModeXTS::EncryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const + void EncryptionModeXTS::EncryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const { - byte finalCarry; - byte whiteningValues [ENCRYPTION_DATA_UNIT_SIZE]; - byte whiteningValue [BYTES_PER_XTS_BLOCK]; - byte byteBufUnitNo [BYTES_PER_XTS_BLOCK]; + uint8 finalCarry; + uint8 whiteningValues [ENCRYPTION_DATA_UNIT_SIZE]; + uint8 whiteningValue [BYTES_PER_XTS_BLOCK]; + uint8 byteBufUnitNo [BYTES_PER_XTS_BLOCK]; uint64 *whiteningValuesPtr64 = (uint64 *) whiteningValues; uint64 *whiteningValuePtr64 = (uint64 *) whiteningValue; uint64 *bufPtr = (uint64 *) buffer; uint64 *dataUnitBufPtr; unsigned int startBlock = startCipherBlockNo, endBlock, block, countBlock; @@ -180,11 +180,11 @@ namespace VeraCrypt *bufPtr++ ^= *whiteningValuesPtr64++; *bufPtr++ ^= *whiteningValuesPtr64++; } #endif // Actual encryption - cipher.EncryptBlocks ((byte *) dataUnitBufPtr, countBlock); + cipher.EncryptBlocks ((uint8 *) dataUnitBufPtr, countBlock); bufPtr = dataUnitBufPtr; whiteningValuesPtr64 = (uint64 *) whiteningValues; #if (CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && CRYPTOPP_BOOL_X64) @@ -205,11 +205,11 @@ namespace VeraCrypt FAST_ERASE64 (whiteningValue, sizeof (whiteningValue)); FAST_ERASE64 (whiteningValues, sizeof (whiteningValues)); } - void EncryptionModeXTS::EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + void EncryptionModeXTS::EncryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const { EncryptBuffer (data, sectorCount * sectorSize, sectorIndex * sectorSize / ENCRYPTION_DATA_UNIT_SIZE); } size_t EncryptionModeXTS::GetKeySize () const @@ -224,16 +224,16 @@ namespace VeraCrypt } return keySize; } - void EncryptionModeXTS::Decrypt (byte *data, uint64 length) const + void EncryptionModeXTS::Decrypt (uint8 *data, uint64 length) const { DecryptBuffer (data, length, 0); } - void EncryptionModeXTS::DecryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const + void EncryptionModeXTS::DecryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const { if_debug (ValidateState()); CipherList::const_iterator iSecondaryCipher = SecondaryCiphers.end(); @@ -244,16 +244,16 @@ namespace VeraCrypt } assert (iSecondaryCipher == SecondaryCiphers.begin()); } - void EncryptionModeXTS::DecryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const + void EncryptionModeXTS::DecryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const { - byte finalCarry; - byte whiteningValues [ENCRYPTION_DATA_UNIT_SIZE]; - byte whiteningValue [BYTES_PER_XTS_BLOCK]; - byte byteBufUnitNo [BYTES_PER_XTS_BLOCK]; + uint8 finalCarry; + uint8 whiteningValues [ENCRYPTION_DATA_UNIT_SIZE]; + uint8 whiteningValue [BYTES_PER_XTS_BLOCK]; + uint8 byteBufUnitNo [BYTES_PER_XTS_BLOCK]; uint64 *whiteningValuesPtr64 = (uint64 *) whiteningValues; uint64 *whiteningValuePtr64 = (uint64 *) whiteningValue; uint64 *bufPtr = (uint64 *) buffer; uint64 *dataUnitBufPtr; unsigned int startBlock = startCipherBlockNo, endBlock, block, countBlock; @@ -350,11 +350,11 @@ namespace VeraCrypt { *bufPtr++ ^= *whiteningValuesPtr64++; *bufPtr++ ^= *whiteningValuesPtr64++; } #endif - cipher.DecryptBlocks ((byte *) dataUnitBufPtr, countBlock); + cipher.DecryptBlocks ((uint8 *) dataUnitBufPtr, countBlock); bufPtr = dataUnitBufPtr; whiteningValuesPtr64 = (uint64 *) whiteningValues; #if (CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && CRYPTOPP_BOOL_X64) XorBlocks (bufPtr, whiteningValuesPtr64, countBlock, startBlock, endBlock); @@ -372,13 +372,13 @@ namespace VeraCrypt *((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo); } FAST_ERASE64 (whiteningValue, sizeof (whiteningValue)); FAST_ERASE64 (whiteningValues, sizeof (whiteningValues)); - } + } - void EncryptionModeXTS::DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const + void EncryptionModeXTS::DecryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const { DecryptBuffer (data, sectorCount * sectorSize, sectorIndex * sectorSize / ENCRYPTION_DATA_UNIT_SIZE); } void EncryptionModeXTS::SetCiphers (const CipherList &ciphers) @@ -409,11 +409,11 @@ namespace VeraCrypt { size_t keyOffset = 0; foreach_ref (Cipher &cipher, SecondaryCiphers) { cipher.SetKey (SecondaryKey.GetRange (keyOffset, cipher.GetKeySize())); - keyOffset += cipher.GetKeySize(); + keyOffset += cipher.GetKeySize(); } KeySet = true; } } diff --git a/src/Volume/EncryptionModeXTS.h b/src/Volume/EncryptionModeXTS.h index 6f674073..80130efd 100644 --- a/src/Volume/EncryptionModeXTS.h +++ b/src/Volume/EncryptionModeXTS.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -22,26 +22,26 @@ namespace VeraCrypt { public: EncryptionModeXTS () { } virtual ~EncryptionModeXTS () { } - virtual void Decrypt (byte *data, uint64 length) const; - virtual void DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; - virtual void Encrypt (byte *data, uint64 length) const; - virtual void EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual void Decrypt (uint8 *data, uint64 length) const; + virtual void DecryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; + virtual void Encrypt (uint8 *data, uint64 length) const; + virtual void EncryptSectorsCurrentThread (uint8 *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const; virtual const SecureBuffer &GetKey () const { return SecondaryKey; } virtual size_t GetKeySize () const; virtual wstring GetName () const { return L"XTS"; }; virtual shared_ptr <EncryptionMode> GetNew () const { return shared_ptr <EncryptionMode> (new EncryptionModeXTS); } virtual void SetCiphers (const CipherList &ciphers); virtual void SetKey (const ConstBufferPtr &key); protected: - void DecryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const; - void DecryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const; - void EncryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const; - void EncryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const; + void DecryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const; + void DecryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const; + void EncryptBuffer (uint8 *data, uint64 length, uint64 startDataUnitNo) const; + void EncryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, uint8 *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const; void SetSecondaryCipherKeys (); SecureBuffer SecondaryKey; CipherList SecondaryCiphers; diff --git a/src/Volume/EncryptionTest.cpp b/src/Volume/EncryptionTest.cpp index bb9c3a0b..dfa1e5ea 100644 --- a/src/Volume/EncryptionTest.cpp +++ b/src/Volume/EncryptionTest.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -14,10 +14,13 @@ #include "Common/Crc.h" #include "Crc32.h" #include "EncryptionAlgorithm.h" #include "EncryptionMode.h" #include "EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "EncryptionModeWolfCryptXTS.h" +#endif #include "EncryptionTest.h" #include "Pkcs5Kdf.h" namespace VeraCrypt { @@ -41,13 +44,13 @@ namespace VeraCrypt } struct CipherTestVector { - byte Key[32]; - byte Plaintext[16]; - byte Ciphertext[16]; + uint8 Key[32]; + uint8 Plaintext[16]; + uint8 Ciphertext[16]; }; static const CipherTestVector AESTestVectors[] = { { @@ -62,10 +65,11 @@ namespace VeraCrypt 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf, 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 } } }; + #ifndef WOLFCRYPT_BACKEND static const CipherTestVector SerpentTestVectors[] = { { { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, @@ -149,10 +153,11 @@ namespace VeraCrypt { 0xB4, 0x29, 0x91, 0x2C, 0x6E, 0x00, 0x32, 0xF9, 0x28, 0x54, 0x52, 0xD7, 0x67, 0x18, 0xD0, 0x8B } } }; + #endif static void TestCipher (Cipher &cipher, const CipherTestVector *testVector, size_t testVectorCount) { Buffer buffer (cipher.GetBlockSize()); for (size_t i = 0; i < testVectorCount; ++i) @@ -172,11 +177,11 @@ namespace VeraCrypt TestCipher (aes, AESTestVectors, array_capacity (AESTestVectors)); Buffer testData (1024); for (size_t i = 0; i < testData.Size(); ++i) { - testData[i] = (byte) i; + testData[i] = (uint8) i; } uint32 origCrc = Crc32::ProcessBuffer (testData); aes.SetKey (ConstBufferPtr (testData, aes.GetKeySize())); @@ -188,10 +193,11 @@ namespace VeraCrypt aes.DecryptBlocks (testData, testData.Size() / aes.GetBlockSize()); if (origCrc != Crc32::ProcessBuffer (testData)) throw TestFailed (SRC_POS); + #ifndef WOLFCRYPT_BACKEND CipherSerpent serpent; TestCipher (serpent, SerpentTestVectors, array_capacity (SerpentTestVectors)); CipherTwofish twofish; TestCipher (twofish, TwofishTestVectors, array_capacity (TwofishTestVectors)); @@ -199,10 +205,11 @@ namespace VeraCrypt CipherCamellia camellia; TestCipher (camellia, CamelliaTestVectors, array_capacity (CamelliaTestVectors)); CipherKuznyechik kuznyechik; TestCipher (kuznyechik, KuznyechikTestVectors, array_capacity (KuznyechikTestVectors)); + #endif } const EncryptionTest::XtsTestVector EncryptionTest::XtsTestVectors[] = { /* XTS-AES-256 */ @@ -435,13 +442,20 @@ namespace VeraCrypt size_t i; for (i = 0; i < array_capacity (XtsTestVectors); i++) { AES aes; - shared_ptr <EncryptionMode> xts (new EncryptionModeXTS); - - aes.SetKey (ConstBufferPtr (XtsTestVectors[i].key1, sizeof (XtsTestVectors[i].key1))); + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS); + #else + shared_ptr <EncryptionMode> xts (new EncryptionModeXTS); + #endif + + aes.SetKey (ConstBufferPtr (XtsTestVectors[i].key1, sizeof (XtsTestVectors[i].key1))); + #ifdef WOLFCRYPT_BACKEND + aes.SetKeyXTS (ConstBufferPtr (XtsTestVectors[i].key2, sizeof (XtsTestVectors[i].key2))); + #endif xts->SetKey (ConstBufferPtr (XtsTestVectors[i].key2, sizeof (XtsTestVectors[i].key2))); aes.SetMode (xts); memcpy (p, XtsTestVectors[i].plaintext, sizeof (p)); @@ -469,11 +483,11 @@ namespace VeraCrypt uint64 nbrUnits; uint64 writeOffset; int testCase = 0; int nTestsPerformed = 0; - static const byte testKey[] = + static const uint8 testKey[] = { 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27, 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13 }; @@ -492,26 +506,33 @@ namespace VeraCrypt unitNo = writeOffset / ENCRYPTION_DATA_UNIT_SIZE; // Test all EAs that support this mode of operation foreach_ref (EncryptionAlgorithm &ea, EncryptionAlgorithm::GetAvailableAlgorithms()) { - shared_ptr <EncryptionMode> mode (new EncryptionModeXTS); + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> mode (new EncryptionModeWolfCryptXTS); + #else + shared_ptr <EncryptionMode> mode (new EncryptionModeXTS); + #endif if (!ea.IsModeSupported (mode)) continue; ea.SetKey (ConstBufferPtr (testKey, ea.GetKeySize())); Buffer modeKey (ea.GetKeySize()); for (size_t mi = 0; mi < modeKey.Size(); mi++) - modeKey[mi] = (byte) mi; + modeKey[mi] = (uint8) mi; modeKey.CopyFrom (ConstBufferPtr (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2, sizeof (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2))); mode->SetKey (modeKey); ea.SetMode (mode); + #ifdef WOLFCRYPT_BACKEND + ea.SetKeyXTS (modeKey); + #endif - // Each data unit will contain the same plaintext + // Each data unit will contain the same plaintext for (i = 0; i < nbrUnits; i++) { memcpy ((unsigned char *) buf + i * ENCRYPTION_DATA_UNIT_SIZE, XtsTestVectors[array_capacity (XtsTestVectors)-1].plaintext, ENCRYPTION_DATA_UNIT_SIZE); @@ -554,10 +575,11 @@ namespace VeraCrypt throw TestFailed (SRC_POS); nTestsPerformed++; break; } } + #ifndef WOLFCRYPT_BACKEND else if (typeid (ea) == typeid (Serpent)) { switch (testCase) { case 0: @@ -918,11 +940,11 @@ namespace VeraCrypt throw TestFailed (SRC_POS); nTestsPerformed++; break; } } - + #endif if (crc == 0x9f5edd58) throw TestFailed (SRC_POS); ea.DecryptSectors (buf, unitNo, nbrUnits, ENCRYPTION_DATA_UNIT_SIZE); @@ -939,24 +961,31 @@ namespace VeraCrypt nbrUnits = sizeof (buf) / ENCRYPTION_DATA_UNIT_SIZE; // Test all EAs that support this mode of operation foreach_ref (EncryptionAlgorithm &ea, EncryptionAlgorithm::GetAvailableAlgorithms()) { + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> mode (new EncryptionModeWolfCryptXTS); + #else shared_ptr <EncryptionMode> mode (new EncryptionModeXTS); + #endif if (!ea.IsModeSupported (mode)) continue; ea.SetKey (ConstBufferPtr (testKey, ea.GetKeySize())); Buffer modeKey (ea.GetKeySize()); for (size_t mi = 0; mi < modeKey.Size(); mi++) - modeKey[mi] = (byte) mi; + modeKey[mi] = (uint8) mi; modeKey.CopyFrom (ConstBufferPtr (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2, sizeof (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2))); mode->SetKey (modeKey); ea.SetMode (mode); + #ifdef WOLFCRYPT_BACKEND + ea.SetKeyXTS (modeKey); + #endif // Each data unit will contain the same plaintext for (i = 0; i < nbrUnits; i++) { memcpy ((unsigned char *) buf + i * ENCRYPTION_DATA_UNIT_SIZE, @@ -972,10 +1001,11 @@ namespace VeraCrypt { if (crc != 0x33b91fab) throw TestFailed (SRC_POS); nTestsPerformed++; } + #ifndef WOLFCRYPT_BACKEND else if (typeid (ea) == typeid (Serpent)) { if (crc != 0x3494d480) throw TestFailed (SRC_POS); nTestsPerformed++; @@ -1056,10 +1086,11 @@ namespace VeraCrypt { if (crc != 0x755dad72) throw TestFailed (SRC_POS); nTestsPerformed++; } + #endif if (crc == 0x9f5edd58) throw TestFailed (SRC_POS); ea.Decrypt (buf, sizeof (buf)); @@ -1067,22 +1098,26 @@ namespace VeraCrypt if (GetCrc32 (buf, sizeof (buf)) != 0x9f5edd58) throw TestFailed (SRC_POS); nTestsPerformed++; } - + #ifndef WOLFCRYPT_BACKEND if (nTestsPerformed != 150) + #else + if (nTestsPerformed != 10) + #endif throw TestFailed (SRC_POS); } void EncryptionTest::TestPkcs5 () { - VolumePassword password ((byte*) "password", 8); - static const byte saltData[] = { 0x12, 0x34, 0x56, 0x78 }; + VolumePassword password ((uint8*) "password", 8); + static const uint8 saltData[] = { 0x12, 0x34, 0x56, 0x78 }; ConstBufferPtr salt (saltData, sizeof (saltData)); Buffer derivedKey (4); + #ifndef WOLFCRYPT_BACKEND Pkcs5HmacBlake2s pkcs5HmacBlake2s; pkcs5HmacBlake2s.DeriveKey (derivedKey, password, salt, 5); if (memcmp (derivedKey.Ptr(), "\x8d\x51\xfa\x31", 4) != 0) throw TestFailed (SRC_POS); @@ -1103,7 +1138,18 @@ namespace VeraCrypt Pkcs5HmacStreebog pkcs5HmacStreebog; pkcs5HmacStreebog.DeriveKey (derivedKey, password, salt, 5); if (memcmp (derivedKey.Ptr(), "\xd0\x53\xa2\x30", 4) != 0) throw TestFailed (SRC_POS); - } + #else + Pkcs5HmacSha256 pkcs5HmacSha256; + pkcs5HmacSha256.DeriveKey (derivedKey, password, salt, 5); + if (memcmp (derivedKey.Ptr(), "\x64\xf3\xa5\xa3", 4) != 0) + throw TestFailed (SRC_POS); + + Pkcs5HmacSha512 pkcs5HmacSha512; + pkcs5HmacSha512.DeriveKey (derivedKey, password, salt, 5); + if (memcmp (derivedKey.Ptr(), "\x55\xa1\x76\xbb", 4) != 0) + throw TestFailed (SRC_POS); + #endif + } } diff --git a/src/Volume/EncryptionTest.h b/src/Volume/EncryptionTest.h index 17e14fd7..b8f91c4e 100644 --- a/src/Volume/EncryptionTest.h +++ b/src/Volume/EncryptionTest.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -31,16 +31,16 @@ namespace VeraCrypt static void TestXts (); static void TestXtsAES (); struct XtsTestVector { - byte key1[32]; - byte key2[32]; - byte dataUnitNo[8]; + uint8 key1[32]; + uint8 key2[32]; + uint8 dataUnitNo[8]; unsigned int blockNo; - byte plaintext[ENCRYPTION_DATA_UNIT_SIZE]; - byte ciphertext[ENCRYPTION_DATA_UNIT_SIZE]; + uint8 plaintext[ENCRYPTION_DATA_UNIT_SIZE]; + uint8 ciphertext[ENCRYPTION_DATA_UNIT_SIZE]; }; static const XtsTestVector XtsTestVectors[]; private: diff --git a/src/Volume/EncryptionThreadPool.cpp b/src/Volume/EncryptionThreadPool.cpp index 7c86bf49..d216df65 100644 --- a/src/Volume/EncryptionThreadPool.cpp +++ b/src/Volume/EncryptionThreadPool.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -24,17 +24,17 @@ #include "Common/Crypto.h" #include "EncryptionThreadPool.h" namespace VeraCrypt { - void EncryptionThreadPool::DoWork (WorkType::Enum type, const EncryptionMode *encryptionMode, byte *data, uint64 startUnitNo, uint64 unitCount, size_t sectorSize) + void EncryptionThreadPool::DoWork (WorkType::Enum type, const EncryptionMode *encryptionMode, uint8 *data, uint64 startUnitNo, uint64 unitCount, size_t sectorSize) { size_t fragmentCount; size_t unitsPerFragment; size_t remainder; - byte *fragmentData; + uint8 *fragmentData; uint64 fragmentStartUnitNo; WorkItem *workItem; WorkItem *firstFragmentWorkItem; diff --git a/src/Volume/EncryptionThreadPool.h b/src/Volume/EncryptionThreadPool.h index baf31e23..1bfa60a1 100644 --- a/src/Volume/EncryptionThreadPool.h +++ b/src/Volume/EncryptionThreadPool.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -53,19 +53,19 @@ namespace VeraCrypt union { struct { const EncryptionMode *Mode; - byte *Data; + uint8 *Data; uint64 StartUnitNo; uint64 UnitCount; size_t SectorSize; } Encryption; }; }; - static void DoWork (WorkType::Enum type, const EncryptionMode *mode, byte *data, uint64 startUnitNo, uint64 unitCount, size_t sectorSize); + static void DoWork (WorkType::Enum type, const EncryptionMode *mode, uint8 *data, uint64 startUnitNo, uint64 unitCount, size_t sectorSize); static bool IsRunning () { return ThreadPoolRunning; } static void Start (); static void Stop (); protected: diff --git a/src/Volume/Hash.cpp b/src/Volume/Hash.cpp index aad900c1..a990eec9 100644 --- a/src/Volume/Hash.cpp +++ b/src/Volume/Hash.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -22,15 +22,16 @@ namespace VeraCrypt HashList Hash::GetAvailableAlgorithms () { HashList l; l.push_back (shared_ptr <Hash> (new Sha512 ())); - l.push_back (shared_ptr <Hash> (new Whirlpool ())); - l.push_back (shared_ptr <Hash> (new Blake2s ())); l.push_back (shared_ptr <Hash> (new Sha256 ())); + #ifndef WOLFCRYPT_BACKEND + l.push_back (shared_ptr <Hash> (new Blake2s ())); + l.push_back (shared_ptr <Hash> (new Whirlpool ())); l.push_back (shared_ptr <Hash> (new Streebog ())); - + #endif return l; } void Hash::ValidateDataParameters (const ConstBufferPtr &data) const { @@ -42,10 +43,11 @@ namespace VeraCrypt { if (buffer.Size() < GetDigestSize ()) throw ParameterIncorrect (SRC_POS); } + #ifndef WOLFCRYPT_BACKEND // RIPEMD-160 Blake2s::Blake2s () { Context.Allocate (sizeof (blake2s_state), 32); Init(); @@ -65,10 +67,11 @@ namespace VeraCrypt void Blake2s::ProcessData (const ConstBufferPtr &data) { if_debug (ValidateDataParameters (data)); blake2s_update ((blake2s_state *) Context.Ptr(), data.Get(), data.Size()); } + #endif // SHA-256 Sha256::Sha256 () { Context.Allocate (sizeof (sha256_ctx), 32); @@ -114,10 +117,11 @@ namespace VeraCrypt { if_debug (ValidateDataParameters (data)); sha512_hash (data.Get(), (int) data.Size(), (sha512_ctx *) Context.Ptr()); } + #ifndef WOLFCRYPT_BACKEND // Whirlpool Whirlpool::Whirlpool () { Context.Allocate (sizeof (WHIRLPOOL_CTX), 32); Init(); @@ -161,6 +165,7 @@ namespace VeraCrypt void Streebog::ProcessData (const ConstBufferPtr &data) { if_debug (ValidateDataParameters (data)); STREEBOG_add ((STREEBOG_CTX *) Context.Ptr(), data.Get(), (int) data.Size()); } + #endif } diff --git a/src/Volume/Hash.h b/src/Volume/Hash.h index 0e464b37..8950982b 100644 --- a/src/Volume/Hash.h +++ b/src/Volume/Hash.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -46,10 +46,11 @@ namespace VeraCrypt private: Hash (const Hash &); Hash &operator= (const Hash &); }; + #ifndef WOLFCRYPT_BACKEND // Blake2s class Blake2s : public Hash { public: Blake2s (); @@ -68,10 +69,11 @@ namespace VeraCrypt private: Blake2s (const Blake2s &); Blake2s &operator= (const Blake2s &); }; + #endif // SHA-256 class Sha256 : public Hash { public: @@ -115,10 +117,11 @@ namespace VeraCrypt private: Sha512 (const Sha512 &); Sha512 &operator= (const Sha512 &); }; + #ifndef WOLFCRYPT_BACKEND // Whirlpool class Whirlpool : public Hash { public: Whirlpool (); @@ -160,8 +163,9 @@ namespace VeraCrypt private: Streebog (const Streebog &); Streebog &operator= (const Streebog &); }; + #endif } #endif // TC_HEADER_Encryption_Hash diff --git a/src/Volume/Keyfile.cpp b/src/Volume/Keyfile.cpp index 24b40709..d38ed523 100644 --- a/src/Volume/Keyfile.cpp +++ b/src/Volume/Keyfile.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -33,24 +33,24 @@ namespace VeraCrypt SecureBuffer keyfileBuf (File::GetOptimalReadSize()); if (Token::IsKeyfilePathValid (Path, emvSupportEnabled)) { // Apply keyfile generated by a security token - vector <byte> keyfileData; + vector <uint8> keyfileData; Token::getTokenKeyfile(wstring(Path))->GetKeyfileData(keyfileData); if (keyfileData.size() < MinProcessedLength) throw InsufficientData(SRC_POS, Path); for (size_t i = 0; i < keyfileData.size(); i++) { uint32 crc = crc32.Process(keyfileData[i]); - pool[poolPos++] += (byte)(crc >> 24); - pool[poolPos++] += (byte)(crc >> 16); - pool[poolPos++] += (byte)(crc >> 8); - pool[poolPos++] += (byte) crc; + pool[poolPos++] += (uint8)(crc >> 24); + pool[poolPos++] += (uint8)(crc >> 16); + pool[poolPos++] += (uint8)(crc >> 8); + pool[poolPos++] += (uint8) crc; if (poolPos >= pool.Size()) poolPos = 0; if (++totalLength >= MaxProcessedLength) @@ -67,14 +67,14 @@ namespace VeraCrypt while ((readLength = file.Read (keyfileBuf)) > 0) { for (size_t i = 0; i < readLength; i++) { uint32 crc = crc32.Process(keyfileBuf[i]); - pool[poolPos++] += (byte)(crc >> 24); - pool[poolPos++] += (byte)(crc >> 16); - pool[poolPos++] += (byte)(crc >> 8); - pool[poolPos++] += (byte) crc; + pool[poolPos++] += (uint8)(crc >> 24); + pool[poolPos++] += (uint8)(crc >> 16); + pool[poolPos++] += (uint8)(crc >> 8); + pool[poolPos++] += (uint8) crc; if (poolPos >= pool.Size()) poolPos = 0; if (++totalLength >= MaxProcessedLength) goto done; } diff --git a/src/Volume/Keyfile.h b/src/Volume/Keyfile.h index 1d87a983..f087fc70 100644 --- a/src/Volume/Keyfile.h +++ b/src/Volume/Keyfile.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/Pkcs5Kdf.cpp b/src/Volume/Pkcs5Kdf.cpp index ff49cefe..7dad9ebc 100644 --- a/src/Volume/Pkcs5Kdf.cpp +++ b/src/Volume/Pkcs5Kdf.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -54,66 +54,71 @@ namespace VeraCrypt { Pkcs5KdfList l; l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha512 ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha256 ())); + #ifndef WOLFCRYPT_BACKEND l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacBlake2s ())); - l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool ())); + l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacStreebog ())); - + #endif return l; } void Pkcs5Kdf::ValidateParameters (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { if (key.Size() < 1 || password.Size() < 1 || salt.Size() < 1 || iterationCount < 1) throw ParameterIncorrect (SRC_POS); } + #ifndef WOLFCRYPT_BACKEND void Pkcs5HmacBlake2s_Boot::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_blake2s ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_blake2s (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } void Pkcs5HmacBlake2s::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_blake2s ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_blake2s (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } + #endif void Pkcs5HmacSha256_Boot::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_sha256 ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_sha256 (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } void Pkcs5HmacSha256::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_sha256 ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_sha256 (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } void Pkcs5HmacSha512::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_sha512 ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_sha512 (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } + #ifndef WOLFCRYPT_BACKEND void Pkcs5HmacWhirlpool::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_whirlpool ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_whirlpool (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } void Pkcs5HmacStreebog::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_streebog ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_streebog (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } void Pkcs5HmacStreebog_Boot::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_streebog ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_streebog (password.DataPtr(), (int) password.Size(), salt.Get(), (int) salt.Size(), iterationCount, key.Get(), (int) key.Size()); } + #endif } diff --git a/src/Volume/Pkcs5Kdf.h b/src/Volume/Pkcs5Kdf.h index 9071caf0..399d53fb 100644 --- a/src/Volume/Pkcs5Kdf.h +++ b/src/Volume/Pkcs5Kdf.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -46,10 +46,11 @@ namespace VeraCrypt private: Pkcs5Kdf (const Pkcs5Kdf &); Pkcs5Kdf &operator= (const Pkcs5Kdf &); }; + #ifndef WOLFCRYPT_BACKEND class Pkcs5HmacBlake2s_Boot : public Pkcs5Kdf { public: Pkcs5HmacBlake2s_Boot () : Pkcs5Kdf() { } virtual ~Pkcs5HmacBlake2s_Boot () { } @@ -79,10 +80,11 @@ namespace VeraCrypt private: Pkcs5HmacBlake2s (const Pkcs5HmacBlake2s &); Pkcs5HmacBlake2s &operator= (const Pkcs5HmacBlake2s &); }; + #endif class Pkcs5HmacSha256_Boot : public Pkcs5Kdf { public: Pkcs5HmacSha256_Boot () : Pkcs5Kdf() { } @@ -130,11 +132,11 @@ namespace VeraCrypt private: Pkcs5HmacSha512 (const Pkcs5HmacSha512 &); Pkcs5HmacSha512 &operator= (const Pkcs5HmacSha512 &); }; - + #ifndef WOLFCRYPT_BACKEND class Pkcs5HmacWhirlpool : public Pkcs5Kdf { public: Pkcs5HmacWhirlpool () : Pkcs5Kdf() { } virtual ~Pkcs5HmacWhirlpool () { } @@ -181,8 +183,9 @@ namespace VeraCrypt private: Pkcs5HmacStreebog_Boot (const Pkcs5HmacStreebog_Boot &); Pkcs5HmacStreebog_Boot &operator= (const Pkcs5HmacStreebog_Boot &); }; + #endif } #endif // TC_HEADER_Encryption_Pkcs5 diff --git a/src/Volume/Version.h b/src/Volume/Version.h index b2f9215c..8e00d81f 100644 --- a/src/Volume/Version.h +++ b/src/Volume/Version.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/Volume.cpp b/src/Volume/Volume.cpp index 524f2395..b06279b7 100644 --- a/src/Volume/Volume.cpp +++ b/src/Volume/Volume.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/Volume.h b/src/Volume/Volume.h index c816da58..e924df9b 100644 --- a/src/Volume/Volume.h +++ b/src/Volume/Volume.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -112,10 +112,11 @@ namespace VeraCrypt void Open (shared_ptr <File> volumeFile, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, bool emvSupportEnabled, VolumeProtection::Enum protection = VolumeProtection::None, shared_ptr <VolumePassword> protectionPassword = shared_ptr <VolumePassword> (), int protectionPim = 0, shared_ptr <Pkcs5Kdf> protectionKdf = shared_ptr <Pkcs5Kdf> (), shared_ptr <KeyfileList> protectionKeyfiles = shared_ptr <KeyfileList> (), VolumeType::Enum volumeType = VolumeType::Unknown, bool useBackupHeaders = false, bool partitionInSystemEncryptionScope = false); void ReadSectors (const BufferPtr &buffer, uint64 byteOffset); void ReEncryptHeader (bool backupHeader, const ConstBufferPtr &newSalt, const ConstBufferPtr &newHeaderKey, shared_ptr <Pkcs5Kdf> newPkcs5Kdf); void WriteSectors (const ConstBufferPtr &buffer, uint64 byteOffset); bool IsEncryptionNotCompleted () const { return EncryptionNotCompleted; } + bool IsMasterKeyVulnerable() const { return Header && Header->IsMasterKeyVulnerable(); } protected: void CheckProtectedRange (uint64 writeHostOffset, uint64 writeLength); void ValidateState () const; diff --git a/src/Volume/Volume.make b/src/Volume/Volume.make index d69ec135..a4f62562 100644 --- a/src/Volume/Volume.make +++ b/src/Volume/Volume.make @@ -11,14 +11,16 @@ # OBJS := OBJSEX := OBJSNOOPT := +OBJSSSE41 := +OBJSSSSE3 := +OBJSHANI := OBJS += Cipher.o OBJS += EncryptionAlgorithm.o OBJS += EncryptionMode.o -OBJS += EncryptionModeXTS.o OBJS += EncryptionTest.o OBJS += EncryptionThreadPool.o OBJS += Hash.o OBJS += Keyfile.o OBJS += Pkcs5Kdf.o @@ -28,62 +30,85 @@ OBJS += VolumeHeader.o OBJS += VolumeInfo.o OBJS += VolumeLayout.o OBJS += VolumePassword.o OBJS += VolumePasswordCache.o +ifeq "$(ENABLE_WOLFCRYPT)" "0" +OBJS += EncryptionModeXTS.o +else +OBJS += EncryptionModeWolfCryptXTS.o +endif + +ifeq "$(ENABLE_WOLFCRYPT)" "0" ifeq "$(PLATFORM)" "MacOSX" - OBJSEX += ../Crypto/Aes_asm.oo - OBJS += ../Crypto/Aes_hw_cpu.o - OBJS += ../Crypto/Aescrypt.o - OBJSEX += ../Crypto/Twofish_asm.oo - OBJSEX += ../Crypto/Camellia_asm.oo +ifneq "$(COMPILE_ASM)" "false" + OBJSEX += ../Crypto/Aes_asm.oo + OBJS += ../Crypto/Aes_hw_cpu.o + OBJSEX += ../Crypto/Aes_hw_armv8.oo + OBJS += ../Crypto/Aescrypt.o + OBJSEX += ../Crypto/Twofish_asm.oo + OBJSEX += ../Crypto/Camellia_asm.oo OBJSEX += ../Crypto/Camellia_aesni_asm.oo OBJSEX += ../Crypto/sha256-nayuki.oo OBJSEX += ../Crypto/sha512-nayuki.oo + OBJSEX += ../Crypto/sha256_armv8.oo OBJSEX += ../Crypto/sha256_avx1.oo OBJSEX += ../Crypto/sha256_avx2.oo OBJSEX += ../Crypto/sha256_sse4.oo OBJSEX += ../Crypto/sha512_avx1.oo OBJSEX += ../Crypto/sha512_avx2.oo OBJSEX += ../Crypto/sha512_sse4.oo +endif else ifeq "$(CPU_ARCH)" "x86" OBJS += ../Crypto/Aes_x86.o -ifeq "$(DISABLE_AESNI)" "0" - OBJS += ../Crypto/Aes_hw_cpu.o -endif + ifeq "$(DISABLE_AESNI)" "0" + OBJS += ../Crypto/Aes_hw_cpu.o + endif OBJS += ../Crypto/sha256-x86-nayuki.o OBJS += ../Crypto/sha512-x86-nayuki.o else ifeq "$(CPU_ARCH)" "x64" OBJS += ../Crypto/Aes_x64.o -ifeq "$(DISABLE_AESNI)" "0" - OBJS += ../Crypto/Aes_hw_cpu.o -endif + ifeq "$(DISABLE_AESNI)" "0" + OBJS += ../Crypto/Aes_hw_cpu.o + endif OBJS += ../Crypto/Twofish_x64.o OBJS += ../Crypto/Camellia_x64.o OBJS += ../Crypto/Camellia_aesni_x64.o OBJS += ../Crypto/sha512-x64-nayuki.o OBJS += ../Crypto/sha256_avx1_x64.o OBJS += ../Crypto/sha256_avx2_x64.o OBJS += ../Crypto/sha256_sse4_x64.o OBJS += ../Crypto/sha512_avx1_x64.o OBJS += ../Crypto/sha512_avx2_x64.o OBJS += ../Crypto/sha512_sse4_x64.o +else ifeq "$(CPU_ARCH)" "arm64" + OBJARMV8CRYPTO += ../Crypto/Aes_hw_armv8.oarmv8crypto + OBJS += ../Crypto/Aescrypt.o + OBJARMV8CRYPTO += ../Crypto/sha256_armv8.oarmv8crypto else OBJS += ../Crypto/Aescrypt.o endif ifeq "$(GCC_GTEQ_430)" "1" -OBJSSSE41 += ../Crypto/blake2s_SSE41.osse41 -OBJSSSSE3 += ../Crypto/blake2s_SSSE3.ossse3 + OBJSSSE41 += ../Crypto/blake2s_SSE41.osse41 + OBJSSSSE3 += ../Crypto/blake2s_SSSE3.ossse3 else -OBJS += ../Crypto/blake2s_SSE41.o -OBJS += ../Crypto/blake2s_SSSE3.o + OBJS += ../Crypto/blake2s_SSE41.o + OBJS += ../Crypto/blake2s_SSSE3.o +endif +ifeq "$(GCC_GTEQ_500)" "1" + OBJSHANI += ../Crypto/Sha2Intel.oshani +else + OBJS += ../Crypto/Sha2Intel.o +endif +else +OBJS += ../Crypto/wolfCrypt.o endif +ifeq "$(ENABLE_WOLFCRYPT)" "0" OBJS += ../Crypto/Aeskey.o OBJS += ../Crypto/Aestab.o -OBJS += ../Crypto/cpu.o OBJS += ../Crypto/blake2s.o OBJS += ../Crypto/blake2s_SSE2.o OBJS += ../Crypto/SerpentFast.o OBJS += ../Crypto/SerpentFast_simd.o OBJS += ../Crypto/Sha2.o @@ -91,10 +116,14 @@ OBJS += ../Crypto/Twofish.o OBJS += ../Crypto/Whirlpool.o OBJS += ../Crypto/Camellia.o OBJS += ../Crypto/Streebog.o OBJS += ../Crypto/kuznyechik.o OBJS += ../Crypto/kuznyechik_simd.o +OBJS += ../Common/Pkcs5.o +endif + +OBJS += ../Crypto/cpu.o OBJSNOOPT += ../Crypto/jitterentropy-base.o0 OBJS += ../Common/CommandAPDU.o OBJS += ../Common/PCSCException.o @@ -108,25 +137,38 @@ OBJS += ../Common/Crc.o OBJS += ../Common/TLVParser.o OBJS += ../Common/EMVCard.o OBJS += ../Common/EMVToken.o OBJS += ../Common/Endian.o OBJS += ../Common/GfMul.o -OBJS += ../Common/Pkcs5.o OBJS += ../Common/SecurityToken.o VolumeLibrary: Volume.a +ifeq "$(ENABLE_WOLFCRYPT)" "0" ifeq "$(PLATFORM)" "MacOSX" +ifneq "$(COMPILE_ASM)" "false" +../Crypto/Aes_hw_armv8.oo: ../Crypto/Aes_hw_armv8.c + @echo Compiling $(<F) + $(CC) $(CFLAGS_ARM64) -c ../Crypto/Aes_hw_armv8.c -o ../Crypto/Aes_hw_armv8_arm64.o + $(CC) $(CFLAGS_X64) -c ../Crypto/Aes_hw_armv8.c -o ../Crypto/Aes_hw_armv8_x64.o + lipo -create ../Crypto/Aes_hw_armv8_arm64.o ../Crypto/Aes_hw_armv8_x64.o -output ../Crypto/Aes_hw_armv8.oo + rm -fr ../Crypto/Aes_hw_armv8_arm64.o ../Crypto/Aes_hw_armv8_x64.o +../Crypto/sha256_armv8.oo: ../Crypto/sha256_armv8.c + @echo Compiling $(<F) + $(CC) $(CFLAGS_ARM64) -c ../Crypto/sha256_armv8.c -o ../Crypto/sha256_armv8_arm64.o + $(CC) $(CFLAGS_X64) -c ../Crypto/sha256_armv8.c -o ../Crypto/sha256_armv8_x64.o + lipo -create ../Crypto/sha256_armv8_arm64.o ../Crypto/sha256_armv8_x64.o -output ../Crypto/sha256_armv8.oo + rm -fr ../Crypto/sha256_armv8_arm64.o ../Crypto/sha256_armv8_x64.o ../Crypto/Aes_asm.oo: ../Crypto/Aes_x86.asm ../Crypto/Aes_x64.asm @echo Assembling $(<F) $(AS) $(ASFLAGS32) -o ../Crypto/Aes_x86.o ../Crypto/Aes_x86.asm $(AS) $(ASFLAGS64) -o ../Crypto/Aes_x64.o ../Crypto/Aes_x64.asm lipo -create ../Crypto/Aes_x86.o ../Crypto/Aes_x64.o -output ../Crypto/Aes_asm.oo rm -fr ../Crypto/Aes_x86.o ../Crypto/Aes_x64.o ../Crypto/Twofish_asm.oo: ../Crypto/Twofish_x64.S @echo Assembling $(<F) - $(AS) $(ASFLAGS64) -p gas -o ../Crypto/Twofish_asm.oo ../Crypto/Twofish_x64.S + $(AS) $(ASFLAGS64) -p gas -o ../Crypto/Twofish_asm.oo ../Crypto/Twofish_x64.S ../Crypto/Camellia_asm.oo: ../Crypto/Camellia_x64.S @echo Assembling $(<F) $(AS) $(ASFLAGS64) -p gas -o ../Crypto/Camellia_asm.oo ../Crypto/Camellia_x64.S ../Crypto/Camellia_aesni_asm.oo: ../Crypto/Camellia_aesni_x64.S @echo Assembling $(<F) @@ -157,7 +199,9 @@ ifeq "$(PLATFORM)" "MacOSX" $(AS) $(ASFLAGS64) -o ../Crypto/sha512_avx2.oo ../Crypto/sha512_avx2_x64.asm ../Crypto/sha512_sse4.oo: ../Crypto/sha512_sse4_x64.asm @echo Assembling $(<F) $(AS) $(ASFLAGS64) -o ../Crypto/sha512_sse4.oo ../Crypto/sha512_sse4_x64.asm endif +endif +endif include $(BUILD_INC)/Makefile.inc diff --git a/src/Volume/VolumeException.cpp b/src/Volume/VolumeException.cpp index 0ba9ec34..e1e8fbf8 100644 --- a/src/Volume/VolumeException.cpp +++ b/src/Volume/VolumeException.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/VolumeException.h b/src/Volume/VolumeException.h index 8185fab9..8e88a576 100644 --- a/src/Volume/VolumeException.h +++ b/src/Volume/VolumeException.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/VolumeHeader.cpp b/src/Volume/VolumeHeader.cpp index d8527ed5..f3eaba9b 100644 --- a/src/Volume/VolumeHeader.cpp +++ b/src/Volume/VolumeHeader.cpp @@ -2,18 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Crc32.h" #include "EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "EncryptionModeWolfCryptXTS.h" +#endif #include "Pkcs5Kdf.h" #include "Pkcs5Kdf.h" #include "VolumeHeader.h" #include "VolumeException.h" #include "Common/Crypto.h" @@ -42,10 +45,11 @@ namespace VeraCrypt VolumeDataSize = 0; EncryptedAreaStart = 0; EncryptedAreaLength = 0; Flags = 0; SectorSize = 0; + XtsKeyVulnerable = false; } void VolumeHeader::Create (const BufferPtr &headerBuffer, VolumeHeaderCreationOptions &options) { if (options.DataKey.Size() != options.EA->GetKeySize() * 2 || options.Salt.Size() != GetSaltSize()) @@ -57,10 +61,13 @@ namespace VeraCrypt RequiredMinProgramVersion = CurrentRequiredMinProgramVersion; DataAreaKey.Zero(); DataAreaKey.CopyFrom (options.DataKey); + // check if the XTS key is vulnerable by comparing the two parts of the key + XtsKeyVulnerable = (memcmp (options.DataKey.Get() + options.EA->GetKeySize(), options.DataKey.Get(), options.EA->GetKeySize()) == 0); + VolumeCreationTime = 0; HiddenVolumeDataSize = (options.Type == VolumeType::Hidden ? options.VolumeDataSize : 0); VolumeDataSize = options.VolumeDataSize; EncryptedAreaStart = options.VolumeDataStart; @@ -74,12 +81,16 @@ namespace VeraCrypt { throw ParameterIncorrect (SRC_POS); } EA = options.EA; - shared_ptr <EncryptionMode> mode (new EncryptionModeXTS ()); - EA->SetMode (mode); + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> mode (new EncryptionModeWolfCryptXTS ()); + #else + shared_ptr <EncryptionMode> mode (new EncryptionModeXTS ()); + #endif + EA->SetMode (mode); EncryptNew (headerBuffer, options.Salt, options.HeaderKey, options.Kdf); } bool VolumeHeader::Decrypt (const ConstBufferPtr &encryptedData, const VolumePassword &password, int pim, shared_ptr <Pkcs5Kdf> kdf, const Pkcs5KdfList &keyDerivationFunctions, const EncryptionAlgorithmList &encryptionAlgorithms, const EncryptionModeList &encryptionModes) @@ -98,21 +109,32 @@ namespace VeraCrypt pkcs5->DeriveKey (headerKey, password, pim, salt); foreach (shared_ptr <EncryptionMode> mode, encryptionModes) { - if (typeid (*mode) != typeid (EncryptionModeXTS)) - mode->SetKey (headerKey.GetRange (0, mode->GetKeySize())); + #ifdef WOLFCRYPT_BACKEND + if (typeid (*mode) != typeid (EncryptionModeWolfCryptXTS)) + #else + if (typeid (*mode) != typeid (EncryptionModeXTS)) + #endif + mode->SetKey (headerKey.GetRange (0, mode->GetKeySize())); foreach (shared_ptr <EncryptionAlgorithm> ea, encryptionAlgorithms) { if (!ea->IsModeSupported (mode)) continue; + #ifndef WOLFCRYPT_BACKEND if (typeid (*mode) == typeid (EncryptionModeXTS)) { - ea->SetKey (headerKey.GetRange (0, ea->GetKeySize())); + ea->SetKey (headerKey.GetRange (0, ea->GetKeySize())); + #else + if (typeid (*mode) == typeid (EncryptionModeWolfCryptXTS)) + { + ea->SetKey (headerKey.GetRange (0, ea->GetKeySize())); + ea->SetKeyXTS (headerKey.GetRange (ea->GetKeySize(), ea->GetKeySize())); + #endif mode = mode->GetNew(); mode->SetKey (headerKey.GetRange (ea->GetKeySize(), ea->GetKeySize())); } else @@ -204,14 +226,24 @@ namespace VeraCrypt DataAreaKey.CopyFrom (header.GetRange (offset, DataKeyAreaMaxSize)); ea = ea->GetNew(); mode = mode->GetNew(); + #ifndef WOLFCRYPT_BACKEND if (typeid (*mode) == typeid (EncryptionModeXTS)) { - ea->SetKey (header.GetRange (offset, ea->GetKeySize())); + ea->SetKey (header.GetRange (offset, ea->GetKeySize())); + #else + if (typeid (*mode) == typeid (EncryptionModeWolfCryptXTS)) + { + ea->SetKey (header.GetRange (offset, ea->GetKeySize())); + ea->SetKeyXTS (header.GetRange (offset + ea->GetKeySize(), ea->GetKeySize())); + #endif mode->SetKey (header.GetRange (offset + ea->GetKeySize(), ea->GetKeySize())); + + // check if the XTS key is vulnerable by comparing the two parts of the key + XtsKeyVulnerable = (memcmp (DataAreaKey.Ptr() + ea->GetKeySize(), DataAreaKey.Ptr(), ea->GetKeySize()) == 0); } else { mode->SetKey (header.GetRange (offset, mode->GetKeySize())); ea->SetKey (header.GetRange (offset + LegacyEncryptionModeKeyAreaSize, ea->GetKeySize())); @@ -248,14 +280,21 @@ namespace VeraCrypt throw ParameterIncorrect (SRC_POS); shared_ptr <EncryptionMode> mode = EA->GetMode()->GetNew(); shared_ptr <EncryptionAlgorithm> ea = EA->GetNew(); + #ifndef WOLFCRYPT_BACKEND if (typeid (*mode) == typeid (EncryptionModeXTS)) { - mode->SetKey (newHeaderKey.GetRange (EA->GetKeySize(), EA->GetKeySize())); - ea->SetKey (newHeaderKey.GetRange (0, ea->GetKeySize())); + ea->SetKey (newHeaderKey.GetRange (0, ea->GetKeySize())); + #else + if (typeid (*mode) == typeid (EncryptionModeWolfCryptXTS)) + { + ea->SetKey (newHeaderKey.GetRange (0, ea->GetKeySize())); + ea->SetKeyXTS (newHeaderKey.GetRange (EA->GetKeySize(), EA->GetKeySize())); + #endif + mode->SetKey (newHeaderKey.GetRange (EA->GetKeySize(), EA->GetKeySize())); } else { mode->SetKey (newHeaderKey.GetRange (0, mode->GetKeySize())); ea->SetKey (newHeaderKey.GetRange (LegacyEncryptionModeKeyAreaSize, ea->GetKeySize())); diff --git a/src/Volume/VolumeHeader.h b/src/Volume/VolumeHeader.h index 85908711..95018b71 100644 --- a/src/Volume/VolumeHeader.h +++ b/src/Volume/VolumeHeader.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -74,10 +74,11 @@ namespace VeraCrypt size_t GetSectorSize () const { return SectorSize; } static uint32 GetSaltSize () { return SaltSize; } uint64 GetVolumeDataSize () const { return VolumeDataSize; } VolumeTime GetVolumeCreationTime () const { return VolumeCreationTime; } void SetSize (uint32 headerSize); + bool IsMasterKeyVulnerable () const { return XtsKeyVulnerable; } protected: bool Deserialize (const ConstBufferPtr &header, shared_ptr <EncryptionAlgorithm> &ea, shared_ptr <EncryptionMode> &mode); template <typename T> T DeserializeEntry (const ConstBufferPtr &header, size_t &offset) const; template <typename T> T DeserializeEntryAt (const ConstBufferPtr &header, const size_t &offset) const; @@ -118,10 +119,11 @@ namespace VeraCrypt uint64 EncryptedAreaLength; uint32 Flags; uint32 SectorSize; SecureBuffer DataAreaKey; + bool XtsKeyVulnerable; private: VolumeHeader (const VolumeHeader &); VolumeHeader &operator= (const VolumeHeader &); }; diff --git a/src/Volume/VolumeInfo.cpp b/src/Volume/VolumeInfo.cpp index 699e203f..f982c077 100644 --- a/src/Volume/VolumeInfo.cpp +++ b/src/Volume/VolumeInfo.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -53,10 +53,11 @@ namespace VeraCrypt sr.Deserialize ("TotalDataWritten", TotalDataWritten); Type = static_cast <VolumeType::Enum> (sr.DeserializeInt32 ("Type")); VirtualDevice = sr.DeserializeWString ("VirtualDevice"); sr.Deserialize ("VolumeCreationTime", VolumeCreationTime); sr.Deserialize ("Pim", Pim); + sr.Deserialize ("MasterKeyVulnerable", MasterKeyVulnerable); } bool VolumeInfo::FirstVolumeMountedAfterSecond (shared_ptr <VolumeInfo> first, shared_ptr <VolumeInfo> second) { return first->SerialInstanceNumber > second->SerialInstanceNumber; @@ -93,10 +94,11 @@ namespace VeraCrypt sr.Serialize ("TotalDataWritten", TotalDataWritten); sr.Serialize ("Type", static_cast <uint32> (Type)); sr.Serialize ("VirtualDevice", wstring (VirtualDevice)); sr.Serialize ("VolumeCreationTime", VolumeCreationTime); sr.Serialize ("Pim", Pim); + sr.Serialize ("MasterKeyVulnerable", MasterKeyVulnerable); } void VolumeInfo::Set (const Volume &volume) { EncryptionAlgorithmBlockSize = static_cast <uint32> (volume.GetEncryptionAlgorithm()->GetMaxBlockSize()); @@ -117,9 +119,10 @@ namespace VeraCrypt Type = volume.GetType(); TopWriteOffset = volume.GetTopWriteOffset(); TotalDataRead = volume.GetTotalDataRead(); TotalDataWritten = volume.GetTotalDataWritten(); Pim = volume.GetPim (); + MasterKeyVulnerable = volume.IsMasterKeyVulnerable(); } TC_SERIALIZER_FACTORY_ADD_CLASS (VolumeInfo); } diff --git a/src/Volume/VolumeInfo.h b/src/Volume/VolumeInfo.h index 1adc87e3..549b9fbd 100644 --- a/src/Volume/VolumeInfo.h +++ b/src/Volume/VolumeInfo.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -59,11 +59,11 @@ namespace VeraCrypt uint64 TotalDataWritten; VolumeType::Enum Type; DevicePath VirtualDevice; VolumeTime VolumeCreationTime; int Pim; - + bool MasterKeyVulnerable; private: VolumeInfo (const VolumeInfo &); VolumeInfo &operator= (const VolumeInfo &); }; } diff --git a/src/Volume/VolumeLayout.cpp b/src/Volume/VolumeLayout.cpp index efb77649..8077a1ab 100644 --- a/src/Volume/VolumeLayout.cpp +++ b/src/Volume/VolumeLayout.cpp @@ -2,18 +2,21 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Volume/EncryptionMode.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "VolumeLayout.h" #include "Boot/Windows/BootCommon.h" namespace VeraCrypt { @@ -64,20 +67,24 @@ namespace VeraCrypt Type = VolumeType::Normal; HeaderOffset = TC_VOLUME_HEADER_OFFSET; HeaderSize = TC_VOLUME_HEADER_SIZE_LEGACY; SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); + #ifndef WOLFCRYPT_BACKEND SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); + SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); + #else + SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeWolfCryptXTS ())); + #endif } uint64 VolumeLayoutV1Normal::GetDataOffset (uint64 volumeHostSize) const { return HeaderSize; @@ -95,10 +102,11 @@ namespace VeraCrypt HeaderOffset = TC_VOLUME_HEADER_OFFSET; HeaderSize = TC_VOLUME_HEADER_SIZE; BackupHeaderOffset = -TC_VOLUME_HEADER_GROUP_SIZE; SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); + #ifndef WOLFCRYPT_BACKEND SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); @@ -109,13 +117,16 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new KuznyechikSerpentCamellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new KuznyechikTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); - } + #else + SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeWolfCryptXTS ())); + #endif + + } uint64 VolumeLayoutV2Normal::GetDataOffset (uint64 volumeHostSize) const { return Header->GetEncryptedAreaStart(); } @@ -140,10 +151,11 @@ namespace VeraCrypt HeaderOffset = TC_HIDDEN_VOLUME_HEADER_OFFSET; HeaderSize = TC_VOLUME_HEADER_SIZE; BackupHeaderOffset = -TC_HIDDEN_VOLUME_HEADER_OFFSET; SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); + #ifndef WOLFCRYPT_BACKEND SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); @@ -156,10 +168,13 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ())); SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); + #else + SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeWolfCryptXTS ())); + #endif } uint64 VolumeLayoutV2Hidden::GetDataOffset (uint64 volumeHostSize) const { return Header->GetEncryptedAreaStart(); @@ -192,10 +207,11 @@ namespace VeraCrypt Type = VolumeType::Normal; HeaderOffset = TC_BOOT_VOLUME_HEADER_SECTOR_OFFSET; HeaderSize = TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE; SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); + #ifndef WOLFCRYPT_BACKEND SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); @@ -206,13 +222,17 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new KuznyechikSerpentCamellia ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new KuznyechikTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ())); - - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); - } + + SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); + #else + SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeWolfCryptXTS ())); + #endif + + } uint64 VolumeLayoutSystemEncryption::GetDataOffset (uint64 volumeHostSize) const { return 0; } @@ -224,12 +244,14 @@ namespace VeraCrypt Pkcs5KdfList VolumeLayoutSystemEncryption::GetSupportedKeyDerivationFunctions () const { Pkcs5KdfList l; l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha256_Boot ())); - l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacBlake2s_Boot ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha512 ())); + #ifndef WOLFCRYPT_BACKEND + l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacBlake2s_Boot ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacStreebog ())); - return l; + #endif + return l; } } diff --git a/src/Volume/VolumeLayout.h b/src/Volume/VolumeLayout.h index 32b646ad..810d387f 100644 --- a/src/Volume/VolumeLayout.h +++ b/src/Volume/VolumeLayout.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/VolumePassword.cpp b/src/Volume/VolumePassword.cpp index a22c9388..28f1daaf 100644 --- a/src/Volume/VolumePassword.cpp +++ b/src/Volume/VolumePassword.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -58,11 +58,11 @@ namespace VeraCrypt Buffer wipeBuffer (128 * 1024); wipeBuffer.Zero(); sr.Serialize ("WipeData", ConstBufferPtr (wipeBuffer)); } - void VolumePassword::Set (const byte *password, size_t size) + void VolumePassword::Set (const uint8 *password, size_t size) { AllocateBuffer (); if (size > MaxSize) throw PasswordTooLong (SRC_POS); diff --git a/src/Volume/VolumePassword.h b/src/Volume/VolumePassword.h index f4a3ccbe..ee75636e 100644 --- a/src/Volume/VolumePassword.h +++ b/src/Volume/VolumePassword.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -20,25 +20,25 @@ namespace VeraCrypt { class VolumePassword : public Serializable { public: VolumePassword (); - VolumePassword (const byte *password, size_t size) { Set (password, size); } + VolumePassword (const uint8 *password, size_t size) { Set (password, size); } VolumePassword (const SecureBuffer &password) { Set (password.Ptr (), password.Size ()); } VolumePassword (const VolumePassword &password) { Set (password); } virtual ~VolumePassword (); bool operator== (const VolumePassword &other) const { return ConstBufferPtr (DataPtr(), Size()).IsDataEqual (ConstBufferPtr (other.DataPtr(), other.Size())); } bool operator!= (const VolumePassword &other) const { return !(*this == other); } VolumePassword &operator= (const VolumePassword &password) { Set (password); return *this; } operator BufferPtr () const { return BufferPtr (PasswordBuffer); } - byte *DataPtr () const { return PasswordBuffer; } + uint8 *DataPtr () const { return PasswordBuffer; } bool IsEmpty () const { return PasswordSize == 0; } size_t Size () const { return PasswordSize; } - void Set (const byte *password, size_t size); + void Set (const uint8 *password, size_t size); void Set (const VolumePassword &password); TC_SERIALIZABLE (VolumePassword); static const size_t MaxLegacySize; diff --git a/src/Volume/VolumePasswordCache.cpp b/src/Volume/VolumePasswordCache.cpp index bd87a858..0f7f621d 100644 --- a/src/Volume/VolumePasswordCache.cpp +++ b/src/Volume/VolumePasswordCache.cpp @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/VolumePasswordCache.h b/src/Volume/VolumePasswordCache.h index 21e62804..3e153467 100644 --- a/src/Volume/VolumePasswordCache.h +++ b/src/Volume/VolumePasswordCache.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ diff --git a/src/Volume/VolumeSlot.h b/src/Volume/VolumeSlot.h index 153f34a4..b88ea411 100644 --- a/src/Volume/VolumeSlot.h +++ b/src/Volume/VolumeSlot.h @@ -2,11 +2,11 @@ Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ |