VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/MainCom.cpp17
-rw-r--r--src/Mount/MainCom.h2
-rw-r--r--src/Mount/MainCom.idl3
-rw-r--r--src/Mount/Mount.c218
-rw-r--r--src/Mount/Mount.h5
-rw-r--r--src/Mount/Mount.rc63
-rw-r--r--src/Mount/Resource.h6
7 files changed, 247 insertions, 67 deletions
diff --git a/src/Mount/MainCom.cpp b/src/Mount/MainCom.cpp
index 829cd21f..a75b1e52 100644
--- a/src/Mount/MainCom.cpp
+++ b/src/Mount/MainCom.cpp
@@ -106,7 +106,7 @@ public:
CW2A volumePathA(volumePath);
MainDlg = (HWND) hWnd;
if (volumePathA.m_psz)
- return ::ChangePwd (volumePathA.m_psz, oldPassword, newPassword, pkcs5, wipePassCount,(HWND) hWnd);
+ return ::ChangePwd (volumePathA.m_psz, oldPassword, 0, newPassword, pkcs5, wipePassCount,(HWND) hWnd);
else
return ERR_OUTOFMEMORY;
}
@@ -151,6 +151,17 @@ public:
return BaseCom::WriteLocalMachineRegistryDwordValue (keyPath, valueName, value);
}
+ virtual int STDMETHODCALLTYPE ChangePasswordEx (BSTR volumePath, Password *oldPassword, int old_pkcs5, Password *newPassword, int pkcs5, int wipePassCount, LONG_PTR hWnd)
+ {
+ USES_CONVERSION;
+ CW2A volumePathA(volumePath);
+ MainDlg = (HWND) hWnd;
+ if (volumePathA.m_psz)
+ return ::ChangePwd (volumePathA.m_psz, oldPassword, old_pkcs5, newPassword, pkcs5, wipePassCount,(HWND) hWnd);
+ else
+ return ERR_OUTOFMEMORY;
+ }
+
protected:
DWORD MessageThreadId;
LONG RefCount;
@@ -261,7 +272,7 @@ extern "C" int UacRestoreVolumeHeader (HWND hwndDlg, char *lpszVolume)
}
-extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, Password *newPassword, int pkcs5, int wipePassCount, HWND hwndDlg)
+extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, int old_pkcs5, Password *newPassword, int pkcs5, int wipePassCount, HWND hwndDlg)
{
CComPtr<ITrueCryptMainCom> tc;
int r;
@@ -269,7 +280,7 @@ extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, Password *
if (ComGetInstance (hwndDlg, &tc))
{
WaitCursor ();
- r = tc->ChangePassword (CComBSTR (lpszVolume), oldPassword, newPassword, pkcs5, wipePassCount, (LONG_PTR) hwndDlg);
+ r = tc->ChangePasswordEx (CComBSTR (lpszVolume), oldPassword, old_pkcs5, newPassword, pkcs5, wipePassCount, (LONG_PTR) hwndDlg);
NormalCursor ();
}
else
diff --git a/src/Mount/MainCom.h b/src/Mount/MainCom.h
index a22eb345..7643c64f 100644
--- a/src/Mount/MainCom.h
+++ b/src/Mount/MainCom.h
@@ -23,7 +23,7 @@ BOOL ComServerMain ();
void UacAnalyzeKernelMiniDump (HWND hwndDlg);
int UacBackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, char *lpszVolume);
int UacRestoreVolumeHeader (HWND hwndDlg, char *lpszVolume);
-int UacChangePwd (char *lpszVolume, Password *oldPassword, Password *newPassword, int pkcs5, int wipePassCount, HWND hwndDlg);
+int UacChangePwd (char *lpszVolume, Password *oldPassword, int old_pkcs5, Password *newPassword, int pkcs5, int wipePassCount, HWND hwndDlg);
#ifdef __cplusplus
}
diff --git a/src/Mount/MainCom.idl b/src/Mount/MainCom.idl
index 8550fe8f..3e347c95 100644
--- a/src/Mount/MainCom.idl
+++ b/src/Mount/MainCom.idl
@@ -12,7 +12,7 @@ import "..\Common\Password.h";
[
uuid(9ACF6176-5FC4-4690-A025-B3306A50EB6A),
helpstring("VeraCrypt Main UAC Support Library"),
- version(2.4) // Update ComSetup.cpp when changing version number
+ version(2.5) // Update ComSetup.cpp when changing version number
]
library TrueCryptMainCom
{
@@ -37,6 +37,7 @@ library TrueCryptMainCom
int RestoreVolumeHeader (LONG_PTR hwndDlg, BSTR lpszVolume);
DWORD SetDriverServiceStartType (DWORD startType);
DWORD WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value);
+ int ChangePasswordEx (BSTR volumePath, Password *oldPassword, int old_pkcs5, Password *newPassword, int pkcs5, int wipePassCount, LONG_PTR hWnd);
};
[
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 0f58c66e..db0e6a91 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -122,6 +122,8 @@ int nSelectedDriveIndex = -1; /* Item number of selected drive */
int cmdUnmountDrive = 0; /* Volume drive letter to unmount (-1 = all) */
Password VolumePassword; /* Password used for mounting volumes */
Password CmdVolumePassword; /* Password passed from command line */
+int VolumePkcs5 = 0;
+int CmdVolumePkcs5 = 0;
BOOL CmdVolumePasswordValid = FALSE;
MountOptions CmdMountOptions;
BOOL CmdMountOptionsValid = FALSE;
@@ -213,6 +215,8 @@ static void localcleanup (void)
clear them for extra security. */
burn (&VolumePassword, sizeof (VolumePassword));
burn (&CmdVolumePassword, sizeof (CmdVolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
+ burn (&CmdVolumePkcs5, sizeof (CmdVolumePkcs5));
burn (&mountOptions, sizeof (mountOptions));
burn (&defaultMountOptions, sizeof (defaultMountOptions));
burn (szFileName, sizeof(szFileName));
@@ -493,6 +497,7 @@ void LoadSettings (HWND hwndDlg)
defaultMountOptions.Removable = ConfigReadInt ("MountVolumesRemovable", FALSE);
defaultMountOptions.ReadOnly = ConfigReadInt ("MountVolumesReadOnly", FALSE);
defaultMountOptions.ProtectHiddenVolume = FALSE;
+ defaultMountOptions.ProtectedHidVolPkcs5Prf = 0;
defaultMountOptions.PartitionInInactiveSysEncScope = FALSE;
defaultMountOptions.RecoveryMode = FALSE;
defaultMountOptions.UseBackupHeader = FALSE;
@@ -1448,7 +1453,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_INITDIALOG:
{
LPARAM nIndex;
- HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
+ HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_OLD_PRF_ID);
int i;
WipeAlgorithmId headerWipeMode = TC_WIPE_3_DOD_5220;
@@ -1466,6 +1471,22 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES), TRUE);
EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_KEYFILES), TRUE);
+ /* Add PRF algorithm list for current password */
+ SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
+
+ 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++)
+ {
+ nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
+ SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
+ }
+
+ SendMessage (hComboBox, CB_SETCURSEL, 0, 0);
+
+ /* Add PRF algorithm list for new password */
+ hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
nIndex = SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("UNCHANGED"));
@@ -1508,6 +1529,8 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDT_NEW_PASSWORD), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDT_CONFIRM_PASSWORD), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDT_PKCS5_PRF), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), FALSE);
break;
case PCDM_REMOVE_ALL_KEYFILES_FROM_VOL:
@@ -1558,6 +1581,12 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
ShowWindow(GetDlgItem(hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_SHOW_PASSWORD_CHPWD_ORI), SW_HIDE);
+ /* for system encryption, we can't change the PRF */
+ EnableWindow (GetDlgItem (hwndDlg, IDT_PKCS5_PRF), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDT_NEW_PKCS5_PRF), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_PKCS5_OLD_PRF_ID), FALSE);
+
if (SetTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD, TIMER_INTERVAL_KEYB_LAYOUT_GUARD, NULL) == 0)
{
Error ("CANNOT_SET_TIMER");
@@ -1815,6 +1844,8 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
SendMessage (GetDlgItem (hwndDlg, IDC_WIPE_MODE), CB_GETCURSEL, 0, 0),
0);
int nStatus;
+ int old_pkcs5 = SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_OLD_PRF_ID), CB_GETITEMDATA,
+ SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_OLD_PRF_ID), CB_GETCURSEL, 0, 0), 0);
int pkcs5 = SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA,
SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
@@ -1872,11 +1903,20 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
{
// System
- pkcs5 = 0; // PKCS-5 PRF unchanged (currently system encryption supports only RIPEMD-160)
+ try
+ {
+ VOLUME_PROPERTIES_STRUCT properties;
+ BootEncObj->GetVolumeProperties(&properties);
+ old_pkcs5 = properties.pkcs5;
+ }
+ catch(...)
+ {}
+
+ pkcs5 = 0; // PKCS-5 PRF unchanged (currently we can't change PRF of system encryption)
try
{
- nStatus = BootEncObj->ChangePassword (&oldPassword, &newPassword, pkcs5, GetWipePassCount(headerWiperMode));
+ nStatus = BootEncObj->ChangePassword (&oldPassword, old_pkcs5, &newPassword, pkcs5, GetWipePassCount(headerWiperMode));
}
catch (Exception &e)
{
@@ -1888,14 +1928,14 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
{
// Non-system
- nStatus = ChangePwd (szFileName, &oldPassword, &newPassword, pkcs5, GetWipePassCount(headerWiperMode), hwndDlg);
+ nStatus = ChangePwd (szFileName, &oldPassword, old_pkcs5, &newPassword, pkcs5, GetWipePassCount(headerWiperMode), hwndDlg);
if (nStatus == ERR_OS_ERROR
&& GetLastError () == ERROR_ACCESS_DENIED
&& IsUacSupported ()
&& IsVolumeDeviceHosted (szFileName))
{
- nStatus = UacChangePwd (szFileName, &oldPassword, &newPassword, pkcs5, GetWipePassCount(headerWiperMode), hwndDlg);
+ nStatus = UacChangePwd (szFileName, &oldPassword, old_pkcs5, &newPassword, pkcs5, GetWipePassCount(headerWiperMode), hwndDlg);
}
}
@@ -1943,13 +1983,16 @@ static char *PasswordDialogTitleStringId;
BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
WORD lw = LOWORD (wParam);
- static Password *szXPwd;
+ static Password *szXPwd;
+ static int *pkcs5;
switch (msg)
{
case WM_INITDIALOG:
{
- szXPwd = (Password *) lParam;
+ int i, nIndex;
+ szXPwd = ((PasswordDlgParam *) lParam) -> password;
+ pkcs5 = ((PasswordDlgParam *) lParam) -> pkcs5;
LocalizeDialog (hwndDlg, "IDD_PASSWORD_DLG");
DragAcceptFiles (hwndDlg, TRUE);
@@ -1977,6 +2020,22 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
SetWindowTextW (hwndDlg, s);
}
+ /* Populate the PRF algorithms list */
+ HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
+ SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
+
+ 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++)
+ {
+ 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);
+
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
SendMessage (GetDlgItem (hwndDlg, IDC_CACHE), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0);
@@ -2155,6 +2214,7 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
szXPwd->Length = strlen ((char *) szXPwd->Text);
bCacheInDriver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_CACHE));
+ *pkcs5 = (int) SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
}
// Attempt to wipe password stored in the input field buffer
@@ -2502,6 +2562,21 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow (GetDlgItem (hwndDlg, IDC_MOUNT_SYSENC_PART_WITHOUT_PBA), !bPrebootPasswordDlgMode);
+ /* Add PRF algorithm list for hidden volume password */
+ 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++)
+ {
+ nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
+ SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
+ }
+
+ SendMessage (hComboBox, CB_SETCURSEL, 0, 0);
+
protect = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PROTECT_HIDDEN_VOL));
EnableWindow (GetDlgItem (hwndDlg, IDC_PROTECT_HIDDEN_VOL), !IsButtonChecked (GetDlgItem (hwndDlg, IDC_MOUNT_READONLY)));
@@ -2511,6 +2586,8 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow (GetDlgItem (hwndDlg, IDT_HIDDEN_PROT_PASSWD), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_HIDVOL_PROT), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT), protect);
+ EnableWindow (GetDlgItem (hwndDlg, IDT_PKCS5_PRF), protect);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), protect);
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT, hidVolProtKeyFilesParam.EnableKeyFiles);
@@ -2609,6 +2686,9 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
sizeof (mountOptions->ProtectedHidVolPassword.Text));
mountOptions->ProtectedHidVolPassword.Length = strlen ((char *) mountOptions->ProtectedHidVolPassword.Text);
+
+ mountOptions->ProtectedHidVolPkcs5Prf = SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA,
+ SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
}
// Cleanup
@@ -2645,6 +2725,8 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_MO), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_HIDVOL_PROT), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT), protect);
+ EnableWindow (GetDlgItem (hwndDlg, IDT_PKCS5_PRF), protect);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), protect);
return 1;
}
@@ -3396,21 +3478,27 @@ LPARAM GetItemLong (HWND hTree, int itemNo)
return item.lParam;
}
-static int AskVolumePassword (HWND hwndDlg, Password *password, char *titleStringId, BOOL enableMountOptions)
+static int AskVolumePassword (HWND hwndDlg, Password *password, int *pkcs5, char *titleStringId, BOOL enableMountOptions)
{
int result;
+ PasswordDlgParam dlgParam;
PasswordDialogTitleStringId = titleStringId;
PasswordDialogDisableMountOptions = !enableMountOptions;
+ dlgParam.password = password;
+ dlgParam.pkcs5 = pkcs5;
+
result = DialogBoxParamW (hInst,
MAKEINTRESOURCEW (IDD_PASSWORD_DLG), hwndDlg,
- (DLGPROC) PasswordDlgProc, (LPARAM) password);
+ (DLGPROC) PasswordDlgProc, (LPARAM) &dlgParam);
if (result != IDOK)
{
password->Length = 0;
+ *pkcs5 = 0;
burn (&mountOptions.ProtectedHidVolPassword, sizeof (mountOptions.ProtectedHidVolPassword));
+ burn (&mountOptions.ProtectedHidVolPkcs5Prf, sizeof (mountOptions.ProtectedHidVolPkcs5Prf));
}
return result == IDOK;
@@ -3430,7 +3518,10 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName)
nDosDriveNo = HIWORD (GetSelectedLong (GetDlgItem (hwndDlg, IDC_DRIVELIST))) - 'A';
if (!MultipleMountOperationInProgress)
+ {
VolumePassword.Length = 0;
+ VolumePkcs5 = 0;
+ }
if (szFileName == NULL)
{
@@ -3465,7 +3556,7 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName)
// First try cached passwords and if they fail ask user for a new one
WaitCursor ();
- mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, NULL, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
+ mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, NULL, CmdVolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
// If keyfiles are enabled, test empty password first
if (!mounted && KeyFilesEnable && FirstKeyFile)
@@ -3474,14 +3565,16 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName)
emptyPassword.Length = 0;
KeyFilesApply (&emptyPassword, FirstKeyFile);
- mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &emptyPassword, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
+ mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &emptyPassword, CmdVolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
+ if (mounted)
+ VolumePkcs5 = CmdVolumePkcs5;
burn (&emptyPassword, sizeof (emptyPassword));
}
// Test password and/or keyfiles used for the previous volume
if (!mounted && MultipleMountOperationInProgress && VolumePassword.Length != 0)
- mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
+ mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, VolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
NormalCursor ();
@@ -3494,17 +3587,24 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName)
}
while (mounted == 0)
- {
+ {
if (CmdVolumePassword.Length > 0)
{
VolumePassword = CmdVolumePassword;
+ VolumePkcs5 = CmdVolumePkcs5;
}
else if (!Silent)
{
+ int GuiPkcs5 = CmdVolumePkcs5;
StringCbCopyA (PasswordDlgVolume, sizeof(PasswordDlgVolume), szFileName);
- if (!AskVolumePassword (hwndDlg, &VolumePassword, NULL, TRUE))
+ if (!AskVolumePassword (hwndDlg, &VolumePassword, &GuiPkcs5, NULL, TRUE))
goto ret;
+ else
+ {
+ VolumePkcs5 = GuiPkcs5;
+ burn (&GuiPkcs5, sizeof(GuiPkcs5));
+ }
}
WaitCursor ();
@@ -3512,7 +3612,7 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName)
if (KeyFilesEnable)
KeyFilesApply (&VolumePassword, FirstKeyFile);
- mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, bCacheInDriver, bForceMount, &mountOptions, Silent, !Silent);
+ mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, VolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, Silent, !Silent);
NormalCursor ();
// Check for legacy non-ASCII passwords
@@ -3524,9 +3624,13 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName)
Warning ("EXE_FILE_EXTENSION_MOUNT_WARNING");
if (!MultipleMountOperationInProgress)
+ {
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
+ }
burn (&mountOptions.ProtectedHidVolPassword, sizeof (mountOptions.ProtectedHidVolPassword));
+ burn (&mountOptions.ProtectedHidVolPkcs5Prf, sizeof (mountOptions.ProtectedHidVolPkcs5Prf));
if (CmdVolumePassword.Length > 0 || Silent)
break;
@@ -3554,9 +3658,13 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName)
ret:
if (!MultipleMountOperationInProgress)
+ {
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
+ }
burn (&mountOptions.ProtectedHidVolPassword, sizeof (mountOptions.ProtectedHidVolPassword));
+ burn (&mountOptions.ProtectedHidVolPkcs5Prf, sizeof (mountOptions.ProtectedHidVolPkcs5Prf));
RestoreDefaultKeyFilesParam ();
@@ -3749,14 +3857,21 @@ static BOOL MountAllDevices (HWND hwndDlg, BOOL bPasswordPrompt)
{
if (!CmdVolumePasswordValid && bPasswordPrompt)
{
+ int GuiPkcs5 = CmdVolumePkcs5;
PasswordDlgVolume[0] = '\0';
- if (!AskVolumePassword (hwndDlg, &VolumePassword, NULL, TRUE))
+ if (!AskVolumePassword (hwndDlg, &VolumePassword, &GuiPkcs5, NULL, TRUE))
goto ret;
+ else
+ {
+ VolumePkcs5 = GuiPkcs5;
+ burn (&GuiPkcs5, sizeof(GuiPkcs5));
+ }
}
else if (CmdVolumePasswordValid)
{
bPasswordPrompt = FALSE;
VolumePassword = CmdVolumePassword;
+ VolumePkcs5 = CmdVolumePkcs5;
}
WaitCursor();
@@ -3810,8 +3925,8 @@ static BOOL MountAllDevices (HWND hwndDlg, BOOL bPasswordPrompt)
goto ret;
// First try user password then cached passwords
- if ((mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, bCacheInDriver, bForceMount, &mountOptions, TRUE, FALSE)) > 0
- || (mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, NULL, bCacheInDriver, bForceMount, &mountOptions, TRUE, FALSE)) > 0)
+ if ((mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, &VolumePassword, VolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, TRUE, FALSE)) > 0
+ || (mounted = MountVolume (hwndDlg, nDosDriveNo, szFileName, NULL, VolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, TRUE, FALSE)) > 0)
{
// A volume has been successfully mounted
@@ -3889,7 +4004,9 @@ static BOOL MountAllDevices (HWND hwndDlg, BOOL bPasswordPrompt)
if (!bHeaderBakRetry)
{
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
burn (&mountOptions.ProtectedHidVolPassword, sizeof (mountOptions.ProtectedHidVolPassword));
+ burn (&mountOptions.ProtectedHidVolPkcs5Prf, sizeof (mountOptions.ProtectedHidVolPkcs5Prf));
}
} while (bPasswordPrompt && mountedVolCount < 1);
@@ -3923,7 +4040,9 @@ ret:
MultipleMountOperationInProgress = FALSE;
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
burn (&mountOptions.ProtectedHidVolPassword, sizeof (mountOptions.ProtectedHidVolPassword));
+ burn (&mountOptions.ProtectedHidVolPkcs5Prf, sizeof (mountOptions.ProtectedHidVolPkcs5Prf));
mountOptions.UseBackupHeader = defaultMountOptions.UseBackupHeader;
@@ -4786,7 +4905,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
BOOL mounted;
// Cached password
- mounted = MountVolume (hwndDlg, szDriveLetter[0] - 'A', szFileName, NULL, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
+ mounted = MountVolume (hwndDlg, szDriveLetter[0] - 'A', szFileName, NULL, CmdVolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, Silent, FALSE);
// Command line password or keyfiles
if (!mounted && (CmdVolumePassword.Length != 0 || FirstCmdKeyFile))
@@ -4797,7 +4916,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
KeyFilesApply (&CmdVolumePassword, FirstCmdKeyFile);
mounted = MountVolume (hwndDlg, szDriveLetter[0] - 'A',
- szFileName, &CmdVolumePassword, bCacheInDriver, bForceMount,
+ szFileName, &CmdVolumePassword, CmdVolumePkcs5, bCacheInDriver, bForceMount,
&mountOptions, Silent, reportBadPasswd);
burn (&CmdVolumePassword, sizeof (CmdVolumePassword));
@@ -4812,21 +4931,29 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
// Ask user for password
while (!mounted && !Silent)
{
+ int GuiPkcs5 = CmdVolumePkcs5;
VolumePassword.Length = 0;
StringCbCopyA (PasswordDlgVolume, sizeof(PasswordDlgVolume),szFileName);
- if (!AskVolumePassword (hwndDlg, &VolumePassword, NULL, TRUE))
+ if (!AskVolumePassword (hwndDlg, &VolumePassword, &GuiPkcs5, NULL, TRUE))
break;
+ else
+ {
+ VolumePkcs5 = GuiPkcs5;
+ burn (&GuiPkcs5, sizeof(GuiPkcs5));
+ }
WaitCursor ();
if (KeyFilesEnable && FirstKeyFile)
KeyFilesApply (&VolumePassword, FirstKeyFile);
- mounted = MountVolume (hwndDlg, szDriveLetter[0] - 'A', szFileName, &VolumePassword, bCacheInDriver, bForceMount, &mountOptions, FALSE, TRUE);
+ mounted = MountVolume (hwndDlg, szDriveLetter[0] - 'A', szFileName, &VolumePassword, VolumePkcs5, bCacheInDriver, bForceMount, &mountOptions, FALSE, TRUE);
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
burn (&mountOptions.ProtectedHidVolPassword, sizeof (mountOptions.ProtectedHidVolPassword));
+ burn (&mountOptions.ProtectedHidVolPkcs5Prf, sizeof (mountOptions.ProtectedHidVolPkcs5Prf));
NormalCursor ();
}
@@ -6654,7 +6781,8 @@ void ExtractCommandLine (HWND hwndDlg, char *lpszCommandLine)
OptionSilent,
OptionTokenLib,
OptionVolume,
- CommandWipeCache
+ CommandWipeCache,
+ OptionPkcs5,
};
argument args[]=
@@ -6675,7 +6803,8 @@ void ExtractCommandLine (HWND hwndDlg, char *lpszCommandLine)
{ OptionSilent, "/silent", "/s", FALSE },
{ OptionTokenLib, "/tokenlib", NULL, FALSE },
{ OptionVolume, "/volume", "/v", FALSE },
- { CommandWipeCache, "/wipecache", "/w", FALSE }
+ { CommandWipeCache, "/wipecache", "/w", FALSE },
+ { OptionPkcs5, "/prf", NULL , FALSE }
};
argumentspec as;
@@ -6874,6 +7003,32 @@ void ExtractCommandLine (HWND hwndDlg, char *lpszCommandLine)
exit(0);
break;
+ case OptionPkcs5:
+ {
+ char szTmp[32];
+ if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs,
+ nArgPos, &i, nNoCommandLineArgs, szTmp, sizeof (szTmp)))
+ {
+ if (stricmp(szTmp, "sha512") == 0)
+ CmdVolumePkcs5 = SHA512;
+ else if (stricmp(szTmp, "whirlpool") == 0)
+ CmdVolumePkcs5 = WHIRLPOOL;
+ else if (stricmp(szTmp, "sha256") == 0)
+ CmdVolumePkcs5 = SHA256;
+ else if (stricmp(szTmp, "ripemd160") == 0)
+ CmdVolumePkcs5 = RIPEMD160;
+ else
+ {
+ CmdVolumePkcs5 = 0;
+ Error ("COMMAND_LINE_ERROR");
+ }
+
+ }
+ else
+ Error ("COMMAND_LINE_ERROR");
+ }
+ break;
+
// no option = file name
default:
{
@@ -7332,6 +7487,7 @@ skipMount:
MultipleMountOperationInProgress = FALSE;
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
if (status && CloseSecurityTokenSessionsAfterMount)
SecurityToken::CloseAllSessions();
@@ -7558,7 +7714,7 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const char *lps
while (TRUE)
{
- if (!AskVolumePassword (hwndDlg, askPassword, type == TC_VOLUME_TYPE_HIDDEN ? "ENTER_HIDDEN_VOL_PASSWORD" : "ENTER_NORMAL_VOL_PASSWORD", FALSE))
+ if (!AskVolumePassword (hwndDlg, askPassword, &VolumePkcs5, type == TC_VOLUME_TYPE_HIDDEN ? "ENTER_HIDDEN_VOL_PASSWORD" : "ENTER_NORMAL_VOL_PASSWORD", FALSE))
{
nStatus = ERR_SUCCESS;
goto ret;
@@ -7569,7 +7725,7 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const char *lps
if (KeyFilesEnable && FirstKeyFile)
KeyFilesApply (askPassword, FirstKeyFile);
- nStatus = OpenVolume (askVol, lpszVolume, askPassword, FALSE, bPreserveTimestamp, FALSE);
+ nStatus = OpenVolume (askVol, lpszVolume, askPassword, VolumePkcs5, FALSE, bPreserveTimestamp, FALSE);
NormalCursor();
@@ -7722,6 +7878,7 @@ error:
handleError (hwndDlg, nStatus);
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
burn (&hiddenVolPassword, sizeof (hiddenVolPassword));
burn (temporaryKey, sizeof (temporaryKey));
burn (originalK2, sizeof (originalK2));
@@ -7823,7 +7980,7 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume)
while (TRUE)
{
StringCbCopyA (PasswordDlgVolume, sizeof(PasswordDlgVolume), lpszVolume);
- if (!AskVolumePassword (hwndDlg, &VolumePassword, NULL, FALSE))
+ if (!AskVolumePassword (hwndDlg, &VolumePassword, &VolumePkcs5, NULL, FALSE))
{
nStatus = ERR_SUCCESS;
goto ret;
@@ -7834,7 +7991,7 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume)
if (KeyFilesEnable && FirstKeyFile)
KeyFilesApply (&VolumePassword, FirstKeyFile);
- nStatus = OpenVolume (&volume, lpszVolume, &VolumePassword, TRUE, bPreserveTimestamp, TRUE);
+ nStatus = OpenVolume (&volume, lpszVolume, &VolumePassword, VolumePkcs5, TRUE, bPreserveTimestamp, TRUE);
NormalCursor();
@@ -8025,7 +8182,7 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume)
// Open the header
while (TRUE)
{
- if (!AskVolumePassword (hwndDlg, &VolumePassword, "ENTER_HEADER_BACKUP_PASSWORD", FALSE))
+ if (!AskVolumePassword (hwndDlg, &VolumePassword, &VolumePkcs5, "ENTER_HEADER_BACKUP_PASSWORD", FALSE))
{
nStatus = ERR_SUCCESS;
goto ret;
@@ -8041,7 +8198,7 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume)
if (type == TC_VOLUME_TYPE_HIDDEN)
headerOffsetBackupFile += (legacyBackup ? TC_VOLUME_HEADER_SIZE_LEGACY : TC_VOLUME_HEADER_SIZE);
- nStatus = ReadVolumeHeader (FALSE, buffer + headerOffsetBackupFile, &VolumePassword, &restoredCryptoInfo, NULL);
+ nStatus = ReadVolumeHeader (FALSE, buffer + headerOffsetBackupFile, &VolumePassword, VolumePkcs5, &restoredCryptoInfo, NULL);
if (nStatus == ERR_SUCCESS)
break;
}
@@ -8145,6 +8302,7 @@ error:
handleError (hwndDlg, nStatus);
burn (&VolumePassword, sizeof (VolumePassword));
+ burn (&VolumePkcs5, sizeof (VolumePkcs5));
RestoreDefaultKeyFilesParam();
RandStop (FALSE);
NormalCursor();
diff --git a/src/Mount/Mount.h b/src/Mount/Mount.h
index f0f5885f..e982de81 100644
--- a/src/Mount/Mount.h
+++ b/src/Mount/Mount.h
@@ -48,6 +48,11 @@ typedef struct
BOOL bHidVolDamagePrevReported[26];
} VOLUME_NOTIFICATIONS_LIST;
+typedef struct
+{
+ Password *password;
+ int* pkcs5;
+} PasswordDlgParam;
extern VOLUME_NOTIFICATIONS_LIST VolumeNotificationsList;
diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc
index 56597cd2..8851646e 100644
--- a/src/Mount/Mount.rc
+++ b/src/Mount/Mount.rc
@@ -103,32 +103,34 @@ BEGIN
CONTROL "",IDC_VOLUME_PROPERTIES_LIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,6,269,154
END
-IDD_PASSWORDCHANGE_DLG DIALOGEX 0, 0, 316, 183
+IDD_PASSWORDCHANGE_DLG DIALOGEX 0, 0, 316, 207
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Change Password or Keyfiles"
CLASS "CustomDlg"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
EDITTEXT IDC_OLD_PASSWORD,89,14,147,13,ES_PASSWORD | ES_AUTOHSCROLL
- CONTROL "Use keyfiles",IDC_ENABLE_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,34,86,10
- PUSHBUTTON "Keyfiles...",IDC_KEYFILES,177,32,59,14
- CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_ORI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,46,138,10,WS_EX_TRANSPARENT
- EDITTEXT IDC_PASSWORD,89,74,147,13,ES_PASSWORD | ES_AUTOHSCROLL
- EDITTEXT IDC_VERIFY,89,90,147,13,ES_PASSWORD | ES_AUTOHSCROLL
- CONTROL "Use keyfiles",IDC_ENABLE_NEW_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,109,86,11
- PUSHBUTTON "Keyfiles...",IDC_NEW_KEYFILES,177,107,59,14
- CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_NEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,121,139,11,WS_EX_TRANSPARENT
- COMBOBOX IDC_PKCS5_PRF_ID,89,136,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ CONTROL "Use keyfiles",IDC_ENABLE_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,53,86,10
+ PUSHBUTTON "Keyfiles...",IDC_KEYFILES,177,51,59,14
+ CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_ORI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,65,138,10,WS_EX_TRANSPARENT
+ EDITTEXT IDC_PASSWORD,89,99,147,13,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_VERIFY,89,115,147,13,ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "Use keyfiles",IDC_ENABLE_NEW_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,134,86,11
+ PUSHBUTTON "Keyfiles...",IDC_NEW_KEYFILES,177,132,59,14
+ CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_NEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,146,139,11,WS_EX_TRANSPARENT
+ COMBOBOX IDC_PKCS5_PRF_ID,89,161,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,251,7,59,14
PUSHBUTTON "Cancel",IDCANCEL,251,24,59,14
RTEXT "Password:",IDT_PASSWORD,12,16,72,8
- RTEXT "Password:",IDT_NEW_PASSWORD,8,77,76,8
- RTEXT "Confirm Password:",IDT_CONFIRM_PASSWORD,9,93,75,16
- RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,9,137,74,10,SS_CENTERIMAGE
- GROUPBOX "Current",IDT_CURRENT,6,3,238,58
- GROUPBOX "New",IDT_NEW,6,63,238,113
- COMBOBOX IDC_WIPE_MODE,89,155,125,90,CBS_DROPDOWNLIST | WS_TABSTOP
- RTEXT "Wipe mode:",IDT_WIPE_MODE,9,157,74,8,0,WS_EX_RIGHT
+ RTEXT "Password:",IDT_NEW_PASSWORD,8,102,76,8
+ RTEXT "Confirm Password:",IDT_CONFIRM_PASSWORD,9,118,75,16
+ RTEXT "PKCS-5 PRF:",IDT_NEW_PKCS5_PRF,9,162,74,10,SS_CENTERIMAGE
+ GROUPBOX "Current",IDT_CURRENT,6,3,238,77
+ GROUPBOX "New",IDT_NEW,6,87,238,113
+ COMBOBOX IDC_WIPE_MODE,89,180,125,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ RTEXT "Wipe mode:",IDT_WIPE_MODE,9,182,74,8,0,WS_EX_RIGHT
+ COMBOBOX IDC_PKCS5_OLD_PRF_ID,89,33,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,12,34,74,10,SS_CENTERIMAGE
END
IDD_MOUNT_DLG DIALOGEX 0, 0, 375, 271
@@ -161,21 +163,23 @@ BEGIN
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,2,151,372,119
END
-IDD_PASSWORD_DLG DIALOGEX 0, 0, 280, 68
+IDD_PASSWORD_DLG DIALOGEX 0, 0, 305, 91
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Enter VeraCrypt Volume Password"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_PASSWORD,48,8,153,14,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_PASSWORD,69,8,153,14,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "Cache passwords and keyfil&es in memory",IDC_CACHE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,27,153,10
- CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,40,83,10
- CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,52,83,11
- PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,137,49,64,14
- PUSHBUTTON "Mount Opti&ons...",IDC_MOUNT_OPTIONS,208,49,64,14
- DEFPUSHBUTTON "OK",IDOK,208,8,64,14
- PUSHBUTTON "Cancel",IDCANCEL,208,25,64,14
- RTEXT "Password:",IDT_PASSWORD,0,10,46,19
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,50,153,10
+ CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,63,83,10
+ CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,75,83,11
+ PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,158,72,64,14
+ PUSHBUTTON "Mount Opti&ons...",IDC_MOUNT_OPTIONS,229,72,64,14
+ DEFPUSHBUTTON "OK",IDOK,229,8,64,14
+ PUSHBUTTON "Cancel",IDCANCEL,229,25,64,14
+ RTEXT "Password:",IDT_PASSWORD,0,10,65,13
+ COMBOBOX IDC_PKCS5_PRF_ID,69,26,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,27,65,13
END
IDD_TRAVELER_DLG DIALOGEX 0, 0, 300, 269
@@ -355,7 +359,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 309
TOPMARGIN, 7
- BOTTOMMARGIN, 176
+ BOTTOMMARGIN, 200
END
IDD_MOUNT_DLG, DIALOG
@@ -366,7 +370,8 @@ BEGIN
IDD_PASSWORD_DLG, DIALOG
BEGIN
- BOTTOMMARGIN, 63
+ RIGHTMARGIN, 296
+ BOTTOMMARGIN, 86
END
IDD_TRAVELER_DLG, DIALOG
diff --git a/src/Mount/Resource.h b/src/Mount/Resource.h
index 3ba75242..bf64cee2 100644
--- a/src/Mount/Resource.h
+++ b/src/Mount/Resource.h
@@ -35,7 +35,6 @@
#define IDC_ENABLE_NEW_KEYFILES 1012
#define IDC_PRESERVE_TIMESTAMPS 1013
#define IDC_PREF_WIPE_CACHE_ON_EXIT 1014
-#define IDC_PKCS5_PRF_ID 1015
#define IDC_PREF_CACHE_PASSWORDS 1016
#define IDC_DIRECTORY 1017
#define IDC_PREF_DISMOUNT_LOGOFF 1018
@@ -77,7 +76,6 @@
#define IDT_NEW 1054
#define IDT_NEW_PASSWORD 1055
#define IDT_CONFIRM_PASSWORD 1056
-#define IDT_PKCS5_PRF 1057
#define IDT_PW_CACHE_OPTIONS 1058
#define IDT_DEFAULT_MOUNT_OPTIONS 1059
#define IDT_WINDOWS_RELATED_SETTING 1060
@@ -160,6 +158,8 @@
#define IDC_FAVORITES_HELP_LINK 1135
#define IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX 1136
#define IDC_PREF_DISMOUNT_SESSION_LOCKED 1137
+#define IDT_NEW_PKCS5_PRF 1138
+#define IDC_PKCS5_OLD_PRF_ID 1139
#define IDM_HELP 40001
#define IDM_ABOUT 40002
#define IDM_UNMOUNT_VOLUME 40003
@@ -231,7 +231,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 118
#define _APS_NEXT_COMMAND_VALUE 40064
-#define _APS_NEXT_CONTROL_VALUE 1138
+#define _APS_NEXT_CONTROL_VALUE 1140
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif