From 6ef41abdd2122c36d9387cc4bbdbcfc81315b94b Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 11 Jul 2015 01:48:52 +0200 Subject: Use Pim name for internal variables instead of the old name Pin --- src/Driver/DriveFilter.c | 16 ++++++++-------- src/Driver/Ntdriver.c | 8 ++++---- src/Driver/Ntvol.c | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/Driver') diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c index 007d9d21..d3bc2dc2 100644 --- a/src/Driver/DriveFilter.c +++ b/src/Driver/DriveFilter.c @@ -224,7 +224,7 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, NTSTATUS status; LARGE_INTEGER offset; char *header; - int pkcs5_prf = 0, pin = 0; + int pkcs5_prf = 0, pim = 0; byte *mappedCryptoInfo = NULL; Dump ("MountDrive pdo=%p\n", Extension->Pdo); @@ -295,9 +295,9 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, } } - pin = (int) (BootArgs.Flags >> 16); + pim = (int) (BootArgs.Flags >> 16); - if (ReadVolumeHeader (!hiddenVolume, header, password, pkcs5_prf, pin, FALSE, &Extension->Queue.CryptoInfo, Extension->HeaderCryptoInfo) == 0) + if (ReadVolumeHeader (!hiddenVolume, header, password, pkcs5_prf, pim, FALSE, &Extension->Queue.CryptoInfo, Extension->HeaderCryptoInfo) == 0) { // Header decrypted status = STATUS_SUCCESS; @@ -777,8 +777,8 @@ void ReopenBootVolumeHeader (PIRP irp, PIO_STACK_LOCATION irpSp) || request->VolumePassword.Length > MAX_PASSWORD || request->pkcs5_prf < 0 || request->pkcs5_prf > LAST_PRF_ID - || request->pin < 0 - || request->pin > 65535 + || request->pim < 0 + || request->pim > 65535 ) { irp->IoStatus.Status = STATUS_INVALID_PARAMETER; @@ -804,14 +804,14 @@ void ReopenBootVolumeHeader (PIRP irp, PIO_STACK_LOCATION irpSp) goto ret; } - if (ReadVolumeHeader (!BootDriveFilterExtension->HiddenSystem, header, &request->VolumePassword, request->pkcs5_prf, request->pin, FALSE, NULL, BootDriveFilterExtension->HeaderCryptoInfo) == 0) + if (ReadVolumeHeader (!BootDriveFilterExtension->HiddenSystem, header, &request->VolumePassword, request->pkcs5_prf, request->pim, FALSE, NULL, BootDriveFilterExtension->HeaderCryptoInfo) == 0) { Dump ("Header reopened\n"); BootDriveFilterExtension->Queue.CryptoInfo->header_creation_time = BootDriveFilterExtension->HeaderCryptoInfo->header_creation_time; BootDriveFilterExtension->Queue.CryptoInfo->pkcs5 = BootDriveFilterExtension->HeaderCryptoInfo->pkcs5; BootDriveFilterExtension->Queue.CryptoInfo->noIterations = BootDriveFilterExtension->HeaderCryptoInfo->noIterations; - BootDriveFilterExtension->Queue.CryptoInfo->volumePin = BootDriveFilterExtension->HeaderCryptoInfo->volumePin; + BootDriveFilterExtension->Queue.CryptoInfo->volumePim = BootDriveFilterExtension->HeaderCryptoInfo->volumePim; irp->IoStatus.Status = STATUS_SUCCESS; } @@ -1585,7 +1585,7 @@ void GetBootDriveVolumeProperties (PIRP irp, PIO_STACK_LOCATION irpSp) prop->mode = Extension->Queue.CryptoInfo->mode; prop->pkcs5 = Extension->Queue.CryptoInfo->pkcs5; prop->pkcs5Iterations = Extension->Queue.CryptoInfo->noIterations; - prop->volumePin = Extension->Queue.CryptoInfo->volumePin; + prop->volumePim = Extension->Queue.CryptoInfo->volumePim; #if 0 prop->volumeCreationTime = Extension->Queue.CryptoInfo->volume_creation_time; prop->headerCreationTime = Extension->Queue.CryptoInfo->header_creation_time; diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index c3a220e1..a9f15b78 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -1227,7 +1227,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex prop->mode = ListExtension->cryptoInfo->mode; prop->pkcs5 = ListExtension->cryptoInfo->pkcs5; prop->pkcs5Iterations = ListExtension->cryptoInfo->noIterations; - prop->volumePin = ListExtension->cryptoInfo->volumePin; + prop->volumePim = ListExtension->cryptoInfo->volumePim; #if 0 prop->volumeCreationTime = ListExtension->cryptoInfo->volume_creation_time; prop->headerCreationTime = ListExtension->cryptoInfo->header_creation_time; @@ -1404,7 +1404,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex if (mount->VolumePassword.Length > MAX_PASSWORD || mount->ProtectedHidVolPassword.Length > MAX_PASSWORD || mount->pkcs5_prf < 0 || mount->pkcs5_prf > LAST_PRF_ID - || mount->VolumePin < 0 || mount->VolumePin == INT_MAX + || mount->VolumePim < 0 || mount->VolumePim == INT_MAX || mount->ProtectedHidVolPkcs5Prf < 0 || mount->ProtectedHidVolPkcs5Prf > LAST_PRF_ID || (mount->bTrueCryptMode != FALSE && mount->bTrueCryptMode != TRUE) ) @@ -1422,10 +1422,10 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex burn (&mount->VolumePassword, sizeof (mount->VolumePassword)); burn (&mount->ProtectedHidVolPassword, sizeof (mount->ProtectedHidVolPassword)); burn (&mount->pkcs5_prf, sizeof (mount->pkcs5_prf)); - burn (&mount->VolumePin, sizeof (mount->VolumePin)); + burn (&mount->VolumePim, sizeof (mount->VolumePim)); burn (&mount->bTrueCryptMode, sizeof (mount->bTrueCryptMode)); burn (&mount->ProtectedHidVolPkcs5Prf, sizeof (mount->ProtectedHidVolPkcs5Prf)); - burn (&mount->ProtectedHidVolPin, sizeof (mount->ProtectedHidVolPin)); + burn (&mount->ProtectedHidVolPim, sizeof (mount->ProtectedHidVolPim)); } break; diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c index 577effa0..1e7c7a5c 100644 --- a/src/Driver/Ntvol.c +++ b/src/Driver/Ntvol.c @@ -467,7 +467,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, readBuffer, &mount->ProtectedHidVolPassword, mount->ProtectedHidVolPkcs5Prf, - mount->ProtectedHidVolPin, + mount->ProtectedHidVolPim, mount->bTrueCryptMode, &tmpCryptoInfo); } @@ -479,7 +479,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, readBuffer, &mount->VolumePassword, mount->pkcs5_prf, - mount->VolumePin, + mount->VolumePim, mount->bTrueCryptMode, &Extension->cryptoInfo); } -- cgit v1.2.3