VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-12 00:24:25 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-14 09:49:05 (GMT)
commitd3e7ed96f3685d83dcc39a18574be1dd2cc8f2f6 (patch)
treec31143436e3db3164f51fcb4f669ab8e4175610a /src/Driver
parent69cb0bea8197fbb2031371a1f71b9a1c94f93b27 (diff)
downloadVeraCrypt-d3e7ed96f3685d83dcc39a18574be1dd2cc8f2f6.zip
VeraCrypt-d3e7ed96f3685d83dcc39a18574be1dd2cc8f2f6.tar.gz
Windows: Implement feature that enables clearing of encryption keys when a new device is inserted. Better implementation for update of EFI bootloader without usage of drive letters (this can fix random issues encountered during Windows upgrade).
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/Ntdriver.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index 47b2f8a..282112f 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -4346,6 +4346,13 @@ NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry)
if (flags & VC_DRIVER_CONFIG_BLOCK_SYS_TRIM)
BlockSystemTrimCommand = TRUE;
+
+ /* clear VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION if it is set */
+ if (flags & VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION)
+ {
+ flags ^= VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION;
+ WriteRegistryConfigFlags (flags);
+ }
}
EnableHwEncryption ((flags & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION) ? FALSE : TRUE);