diff options
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r-- | src/Mount/Mount.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 380cd04a..6b11c178 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c | |||
@@ -1396,6 +1396,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR | |||
1396 | LPARAM nIndex; | 1396 | LPARAM nIndex; |
1397 | HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID); | 1397 | HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID); |
1398 | int i; | 1398 | int i; |
1399 | WipeAlgorithmId headerWipeMode = TC_WIPE_3_DOD_5220; | ||
1399 | 1400 | ||
1400 | ZeroMemory (&newKeyFilesParam, sizeof (newKeyFilesParam)); | 1401 | ZeroMemory (&newKeyFilesParam, sizeof (newKeyFilesParam)); |
1401 | 1402 | ||
@@ -1427,6 +1428,9 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR | |||
1427 | 1428 | ||
1428 | SendMessage (hComboBox, CB_SETCURSEL, 0, 0); | 1429 | SendMessage (hComboBox, CB_SETCURSEL, 0, 0); |
1429 | 1430 | ||
1431 | PopulateWipeModeCombo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), FALSE, FALSE, TRUE); | ||
1432 | SelectAlgo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), (int *) &headerWipeMode); | ||
1433 | |||
1430 | switch (pwdChangeDlgMode) | 1434 | switch (pwdChangeDlgMode) |
1431 | { | 1435 | { |
1432 | case PCDM_CHANGE_PKCS5_PRF: | 1436 | case PCDM_CHANGE_PKCS5_PRF: |
@@ -1751,6 +1755,11 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR | |||
1751 | HWND hParent = GetParent (hwndDlg); | 1755 | HWND hParent = GetParent (hwndDlg); |
1752 | Password oldPassword; | 1756 | Password oldPassword; |
1753 | Password newPassword; | 1757 | Password newPassword; |
1758 | WipeAlgorithmId headerWiperMode = (WipeAlgorithmId) SendMessage ( | ||
1759 | GetDlgItem (hwndDlg, IDC_WIPE_MODE), | ||
1760 | CB_GETITEMDATA, | ||
1761 | SendMessage (GetDlgItem (hwndDlg, IDC_WIPE_MODE), CB_GETCURSEL, 0, 0), | ||
1762 | 0); | ||
1754 | int nStatus; | 1763 | int nStatus; |
1755 | int pkcs5 = SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, | 1764 | int pkcs5 = SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, |
1756 | SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0); | 1765 | SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0); |
@@ -1813,7 +1822,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR | |||
1813 | 1822 | ||
1814 | try | 1823 | try |
1815 | { | 1824 | { |
1816 | nStatus = BootEncObj->ChangePassword (&oldPassword, &newPassword, pkcs5); | 1825 | nStatus = BootEncObj->ChangePassword (&oldPassword, &newPassword, pkcs5, GetWipePassCount(headerWiperMode)); |
1817 | } | 1826 | } |
1818 | catch (Exception &e) | 1827 | catch (Exception &e) |
1819 | { | 1828 | { |
@@ -1825,14 +1834,14 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR | |||
1825 | { | 1834 | { |
1826 | // Non-system | 1835 | // Non-system |
1827 | 1836 | ||
1828 | nStatus = ChangePwd (szFileName, &oldPassword, &newPassword, pkcs5, hwndDlg); | 1837 | nStatus = ChangePwd (szFileName, &oldPassword, &newPassword, pkcs5, GetWipePassCount(headerWiperMode), hwndDlg); |
1829 | 1838 | ||
1830 | if (nStatus == ERR_OS_ERROR | 1839 | if (nStatus == ERR_OS_ERROR |
1831 | && GetLastError () == ERROR_ACCESS_DENIED | 1840 | && GetLastError () == ERROR_ACCESS_DENIED |
1832 | && IsUacSupported () | 1841 | && IsUacSupported () |
1833 | && IsVolumeDeviceHosted (szFileName)) | 1842 | && IsVolumeDeviceHosted (szFileName)) |
1834 | { | 1843 | { |
1835 | nStatus = UacChangePwd (szFileName, &oldPassword, &newPassword, pkcs5, hwndDlg); | 1844 | nStatus = UacChangePwd (szFileName, &oldPassword, &newPassword, pkcs5, GetWipePassCount(headerWiperMode), hwndDlg); |
1836 | } | 1845 | } |
1837 | } | 1846 | } |
1838 | 1847 | ||