VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-07 23:32:03 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-08 00:02:57 (GMT)
commitf780011a865bb0b935e104f93b1ba2c2a1bb3a88 (patch)
tree3ca1eef4adfbfe7fd1a4c591b280db93834b9c3b /src
parent9a76ecfc55cacfa80f3149d3c396a20ce9d84fec (diff)
downloadVeraCrypt-f780011a865bb0b935e104f93b1ba2c2a1bb3a88.zip
VeraCrypt-f780011a865bb0b935e104f93b1ba2c2a1bb3a88.tar.gz
Windows Driver: fix BSOD when mounting hidden volume if RAM encryption is enabled
Diffstat (limited to 'src')
-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 ab9370f..b159b79 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);