VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-28 20:23:01 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-01 00:35:33 +0100
commitae5eb73f93eb092458da878c149fb2dde28cfdad (patch)
treeb86ca770ad0422d61afe2113c3a1bce74991ffd5 /src/Driver
parent0391b8e550dc08d43caa9a04c06c26dd36fd544f (diff)
downloadVeraCrypt-ae5eb73f93eb092458da878c149fb2dde28cfdad.tar.gz
VeraCrypt-ae5eb73f93eb092458da878c149fb2dde28cfdad.zip
Windows driver: call VcProtectKeys only when RAM encryption enabled although this function does nothing when RAM encryption is disabled.
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/DriveFilter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index c9efd7fb..9700226f 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -645,8 +645,11 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password,
/* encrypt keys */
#ifdef _WIN64
- VcProtectKeys (Extension->HeaderCryptoInfo, VcGetEncryptionID (Extension->HeaderCryptoInfo));
- VcProtectKeys (Extension->Queue.CryptoInfo, VcGetEncryptionID (Extension->Queue.CryptoInfo));
+ if (IsRamEncryptionEnabled())
+ {
+ VcProtectKeys (Extension->HeaderCryptoInfo, VcGetEncryptionID (Extension->HeaderCryptoInfo));
+ VcProtectKeys (Extension->Queue.CryptoInfo, VcGetEncryptionID (Extension->Queue.CryptoInfo));
+ }
#endif
status = EncryptedIoQueueStart (&Extension->Queue);