VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-07-29 15:50:30 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-07-29 22:40:44 +0200
commitfe31cf5b83383cbc02f5bc31411367c0128f2df6 (patch)
treeb43bf3351bf30671973ae39b7dc756568168e947 /src/Common
parent2389561406cb9e498008f884bed36e6e9d78ea80 (diff)
downloadVeraCrypt-fe31cf5b83383cbc02f5bc31411367c0128f2df6.tar.gz
VeraCrypt-fe31cf5b83383cbc02f5bc31411367c0128f2df6.zip
Crypto: Use Hyper-V AES-NI detection workaround when displaying AES hardware availability in GUI.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Dlgcode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index c9955714..1ecc3c0a 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -5517,12 +5517,13 @@ BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
uint32 driverConfig = ReadDriverConfigurationFlags();
+ int isAesHwSupported = is_aes_hw_cpu_supported();
- SetDlgItemTextW (hwndDlg, IDC_HW_AES, (wstring (L" ") + (GetString (is_aes_hw_cpu_supported() ? ((driverConfig & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION) ? "UISTR_DISABLED" : "UISTR_YES") : "NOT_APPLICABLE_OR_NOT_AVAILABLE"))).c_str());
+ SetDlgItemTextW (hwndDlg, IDC_HW_AES, (wstring (L" ") + (GetString (isAesHwSupported ? ((driverConfig & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION) ? "UISTR_DISABLED" : "UISTR_YES") : "NOT_APPLICABLE_OR_NOT_AVAILABLE"))).c_str());
ToHyperlink (hwndDlg, IDC_HW_AES_LABEL_LINK);
- if (is_aes_hw_cpu_supported() && (driverConfig & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION))
+ if (isAesHwSupported && (driverConfig & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION))
{
Warning ("DISABLED_HW_AES_AFFECTS_PERFORMANCE", hwndDlg);
}