mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Windows: rename PIN to PIM to avoid confusion. Better error messages.
This commit is contained in:
@@ -215,7 +215,7 @@ static byte AskPassword (Password &password, int& pin)
|
||||
}
|
||||
|
||||
pos = 0;
|
||||
Print ("PIN: ");
|
||||
Print ("PIM: ");
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -232,7 +232,7 @@ static byte AskPassword (Password &password, int& pin)
|
||||
case TC_BIOS_KEY_BACKSPACE:
|
||||
if (pos > 0)
|
||||
{
|
||||
if (pos < MAX_PIN)
|
||||
if (pos < MAX_PIM)
|
||||
PrintBackspace();
|
||||
else
|
||||
PrintCharAtCursor (' ');
|
||||
@@ -253,7 +253,7 @@ static byte AskPassword (Password &password, int& pin)
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsDigit (asciiCode) || pos == MAX_PIN)
|
||||
if (!IsDigit (asciiCode) || pos == MAX_PIM)
|
||||
{
|
||||
Beep();
|
||||
continue;
|
||||
@@ -262,7 +262,7 @@ static byte AskPassword (Password &password, int& pin)
|
||||
pin = 10*pin + (asciiCode - '0');
|
||||
pos++;
|
||||
|
||||
if (pos < MAX_PIN)
|
||||
if (pos < MAX_PIM)
|
||||
PrintChar (asciiCode);
|
||||
else
|
||||
PrintCharAtCursor (asciiCode);
|
||||
|
||||
@@ -90,9 +90,9 @@ BEGIN
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,39,257,11
|
||||
COMBOBOX IDC_PKCS5_PRF_ID,112,125,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,15,126,91,17
|
||||
EDITTEXT IDC_PIN,112,145,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Volume PIN:",IDT_PIN,15,148,91,17
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,158,148,112,8
|
||||
EDITTEXT IDC_PIM,112,145,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Volume PIM:",IDT_PIM,15,148,91,17
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,158,148,112,8
|
||||
END
|
||||
|
||||
IDD_KEYFILES DIALOGEX 0, 0, 345, 237
|
||||
|
||||
@@ -10738,8 +10738,8 @@ int GetPin (HWND hwndDlg, UINT ctrlId)
|
||||
int pin = 0;
|
||||
if (IsWindowEnabled (GetDlgItem (hwndDlg, ctrlId)))
|
||||
{
|
||||
char szTmp[MAX_PIN + 1] = {0};
|
||||
if (GetDlgItemText (hwndDlg, ctrlId, szTmp, MAX_PIN + 1) > 0)
|
||||
char szTmp[MAX_PIM + 1] = {0};
|
||||
if (GetDlgItemText (hwndDlg, ctrlId, szTmp, MAX_PIM + 1) > 0)
|
||||
{
|
||||
char* endPtr = NULL;
|
||||
pin = strtol(szTmp, &endPtr, 10);
|
||||
@@ -10754,7 +10754,7 @@ void SetPin (HWND hwndDlg, UINT ctrlId, int pin)
|
||||
{
|
||||
if (pin > 0)
|
||||
{
|
||||
char szTmp[MAX_PIN + 1];
|
||||
char szTmp[MAX_PIM + 1];
|
||||
StringCbPrintfA (szTmp, sizeof(szTmp), "%d", pin);
|
||||
SetDlgItemText (hwndDlg, ctrlId, szTmp);
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
<control lang="en" key="IDT_PARTIAL_POOL_CONTENTS">Current pool content (partial)</control>
|
||||
<control lang="en" key="IDT_PASS">Pass</control>
|
||||
<control lang="en" key="IDT_PASSWORD">Password:</control>
|
||||
<control lang="en" key="IDT_PIN">Volume PIN:</control>
|
||||
<control lang="en" key="IDT_OLD_PIN">Volume PIN:</control>
|
||||
<control lang="en" key="IDT_PIM">Volume PIM:</control>
|
||||
<control lang="en" key="IDT_OLD_PIM">Volume PIM:</control>
|
||||
<control lang="en" key="IDT_PROGRESS">Progress:</control>
|
||||
<control lang="en" key="IDT_RANDOM_POOL">Random Pool: </control>
|
||||
<control lang="en" key="IDT_SINGLE_BOOT">Select this option if there is only one operating system installed on this computer (even if it has multiple users).</control>
|
||||
@@ -145,8 +145,8 @@
|
||||
<control lang="en" key="IDC_MOUNT_OPTIONS">Mount Opti&ons...</control>
|
||||
<control lang="en" key="IDC_MOUNT_READONLY">Mount volume as read-&only</control>
|
||||
<control lang="en" key="IDC_NEW_KEYFILES">Keyfiles...</control>
|
||||
<control lang="en" key="IDC_OLD_PIN_HELP">(Empty or 0 for default iterations)</control>
|
||||
<control lang="en" key="IDC_PIN_HELP">(Empty or 0 for default iterations)</control>
|
||||
<control lang="en" key="IDC_OLD_PIM_HELP">(Empty or 0 for default iterations)</control>
|
||||
<control lang="en" key="IDC_PIM_HELP">(Empty or 0 for default iterations)</control>
|
||||
<control lang="en" key="IDC_PREF_BKG_TASK_ENABLE">Enabled</control>
|
||||
<control lang="en" key="IDC_PREF_CACHE_PASSWORDS">Cache passwords in driver memory</control>
|
||||
<control lang="en" key="IDC_PREF_DISMOUNT_INACTIVE">Auto-dismount volume after no data has been read/written to it for</control>
|
||||
@@ -609,17 +609,17 @@
|
||||
<string lang="en" key="PASSWORD_HIDDEN_OS_TITLE">Password for Hidden Operating System</string>
|
||||
<string lang="en" key="PASSWORD_LENGTH_WARNING">WARNING: Short passwords are easy to crack using brute force techniques!\n\nWe recommend choosing a password consisting of 20 or more characters. Are you sure you want to use a short password?</string>
|
||||
<string lang="en" key="PASSWORD_TITLE">Volume Password</string>
|
||||
<string lang="en" key="PASSWORD_WRONG">Incorrect password/PRF or not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_OR_KEYFILE_WRONG">Incorrect keyfile(s) and/or password/PRF or not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_OR_MODE_WRONG">Wrong mount mode, incorrect password/PRF, or not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_OR_KEYFILE_OR_MODE_WRONG">Wrong mount mode, incorrect keyfile(s) and/or password/PRF, or not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_WRONG_AUTOMOUNT">Incorrect password/PRF or no valid volume found.</string>
|
||||
<string lang="en" key="PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT">Incorrect keyfile(s)/password/PRF or no valid volume found.</string>
|
||||
<string lang="en" key="PASSWORD_WRONG">Operation failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_OR_KEYFILE_WRONG">Operation failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_OR_KEYFILE_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
|
||||
<string lang="en" key="PASSWORD_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.</string>
|
||||
<string lang="en" key="PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.</string>
|
||||
<string lang="en" key="PASSWORD_WRONG_CAPSLOCK_ON">\n\nWarning: Caps Lock is on. This may cause you to enter your password incorrectly.</string>
|
||||
<string lang="en" key="PIN_CHANGE_WARNING">Remember Number to Mount Volume</string>
|
||||
<string lang="en" key="PIN_SYSENC_CHANGE_WARNING">Remember Number to Boot System</string>
|
||||
<string lang="en" key="PIN_SMALL_WARNING">You have chosen a Personal Iteration Number (PIN) that is smaller than the default VeraCrypt value. Please note that if your password is not strong enough, this could lead to a weaker security.\n\nDo you confirm that you are using a strong password?</string>
|
||||
<string lang="en" key="PIN_SYSENC_TOO_BIG">Personal Iteration Number (PIN) maximum value for system encryption is 65535.</string>
|
||||
<string lang="en" key="PIM_CHANGE_WARNING">Remember Number to Mount Volume</string>
|
||||
<string lang="en" key="PIM_SYSENC_CHANGE_WARNING">Remember Number to Boot System</string>
|
||||
<string lang="en" key="PIM_SMALL_WARNING">You have chosen a Personal Iterations Multiplier (PIM) that is smaller than the default VeraCrypt value. Please note that if your password is not strong enough, this could lead to a weaker security.\n\nDo you confirm that you are using a strong password?</string>
|
||||
<string lang="en" key="PIM_SYSENC_TOO_BIG">Personal Iterations Multiplier (PIM) maximum value for system encryption is 65535.</string>
|
||||
<string lang="en" key="HIDDEN_FILES_PRESENT_IN_KEYFILE_PATH">\n\nWARNING: Hidden file(s) have been found in a keyfile search path. Such hidden files cannot be used as keyfiles. If you need to use them as keyfiles, remove their 'Hidden' attribute (right-click each of them, select 'Properties', uncheck 'Hidden' and click OK). Note: Hidden files are visible only if the corresponding option is enabled (Computer > Organize > 'Folder and search options' > View).</string>
|
||||
<string lang="en" key="HIDDEN_VOL_PROT_PASSWORD_US_KEYB_LAYOUT">If you are attempting to protect a hidden volume containing a hidden system, please make sure you are using the standard US keyboard layout when typing the password for the hidden volume. This is required due to the fact that the password needs to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available.</string>
|
||||
<string lang="en" key="FOUND_NO_PARTITION_W_DEFERRED_INPLACE_ENC">VeraCrypt has not found any volume where the process of encryption/decryption of a non-system volume has been interrupted and where the volume header can be deciphered using the supplied password and/or keyfile(s).\n\nPlease make sure the password and/or keyfile(s) are correct and that the partition/volume is not being used by the system or applications (including antivirus software).</string>
|
||||
@@ -1070,9 +1070,9 @@
|
||||
<string lang="en" key="GAP_BETWEEN_SYS_AND_HIDDEN_OS_PARTITION">Warning: There is unallocated space between the system partition and the first partition behind it. After you create the hidden operating system, you must not create any new partitions in that unallocated space. Otherwise, the hidden operating system will be impossible to boot (until you delete such newly created partitions).</string>
|
||||
<string lang="en" key="ALGO_NOT_SUPPORTED_FOR_SYS_ENCRYPTION">This algorithm is currently not supported for system encryption.</string>
|
||||
<string lang="en" key="ALGO_NOT_SUPPORTED_FOR_TRUECRYPT_MODE">This algorithm is not supported for TrueCrypt mode.</string>
|
||||
<string lang="en" key="PIN_NOT_SUPPORTED_FOR_TRUECRYPT_MODE">PIN (Personal Iteration Number) not supported for TrueCrypt mode.</string>
|
||||
<string lang="en" key="PIN_REQUIRE_LONG_PASSWORD">Password must contain 20 or more characters in order to use the specified PIN.\nShorter passwords can only be used if the PIN is 485 or greater.</string>
|
||||
<string lang="en" key="BOOT_PIN_REQUIRE_LONG_PASSWORD">Pre-boot authentication Password must contain 20 or more characters in order to use the specified PIN.\nShorter passwords can only be used if the PIN is 98 or greater.</string>
|
||||
<string lang="en" key="PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE">PIM (Personal Iterations Multiplier) not supported for TrueCrypt mode.</string>
|
||||
<string lang="en" key="PIM_REQUIRE_LONG_PASSWORD">Password must contain 20 or more characters in order to use the specified PIM.\nShorter passwords can only be used if the PIM is 485 or greater.</string>
|
||||
<string lang="en" key="BOOT_PIM_REQUIRE_LONG_PASSWORD">Pre-boot authentication Password must contain 20 or more characters in order to use the specified PIM.\nShorter passwords can only be used if the PIM is 98 or greater.</string>
|
||||
<string lang="en" key="KEYFILES_NOT_SUPPORTED_FOR_SYS_ENCRYPTION">Keyfiles are currently not supported for system encryption.</string>
|
||||
<string lang="en" key="CANNOT_RESTORE_KEYBOARD_LAYOUT">Warning: VeraCrypt could not restore the original keyboard layout. This may cause you to enter a password incorrectly.</string>
|
||||
<string lang="en" key="CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION">Error: Cannot set the keyboard layout for VeraCrypt to the standard US keyboard layout.\n\nNote that the password needs to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available. Therefore, the password must always be typed using the standard US keyboard layout.</string>
|
||||
|
||||
@@ -114,7 +114,7 @@ BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem, int pin, BOOL bForBoot)
|
||||
{
|
||||
if (bCustomPinSmall)
|
||||
{
|
||||
Error (bForBoot? "BOOT_PIN_REQUIRE_LONG_PASSWORD": "PIN_REQUIRE_LONG_PASSWORD", hwndDlg);
|
||||
Error (bForBoot? "BOOT_PIM_REQUIRE_LONG_PASSWORD": "PIM_REQUIRE_LONG_PASSWORD", hwndDlg);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem, int pin, BOOL bForBoot)
|
||||
#ifndef _DEBUG
|
||||
else if (bCustomPinSmall)
|
||||
{
|
||||
if (MessageBoxW (hwndDlg, GetString ("PIN_SMALL_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES)
|
||||
if (MessageBoxW (hwndDlg, GetString ("PIM_SMALL_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES)
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
// User text input limits
|
||||
#define MIN_PASSWORD 1 // Minimum possible password length
|
||||
#define MAX_PASSWORD 64 // Maximum possible password length
|
||||
#define MAX_PIN 10 // Maximum allowed digits in a PIN (enough for 32-bit value)
|
||||
#define MAX_BOOT_PIN 5 // Maximum allowed digits in a PIN for boot (enough for 16-bit value)
|
||||
#define MAX_BOOT_PIN_VALUE 65535
|
||||
#define MAX_PIM 10 // Maximum allowed digits in a PIM (enough for 32-bit value)
|
||||
#define MAX_BOOT_PIM 5 // Maximum allowed digits in a PIM for boot (enough for 16-bit value)
|
||||
#define MAX_BOOT_PIM_VALUE 65535
|
||||
|
||||
#define PASSWORD_LEN_WARNING 20 // Display a warning when a password is shorter than this
|
||||
|
||||
|
||||
@@ -760,7 +760,7 @@ char *get_pkcs5_prf_name (int pkcs5_prf_id)
|
||||
int get_pkcs5_iteration_count (int pkcs5_prf_id, int pin, BOOL truecryptMode, BOOL bBoot)
|
||||
{
|
||||
if ( (pin < 0)
|
||||
|| (truecryptMode && pin > 0) /* No PIN for TrueCrypt mode */
|
||||
|| (truecryptMode && pin > 0) /* No PIM for TrueCrypt mode */
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -188,9 +188,9 @@
|
||||
#define IDC_WAIT_PROGRESS_BAR 5126
|
||||
#define IDC_PKCS5_PRF_ID 5127
|
||||
#define IDT_PKCS5_PRF 5128
|
||||
#define IDT_PIN 5129
|
||||
#define IDC_PIN 5130
|
||||
#define IDC_PIN_HELP 5131
|
||||
#define IDT_PIM 5129
|
||||
#define IDC_PIM 5130
|
||||
#define IDC_PIM_HELP 5131
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
||||
@@ -131,9 +131,9 @@ BEGIN
|
||||
COMBOBOX IDC_PKCS5_PRF_ID,69,26,86,90,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,27,65,13
|
||||
CONTROL "TrueCrypt Mode",IDC_TRUECRYPT_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,159,28,76,10
|
||||
RTEXT "Volume PIN:",IDT_PIN,0,46,65,13
|
||||
EDITTEXT IDC_PIN,69,43,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,115,46,189,8
|
||||
RTEXT "Volume PIM:",IDT_PIM,0,46,65,13
|
||||
EDITTEXT IDC_PIM,69,43,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,115,46,189,8
|
||||
END
|
||||
|
||||
IDD_EXPAND_PROGRESS_DLG DIALOGEX 0, 0, 376, 271
|
||||
|
||||
@@ -445,9 +445,9 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
|
||||
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_CACHE), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PIN), EM_LIMITTEXT, MAX_PIN, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0);
|
||||
|
||||
SetPin (hwndDlg, IDC_PIN, *pin);
|
||||
SetPin (hwndDlg, IDC_PIM, *pin);
|
||||
|
||||
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable);
|
||||
|
||||
@@ -547,7 +547,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), FALSE);
|
||||
|
||||
SetPin (hwndDlg, IDC_PIN, *pin);
|
||||
SetPin (hwndDlg, IDC_PIM, *pin);
|
||||
|
||||
bPrebootPasswordDlgMode = TRUE;
|
||||
}
|
||||
@@ -659,9 +659,9 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
|
||||
*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);
|
||||
|
||||
GetWindowText (GetDlgItem (hwndDlg, IDC_PIN), tmp, MAX_PIN + 1);
|
||||
GetWindowText (GetDlgItem (hwndDlg, IDC_PIM), tmp, MAX_PIM + 1);
|
||||
if (strlen(tmp))
|
||||
*pin = (int) strtol(tmp, NULL, 10); /* IDC_PIN is configured to accept only numbers */
|
||||
*pin = (int) strtol(tmp, NULL, 10); /* IDC_PIM is configured to accept only numbers */
|
||||
else
|
||||
*pin = 0;
|
||||
|
||||
@@ -678,7 +678,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
|
||||
&& (*pin != 0)
|
||||
)
|
||||
{
|
||||
Error ("PIN_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
|
||||
Error ("PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@
|
||||
#define IDC_BOX_STATUS 1114
|
||||
#define IDC_TRUECRYPT_MODE 1140
|
||||
#define IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT 1141
|
||||
#define IDT_OLD_PIN 1142
|
||||
#define IDC_OLD_PIN 1143
|
||||
#define IDC_OLD_PIN_HELP 1144
|
||||
#define IDT_OLD_PIM 1142
|
||||
#define IDC_OLD_PIM 1143
|
||||
#define IDC_OLD_PIM_HELP 1144
|
||||
#define IDM_HELP 40001
|
||||
#define IDM_ABOUT 40002
|
||||
#define IDM_UNMOUNT_VOLUME 40003
|
||||
|
||||
@@ -116,15 +116,15 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,53,3,163,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_VERIFY,53,19,163,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_PIN,53,35,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
EDITTEXT IDC_PIM,53,35,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,65,95,11,WS_EX_TRANSPARENT
|
||||
CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,55,95,10
|
||||
PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,152,56,64,14,WS_DISABLED
|
||||
RTEXT "Password:",IDT_PASSWORD,1,6,50,8
|
||||
RTEXT "&Confirm:",IDT_CONFIRM,1,23,50,8
|
||||
LTEXT "",IDC_BOX_HELP,0,79,225,89
|
||||
RTEXT "Volume PIN:",IDT_PIN,1,38,50,8
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,97,38,126,8
|
||||
RTEXT "Volume PIM:",IDT_PIM,1,38,50,8
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,97,38,126,8
|
||||
END
|
||||
|
||||
IDD_SIZE_PAGE_DLG DIALOGEX 0, 0, 226, 172
|
||||
@@ -227,15 +227,15 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD_DIRECT,50,2,149,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_PKCS5_PRF_ID,50,17,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
EDITTEXT IDC_PIN,50,32,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
EDITTEXT IDC_PIM,50,32,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "&Display password",IDC_SHOW_PASSWORD_SINGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,46,84,11,WS_EX_TRANSPARENT
|
||||
CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,57,82,11
|
||||
PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,142,54,64,14
|
||||
LTEXT "",IDC_BOX_HELP,0,74,225,94
|
||||
RTEXT "Password:",IDT_PASSWORD,0,6,48,8
|
||||
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,19,48,8
|
||||
RTEXT "Volume PIN:",IDT_PIN,0,34,48,8
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,96,34,127,8
|
||||
RTEXT "Volume PIM:",IDT_PIM,0,34,48,8
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,96,34,127,8
|
||||
END
|
||||
|
||||
IDD_VOLUME_TYPE_PAGE_DLG DIALOGEX 0, 0, 226, 172
|
||||
|
||||
@@ -4068,12 +4068,12 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
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);
|
||||
@@ -4150,15 +4150,15 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
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());
|
||||
@@ -4920,7 +4920,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
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
|
||||
@@ -5312,17 +5312,17 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6993,7 +6993,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
|
||||
|
||||
volumePin = GetPin (hCurPage, IDC_PIN);
|
||||
volumePin = GetPin (hCurPage, IDC_PIM);
|
||||
|
||||
if (volumePassword.Length > 0)
|
||||
{
|
||||
@@ -7003,10 +7003,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
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).
|
||||
@@ -7073,7 +7073,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
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));
|
||||
@@ -8158,7 +8158,7 @@ ovf_end:
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -775,12 +775,12 @@ namespace VeraCrypt
|
||||
{
|
||||
if (favorite.Pin > 0)
|
||||
{
|
||||
char szTmp[MAX_PIN + 1];
|
||||
char szTmp[MAX_PIM + 1];
|
||||
StringCbPrintfA (szTmp, sizeof(szTmp), "%d", favorite.Pin);
|
||||
SetDlgItemText (hwndDlg, IDC_PIN, szTmp);
|
||||
SetDlgItemText (hwndDlg, IDC_PIM, szTmp);
|
||||
}
|
||||
else
|
||||
SetDlgItemText (hwndDlg, IDC_PIN, "");
|
||||
SetDlgItemText (hwndDlg, IDC_PIM, "");
|
||||
SetDlgItemTextW (hwndDlg, IDC_FAVORITE_LABEL, favorite.Label.c_str());
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_MOUNT_ON_LOGON, favorite.MountOnLogOn);
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_MOUNT_ON_ARRIVAL, favorite.MountOnArrival);
|
||||
@@ -806,9 +806,9 @@ namespace VeraCrypt
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOVE_UP), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOVE_DOWN), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_REMOVE), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIN), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN_HELP), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_FAVORITE_LABEL), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_LABEL), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOUNT_ON_LOGON), enable && !systemFavoritesMode);
|
||||
@@ -836,7 +836,7 @@ namespace VeraCrypt
|
||||
else
|
||||
favorite.Label.clear();
|
||||
|
||||
favorite.Pin = GetPin (hwndDlg, IDC_PIN);
|
||||
favorite.Pin = GetPin (hwndDlg, IDC_PIM);
|
||||
|
||||
favorite.ReadOnly = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_MOUNT_READONLY) != 0);
|
||||
favorite.Removable = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_MOUNT_REMOVABLE) != 0);
|
||||
|
||||
@@ -1810,8 +1810,8 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_OLD_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_VERIFY), EM_LIMITTEXT, MAX_PASSWORD, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_OLD_PIN), EM_LIMITTEXT, MAX_PIN, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PIN), EM_LIMITTEXT, MAX_PIN, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_OLD_PIM), EM_LIMITTEXT, MAX_PIM, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDOK), FALSE);
|
||||
|
||||
SetCheckBox (hwndDlg, IDC_ENABLE_KEYFILES, KeyFilesEnable);
|
||||
@@ -1860,9 +1860,9 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
LocalizeDialog (hwndDlg, "IDD_PCDM_CHANGE_PKCS5_PRF");
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PASSWORD), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_VERIFY), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN_HELP), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_ENABLE_NEW_KEYFILES), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_KEYFILES), FALSE);
|
||||
@@ -1876,9 +1876,9 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
newKeyFilesParam.EnableKeyFiles = TRUE;
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PASSWORD), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_VERIFY), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN_HELP), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_NEW_PASSWORD), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_CONFIRM_PASSWORD), FALSE);
|
||||
@@ -1896,9 +1896,9 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_ENABLE_KEYFILES), TRUE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PASSWORD), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_VERIFY), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN_HELP), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_ENABLE_NEW_KEYFILES), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_KEYFILES), FALSE);
|
||||
@@ -2032,7 +2032,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
|
||||
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
|
||||
@@ -2068,24 +2068,24 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
IDC_PASSWORD, IDC_VERIFY,
|
||||
newKeyFilesParam.EnableKeyFiles && newKeyFilesParam.FirstKeyFile != NULL);
|
||||
|
||||
if ((lw == IDC_OLD_PIN) && IsWindowEnabled (GetDlgItem (hwndDlg, IDC_PIN)))
|
||||
if ((lw == IDC_OLD_PIM) && IsWindowEnabled (GetDlgItem (hwndDlg, IDC_PIM)))
|
||||
{
|
||||
char tmp[MAX_PIN+1] = {0};
|
||||
GetDlgItemText (hwndDlg, IDC_OLD_PIN, tmp, MAX_PIN + 1);
|
||||
SetDlgItemText (hwndDlg, IDC_PIN, tmp);
|
||||
char tmp[MAX_PIM+1] = {0};
|
||||
GetDlgItemText (hwndDlg, IDC_OLD_PIM, tmp, MAX_PIM + 1);
|
||||
SetDlgItemText (hwndDlg, IDC_PIM, tmp);
|
||||
}
|
||||
|
||||
if (lw == IDC_PIN)
|
||||
if (lw == IDC_PIM)
|
||||
{
|
||||
if(GetPin (hwndDlg, IDC_OLD_PIN) != GetPin (hwndDlg, IDC_PIN))
|
||||
if(GetPin (hwndDlg, IDC_OLD_PIM) != GetPin (hwndDlg, IDC_PIM))
|
||||
{
|
||||
PinValueChangedWarning = TRUE;
|
||||
SetDlgItemTextW (hwndDlg, IDC_PIN_HELP, GetString (bSysEncPwdChangeDlgMode? "PIN_SYSENC_CHANGE_WARNING" : "PIN_CHANGE_WARNING"));
|
||||
SetDlgItemTextW (hwndDlg, IDC_PIM_HELP, GetString (bSysEncPwdChangeDlgMode? "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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2204,9 +2204,9 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
if (lw == IDC_TRUECRYPT_MODE)
|
||||
{
|
||||
BOOL bEnablePin = GetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE) ? FALSE: TRUE;
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_OLD_PIN), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_OLD_PIN), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_OLD_PIN_HELP), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_OLD_PIM), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_OLD_PIM), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_OLD_PIM_HELP), bEnablePin);
|
||||
}
|
||||
|
||||
if (lw == IDC_SHOW_PASSWORD_CHPWD_ORI)
|
||||
@@ -2251,8 +2251,8 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
|
||||
BOOL truecryptMode = GetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE);
|
||||
|
||||
int old_pin = GetPin (hwndDlg, IDC_OLD_PIN);
|
||||
int pin = GetPin (hwndDlg, IDC_PIN);
|
||||
int old_pin = GetPin (hwndDlg, IDC_OLD_PIM);
|
||||
int pin = GetPin (hwndDlg, IDC_PIM);
|
||||
|
||||
if (truecryptMode && (old_pkcs5 == SHA256))
|
||||
{
|
||||
@@ -2261,7 +2261,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
}
|
||||
else if (truecryptMode && (old_pin != 0))
|
||||
{
|
||||
Error ("PIN_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
|
||||
Error ("PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2271,10 +2271,10 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (bSysEncPwdChangeDlgMode && (pin > MAX_BOOT_PIN_VALUE))
|
||||
if (bSysEncPwdChangeDlgMode && (pin > MAX_BOOT_PIM_VALUE))
|
||||
{
|
||||
SetFocus (GetDlgItem(hwndDlg, IDC_PIN));
|
||||
Error ("PIN_SYSENC_TOO_BIG", hwndDlg);
|
||||
SetFocus (GetDlgItem(hwndDlg, IDC_PIM));
|
||||
Error ("PIM_SYSENC_TOO_BIG", hwndDlg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2443,9 +2443,9 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_CACHE), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PIN), EM_LIMITTEXT, MAX_PIN, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0);
|
||||
|
||||
SetPin (hwndDlg, IDC_PIN, *pin);
|
||||
SetPin (hwndDlg, IDC_PIM, *pin);
|
||||
|
||||
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable);
|
||||
|
||||
@@ -2547,7 +2547,7 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES), FALSE);
|
||||
|
||||
SetPin (hwndDlg, IDC_PIN, *pin);
|
||||
SetPin (hwndDlg, IDC_PIM, *pin);
|
||||
|
||||
bPrebootPasswordDlgMode = TRUE;
|
||||
}
|
||||
@@ -2625,9 +2625,9 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
||||
if (lw == IDC_TRUECRYPT_MODE)
|
||||
{
|
||||
BOOL bEnablePin = GetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE) ? FALSE: TRUE;
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIN), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN_HELP), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), bEnablePin);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), bEnablePin);
|
||||
}
|
||||
|
||||
if (lw == IDC_KEY_FILES)
|
||||
@@ -2672,7 +2672,7 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
||||
*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);
|
||||
|
||||
*pin = GetPin (hwndDlg, IDC_PIN);
|
||||
*pin = GetPin (hwndDlg, IDC_PIM);
|
||||
|
||||
/* SHA-256 is not supported by TrueCrypt */
|
||||
if ( (*truecryptMode)
|
||||
@@ -2687,7 +2687,7 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
||||
&& (*pin != 0)
|
||||
)
|
||||
{
|
||||
Error ("PIN_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
|
||||
Error ("PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -3071,19 +3071,19 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PKCS5_PRF), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIN), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN_HELP), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), protect);
|
||||
|
||||
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT, hidVolProtKeyFilesParam.EnableKeyFiles);
|
||||
|
||||
SendDlgItemMessage (hwndDlg, IDC_PASSWORD_PROT_HIDVOL, EM_LIMITTEXT, MAX_PASSWORD, 0);
|
||||
SendDlgItemMessage (hwndDlg, IDC_PIN, EM_LIMITTEXT, MAX_PIN, 0);
|
||||
SendDlgItemMessage (hwndDlg, IDC_PIM, EM_LIMITTEXT, MAX_PIM, 0);
|
||||
|
||||
if (mountOptions->ProtectedHidVolPassword.Length > 0)
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_PROT_HIDVOL), (LPSTR) mountOptions->ProtectedHidVolPassword.Text);
|
||||
|
||||
SetPin (hwndDlg, IDC_PIN, mountOptions->ProtectedHidVolPin);
|
||||
SetPin (hwndDlg, IDC_PIM, mountOptions->ProtectedHidVolPin);
|
||||
|
||||
ToHyperlink (hwndDlg, IDC_LINK_HIDVOL_PROTECTION_INFO);
|
||||
|
||||
@@ -3179,7 +3179,7 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
|
||||
mountOptions->ProtectedHidVolPkcs5Prf = (int) SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA,
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
|
||||
|
||||
mountOptions->ProtectedHidVolPin = GetPin (hwndDlg, IDC_PIN);
|
||||
mountOptions->ProtectedHidVolPin = GetPin (hwndDlg, IDC_PIM);
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
@@ -3218,9 +3218,9 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PKCS5_PRF), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIN), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIN_HELP), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), protect);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), protect);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -114,13 +114,13 @@ BEGIN
|
||||
EDITTEXT IDC_OLD_PASSWORD,89,14,162,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_PKCS5_OLD_PRF_ID,89,33,85,90,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
CONTROL "TrueCrypt Mode",IDC_TRUECRYPT_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,179,35,78,10
|
||||
EDITTEXT IDC_OLD_PIN,89,51,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
EDITTEXT IDC_OLD_PIM,89,51,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Use keyfiles",IDC_ENABLE_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,72,98,10
|
||||
PUSHBUTTON "Keyfiles...",IDC_KEYFILES,192,70,59,14
|
||||
CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_ORI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,85,138,10,WS_EX_TRANSPARENT
|
||||
EDITTEXT IDC_PASSWORD,89,121,162,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_VERIFY,89,137,162,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_PIN,89,154,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
EDITTEXT IDC_PIM,89,154,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Use keyfiles",IDC_ENABLE_NEW_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,172,99,11
|
||||
PUSHBUTTON "Keyfiles...",IDC_NEW_KEYFILES,192,170,59,14
|
||||
CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_NEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,184,160,11,WS_EX_TRANSPARENT
|
||||
@@ -136,10 +136,10 @@ BEGIN
|
||||
GROUPBOX "New",IDT_NEW,6,108,252,130
|
||||
RTEXT "Wipe mode:",IDT_WIPE_MODE,9,220,74,8,0,WS_EX_RIGHT
|
||||
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,12,34,74,10,SS_CENTERIMAGE
|
||||
RTEXT "Volume PIN:",IDT_OLD_PIN,12,54,74,10
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_OLD_PIN_HELP,135,54,119,8
|
||||
RTEXT "Volume PIN:",IDT_PIN,9,157,75,16
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,135,157,119,8
|
||||
RTEXT "Volume PIM:",IDT_OLD_PIM,12,54,74,10
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_OLD_PIM_HELP,135,54,119,8
|
||||
RTEXT "Volume PIM:",IDT_PIM,9,157,75,16
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,135,157,119,8
|
||||
END
|
||||
|
||||
IDD_MOUNT_DLG DIALOGEX 0, 0, 375, 271
|
||||
@@ -180,7 +180,7 @@ BEGIN
|
||||
EDITTEXT IDC_PASSWORD,69,8,166,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_PKCS5_PRF_ID,69,26,86,90,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
CONTROL "TrueCrypt Mode",IDC_TRUECRYPT_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,159,28,76,10
|
||||
EDITTEXT IDC_PIN,69,43,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
EDITTEXT IDC_PIM,69,43,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Cache passwords and keyfil&es in memory",IDC_CACHE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,61,153,10
|
||||
CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,74,83,10
|
||||
@@ -191,8 +191,8 @@ BEGIN
|
||||
PUSHBUTTON "Cancel",IDCANCEL,243,25,64,14
|
||||
RTEXT "Password:",IDT_PASSWORD,0,10,65,13
|
||||
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,27,65,11
|
||||
RTEXT "Volume PIN:",IDT_PIN,0,46,65,8
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,115,46,189,8
|
||||
RTEXT "Volume PIM:",IDT_PIM,0,46,65,8
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,115,46,189,8
|
||||
END
|
||||
|
||||
IDD_TRAVELER_DLG DIALOGEX 0, 0, 300, 269
|
||||
@@ -340,9 +340,9 @@ BEGIN
|
||||
GROUPBOX "",IDC_FAV_VOL_OPTIONS_GROUP_BOX,7,122,366,159
|
||||
LTEXT "Label of selected favorite volume:",IDT_FAVORITE_LABEL,18,163,202,8
|
||||
GROUPBOX "Global Settings",IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX,7,230,366,57
|
||||
EDITTEXT IDC_PIN,16,143,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,64,145,189,8
|
||||
LTEXT "Volume PIN:",IDT_PIN,18,133,65,8
|
||||
EDITTEXT IDC_PIM,16,143,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,64,145,189,8
|
||||
LTEXT "Volume PIM:",IDT_PIM,18,133,65,8
|
||||
END
|
||||
|
||||
IDD_DEFAULT_MOUNT_PARAMETERS DIALOGEX 0, 0, 167, 65
|
||||
|
||||
@@ -163,9 +163,9 @@
|
||||
#define IDC_PKCS5_OLD_PRF_ID 1139
|
||||
#define IDC_TRUECRYPT_MODE 1140
|
||||
#define IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT 1141
|
||||
#define IDT_OLD_PIN 1142
|
||||
#define IDC_OLD_PIN 1143
|
||||
#define IDC_OLD_PIN_HELP 1144
|
||||
#define IDT_OLD_PIM 1142
|
||||
#define IDC_OLD_PIM 1143
|
||||
#define IDC_OLD_PIM_HELP 1144
|
||||
#define IDM_HELP 40001
|
||||
#define IDM_ABOUT 40002
|
||||
#define IDM_UNMOUNT_VOLUME 40003
|
||||
|
||||
Reference in New Issue
Block a user