VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/DriveFilter.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-28 19:23:01 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-28 23:35:33 (GMT)
commitae5eb73f93eb092458da878c149fb2dde28cfdad (patch)
treeb86ca770ad0422d61afe2113c3a1bce74991ffd5 /src/Driver/DriveFilter.c
parent0391b8e550dc08d43caa9a04c06c26dd36fd544f (diff)
downloadVeraCrypt-ae5eb73f93eb092458da878c149fb2dde28cfdad.zip
VeraCrypt-ae5eb73f93eb092458da878c149fb2dde28cfdad.tar.gz
Windows driver: call VcProtectKeys only when RAM encryption enabled although this function does nothing when RAM encryption is disabled.
Diffstat (limited to 'src/Driver/DriveFilter.c')
-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 c9efd7f..9700226 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);