VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-04 10:37:37 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-04 10:39:47 (GMT)
commit6bb1f24ed571bccd4d1d247dafdc1dda6eaa3d8d (patch)
treecf56d5e0f83ef2fa69580215e60b4106ac888897 /src/ExpandVolume
parent5d3278bcf20d7b8039747a430f86b7dd5ef49a04 (diff)
downloadVeraCrypt-6bb1f24ed571bccd4d1d247dafdc1dda6eaa3d8d.zip
VeraCrypt-6bb1f24ed571bccd4d1d247dafdc1dda6eaa3d8d.tar.gz
Automatically truncate passwords for TrueCrypt volumes and System Encryption to the first 64 characters. This fix issues encountered by users of TrueCrypt volumes who were using passwords longer than 64 characters that were truncated in previous version.
Diffstat (limited to 'src/ExpandVolume')
-rw-r--r--src/ExpandVolume/WinMain.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp
index f673589..7823ad1 100644
--- a/src/ExpandVolume/WinMain.cpp
+++ b/src/ExpandVolume/WinMain.cpp
@@ -673,17 +673,18 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
if (lw == IDOK)
{
+ BOOL bTrueCryptMode = GetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE);
if (mountOptions.ProtectHiddenVolume && hidVolProtKeyFilesParam.EnableKeyFiles)
KeyFilesApply (hwndDlg, &mountOptions.ProtectedHidVolPassword, hidVolProtKeyFilesParam.FirstKeyFile, PasswordDlgVolume);
- if (GetPassword (hwndDlg, IDC_PASSWORD, (LPSTR) szXPwd->Text, MAX_PASSWORD + 1, TRUE))
+ if (GetPassword (hwndDlg, IDC_PASSWORD, (LPSTR) szXPwd->Text, MAX_PASSWORD + 1, bTrueCryptMode, TRUE))
szXPwd->Length = (unsigned __int32) (strlen ((char *) szXPwd->Text));
else
return 1;
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);
- *truecryptMode = GetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE);
+ *truecryptMode = bTrueCryptMode;
*pim = GetPim (hwndDlg, IDC_PIM, 0);