VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-28 19:24:57 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-28 23:27:59 +0100
commit8d787dcd7128fce554f473da62e20162b0b6c9c4 (patch)
tree932db7971342df64b05e297fe8421d195539ae81 /src/Mount
parent25c3d15ed7edcb8483dc3de7a55cf4579f6504c4 (diff)
downloadVeraCrypt-8d787dcd7128fce554f473da62e20162b0b6c9c4.tar.gz
VeraCrypt-8d787dcd7128fce554f473da62e20162b0b6c9c4.zip
Windows: propose only hash algorithm that support system encryption when the user select the option to a partition as an encrypted system partition.
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/Mount.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index f1864769..1d25473d 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -2163,6 +2163,25 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
SetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE, FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_TRUECRYPT_MODE), FALSE);
+ /* Repopulate the PRF algorithms list with algorithms that support system encryption */
+ HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
+ SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
+
+ int i, nIndex = SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
+ SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 0);
+
+ for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++)
+ {
+ if (HashForSystemEncryption(i))
+ {
+ nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
+ SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
+ }
+ }
+
+ /* make autodetection the default */
+ SendMessage (hComboBox, CB_SETCURSEL, 0, 0);
+
ToBootPwdField (hwndDlg, IDC_PASSWORD);
// Attempt to wipe the password stored in the input field buffer