VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/DriveFilter.c152
-rw-r--r--src/Driver/DriveFilter.h17
-rw-r--r--src/Driver/Driver.rc8
-rw-r--r--src/Driver/Driver.vcproj398
-rw-r--r--src/Driver/Driver.vcxproj788
-rw-r--r--src/Driver/Driver.vcxproj.filters419
-rw-r--r--src/Driver/Driver.vcxproj.user18
-rw-r--r--src/Driver/DumpFilter.c19
-rw-r--r--src/Driver/EncryptedIoQueue.c166
-rw-r--r--src/Driver/EncryptedIoQueue.h24
-rw-r--r--src/Driver/Ntdriver.c653
-rw-r--r--src/Driver/Ntdriver.h1
-rw-r--r--src/Driver/Ntvol.c162
-rw-r--r--src/Driver/VolumeFilter.c6
-rw-r--r--src/Driver/veracrypt.Inf91
-rw-r--r--src/Driver/veracrypt_vs2019.vcxproj672
-rw-r--r--src/Driver/veracrypt_vs2019.vcxproj.filters329
17 files changed, 1400 insertions, 2523 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index 6fda3c37..a280d20e 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -359,15 +359,11 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, uint8
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);
@@ -403,11 +399,9 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, uint8
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
@@ -417,13 +411,13 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, uint8
}
-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;
@@ -650,31 +644,22 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password,
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))
@@ -735,7 +720,6 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension)
uint64 encryptedAreaLength = Extension->Queue.EncryptedAreaEnd + 1 - Extension->Queue.EncryptedAreaStart;
uint8 *fieldPos = header + TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH;
PCRYPTO_INFO pCryptoInfo = Extension->HeaderCryptoInfo;
-#ifdef _WIN64
CRYPTO_INFO tmpCI;
if (IsRamEncryptionEnabled())
{
@@ -743,7 +727,6 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension)
VcUnprotectKeys (&tmpCI, VcGetEncryptionID (pCryptoInfo));
pCryptoInfo = &tmpCI;
}
-#endif
DecryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo);
@@ -761,12 +744,10 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension)
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);
@@ -866,6 +847,7 @@ 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);
}
@@ -983,6 +965,7 @@ 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
@@ -995,16 +978,13 @@ 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);
@@ -1024,6 +1004,7 @@ static NTSTATUS DispatchControl (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFil
{
BOOL bBlockTrim = BlockSystemTrimCommand || IsHiddenSystemRunning();
NTSTATUS status = IoAcquireRemoveLock (&Extension->Queue.RemoveLock, Irp);
+ UNREFERENCED_PARAMETER(DeviceObject);
if (!NT_SUCCESS (status))
return TCCompleteIrp (Irp, status, 0);
@@ -1033,7 +1014,6 @@ static NTSTATUS DispatchControl (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFil
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))
{
@@ -1109,7 +1089,7 @@ NTSTATUS DriveFilterDispatchIrp (PDEVICE_OBJECT DeviceObject, PIRP Irp)
return status;
}
-void EmergencyClearAllKeys (PIRP irp, PIO_STACK_LOCATION irpSp)
+void EmergencyClearAllKeys (PIRP irp)
{
irp->IoStatus.Information = 0;
@@ -1136,18 +1116,16 @@ 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;
@@ -1192,22 +1170,20 @@ void ReopenBootVolumeHeader (PIRP irp, PIO_STACK_LOCATION irpSp)
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;
@@ -1239,15 +1215,9 @@ typedef NTSTATUS (*HiberDriverWriteFunctionB) (PLARGE_INTEGER writeOffset, PMDL
typedef struct
{
-#ifdef _WIN64
uint8 FieldPad1[64];
HiberDriverWriteFunctionB WriteFunctionB;
uint8 FieldPad2[56];
-#else
- uint8 FieldPad1[48];
- HiberDriverWriteFunctionB WriteFunctionB;
- uint8 FieldPad2[32];
-#endif
HiberDriverWriteFunctionA WriteFunctionA;
uint8 FieldPad3[24];
LARGE_INTEGER PartitionStartOffset;
@@ -1258,18 +1228,10 @@ typedef NTSTATUS (*HiberDriverEntry) (PVOID arg0, HiberDriverContext *hiberDrive
typedef struct
{
LIST_ENTRY ModuleList;
-#ifdef _WIN64
uint8 FieldPad1[32];
-#else
- uint8 FieldPad1[16];
-#endif
PVOID ModuleBaseAddress;
HiberDriverEntry ModuleEntryAddress;
-#ifdef _WIN64
uint8 FieldPad2[24];
-#else
- uint8 FieldPad2[12];
-#endif
UNICODE_STRING ModuleName;
} ModuleTableItem;
@@ -1458,6 +1420,8 @@ static VOID LoadImageNotifyRoutine (PUNICODE_STRING fullImageName, HANDLE proces
ModuleTableItem *moduleItem;
LIST_ENTRY *listEntry;
KIRQL origIrql;
+ UNREFERENCED_PARAMETER(fullImageName);
+ UNREFERENCED_PARAMETER(processId);
if (!imageInfo || !imageInfo->SystemModeImage || !imageInfo->ImageBase || !TCDriverObject->DriverSection)
return;
@@ -1512,62 +1476,6 @@ static VOID LoadImageNotifyRoutine (PUNICODE_STRING fullImageName, HANDLE proces
}
-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;
@@ -1590,6 +1498,7 @@ static VOID SetupThreadProc (PVOID threadArg)
// wipeRandCharsUpdate instead of relying on uninitialized stack memory
ChaCha20RngCtx rngCtx;
uint8 pbSeed[CHACHA20RNG_KEYSZ + CHACHA20RNG_IVSZ];
+ UNREFERENCED_PARAMETER(threadArg);
GetDriverRandomSeed (pbSeed, sizeof (pbSeed));
ChaCha20RngInit (&rngCtx, pbSeed, GetDriverRandomSeed, 0);
@@ -1951,7 +1860,7 @@ NTSTATUS StartBootEncryptionSetup (PDEVICE_OBJECT DeviceObject, PIRP irp, PIO_ST
}
-void GetBootDriveVolumeProperties (PIRP irp, PIO_STACK_LOCATION irpSp)
+void GetBootDriveVolumeProperties (PIRP irp)
{
if (ValidateIOBufferSize (irp, sizeof (VOLUME_PROPERTIES_STRUCT), ValidateOutput))
{
@@ -1989,7 +1898,7 @@ 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. */
@@ -2051,7 +1960,7 @@ void GetBootEncryptionStatus (PIRP irp, PIO_STACK_LOCATION irpSp)
}
-void GetBootLoaderVersion (PIRP irp, PIO_STACK_LOCATION irpSp)
+void GetBootLoaderVersion (PIRP irp)
{
if (ValidateIOBufferSize (irp, sizeof (uint16), ValidateOutput))
{
@@ -2069,7 +1978,7 @@ void GetBootLoaderVersion (PIRP irp, PIO_STACK_LOCATION irpSp)
}
}
-void GetBootLoaderFingerprint (PIRP irp, PIO_STACK_LOCATION irpSp)
+void GetBootLoaderFingerprint (PIRP irp)
{
if (ValidateIOBufferSize (irp, sizeof (BootLoaderFingerprintRequest), ValidateOutput))
{
@@ -2079,7 +1988,7 @@ void GetBootLoaderFingerprint (PIRP irp, PIO_STACK_LOCATION irpSp)
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;
@@ -2111,7 +2020,7 @@ void GetBootLoaderFingerprint (PIRP irp, PIO_STACK_LOCATION irpSp)
}
}
-void GetBootEncryptionAlgorithmName (PIRP irp, PIO_STACK_LOCATION irpSp)
+void GetBootEncryptionAlgorithmName (PIRP irp)
{
if (ValidateIOBufferSize (irp, sizeof (GetBootEncryptionAlgorithmNameRequest), ValidateOutput))
{
@@ -2193,6 +2102,7 @@ NTSTATUS AbortBootEncryptionSetup ()
static VOID DecoySystemWipeThreadProc (PVOID threadArg)
{
+ UNREFERENCED_PARAMETER(threadArg);
DriveFilterExtension *Extension = BootDriveFilterExtension;
LARGE_INTEGER offset;
@@ -2247,10 +2157,8 @@ static VOID DecoySystemWipeThreadProc (PVOID threadArg)
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));
@@ -2376,7 +2284,7 @@ BOOL IsDecoySystemWipeInProgress()
}
-void GetDecoySystemWipeStatus (PIRP irp, PIO_STACK_LOCATION irpSp)
+void GetDecoySystemWipeStatus (PIRP irp)
{
if (ValidateIOBufferSize (irp, sizeof (DecoySystemWipeStatus), ValidateOutput))
{
diff --git a/src/Driver/DriveFilter.h b/src/Driver/DriveFilter.h
index b164fa5b..307880fb 100644
--- a/src/Driver/DriveFilter.h
+++ b/src/Driver/DriveFilter.h
@@ -59,11 +59,11 @@ 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 ();
@@ -73,14 +73,13 @@ 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);
diff --git a/src/Driver/Driver.rc b/src/Driver/Driver.rc
index bf3481b8..6d9bad20 100644
--- a/src/Driver/Driver.rc
+++ b/src/Driver/Driver.rc
@@ -27,8 +27,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,26,13,0
- PRODUCTVERSION 1,26,13,0
+ FILEVERSION 1,26,17,2
+ PRODUCTVERSION 1,26,17,2
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -45,11 +45,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Driver"
- VALUE "FileVersion", "1.26.13"
+ VALUE "FileVersion", "1.26.17"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "veracrypt.sys"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.26.13"
+ VALUE "ProductVersion", "1.26.17"
END
END
BLOCK "VarFileInfo"
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 ------&#x0D;&#x0A;cmd.exe /c BuildDriver.cmd -build -debug -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit %errorlevel%&#x0D;&#x0A;echo.&#x0D;&#x0A;echo ------ Building veracrypt.sys: Debug x64 ------&#x0D;&#x0A;BuildDriver.cmd -build -debug -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- ReBuildCommandLine="echo ------ Rebuilding veracrypt.sys: Debug x86 ------&#x0D;&#x0A;cmd.exe /c BuildDriver.cmd -rebuild -debug -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit %errorlevel%&#x0D;&#x0A;echo.&#x0D;&#x0A;echo ------ Rebuilding veracrypt.sys: Debug x64 ------&#x0D;&#x0A;BuildDriver.cmd -rebuild -debug -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- CleanCommandLine="echo ------ Cleaning veracrypt.sys: Debug x86 ------&#x0D;&#x0A;cmd.exe /c BuildDriver.cmd -clean -debug -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit %errorlevel%&#x0D;&#x0A;echo.&#x0D;&#x0A;echo ------ Cleaning veracrypt.sys: Debug x64 ------&#x0D;&#x0A;BuildDriver.cmd -clean -debug -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- Output=""
- PreprocessorDefinitions="DEBUG;_DEBUG;TC_WINDOWS_DRIVER"
- IncludeSearchPath="&quot;$(ProjectDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(WINDDK_ROOT)\inc\ddk&quot;;&quot;$(WINDDK_ROOT)\inc\api&quot;"
- 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 ------&#x0D;&#x0A;cmd.exe /c BuildDriver.cmd -build -release -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit %errorlevel%&#x0D;&#x0A;echo.&#x0D;&#x0A;echo ------ Building veracrypt.sys: Release x64 ------&#x0D;&#x0A;BuildDriver.cmd -build -release -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- ReBuildCommandLine="echo ------ Rebuilding veracrypt.sys: Release x86 ------&#x0D;&#x0A;cmd.exe /c BuildDriver.cmd -rebuild -release -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit %errorlevel%&#x0D;&#x0A;echo.&#x0D;&#x0A;echo ------ Rebuilding veracrypt.sys: Release x64 ------&#x0D;&#x0A;BuildDriver.cmd -rebuild -release -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- CleanCommandLine="echo ------ Cleaning veracrypt.sys: Release x86 ------&#x0D;&#x0A;cmd.exe /c BuildDriver.cmd -clean -release -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit %errorlevel%&#x0D;&#x0A;echo.&#x0D;&#x0A;echo ------ Cleaning veracrypt.sys: Release x64 ------&#x0D;&#x0A;BuildDriver.cmd -clean -release -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- Output=""
- PreprocessorDefinitions="TC_WINDOWS_DRIVER"
- IncludeSearchPath="&quot;$(ProjectDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(WINDDK_ROOT)\inc\ddk&quot;;&quot;$(WINDDK_ROOT)\inc\api&quot;"
- 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 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- ReBuildCommandLine="BuildDriver.cmd -rebuild -release -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- CleanCommandLine="BuildDriver.cmd -clean -release -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- Output=""
- PreprocessorDefinitions="TC_WINDOWS_DRIVER"
- IncludeSearchPath="&quot;$(ProjectDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(WINDDK_ROOT)\inc\ddk&quot;;&quot;$(WINDDK_ROOT)\inc\api&quot;"
- 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 &gt;NUL:&#x0D;&#x0A;) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe &gt;NUL: )&#x0D;&#x0A;&#x0D;&#x0A;BuildDriver.cmd -build -debug -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- ReBuildCommandLine="if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe &gt;NUL:&#x0D;&#x0A;) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe &gt;NUL: )&#x0D;&#x0A;&#x0D;&#x0A;BuildDriver.cmd -rebuild -debug -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- CleanCommandLine="BuildDriver.cmd -clean -debug -x86 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- Output="$(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe"
- PreprocessorDefinitions="DEBUG;_DEBUG;TC_WINDOWS_DRIVER"
- IncludeSearchPath="&quot;$(ProjectDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(WINDDK_ROOT)\inc\ddk&quot;;&quot;$(WINDDK_ROOT)\inc\api&quot;"
- 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 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- ReBuildCommandLine="BuildDriver.cmd -rebuild -release -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- CleanCommandLine="BuildDriver.cmd -clean -release -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- Output=""
- PreprocessorDefinitions="TC_WINDOWS_DRIVER"
- IncludeSearchPath="&quot;$(ProjectDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(WINDDK_ROOT)\inc\ddk&quot;;&quot;$(WINDDK_ROOT)\inc\api&quot;"
- 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 &gt;NUL:&#x0D;&#x0A;) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe &gt;NUL: )&#x0D;&#x0A;&#x0D;&#x0A;BuildDriver.cmd -build -debug -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- ReBuildCommandLine="if exist $(SolutionDir)\Mount\Debug\VeraCrypt.exe ( copy $(SolutionDir)\Mount\Debug\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe &gt;NUL:&#x0D;&#x0A;) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe &gt;NUL: )&#x0D;&#x0A;&#x0D;&#x0A;BuildDriver.cmd -rebuild -debug -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- CleanCommandLine="BuildDriver.cmd -clean -debug -x64 &quot;$(SolutionDir)\Common&quot; &quot;$(SolutionDir)\Crypto&quot; &quot;$(ProjectDir)&quot;"
- Output="$(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe"
- PreprocessorDefinitions="DEBUG;_DEBUG;TC_WINDOWS_DRIVER"
- IncludeSearchPath="&quot;$(ProjectDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(WINDDK_ROOT)\inc\ddk&quot;;&quot;$(WINDDK_ROOT)\inc\api&quot;"
- 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..7f135b35 100644
--- a/src/Driver/Driver.vcxproj
+++ b/src/Driver/Driver.vcxproj
@@ -1,219 +1,212 @@
<?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>0xA000008</_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>0xA000008</_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>0xA000008</_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>0xA000008</_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 &gt;NUL:
-) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe &gt;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 &gt;NUL:
-) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\i386\VeraCrypt.exe &gt;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 &gt;NUL:
-) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe &gt;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 &gt;NUL:
-) else ( copy $(SolutionDir)\Mount\Release\VeraCrypt.exe $(ProjectDir)\obj_driver_debug\amd64\VeraCrypt.exe &gt;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.17.2</TimeStamp>
+ </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.17.2</TimeStamp>
+ </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.17.2</TimeStamp>
+ </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.17.2</TimeStamp>
+ </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" />
@@ -225,83 +218,386 @@ BuildDriver.cmd -rebuild -debug -x64 "$(SolutionDir)\Common" "$(SolutionDir)\Cry
<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\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\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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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) &amp; 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">
diff --git a/src/Driver/Driver.vcxproj.filters b/src/Driver/Driver.vcxproj.filters
index 41d7a8c4..478432fa 100644
--- a/src/Driver/Driver.vcxproj.filters
+++ b/src/Driver/Driver.vcxproj.filters
@@ -3,13 +3,7 @@
<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>
@@ -17,263 +11,326 @@
</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>
</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="..\Crypto\SerpentFast.h">
+ <Filter>Crypto\Header Files</Filter>
</ClInclude>
- <ClInclude Include="resource.h">
+ <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>
diff --git a/src/Driver/Driver.vcxproj.user b/src/Driver/Driver.vcxproj.user
index ace9a86a..9724a753 100644
--- a/src/Driver/Driver.vcxproj.user
+++ b/src/Driver/Driver.vcxproj.user
@@ -1,3 +1,19 @@
<?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>
</Project> \ No newline at end of file
diff --git a/src/Driver/DumpFilter.c b/src/Driver/DumpFilter.c
index aa059d9d..f858bb7c 100644
--- a/src/Driver/DumpFilter.c
+++ b/src/Driver/DumpFilter.c
@@ -61,15 +61,6 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT
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);
@@ -129,11 +120,7 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT
WriteFilterBufferSize = ((SIZE_T)filterInitData->MaxPagesPerWrite) * PAGE_SIZE;
-#ifdef _WIN64
highestAcceptableWriteBufferAddr.QuadPart = 0x7FFffffFFFFLL;
-#else
- highestAcceptableWriteBufferAddr.QuadPart = 0xffffFFFFLL;
-#endif
WriteFilterBuffer = MmAllocateContiguousMemory (WriteFilterBufferSize, highestAcceptableWriteBufferAddr);
if (!WriteFilterBuffer)
@@ -158,6 +145,7 @@ 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)
@@ -175,6 +163,7 @@ static NTSTATUS DumpFilterWrite (PFILTER_EXTENSION filterExtension, PLARGE_INTEG
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);
@@ -194,7 +183,7 @@ static NTSTATUS DumpFilterWrite (PFILTER_EXTENSION filterExtension, PLARGE_INTEG
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);
@@ -242,6 +231,7 @@ 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;
@@ -250,6 +240,7 @@ static NTSTATUS DumpFilterFinish (PFILTER_EXTENSION filterExtension)
static NTSTATUS DumpFilterUnload (PFILTER_EXTENSION filterExtension)
{
+ UNREFERENCED_PARAMETER(filterExtension);
Dump ("DumpFilterUnload type=%d\n", filterExtension->DumpType);
if (WriteFilterBuffer)
diff --git a/src/Driver/EncryptedIoQueue.c b/src/Driver/EncryptedIoQueue.c
index 8c2e8a41..91399c47 100644
--- a/src/Driver/EncryptedIoQueue.c
+++ b/src/Driver/EncryptedIoQueue.c
@@ -266,32 +266,106 @@ UpdateBuffer(
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);
+
+ 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_NO_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_NO_INCREMENT, 1, FALSE);
+
+ // Free the item
+ ReleasePoolBuffer(queue, item);
+ }
+}
-static VOID CompletionThreadProc (PVOID threadArg)
+// 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)
@@ -299,7 +373,7 @@ static VOID CompletionThreadProc (PVOID threadArg)
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
@@ -309,15 +383,14 @@ static VOID CompletionThreadProc (PVOID threadArg)
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);
}
@@ -471,8 +544,7 @@ static VOID IoThreadProc (PVOID threadArg)
if (request->CompleteOriginalIrp)
{
- CompleteOriginalIrp (request->Item, request->Item->Status,
- NT_SUCCESS (request->Item->Status) ? request->Item->OriginalLength : 0);
+ HandleCompleteOriginalIrp(queue, request);
}
ReleasePoolBuffer (queue, request);
@@ -640,7 +712,7 @@ static VOID MainThreadProc (PVOID threadArg)
{
UINT64_STRUCT dataUnit;
- dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | ExDefaultMdlProtection));
+ dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | MdlMappingNoExecute));
if (!dataBuffer)
{
TCfree (buffer);
@@ -760,7 +832,7 @@ static VOID MainThreadProc (PVOID threadArg)
continue;
}
- dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | ExDefaultMdlProtection));
+ dataBuffer = (PUCHAR) MmGetSystemAddressForMdlSafe (irp->MdlAddress, (HighPagePriority | MdlMappingNoExecute));
if (dataBuffer == NULL)
{
@@ -972,7 +1044,7 @@ NTSTATUS EncryptedIoQueueStart (EncryptedIoQueue *queue)
{
NTSTATUS status;
EncryptedIoQueueBuffer *buffer;
- int i, preallocatedIoRequestCount, preallocatedItemCount, fragmentSize;
+ int i, j, preallocatedIoRequestCount, preallocatedItemCount, fragmentSize;
preallocatedIoRequestCount = EncryptionIoRequestCount;
preallocatedItemCount = EncryptionItemCount;
@@ -1076,6 +1148,41 @@ retry_preallocated:
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);
@@ -1158,6 +1265,27 @@ NTSTATUS EncryptedIoQueueStop (EncryptedIoQueue *queue)
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);
diff --git a/src/Driver/EncryptedIoQueue.h b/src/Driver/EncryptedIoQueue.h
index d4d580c9..3738065a 100644
--- a/src/Driver/EncryptedIoQueue.h
+++ b/src/Driver/EncryptedIoQueue.h
@@ -26,6 +26,7 @@
#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
{
@@ -37,6 +38,15 @@ typedef struct EncryptedIoQueueBufferStruct
} 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
{
@@ -97,9 +107,9 @@ typedef struct
uint8 *ReadAheadBuffer;
LARGE_INTEGER MaxReadAheadOffset;
- LONG OutstandingIoCount;
+ volatile LONG OutstandingIoCount;
KEVENT NoOutstandingIoEvent;
- LONG IoThreadPendingRequestCount;
+ volatile LONG IoThreadPendingRequestCount;
KEVENT PoolBufferFreeEvent;
@@ -125,6 +135,16 @@ typedef struct
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;
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index 96f60cdd..12943dc8 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -142,20 +142,10 @@ 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];
@@ -190,22 +180,15 @@ BOOL IsUefiBoot ()
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;
@@ -220,13 +203,6 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed)
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);
@@ -239,17 +215,10 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed)
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 ())
@@ -282,11 +251,6 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed)
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);
@@ -294,122 +258,68 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed)
}
-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");
+ Dump("DriverEntry " TC_APP_NAME " " VERSION_STRING VERSION_STRING_SUFFIX "\n");
- DetectX86Features ();
+ DetectX86Features();
- PsGetVersion (&OsMajorVersion, &OsMinorVersion, NULL, NULL);
+ 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;
- }
-
- // KeAreAllApcsDisabled is available starting from Windows Server 2003
- if ((OsMajorVersion > 5) || (OsMajorVersion == 5 && OsMinorVersion >= 2))
- {
- UNICODE_STRING KeAreAllApcsDisabledFuncName;
- RtlInitUnicodeString(&KeAreAllApcsDisabledFuncName, L"KeAreAllApcsDisabled");
-
- 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 ();
+ DisableCPUExtendedFeatures();
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)
{
@@ -417,7 +327,7 @@ NTSTATUS DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
}
DriverObject->DriverUnload = TCUnloadDriver;
- return TCCreateRootDeviceObject (DriverObject);
+ return TCCreateRootDeviceObject(DriverObject);
}
@@ -598,8 +508,9 @@ NTSTATUS TCDispatchQueueIRP (PDEVICE_OBJECT DeviceObject, PIRP Irp)
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));
}
@@ -878,6 +789,7 @@ 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)
{
@@ -929,7 +841,7 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
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);
@@ -1019,12 +931,11 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
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;
@@ -1338,7 +1249,6 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
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;
@@ -1373,7 +1283,6 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
{
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;
@@ -1528,37 +1437,20 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
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)
- )
- {
- Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;
- Irp->IoStatus.Information = 0;
- }
- else if (ValidateIOBufferSize (Irp, sizeof (VOLUME_DISK_EXTENTS), ValidateOutput))
+ 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 = BYTES_PER_MB; // Set offset to 1MB to emulate the partition offset on a real MBR disk
- 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;
@@ -1723,7 +1615,6 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
{
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;
@@ -1933,7 +1824,9 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
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);
}
@@ -1955,6 +1848,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
{
PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp);
NTSTATUS ntStatus;
+ UNREFERENCED_PARAMETER(Extension);
switch (irpSp->Parameters.DeviceIoControl.IoControlCode)
{
@@ -1981,7 +1875,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
case TC_IOCTL_IS_DRIVER_UNLOAD_DISABLED:
if (ValidateIOBufferSize (Irp, sizeof (int), ValidateOutput))
{
- LONG deviceObjectCount = 0;
+ ULONG deviceObjectCount = 0;
*(int *) Irp->AssociatedIrp.SystemBuffer = DriverUnloadDisabled;
@@ -2025,7 +1919,6 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
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;
@@ -2266,7 +2159,6 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
if (readBuffer[510] == 0x55 && readBuffer[511] == 0xaa)
{
- int i;
for (i = 0; i < 4; ++i)
{
if (readBuffer[446 + i * 16 + 4] == PARTITION_LDM)
@@ -2459,16 +2351,16 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
{
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;
@@ -2479,12 +2371,12 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
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));
@@ -2503,16 +2395,16 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
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;
@@ -2521,7 +2413,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
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))))
@@ -2529,7 +2421,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
}
Irp->IoStatus.Information = sizeof (DISK_PARTITION_INFO_STRUCT);
- Irp->IoStatus.Status = ntStatus;
+ Irp->IoStatus.Status = ntStatusLocal;
}
}
break;
@@ -2539,17 +2431,17 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
{
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;
@@ -2559,18 +2451,18 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
{
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));
@@ -2580,30 +2472,27 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
{
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;
}
}
}
@@ -2611,7 +2500,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
TCfree (buffer);
Irp->IoStatus.Information = sizeof (DISK_GEOMETRY_EX_STRUCT);
- Irp->IoStatus.Status = ntStatus;
+ Irp->IoStatus.Status = ntStatusLocal;
}
else
{
@@ -2669,7 +2558,6 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
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
@@ -2703,7 +2591,6 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
{
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))
{
@@ -2731,7 +2618,6 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
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))
{
@@ -2748,7 +2634,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
break;
case VC_IOCTL_EMERGENCY_CLEAR_ALL_KEYS:
- EmergencyClearAllKeys (Irp, irpSp);
+ EmergencyClearAllKeys (Irp);
WipeCache();
break;
@@ -2763,7 +2649,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
break;
case TC_IOCTL_GET_BOOT_ENCRYPTION_STATUS:
- GetBootEncryptionStatus (Irp, irpSp);
+ GetBootEncryptionStatus (Irp);
break;
case TC_IOCTL_GET_BOOT_ENCRYPTION_SETUP_RESULT:
@@ -2772,23 +2658,23 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
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:
@@ -2816,7 +2702,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
break;
case TC_IOCTL_GET_DECOY_SYSTEM_WIPE_STATUS:
- GetDecoySystemWipeStatus (Irp, irpSp);
+ GetDecoySystemWipeStatus (Irp);
break;
case TC_IOCTL_WRITE_BOOT_DRIVE_SECTOR:
@@ -2891,6 +2777,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
if (ValidateIOBufferSize (Irp, sizeof (EncryptionQueueParameters), ValidateOutput))
{
EncryptionQueueParameters* pParams = (EncryptionQueueParameters*) Irp->AssociatedIrp.SystemBuffer;
+ pParams->EncryptionMaxWorkItems = EncryptionMaxWorkItems;
pParams->EncryptionFragmentSize = EncryptionFragmentSize;
pParams->EncryptionIoRequestCount = EncryptionIoRequestCount;
pParams->EncryptionItemCount = EncryptionItemCount;
@@ -3328,152 +3215,81 @@ LPWSTR TCTranslateCode (ULONG ulCode)
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
}
}
@@ -3505,11 +3321,13 @@ void TCDeleteDeviceObject (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension)
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);
@@ -3534,7 +3352,7 @@ void TCDeleteDeviceObject (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension)
VOID TCUnloadDriver (PDRIVER_OBJECT DriverObject)
{
Dump ("TCUnloadDriver BEGIN\n");
-
+ UNREFERENCED_PARAMETER(DriverObject);
OnShutdownPending();
if (IsBootDriveMounted())
@@ -3568,6 +3386,7 @@ typedef struct
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);
}
@@ -3582,7 +3401,7 @@ NTSTATUS TCDeviceIoControl (PWSTR deviceName, ULONG IoControlCode, void *InputBu
KEVENT event;
UNICODE_STRING name;
- if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled())
+ if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled())
{
TCDeviceIoControlWorkItemArgs args;
@@ -3654,6 +3473,7 @@ typedef struct
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);
}
@@ -3666,7 +3486,7 @@ NTSTATUS SendDeviceIoControlRequest (PDEVICE_OBJECT deviceObject, ULONG ioContro
PIRP irp;
KEVENT event;
- if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled())
+ if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled())
{
SendDeviceIoControlRequestWorkItemArgs args;
@@ -3998,6 +3818,7 @@ static NTSTATUS UpdateFsVolumeInformation (MOUNT_STRUCT* mount, PEXTENSION NewEx
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);
}
@@ -4010,7 +3831,7 @@ static NTSTATUS UpdateFsVolumeInformation (MOUNT_STRUCT* mount, PEXTENSION NewEx
BOOL bIsNTFS = FALSE;
ULONG labelMaxLen, labelEffectiveLen;
- if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled())
+ if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled())
{
UpdateFsVolumeInformationWorkItemArgs args;
@@ -4265,6 +4086,7 @@ typedef struct
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);
}
@@ -4276,7 +4098,7 @@ NTSTATUS UnmountDevice (UNMOUNT_STRUCT *unmountRequest, PDEVICE_OBJECT deviceObj
HANDLE volumeHandle;
PFILE_OBJECT volumeFileObject;
- if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled())
+ if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled())
{
UnmountDeviceWorkItemArgs args;
@@ -4306,7 +4128,7 @@ NTSTATUS UnmountDevice (UNMOUNT_STRUCT *unmountRequest, PDEVICE_OBJECT deviceObj
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;
@@ -4570,33 +4392,14 @@ 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;
@@ -4606,17 +4409,14 @@ size_t GetCpuCount (WORD* pGroupCount)
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;
}
}
@@ -4625,13 +4425,10 @@ USHORT GetCpuGroup (size_t index)
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)
@@ -4851,6 +4648,14 @@ NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry)
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)
@@ -4868,6 +4673,9 @@ NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry)
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;
}
@@ -5074,36 +4882,3 @@ 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 3995ffdf..b03b5e93 100644
--- a/src/Driver/Ntdriver.h
+++ b/src/Driver/Ntdriver.h
@@ -128,6 +128,7 @@ 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)
diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c
index 68f63f16..0376033f 100644
--- a/src/Driver/Ntvol.c
+++ b/src/Driver/Ntvol.c
@@ -53,7 +53,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
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;
@@ -98,65 +98,62 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
PARTITION_INFORMATION_EX pix;
LARGE_INTEGER diskLengthInfo;
DISK_GEOMETRY_EX dg;
- STORAGE_PROPERTY_QUERY storagePropertyQuery = {0};
+ 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;
}
@@ -165,76 +162,72 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
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;
}
@@ -242,7 +235,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
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;
@@ -641,10 +634,8 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
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);
@@ -937,6 +928,7 @@ typedef struct
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);
}
@@ -955,7 +947,7 @@ NTSTATUS TCSendHostDeviceIoControlRequestEx (PDEVICE_OBJECT DeviceObject,
UNREFERENCED_PARAMETER(DeviceObject); /* Remove compiler warning */
- if ((KeGetCurrentIrql() >= APC_LEVEL) || VC_KeAreAllApcsDisabled())
+ if ((KeGetCurrentIrql() >= APC_LEVEL) || KeAreAllApcsDisabled())
{
TCSendHostDeviceIoControlRequestExWorkItemArgs args;
diff --git a/src/Driver/VolumeFilter.c b/src/Driver/VolumeFilter.c
index 29d02673..b4bc8d2e 100644
--- a/src/Driver/VolumeFilter.c
+++ b/src/Driver/VolumeFilter.c
@@ -155,6 +155,7 @@ 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);
@@ -270,9 +271,10 @@ static NTSTATUS DispatchPnp (PDEVICE_OBJECT DeviceObject, PIRP Irp, VolumeFilter
}
-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);
@@ -304,7 +306,7 @@ NTSTATUS VolumeFilterDispatchIrp (PDEVICE_OBJECT DeviceObject, PIRP Irp)
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);
diff --git a/src/Driver/veracrypt.Inf b/src/Driver/veracrypt.Inf
new file mode 100644
index 00000000..d2cef1b4
--- /dev/null
+++ b/src/Driver/veracrypt.Inf
@@ -0,0 +1,91 @@
+;;;
+;;; VeraCrypt
+;;;
+;;;
+;;; Copyright (c) 2024, 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 8a360525..00000000
--- a/src/Driver/veracrypt_vs2019.vcxproj
+++ /dev/null
@@ -1,672 +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">
- <CallingConvention Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StdCall</CallingConvention>
- <CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StdCall</CallingConvention>
- </ClCompile>
- <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">
- <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="..\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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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)'=='Debug|Win32'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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)'=='Debug|Win32'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Crypto\Sha2.c">
- <CallingConvention Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StdCall</CallingConvention>
- <CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StdCall</CallingConvention>
- </ClCompile>
- <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>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir>
- <TargetName>veracrypt</TargetName>
- <IntDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <TargetName>veracrypt</TargetName>
- <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
- <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir>
- <IntDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetName>veracrypt</TargetName>
- <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
- <OutDir>$(ProjectDir)$(ConfigurationName)\</OutDir>
- <IntDir>$(ProjectDir)$(ConfigurationName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
- <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
- <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir>
- <TargetName>veracrypt</TargetName>
- <IntDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <TargetName>veracrypt</TargetName>
- <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
- <OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir>
- <IntDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetName>veracrypt</TargetName>
- <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
- <OutDir>$(ProjectDir)$(ConfigurationName)\</OutDir>
- <IntDir>$(ProjectDir)$(ConfigurationName)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
- <Link>
- <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <GenerateMapFile>true</GenerateMapFile>
- </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>
- <GenerateMapFile>true</GenerateMapFile>
- </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>
- <CallingConvention>Cdecl</CallingConvention>
- </ClCompile>
- <PostBuildEvent>
- <Command>copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.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>
- <GenerateMapFile>true</GenerateMapFile>
- </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>
- <CallingConvention>StdCall</CallingConvention>
- </ClCompile>
- <PostBuildEvent>
- <Command>copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt.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>
- <GenerateMapFile>true</GenerateMapFile>
- </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>
- <GenerateMapFile>true</GenerateMapFile>
- </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>
- <CallingConvention>Cdecl</CallingConvention>
- </ClCompile>
- <PostBuildEvent>
- <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.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>
- <GenerateMapFile>true</GenerateMapFile>
- </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>
- <CallingConvention>StdCall</CallingConvention>
- </ClCompile>
- <PostBuildEvent>
- <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt.sys"</Command>
- </PostBuildEvent>
- <Inf>
- <SpecifyArchitecture>true</SpecifyArchitecture>
- <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion>
- </Inf>
- </ItemDefinitionGroup>
- <ItemGroup>
- <FilesToPackage Include="$(TargetPath)" />
- </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="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) &amp; nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
-</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
-</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win64 -Ox -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox --prefix _ -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)'=='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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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)'=='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) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
-</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
-</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
-</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
-</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox --prefix _ -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)'=='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'">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\Twofish_x64.S">
- <FileType>Document</FileType>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="..\Crypto\sha256-x86-nayuki.S">
- <FileType>Document</FileType>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) &amp; vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) &amp; 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>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; yasm.exe -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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; yasm.exe -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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; yasm.exe -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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo %(Filename)%(Extension) &amp; vsyasm.exe -Xvc -p gas -D WINABI -D __YASM__ -f win32 -o "$(TargetDir)\%(Filename).obj" -l "$(TargetDir)\%(Filename).lst" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo %(Filename)%(Extension) &amp; 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>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; yasm.exe -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)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
- </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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; yasm.exe -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)'=='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)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; 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) &amp; yasm.exe -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)'=='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) &amp; 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) &amp; 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) &amp; ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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) &amp; ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="..\Crypto\rdseed_ml.asm">
- <FileType>Document</FileType>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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) &amp; ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; 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) &amp; 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) &amp; ml.exe /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /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'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</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 43a1a222..00000000
--- a/src/Driver/veracrypt_vs2019.vcxproj.filters
+++ /dev/null
@@ -1,329 +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>
- <ClInclude Include="..\Common\Tcdefs.h">
- <Filter>Common</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