VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/Ntdriver.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-12 01:24:25 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-14 10:49:05 +0100
commitd3e7ed96f3685d83dcc39a18574be1dd2cc8f2f6 (patch)
treec31143436e3db3164f51fcb4f669ab8e4175610a /src/Driver/Ntdriver.c
parent69cb0bea8197fbb2031371a1f71b9a1c94f93b27 (diff)
downloadVeraCrypt-d3e7ed96f3685d83dcc39a18574be1dd2cc8f2f6.tar.gz
VeraCrypt-d3e7ed96f3685d83dcc39a18574be1dd2cc8f2f6.zip
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/Ntdriver.c')
-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 47b2f8a5..282112fc 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);