VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-02-25 07:56:33 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-02-25 08:09:03 (GMT)
commita916135f3c28eae9c3db946c9946d3f75536a0ff (patch)
tree0dd77e284eddd8d5ed06961bada816b5e101e618 /src/Mount
parentb2020c9fb7dc5d6591ccfa9151141b18524c6d0b (diff)
downloadVeraCrypt-a916135f3c28eae9c3db946c9946d3f75536a0ff.zip
VeraCrypt-a916135f3c28eae9c3db946c9946d3f75536a0ff.tar.gz
Windows: Use default hash in the options of hidden volume protection
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/Mount.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 427c1a9..0a10470 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -2329,6 +2329,9 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
if (lw == IDC_MOUNT_OPTIONS)
{
+ /* Use default PRF specified by the user if any */
+ if (mountOptions.ProtectedHidVolPkcs5Prf == 0)
+ mountOptions.ProtectedHidVolPkcs5Prf = *pkcs5;
DialogBoxParamW (hInst,
MAKEINTRESOURCEW (IDD_MOUNT_OPTIONS), hwndDlg,
(DLGPROC) MountOptionsDlgProc, (LPARAM) &mountOptions);
@@ -6013,6 +6016,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (GetAsyncKeyState (VK_CONTROL) < 0)
{
+ /* Priority is given to command line parameters
+ * Default values used only when nothing specified in command line
+ */
+ if (CmdVolumePkcs5 == 0)
+ mountOptions.ProtectedHidVolPkcs5Prf = DefaultVolumePkcs5;
+ else
+ mountOptions.ProtectedHidVolPkcs5Prf = CmdVolumePkcs5;
+
if (IDCANCEL == DialogBoxParamW (hInst,
MAKEINTRESOURCEW (IDD_MOUNT_OPTIONS), hwndDlg,
(DLGPROC) MountOptionsDlgProc, (LPARAM) &mountOptions))
@@ -7765,6 +7776,13 @@ BOOL MountFavoriteVolumes (BOOL systemFavorites, BOOL logOnMount, BOOL hotKeyMou
&& !favoriteVolumeToMount.Path.empty()
&& GetAsyncKeyState (VK_CONTROL) < 0)
{
+ /* Priority is given to command line parameters
+ * Default values used only when nothing specified in command line
+ */
+ if (CmdVolumePkcs5 == 0)
+ mountOptions.ProtectedHidVolPkcs5Prf = DefaultVolumePkcs5;
+ else
+ mountOptions.ProtectedHidVolPkcs5Prf = CmdVolumePkcs5;
if (DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_MOUNT_OPTIONS), MainDlg, MountOptionsDlgProc, (LPARAM) &mountOptions) == IDCANCEL)
{
status = FALSE;
@@ -9214,6 +9232,13 @@ void MountSelectedVolume (HWND hwndDlg, BOOL mountWithOptions)
if (mountWithOptions || GetAsyncKeyState (VK_CONTROL) < 0)
{
+ /* Priority is given to command line parameters
+ * Default values used only when nothing specified in command line
+ */
+ if (CmdVolumePkcs5 == 0)
+ mountOptions.ProtectedHidVolPkcs5Prf = DefaultVolumePkcs5;
+ else
+ mountOptions.ProtectedHidVolPkcs5Prf = CmdVolumePkcs5;
if (IDCANCEL == DialogBoxParamW (hInst,
MAKEINTRESOURCEW (IDD_MOUNT_OPTIONS), hwndDlg,
(DLGPROC) MountOptionsDlgProc, (LPARAM) &mountOptions))