VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);