diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-07-24 23:39:33 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-07-24 23:48:07 +0200 |
commit | 0fca588275c58e5db940deed12db9e4958a961b6 (patch) | |
tree | 9064fa72e635fb7552de020b6eadabe8f8d5f7b3 /src/Common | |
parent | 2dbf36618401ff4660d31b49f15300af730edaed (diff) | |
download | VeraCrypt-0fca588275c58e5db940deed12db9e4958a961b6.tar.gz VeraCrypt-0fca588275c58e5db940deed12db9e4958a961b6.zip |
Crypto: Workaround for AES-NI issue under Hyper-V on Windows Server 2008 R2 which masks AES-NI from applications although it is available.
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/Crypto.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c index 134a1715..dea4ff02 100644 --- a/src/Common/Crypto.c +++ b/src/Common/Crypto.c @@ -21,6 +21,7 @@ #include "EncryptionThreadPool.h" #endif #include "Volumes.h" +#include "cpu.h" /* Update the following when adding a new cipher or EA: @@ -1051,7 +1052,11 @@ BOOL IsAesHwCpuSupported () if (!stateValid) { +#ifdef TC_WINDOWS_BOOT_AES state = is_aes_hw_cpu_supported() ? TRUE : FALSE; +#else + state = g_hasAESNI ? TRUE : FALSE; +#endif stateValid = TRUE; } |