diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-03-03 23:34:03 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-03-03 23:48:49 +0100 |
commit | 5c934d81227c74ef8806589997518c6823db17d3 (patch) | |
tree | f6ce46fe8b894cf2d232dd872925a67327481f44 /src/Driver | |
parent | 6d2cef1fd8e0e80acdc383779c6cce61eb8e38dc (diff) | |
download | VeraCrypt-5c934d81227c74ef8806589997518c6823db17d3.tar.gz VeraCrypt-5c934d81227c74ef8806589997518c6823db17d3.zip |
Windows Driver: Add IOCTL code to query RAM encryption status in VeraCrypt driver
Diffstat (limited to 'src/Driver')
-rw-r--r-- | src/Driver/Ntdriver.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index 70b34f43..7293de2d 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -2796,6 +2796,15 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex } break; + case VC_IOCTL_IS_RAM_ENCRYPTION_ENABLED: + if (ValidateIOBufferSize (Irp, sizeof (int), ValidateOutput)) + { + *(int *) Irp->AssociatedIrp.SystemBuffer = IsRamEncryptionEnabled() ? 1 : 0; + Irp->IoStatus.Information = sizeof (int); + Irp->IoStatus.Status = STATUS_SUCCESS; + } + break; + default: return TCCompleteIrp (Irp, STATUS_INVALID_DEVICE_REQUEST, 0); } @@ -3204,6 +3213,8 @@ LPWSTR TCTranslateCode (ULONG ulCode) TC_CASE_RET_NAME (TC_IOCTL_WIPE_PASSWORD_CACHE); TC_CASE_RET_NAME (TC_IOCTL_WRITE_BOOT_DRIVE_SECTOR); TC_CASE_RET_NAME (VC_IOCTL_GET_DRIVE_GEOMETRY_EX); + TC_CASE_RET_NAME (VC_IOCTL_EMERGENCY_CLEAR_ALL_KEYS); + TC_CASE_RET_NAME (VC_IOCTL_IS_RAM_ENCRYPTION_ENABLED); TC_CASE_RET_NAME (IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS); |