VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-08 00:32:03 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-08 01:02:57 +0100
commitf780011a865bb0b935e104f93b1ba2c2a1bb3a88 (patch)
tree3ca1eef4adfbfe7fd1a4c591b280db93834b9c3b
parent9a76ecfc55cacfa80f3149d3c396a20ce9d84fec (diff)
downloadVeraCrypt-f780011a865bb0b935e104f93b1ba2c2a1bb3a88.tar.gz
VeraCrypt-f780011a865bb0b935e104f93b1ba2c2a1bb3a88.zip
Windows Driver: fix BSOD when mounting hidden volume if RAM encryption is enabled
-rw-r--r--src/Driver/Ntvol.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c
index ab9370f7..b159b79d 100644
--- a/src/Driver/Ntvol.c
+++ b/src/Driver/Ntvol.c
@@ -591,10 +591,6 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
mount->VolumePim,
mount->bTrueCryptMode,
&Extension->cryptoInfo);
-#ifdef _WIN64
- if (IsRamEncryptionEnabled())
- VcProtectKeys (Extension->cryptoInfo, VcGetEncryptionID (Extension->cryptoInfo));
-#endif
}
ReadVolumeHeaderRecoveryMode = FALSE;
@@ -611,6 +607,11 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
goto error;
}
+#ifdef _WIN64
+ if (IsRamEncryptionEnabled())
+ VcProtectKeys (Extension->cryptoInfo, VcGetEncryptionID (Extension->cryptoInfo));
+#endif
+
Dump ("Volume header decrypted\n");
Dump ("Required program version = %x\n", (int) Extension->cryptoInfo->RequiredProgramVersion);
Dump ("Legacy volume = %d\n", (int) Extension->cryptoInfo->LegacyVolume);