From 44c9c077f379e65ef45952e1e78059cdec2fa36f Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 11 Dec 2022 13:01:14 +0100 Subject: Revert "New sys enc wizard (#957)" This reverts commit c0ff7a7c521b1d658316d9a177383ab0c403007a. --- src/Common/Dlgcode.c | 71 +- src/Common/Dlgcode.h | 4 - src/Common/Language.xml | 76 +- src/Common/Password.c | 12 +- src/Format/Format.rc | 164 +- src/Format/Resource.h | 25 +- src/Format/Tcformat.c | 1247 +- src/Format/Tcformat.h | 8 - src/Release/Setup Files/Product64.wxs | 6 +- src/Release/Setup Files/password1000000.txt | 999999 ------------------------- src/Setup/Setup.h | 2 - src/Signing/sign_test.bat | 2 +- 12 files changed, 284 insertions(+), 1001332 deletions(-) delete mode 100644 src/Release/Setup Files/password1000000.txt (limited to 'src') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index c3430525..2c707f5d 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -2068,25 +2068,24 @@ void HandlePasswordEditWmChar (HWND hwnd, WPARAM wParam) SendMessage(hwnd, EM_HIDEBALLOONTIP, 0, 0); } - -/* Protects an input field from having its content updated by a paste action */ +// Protects an input field from having its content updated by a Paste action (call ToBootPwdField() to use this). static LRESULT CALLBACK BootPwdFieldProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { WNDPROC wp = (WNDPROC) GetWindowLongPtrW (hwnd, GWLP_USERDATA); - + switch (message) { case WM_PASTE: - Error ("ERROR_PASTE_ACTION", GetParent(hwnd)); return 1; - case WM_CHAR: HandlePasswordEditWmChar (hwnd, wParam); break; } + return CallWindowProcW (wp, hwnd, message, wParam, lParam); } + // Protects an input field from having its content updated by a Paste action. Used for pre-boot password // input fields (only the US keyboard layout is supported in pre-boot environment so we must prevent the // user from pasting a password typed using a non-US keyboard layout). @@ -2105,12 +2104,6 @@ void ToBootPwdField (HWND hwndDlg, UINT ctrlId) SetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC, (LONG_PTR) BootPwdFieldProc); } -BOOL CheckIsIMESupported () -{ - if (himm32dll == NULL) - return FALSE; - return TRUE; -} // Ensures that a warning is displayed when user is pasting a password longer than the maximum // length which is set to 64 characters static LRESULT CALLBACK NormalPwdFieldProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -2941,7 +2934,7 @@ SelectAlgo (HWND hComboBox, int *algo_id) /* Something went wrong ; couldn't find the requested algo id so we drop back to a default */ - + *algo_id = (int) SendMessage (hComboBox, CB_GETITEMDATA, 0, 0); SendMessage (hComboBox, CB_SETCURSEL, 0, 0); @@ -5468,53 +5461,6 @@ BOOL BrowseFiles (HWND hwndDlg, char *stringId, wchar_t *lpszFileName, BOOL keep return BrowseFilesInDir (hwndDlg, stringId, NULL, lpszFileName, keepHistory, saveMode, browseFilter); } -BOOL BrowseFile (HWND hwndDlg, char *stringId, wchar_t *initialDir) -{ - OPENFILENAMEW ofn; - wchar_t file[TC_MAX_PATH] = { 0 }; - wchar_t filter[1024]; - BOOL status = FALSE; - - CoInitialize (NULL); - - ZeroMemory (&ofn, sizeof (ofn)); - - if (initialDir) - { - ofn.lpstrInitialDir = initialDir; - } - - ofn.lStructSize = sizeof (ofn); - ofn.hwndOwner = hwndDlg; - StringCbPrintfW (filter, sizeof(filter), L"%ls (*.*)%c*.*%c", - GetString ("ALL_FILES"), 0, 0); - ofn.lpstrFilter = filter; - ofn.nFilterIndex = 1; - ofn.lpstrFile = NULL; - ofn.nMaxFile = sizeof (file) / sizeof (file[0]); - ofn.lpstrTitle = GetString (stringId); - ofn.lpstrDefExt = NULL; - ofn.Flags = OFN_HIDEREADONLY - | OFN_PATHMUSTEXIST - | OFN_DONTADDTORECENT; - - SystemFileSelectorCallerThreadId = GetCurrentThreadId(); - SystemFileSelectorCallPending = TRUE; - - if (!GetOpenFileNameW (&ofn)) - goto ret; - - SystemFileSelectorCallPending = FALSE; - - status = TRUE; - -ret: - SystemFileSelectorCallPending = FALSE; - ResetCurrentDirectory(); - CoUninitialize(); - - return status; -} BOOL BrowseFilesInDir (HWND hwndDlg, char *stringId, wchar_t *initialDir, wchar_t *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter, const wchar_t *initialFileName, const wchar_t *defaultExtension) { @@ -10036,6 +9982,8 @@ BOOL PrintHardCopyTextUTF16 (wchar_t *text, wchar_t *title, size_t textByteLen) return TRUE; } + + BOOL IsNonInstallMode () { HKEY hkey, hkeybis; @@ -10134,6 +10082,7 @@ BOOL IsNonInstallMode () return TRUE; } + LRESULT SetCheckBox (HWND hwndDlg, int dlgItem, BOOL state) { return SendDlgItemMessage (hwndDlg, dlgItem, BM_SETCHECK, state ? BST_CHECKED : BST_UNCHECKED, 0); @@ -11674,7 +11623,7 @@ BYTE *MapResource (wchar_t *resourceType, int resourceId, PDWORD size) { HGLOBAL hResL; HRSRC hRes; - HINSTANCE hResInst = NULL; + HINSTANCE hResInst = NULL; #ifdef SETUP_DLL // In case we're being called from the SetupDLL project, FindResource() @@ -11686,7 +11635,7 @@ BYTE *MapResource (wchar_t *resourceType, int resourceId, PDWORD size) hRes = FindResource (hResInst, MAKEINTRESOURCE(resourceId), resourceType); hResL = LoadResource (hResInst, hRes); - + if (size != NULL) *size = SizeofResource (hResInst, hRes); diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index d9bc3374..362b2d6d 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -282,9 +282,6 @@ typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)( #define ISO_BURNER_TOOL L"isoburn.exe" #define PRINT_TOOL L"notepad.exe" - -BOOL CheckIsIMESupported (); - void InitGlobalLocks (); void FinalizeGlobalLocks (); void cleanup ( void ); @@ -377,7 +374,6 @@ BOOL CALLBACK CipherTestDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , void ResetCipherTest ( HWND hwndDlg , int idTestCipher ); void ResetCurrentDirectory (); BOOL BrowseFiles (HWND hwndDlg, char *stringId, wchar_t *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter); -BOOL BrowseFile (HWND hwndDlg, char *stringId, wchar_t *initialDir); BOOL BrowseDirectories (HWND hWnd, char *lpszTitle, wchar_t *dirName); void handleError ( HWND hwndDlg , int code, const char* srcPos ); BOOL CheckFileStreamWriteErrors (HWND hwndDlg, FILE *file, const wchar_t *fileName); diff --git a/src/Common/Language.xml b/src/Common/Language.xml index 9ac6ce1b..e4ceac7a 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -6,7 +6,6 @@ - Cancel Install &for all users Bro&wse... @@ -59,7 +58,7 @@ Open Outer Volume &Pause Use P&IM - Modify PIM + Use PIM Quick Format &Display password &Display password @@ -71,7 +70,7 @@ Encrypt the system partition or entire system drive Encrypt the Windows system partition Encrypt the whole drive - VeraCrypt Wizard + VeraCrypt Volume Creation Wizard Cluster IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click Next to continue. &Confirm: @@ -101,7 +100,7 @@ Encrypts the partition/drive where Windows is installed. Anyone who wants to gain access and use the system, read and write files, etc., will need to enter the correct password each time before Windows boots. Optionally, creates a hidden system. Select this option to encrypt the partition where the currently running Windows operating system is installed. Volume Label in Windows: - Wipe Mode + Wipe mode: Close Allow pre-boot &authentication to be bypassed by pressing the Esc key (enables boot manager) Do nothing @@ -489,7 +488,7 @@ The entire selected partition and all data stored on it will be encrypted in place. If the partition is empty, you should choose the other option (the volume will be created much faster). Note: &Resume - &Cancel + &Defer &Start &Continue &Format @@ -1107,7 +1106,7 @@ Keyfiles are currently not supported for system encryption. Warning: VeraCrypt could not restore the original keyboard layout. This may cause you to enter a password incorrectly. 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. - It is not possible to type characters by pressing keys while the right Alt key is held down. However, you can type most of such characters by pressing appropriate keys while the Shift key is held down. + As VeraCrypt temporarily changed the keyboard layout to the standard US keyboard layout, it is not possible to type characters by pressing keys while the right Alt key is held down. However, you can type most of such characters by pressing appropriate keys while the Shift key is held down. VeraCrypt prevented change of keyboard layout. Note: The password will need 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. However, it is important to note that you do NOT need a real US keyboard. VeraCrypt automatically ensures that you can safely type the password (right now and in the pre-boot environment) even if you do NOT have a real US keyboard. Before you can encrypt the partition/drive, you must create a VeraCrypt Rescue Disk (VRD), which serves the following purposes:\n\n- If the VeraCrypt Boot Loader, master key, or other critical data gets damaged, the VRD allows you to restore it
Was: EUR 10.08was - EUR 10.08