diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-06-08 01:14:57 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-06-08 01:16:34 +0200 |
commit | a7a8d57bcaaaf4e5982d2e51cd3086d34f45f780 (patch) | |
tree | 457161e7fefc61ee391ab2bd99f6f728b3b4a688 /src/Format/Tcformat.c | |
parent | 00cd134720f754f008fdc541afdd9ab70f6d11da (diff) | |
download | VeraCrypt-a7a8d57bcaaaf4e5982d2e51cd3086d34f45f780.tar.gz VeraCrypt-a7a8d57bcaaaf4e5982d2e51cd3086d34f45f780.zip |
Windows: rename PIN to PIM to avoid confusion. Better error messages.
Diffstat (limited to 'src/Format/Tcformat.c')
-rw-r--r-- | src/Format/Tcformat.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index a59ec4a4..f088c498 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -4063,22 +4063,22 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa SendMessage (hComboBox, CB_SETCURSEL, 0, 0);
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT), EM_LIMITTEXT, MAX_PASSWORD, 0);
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT), szRawPassword);
SetFocus (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT));
- SendMessage (GetDlgItem (hwndDlg, IDC_PIN), EM_LIMITTEXT, MAX_PIN, 0);
+ SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0);
if (volumePin > 0)
{
- char szTmp[MAX_PIN + 1];
+ char szTmp[MAX_PIM + 1];
StringCbPrintfA(szTmp, sizeof(szTmp), "%d", volumePin);
- SetWindowText (GetDlgItem (hwndDlg, IDC_PIN), szTmp);
+ SetWindowText (GetDlgItem (hwndDlg, IDC_PIM), szTmp);
}
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable);
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (bInPlaceEncNonSys ? (bInPlaceEncNonSysResumed ? "NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE_HELP" : "NONSYS_INPLACE_DEC_PASSWORD_PAGE_HELP") : "PASSWORD_HIDDENVOL_HOST_DIRECT_HELP"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bInPlaceEncNonSys ? "PASSWORD" : "PASSWORD_HIDVOL_HOST_TITLE"));
@@ -4145,25 +4145,25 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
SendMessage (GetDlgItem (hwndDlg, IDC_VERIFY), EM_LIMITTEXT, MAX_PASSWORD, 0);
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), szRawPassword);
SetWindowText (GetDlgItem (hwndDlg, IDC_VERIFY), szVerify);
SetFocus (GetDlgItem (hwndDlg, IDC_PASSWORD));
- SendMessage (GetDlgItem (hwndDlg, IDC_PIN), EM_LIMITTEXT, SysEncInEffect()? MAX_BOOT_PIN: MAX_PIN, 0);
+ SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, SysEncInEffect()? MAX_BOOT_PIM: MAX_PIM, 0);
if (volumePin > 0)
{
- char szTmp[MAX_PIN + 1];
+ char szTmp[MAX_PIM + 1];
StringCbPrintfA(szTmp, sizeof(szTmp), "%d", volumePin);
- SetWindowText (GetDlgItem (hwndDlg, IDC_PIN), szTmp);
+ SetWindowText (GetDlgItem (hwndDlg, IDC_PIM), szTmp);
PinValueChangedWarning = TRUE;
- SetDlgItemTextW (hwndDlg, IDC_PIN_HELP, GetString (SysEncInEffect ()? "PIN_SYSENC_CHANGE_WARNING" : "PIN_CHANGE_WARNING"));
+ SetDlgItemTextW (hwndDlg, IDC_PIM_HELP, GetString (SysEncInEffect ()? "PIM_SYSENC_CHANGE_WARNING" : "PIM_CHANGE_WARNING"));
}
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable && !SysEncInEffect());
EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable);
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), str);
if (CreatingHiddenSysVol())
@@ -4915,17 +4915,17 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1;
case TC_APPMSG_PERFORM_POST_SYSENC_WMINIT_TASKS:
AfterSysEncProgressWMInitTasks (hwndDlg);
return 1;
case WM_CTLCOLORSTATIC:
{
- if (PinValueChangedWarning && ((HWND)lParam == GetDlgItem(hwndDlg, IDC_PIN_HELP)) )
+ if (PinValueChangedWarning && ((HWND)lParam == GetDlgItem(hwndDlg, IDC_PIM_HELP)) )
{
// we're about to draw the static
// set the text colour in (HDC)lParam
SetBkMode((HDC)wParam,TRANSPARENT);
SetTextColor((HDC)wParam, RGB(255,0,0));
// NOTE: per documentation as pointed out by selbie, GetSolidBrush would leak a GDI handle.
return (BOOL)GetSysColorBrush(COLOR_MENU);
}
@@ -5307,27 +5307,27 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
GetDlgItem (hwndDlg, IDC_PASSWORD),
GetDlgItem (hwndDlg, IDC_VERIFY),
NULL,
NULL,
KeyFilesEnable && FirstKeyFile!=NULL && !SysEncInEffect());
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
- if (lw == IDC_PIN)
+ if (lw == IDC_PIM)
{
- if(GetPin (hwndDlg, IDC_PIN) != 0)
+ if(GetPin (hwndDlg, IDC_PIM) != 0)
{
PinValueChangedWarning = TRUE;
- SetDlgItemTextW (hwndDlg, IDC_PIN_HELP, GetString (SysEncInEffect ()? "PIN_SYSENC_CHANGE_WARNING" : "PIN_CHANGE_WARNING"));
+ SetDlgItemTextW (hwndDlg, IDC_PIM_HELP, GetString (SysEncInEffect ()? "PIM_SYSENC_CHANGE_WARNING" : "PIM_CHANGE_WARNING"));
}
else
{
PinValueChangedWarning = FALSE;
- SetDlgItemTextW (hwndDlg, IDC_PIN_HELP, (wchar_t *) GetDictionaryValueByInt (IDC_PIN_HELP));
+ SetDlgItemTextW (hwndDlg, IDC_PIM_HELP, (wchar_t *) GetDictionaryValueByInt (IDC_PIM_HELP));
}
}
return 1;
}
if (lw == IDC_SHOW_PASSWORD && nCurPageNo == PASSWORD_PAGE)
{
@@ -6988,30 +6988,30 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa GetDlgItem (hCurPage, IDC_PASSWORD),
GetDlgItem (hCurPage, IDC_VERIFY),
volumePassword.Text,
szVerify,
KeyFilesEnable && FirstKeyFile!=NULL && !SysEncInEffect());
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
- volumePin = GetPin (hCurPage, IDC_PIN);
+ volumePin = GetPin (hCurPage, IDC_PIM);
if (volumePassword.Length > 0)
{
// Password character encoding
if (!CheckPasswordCharEncoding (GetDlgItem (hCurPage, IDC_PASSWORD), NULL))
{
Error ("UNSUPPORTED_CHARS_IN_PWD", hwndDlg);
return 1;
}
- else if (SysEncInEffect() && (volumePin > MAX_BOOT_PIN_VALUE))
+ else if (SysEncInEffect() && (volumePin > MAX_BOOT_PIM_VALUE))
{
- SetFocus (GetDlgItem(hCurPage, IDC_PIN));
- Error ("PIN_SYSENC_TOO_BIG", hwndDlg);
+ SetFocus (GetDlgItem(hCurPage, IDC_PIM));
+ Error ("PIM_SYSENC_TOO_BIG", hwndDlg);
return 1;
}
// Check password length (check also done for outer volume which is not the case in TrueCrypt).
else if (!CheckPasswordLength (hwndDlg, GetDlgItem (hCurPage, IDC_PASSWORD), volumePin, SysEncInEffect()))
{
return 1;
}
}
@@ -7068,17 +7068,17 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa {
WaitCursor ();
GetWindowText (GetDlgItem (hCurPage, IDC_PASSWORD_DIRECT), (char *) volumePassword.Text, sizeof (volumePassword.Text));
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
hash_algo = (int) SendMessage (GetDlgItem (hCurPage, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, SendMessage (GetDlgItem (hCurPage, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
- volumePin = GetPin (hCurPage, IDC_PIN);
+ volumePin = GetPin (hCurPage, IDC_PIM);
// Store the password in case we need to restore it after keyfile is applied to it
GetWindowText (GetDlgItem (hCurPage, IDC_PASSWORD_DIRECT), szRawPassword, sizeof (szRawPassword));
if (KeyFilesEnable)
{
KeyFilesApply (hwndDlg, &volumePassword, FirstKeyFile);
}
@@ -8153,17 +8153,17 @@ ovf_end: GetDlgItem (hCurPage, IDC_PASSWORD),
GetDlgItem (hCurPage, IDC_VERIFY),
volumePassword.Text,
szVerify,
KeyFilesEnable && FirstKeyFile!=NULL && !SysEncInEffect ());
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
- volumePin = GetPin (hCurPage, IDC_PIN);
+ volumePin = GetPin (hCurPage, IDC_PIM);
nNewPageNo = SIZE_PAGE + 1; // Skip the hidden volume host password page
if (SysEncInEffect ())
{
nNewPageNo = CIPHER_PAGE + 1; // Skip irrelevant pages
KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD);
|