diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-02-28 20:23:01 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-03-01 00:35:33 +0100 |
commit | ae5eb73f93eb092458da878c149fb2dde28cfdad (patch) | |
tree | b86ca770ad0422d61afe2113c3a1bce74991ffd5 /src/Driver | |
parent | 0391b8e550dc08d43caa9a04c06c26dd36fd544f (diff) | |
download | VeraCrypt-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.c | 7 |
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); |