diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-02-25 08:56:33 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-02-25 09:09:03 +0100 |
commit | a916135f3c28eae9c3db946c9946d3f75536a0ff (patch) | |
tree | 0dd77e284eddd8d5ed06961bada816b5e101e618 /src/Mount | |
parent | b2020c9fb7dc5d6591ccfa9151141b18524c6d0b (diff) | |
download | VeraCrypt-a916135f3c28eae9c3db946c9946d3f75536a0ff.tar.gz VeraCrypt-a916135f3c28eae9c3db946c9946d3f75536a0ff.zip |
Windows: Use default hash in the options of hidden volume protection
Diffstat (limited to 'src/Mount')
-rw-r--r-- | src/Mount/Mount.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 427c1a93..0a104709 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))
|