Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -b -r tc-7.1/Boot/Windows/BootMain.cpp tc-7.2/Boot/Windows/BootMain.cpp
- 78c78,80
- < PrintEndl (3);
- ---
- > PrintEndl (2);
- > Print ("WARNING: Using TrueCrypt is not secure");
- > PrintEndl (2);
- 577,695d578
- < static bool CopySystemPartitionToHiddenVolume (byte drive, byte &exitKey)
- < {
- < bool status = false;
- <
- < uint64 sectorsRemaining;
- < uint64 sectorOffset;
- < sectorOffset.LowPart = 0;
- < sectorOffset.HighPart = 0;
- <
- < int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
- < int statCount;
- <
- < if (!CheckMemoryRequirements ())
- < goto err;
- <
- < if (!GetSystemPartitions (drive))
- < goto err;
- <
- < if (PartitionFollowingActive.Drive == TC_INVALID_BIOS_DRIVE)
- < TC_THROW_FATAL_EXCEPTION;
- <
- < // Check if BIOS can read the last sector of the hidden system
- < AcquireSectorBuffer();
- <
- < if (ReadSectors (SectorBuffer, PartitionFollowingActive.Drive, PartitionFollowingActive.EndSector - (TC_VOLUME_HEADER_GROUP_SIZE / TC_LB_SIZE - 2), 1) != BiosResultSuccess
- < || GetCrc32 (SectorBuffer, sizeof (SectorBuffer)) != OuterVolumeBackupHeaderCrc)
- < {
- < PrintErrorNoEndl ("Your BIOS does not support large drives");
- < Print (IsLbaSupported (PartitionFollowingActive.Drive) ? " due to a bug" : "\r\n- Enable LBA in BIOS");
- < PrintEndl();
- < Print (TC_BOOT_STR_UPGRADE_BIOS);
- <
- < ReleaseSectorBuffer();
- < goto err;
- < }
- <
- < ReleaseSectorBuffer();
- <
- < if (!MountVolume (drive, exitKey, true, false))
- < return false;
- <
- < sectorsRemaining = EncryptedVirtualPartition.SectorCount;
- <
- < if (!(sectorsRemaining == ActivePartition.SectorCount))
- < TC_THROW_FATAL_EXCEPTION;
- <
- < InitScreen();
- < Print ("\r\nCopying system to hidden volume. To abort, press Esc.\r\n\r\n");
- <
- < while (sectorsRemaining.HighPart != 0 || sectorsRemaining.LowPart != 0)
- < {
- < if (EscKeyPressed())
- < {
- < Print ("\rIf aborted, copying will have to start from the beginning (if attempted again).\r\n");
- < if (AskYesNo ("Abort"))
- < break;
- < }
- <
- < if (sectorsRemaining.HighPart == 0 && sectorsRemaining.LowPart < fragmentSectorCount)
- < fragmentSectorCount = (int) sectorsRemaining.LowPart;
- <
- < if (ReadWriteSectors (false, TC_BOOT_LOADER_BUFFER_SEGMENT, 0, drive, ActivePartition.StartSector + sectorOffset, fragmentSectorCount, false) != BiosResultSuccess)
- < {
- < Print ("To fix bad sectors: 1) Terminate 2) Encrypt and decrypt sys partition 3) Retry\r\n");
- < crypto_close (BootCryptoInfo);
- < goto err;
- < }
- <
- < AcquireSectorBuffer();
- <
- < for (int i = 0; i < fragmentSectorCount; ++i)
- < {
- < CopyMemory (TC_BOOT_LOADER_BUFFER_SEGMENT, i * TC_LB_SIZE, SectorBuffer, TC_LB_SIZE);
- <
- < uint64 s = HiddenVolumeStartUnitNo + sectorOffset + i;
- < EncryptDataUnits (SectorBuffer, &s, 1, BootCryptoInfo);
- <
- < CopyMemory (SectorBuffer, TC_BOOT_LOADER_BUFFER_SEGMENT, i * TC_LB_SIZE, TC_LB_SIZE);
- < }
- <
- < ReleaseSectorBuffer();
- <
- < if (ReadWriteSectors (true, TC_BOOT_LOADER_BUFFER_SEGMENT, 0, drive, HiddenVolumeStartSector + sectorOffset, fragmentSectorCount, false) != BiosResultSuccess)
- < {
- < crypto_close (BootCryptoInfo);
- < goto err;
- < }
- <
- < sectorsRemaining = sectorsRemaining - fragmentSectorCount;
- < sectorOffset = sectorOffset + fragmentSectorCount;
- <
- < if (!(statCount++ & 0xf))
- < {
- < Print ("\rRemaining: ");
- < PrintSectorCountInMB (sectorsRemaining);
- < }
- < }
- <
- < crypto_close (BootCryptoInfo);
- <
- < if (sectorsRemaining.HighPart == 0 && sectorsRemaining.LowPart == 0)
- < {
- < status = true;
- < Print ("\rCopying completed.");
- < }
- <
- < PrintEndl (2);
- < goto ret;
- <
- < err:
- < exitKey = TC_BIOS_KEY_ESC;
- < GetKeyboardChar();
- <
- < ret:
- < EraseMemory ((void *) TC_BOOT_LOADER_ARGS_OFFSET, sizeof (BootArguments));
- < return status;
- < }
- <
- <
- 1108,1129d990
- < // Hidden system setup
- < byte hiddenSystemCreationPhase = BootSectorFlags & TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE;
- <
- < if (hiddenSystemCreationPhase != TC_HIDDEN_OS_CREATION_PHASE_NONE)
- < {
- < PreventNormalSystemBoot = true;
- < PrintMainMenu();
- <
- < if (hiddenSystemCreationPhase == TC_HIDDEN_OS_CREATION_PHASE_CLONING)
- < {
- < if (CopySystemPartitionToHiddenVolume (BootDrive, exitKey))
- < {
- < BootSectorFlags = (BootSectorFlags & ~TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE) | TC_HIDDEN_OS_CREATION_PHASE_WIPING;
- < UpdateBootSectorConfiguration (BootLoaderDrive);
- < }
- < else if (exitKey == TC_BIOS_KEY_ESC)
- < goto bootMenu;
- < else
- < continue;
- < }
- < }
- < else
- diff -b -r tc-7.1/Common/BootEncryption.cpp tc-7.2/Common/BootEncryption.cpp
- 1863a1864,1865
- > AbortProcess ("INSECURE_APP");
- >
- 2235,2242c2237
- < BootEncryptionStatus encStatus = GetStatus();
- < if (encStatus.DriveMounted)
- < throw ParameterIncorrect (SRC_POS);
- <
- < CheckRequirements();
- < BackupSystemLoader();
- <
- < SelectedEncryptionAlgorithmId = ea;
- ---
- > AbortProcess ("INSECURE_APP");
- 2248,2300c2243
- < BootEncryptionStatus encStatus = GetStatus();
- < if (encStatus.DriveMounted)
- < throw ParameterIncorrect (SRC_POS);
- <
- < CheckRequirements ();
- <
- < SystemDriveConfiguration config = GetSystemDriveConfiguration();
- <
- < // Some chipset drivers may prevent access to the last sector of the drive
- < if (!systemPartitionOnly)
- < {
- < DISK_GEOMETRY geometry = GetDriveGeometry (config.DriveNumber);
- < Buffer sector (geometry.BytesPerSector);
- <
- < Device device (config.DevicePath);
- <
- < try
- < {
- < device.SeekAt (config.DrivePartition.Info.PartitionLength.QuadPart - geometry.BytesPerSector);
- < device.Read (sector.Ptr(), sector.Size());
- < }
- < catch (SystemException &e)
- < {
- < if (e.ErrorCode != ERROR_CRC)
- < {
- < e.Show (ParentWindow);
- < Error ("WHOLE_DRIVE_ENCRYPTION_PREVENTED_BY_DRIVERS");
- < throw UserAbort (SRC_POS);
- < }
- < }
- < }
- <
- < BackupSystemLoader ();
- <
- < uint64 volumeSize;
- < uint64 encryptedAreaStart;
- <
- < if (systemPartitionOnly)
- < {
- < volumeSize = config.SystemPartition.Info.PartitionLength.QuadPart;
- < encryptedAreaStart = config.SystemPartition.Info.StartingOffset.QuadPart;
- < }
- < else
- < {
- < volumeSize = config.DrivePartition.Info.PartitionLength.QuadPart - TC_BOOT_LOADER_AREA_SIZE;
- < encryptedAreaStart = config.DrivePartition.Info.StartingOffset.QuadPart + TC_BOOT_LOADER_AREA_SIZE;
- < }
- <
- < SelectedEncryptionAlgorithmId = ea;
- < CreateVolumeHeader (volumeSize, encryptedAreaStart, &password, ea, mode, pkcs5);
- <
- < if (!rescueIsoImagePath.empty())
- < CreateRescueIsoImage (true, rescueIsoImagePath);
- ---
- > AbortProcess ("INSECURE_APP");
- 2361,2373c2304
- < BootEncryptionStatus encStatus = GetStatus();
- <
- < if (!encStatus.DeviceFilterActive || !encStatus.DriveMounted || encStatus.SetupInProgress)
- < throw ParameterIncorrect (SRC_POS);
- <
- < BootEncryptionSetupRequest request;
- < ZeroMemory (&request, sizeof (request));
- <
- < request.SetupMode = SetupEncryption;
- < request.WipeAlgorithm = wipeAlgorithm;
- < request.ZeroUnreadableSectors = zeroUnreadableSectors;
- <
- < CallDriver (TC_IOCTL_BOOT_ENCRYPTION_SETUP, &request, sizeof (request), NULL, 0);
- ---
- > AbortProcess ("INSECURE_APP");
- diff -b -r tc-7.1/Common/Cmdline.c tc-7.2/Common/Cmdline.c
- 56a57,58
- > strcat (tmp, "\nExamples:\n\nMount a volume as X:\ttruecrypt.exe /q /v volume.tc /l X\nDismount a volume X:\ttruecrypt.exe /q /d X");
- >
- diff -b -r tc-7.1/Common/Common.rc tc-7.2/Common/Common.rc
- 16c16
- < // English (U.S.) resources
- ---
- > // English (United States) resources
- 19d18
- < #ifdef _WIN32
- 22d20
- < #endif //_WIN32
- 37d34
- < LTEXT "",IDC_HOMEPAGE,18,87,117,9,SS_NOTIFY
- 39c36
- < CONTROL 517,IDC_ABOUT_BKG,"Static",SS_BITMAP,0,0,12,11,WS_EX_STATICEDGE
- ---
- > CONTROL IDB_TEXTUAL_LOGO_BKG,IDC_ABOUT_BKG,"Static",SS_BITMAP,0,0,12,11,WS_EX_STATICEDGE
- 45c42
- < CONTROL 518,IDC_TEXTUAL_LOGO_IMG,"Static",SS_BITMAP,12,26,157,16
- ---
- > CONTROL IDB_TEXTUAL_LOGO_96DPI,IDC_TEXTUAL_LOGO_IMG,"Static",SS_BITMAP,12,26,157,16
- 48c45
- < IDD_COMMANDHELP_DLG DIALOGEX 0, 0, 249, 213
- ---
- > IDD_COMMANDHELP_DLG DIALOGEX 0, 0, 249, 234
- 54,55c51,52
- < DEFPUSHBUTTON "OK",IDOK,93,191,59,14
- < LTEXT "",IDC_COMMANDHELP_TEXT,20,11,208,174
- ---
- > DEFPUSHBUTTON "OK",IDOK,93,212,59,14
- > LTEXT "",IDC_COMMANDHELP_TEXT,20,11,208,195
- 68c65
- < IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 172
- ---
- > IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 159
- 84d80
- < LTEXT "What is hidden volume protection?",IDC_LINK_HIDVOL_PROTECTION_INFO,16,151,247,10,SS_NOTIFY
- 88c84
- < GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,72,265,95
- ---
- > GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,72,265,81
- 112d107
- < LTEXT "More information on keyfiles",IDC_LINK_KEYFILES_INFO,96,220,108,10,SS_NOTIFY
- 122d116
- < CTEXT "Download language pack",IDC_GET_LANG_PACKS,2,146,205,10,SS_NOTIFY
- 214c208
- < STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
- ---
- > STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
- 310a305,308
- > IDD_ABOUT_DLG, DIALOG
- > BEGIN
- > END
- >
- 313c311
- < BOTTOMMARGIN, 205
- ---
- > BOTTOMMARGIN, 226
- 328c326
- < BOTTOMMARGIN, 166
- ---
- > BOTTOMMARGIN, 153
- 527c525
- < #endif // English (U.S.) resources
- ---
- > #endif // English (United States) resources
- diff -b -r tc-7.1/Common/Dlgcode.c tc-7.2/Common/Dlgcode.c
- 53a54
- > #include "Mount/resource.h"
- 69,70d69
- < char szHelpFile[TC_MAX_PATH];
- < char szHelpFile2[TC_MAX_PATH];
- 408,409c407,408
- < MessageBoxW (NULL, GetString (stringId), lpszTitle, ICON_HAND);
- < exit (1);
- ---
- > MessageBoxW (NULL, GetString (stringId), lpszTitle, ICON_HAND | MB_SETFOREGROUND | MB_TOPMOST);
- > ExitProcess (1);
- 415c414
- < exit (1);
- ---
- > ExitProcess (1);
- 771a771,783
- > // Note that the user can still close the window by right-clicking its taskbar icon and selecting 'Close window', or by pressing Alt-F4, or using the Task Manager.
- > void DisableCloseButton (HWND hwndDlg)
- > {
- > EnableMenuItem (GetSystemMenu (hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
- > }
- >
- >
- > void EnableCloseButton (HWND hwndDlg)
- > {
- > EnableMenuItem (GetSystemMenu (hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
- > }
- >
- >
- 872,875d883
- < // Hyperlink
- < SetWindowText (GetDlgItem (hwndDlg, IDC_HOMEPAGE), "www.truecrypt.org");
- < ToHyperlink (hwndDlg, IDC_HOMEPAGE);
- <
- 918c926
- < "Copyright \xA9 2003-2012 TrueCrypt Developers Association. All Rights Reserved.\r\n"
- ---
- > "Copyright \xA9 2003-2014 TrueCrypt Developers Association. All Rights Reserved.\r\n"
- 924c932
- < "Copyright \xA9 2012 TrueCrypt Developers Association. All rights reserved.\r\n\r\n"
- ---
- > "Copyright \xA9 2014 TrueCrypt Developers Association. All rights reserved.\r\n\r\n"
- 937,942d944
- < if (lw == IDC_HOMEPAGE)
- < {
- < Applink ("main", TRUE, "");
- < return 1;
- < }
- <
- 1628,1885d1629
- < static BOOL IsReturnAddress (DWORD64 address)
- < {
- < static size_t codeEnd = 0;
- < byte *sp = (byte *) address;
- <
- < if (codeEnd == 0)
- < {
- < MEMORY_BASIC_INFORMATION mi;
- < if (VirtualQuery ((LPCVOID) 0x401000, &mi, sizeof (mi)) >= sizeof (mi))
- < codeEnd = (size_t) mi.BaseAddress + mi.RegionSize;
- < }
- <
- < if (address < 0x401000 + 8 || address > codeEnd)
- < return FALSE;
- <
- < return sp[-5] == 0xe8 // call ADDR
- < || (sp[-6] == 0xff && sp[-5] == 0x15) // call [ADDR]
- < || (sp[-2] == 0xff && (sp[-1] & 0xf0) == 0xd0); // call REG
- < }
- <
- <
- < typedef struct
- < {
- < EXCEPTION_POINTERS *ExceptionPointers;
- < HANDLE ExceptionThread;
- <
- < } ExceptionHandlerThreadArgs;
- <
- <
- < void ExceptionHandlerThread (void *threadArg)
- < {
- < ExceptionHandlerThreadArgs *args = (ExceptionHandlerThreadArgs *) threadArg;
- <
- < EXCEPTION_POINTERS *ep = args->ExceptionPointers;
- < DWORD addr;
- < DWORD exCode = ep->ExceptionRecord->ExceptionCode;
- < SYSTEM_INFO si;
- < wchar_t msg[8192];
- < char modPath[MAX_PATH];
- < int crc = 0;
- < char url[MAX_URL_LENGTH];
- < char lpack[128];
- < stringstream callStack;
- < addr = (DWORD) ep->ExceptionRecord->ExceptionAddress;
- < PDWORD sp = (PDWORD) ep->ContextRecord->Esp;
- < int frameNumber = 0;
- <
- < switch (exCode)
- < {
- < case STATUS_IN_PAGE_ERROR:
- < case 0xeedfade:
- < // Exception not caused by TrueCrypt
- < MessageBoxW (0, GetString ("EXCEPTION_REPORT_EXT"),
- < GetString ("EXCEPTION_REPORT_TITLE"),
- < MB_ICONERROR | MB_OK | MB_SETFOREGROUND | MB_TOPMOST);
- < return;
- < }
- <
- < // Call stack
- < HMODULE dbgDll = LoadLibrary ("dbghelp.dll");
- < if (dbgDll)
- < {
- < typedef DWORD (__stdcall *SymGetOptions_t) ();
- < typedef DWORD (__stdcall *SymSetOptions_t) (DWORD SymOptions);
- < typedef BOOL (__stdcall *SymInitialize_t) (HANDLE hProcess, PCSTR UserSearchPath, BOOL fInvadeProcess);
- < typedef BOOL (__stdcall *StackWalk64_t) (DWORD MachineType, HANDLE hProcess, HANDLE hThread, LPSTACKFRAME64 StackFrame, PVOID ContextRecord, PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine, PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine, PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine, PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
- < typedef BOOL (__stdcall * SymFromAddr_t) (HANDLE hProcess, DWORD64 Address, PDWORD64 Displacement, PSYMBOL_INFO Symbol);
- <
- < SymGetOptions_t DbgHelpSymGetOptions = (SymGetOptions_t) GetProcAddress (dbgDll, "SymGetOptions");
- < SymSetOptions_t DbgHelpSymSetOptions = (SymSetOptions_t) GetProcAddress (dbgDll, "SymSetOptions");
- < SymInitialize_t DbgHelpSymInitialize = (SymInitialize_t) GetProcAddress (dbgDll, "SymInitialize");
- < PFUNCTION_TABLE_ACCESS_ROUTINE64 DbgHelpSymFunctionTableAccess64 = (PFUNCTION_TABLE_ACCESS_ROUTINE64) GetProcAddress (dbgDll, "SymFunctionTableAccess64");
- < PGET_MODULE_BASE_ROUTINE64 DbgHelpSymGetModuleBase64 = (PGET_MODULE_BASE_ROUTINE64) GetProcAddress (dbgDll, "SymGetModuleBase64");
- < StackWalk64_t DbgHelpStackWalk64 = (StackWalk64_t) GetProcAddress (dbgDll, "StackWalk64");
- < SymFromAddr_t DbgHelpSymFromAddr = (SymFromAddr_t) GetProcAddress (dbgDll, "SymFromAddr");
- <
- < if (DbgHelpSymGetOptions && DbgHelpSymSetOptions && DbgHelpSymInitialize && DbgHelpSymFunctionTableAccess64 && DbgHelpSymGetModuleBase64 && DbgHelpStackWalk64 && DbgHelpSymFromAddr)
- < {
- < DbgHelpSymSetOptions (DbgHelpSymGetOptions() | SYMOPT_DEFERRED_LOADS | SYMOPT_ALLOW_ABSOLUTE_SYMBOLS | SYMOPT_NO_CPP);
- <
- < if (DbgHelpSymInitialize (GetCurrentProcess(), NULL, TRUE))
- < {
- < STACKFRAME64 frame;
- < memset (&frame, 0, sizeof (frame));
- <
- < frame.AddrPC.Offset = ep->ContextRecord->Eip;
- < frame.AddrPC.Mode = AddrModeFlat;
- < frame.AddrStack.Offset = ep->ContextRecord->Esp;
- < frame.AddrStack.Mode = AddrModeFlat;
- < frame.AddrFrame.Offset = ep->ContextRecord->Ebp;
- < frame.AddrFrame.Mode = AddrModeFlat;
- <
- < string lastSymbol;
- <
- < while (frameNumber < 32 && DbgHelpStackWalk64 (IMAGE_FILE_MACHINE_I386, GetCurrentProcess(), args->ExceptionThread, &frame, ep->ContextRecord, NULL, DbgHelpSymFunctionTableAccess64, DbgHelpSymGetModuleBase64, NULL))
- < {
- < if (!frame.AddrPC.Offset)
- < continue;
- <
- < ULONG64 symbolBuffer[(sizeof (SYMBOL_INFO) + MAX_SYM_NAME * sizeof (TCHAR) + sizeof (ULONG64) - 1) / sizeof (ULONG64)];
- < memset (symbolBuffer, 0, sizeof (symbolBuffer));
- <
- < PSYMBOL_INFO symbol = (PSYMBOL_INFO) symbolBuffer;
- < symbol->SizeOfStruct = sizeof (SYMBOL_INFO);
- < symbol->MaxNameLen = MAX_SYM_NAME;
- <
- < if (DbgHelpSymFromAddr (GetCurrentProcess(), frame.AddrPC.Offset, NULL, symbol) && symbol->NameLen > 0)
- < {
- < for (size_t i = 0; i < symbol->NameLen; ++i)
- < {
- < if (!isalnum (symbol->Name[i]))
- < symbol->Name[i] = '_';
- < }
- <
- < if (symbol->Name != lastSymbol)
- < callStack << "&st" << frameNumber++ << "=" << symbol->Name;
- <
- < lastSymbol = symbol->Name;
- < }
- < else if (frameNumber == 0 || IsReturnAddress (frame.AddrPC.Offset))
- < {
- < callStack << "&st" << frameNumber++ << "=0x" << hex << frame.AddrPC.Offset << dec;
- < }
- < }
- < }
- < }
- < }
- <
- < // StackWalk64() may fail due to missing frame pointers
- < list <DWORD> retAddrs;
- < if (frameNumber == 0)
- < retAddrs.push_back (ep->ContextRecord->Eip);
- <
- < retAddrs.push_back (0);
- <
- < MEMORY_BASIC_INFORMATION mi;
- < VirtualQuery (sp, &mi, sizeof (mi));
- < PDWORD stackTop = (PDWORD)((byte *) mi.BaseAddress + mi.RegionSize);
- < int i = 0;
- <
- < while (retAddrs.size() < 16 && &sp[i] < stackTop)
- < {
- < if (IsReturnAddress (sp[i]))
- < {
- < bool duplicate = false;
- < foreach (DWORD prevAddr, retAddrs)
- < {
- < if (sp[i] == prevAddr)
- < {
- < duplicate = true;
- < break;
- < }
- < }
- <
- < if (!duplicate)
- < retAddrs.push_back (sp[i]);
- < }
- < i++;
- < }
- <
- < if (retAddrs.size() > 1)
- < {
- < foreach (DWORD addr, retAddrs)
- < {
- < callStack << "&st" << frameNumber++ << "=0x" << hex << addr << dec;
- < }
- < }
- <
- < // Checksum of the module
- < if (GetModuleFileName (NULL, modPath, sizeof (modPath)))
- < {
- < HANDLE h = CreateFile (modPath, FILE_READ_DATA | FILE_READ_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
- < if (h != INVALID_HANDLE_VALUE)
- < {
- < BY_HANDLE_FILE_INFORMATION fi;
- < if (GetFileInformationByHandle (h, &fi))
- < {
- < char *buf = (char *) malloc (fi.nFileSizeLow);
- < if (buf)
- < {
- < DWORD bytesRead;
- < if (ReadFile (h, buf, fi.nFileSizeLow, &bytesRead, NULL) && bytesRead == fi.nFileSizeLow)
- < crc = GetCrc32 ((unsigned char *) buf, fi.nFileSizeLow);
- < free (buf);
- < }
- < }
- < CloseHandle (h);
- < }
- < }
- <
- < GetSystemInfo (&si);
- <
- < if (LocalizationActive)
- < sprintf_s (lpack, sizeof (lpack), "&langpack=%s_%s", GetPreferredLangId (), GetActiveLangPackVersion ());
- < else
- < lpack[0] = 0;
- <
- < sprintf (url, TC_APPLINK_SECURE "&dest=err-report%s&os=%s&osver=%d.%d.%d&arch=%s&cpus=%d&app=%s&cksum=%x&dlg=%s&err=%x&addr=%x"
- < , lpack
- < , GetWindowsEdition().c_str()
- < , CurrentOSMajor
- < , CurrentOSMinor
- < , CurrentOSServicePack
- < , Is64BitOs () ? "x64" : "x86"
- < , si.dwNumberOfProcessors
- < #ifdef TCMOUNT
- < ,"main"
- < #endif
- < #ifdef VOLFORMAT
- < ,"format"
- < #endif
- < #ifdef SETUP
- < ,"setup"
- < #endif
- < , crc
- < , LastDialogId ? LastDialogId : "-"
- < , exCode
- < , addr);
- <
- < string urlStr = url + callStack.str();
- <
- < _snwprintf (msg, array_capacity (msg), GetString ("EXCEPTION_REPORT"), urlStr.c_str());
- <
- < if (IDYES == MessageBoxW (0, msg, GetString ("EXCEPTION_REPORT_TITLE"), MB_ICONERROR | MB_YESNO | MB_DEFBUTTON1))
- < ShellExecute (NULL, "open", urlStr.c_str(), NULL, NULL, SW_SHOWNORMAL);
- < else
- < UnhandledExceptionFilter (ep);
- < }
- <
- <
- < LONG __stdcall ExceptionHandler (EXCEPTION_POINTERS *ep)
- < {
- < SetUnhandledExceptionFilter (NULL);
- <
- < if (SystemFileSelectorCallPending && SystemFileSelectorCallerThreadId == GetCurrentThreadId())
- < {
- < MessageBoxW (NULL, GetString ("EXCEPTION_REPORT_EXT_FILESEL"), GetString ("EXCEPTION_REPORT_TITLE"), MB_ICONERROR | MB_OK | MB_SETFOREGROUND | MB_TOPMOST);
- <
- < UnhandledExceptionFilter (ep);
- < return EXCEPTION_EXECUTE_HANDLER;
- < }
- <
- < ExceptionHandlerThreadArgs args;
- < args.ExceptionPointers = ep;
- < args.ExceptionThread = GetCurrentThread();
- <
- < WaitForSingleObject ((HANDLE) _beginthread (ExceptionHandlerThread, 0, &args), INFINITE);
- <
- < return EXCEPTION_EXECUTE_HANDLER;
- < }
- <
- <
- < void InvalidParameterHandler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t reserved)
- < {
- < TC_THROW_FATAL_EXCEPTION;
- < }
- <
- <
- 2108c1852
- < // Returns the number of partitions where non-system in-place encryption is progress or had been in progress
- ---
- > // Returns the number of partitions where non-system in-place encryption is or had been in progress
- 2156,2222d1899
- < void SavePostInstallTasksSettings (int command)
- < {
- < FILE *f = NULL;
- <
- < if (IsNonInstallMode() && command != TC_POST_INSTALL_CFG_REMOVE_ALL)
- < return;
- <
- < switch (command)
- < {
- < case TC_POST_INSTALL_CFG_REMOVE_ALL:
- < remove (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL));
- < remove (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES));
- < break;
- <
- < case TC_POST_INSTALL_CFG_TUTORIAL:
- < f = fopen (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL), "w");
- < break;
- <
- < case TC_POST_INSTALL_CFG_RELEASE_NOTES:
- < f = fopen (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES), "w");
- < break;
- <
- < default:
- < return;
- < }
- <
- < if (f == NULL)
- < return;
- <
- < if (fputs ("1", f) < 0)
- < {
- < // Error
- < fclose (f);
- < return;
- < }
- <
- < TCFlushFile (f);
- <
- < fclose (f);
- < }
- <
- <
- < void DoPostInstallTasks (void)
- < {
- < BOOL bDone = FALSE;
- <
- < if (FileExists (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL)))
- < {
- < if (AskYesNo ("AFTER_INSTALL_TUTORIAL") == IDYES)
- < Applink ("beginnerstutorial", TRUE, "");
- <
- < bDone = TRUE;
- < }
- <
- < if (FileExists (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES)))
- < {
- < if (AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES") == IDYES)
- < Applink ("releasenotes", TRUE, "");
- <
- < bDone = TRUE;
- < }
- <
- < if (bDone)
- < SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_REMOVE_ALL);
- < }
- <
- <
- 2358,2360d2034
- < SetUnhandledExceptionFilter (ExceptionHandler);
- < _set_invalid_parameter_handler (InvalidParameterHandler);
- <
- 2463,2464d2136
- < InitHelpFileName ();
- <
- 2474,2504d2145
- < void InitHelpFileName (void)
- < {
- < char *lpszTmp;
- <
- < GetModuleFileName (NULL, szHelpFile, sizeof (szHelpFile));
- < lpszTmp = strrchr (szHelpFile, '\\');
- < if (lpszTmp)
- < {
- < char szTemp[TC_MAX_PATH];
- <
- < // Primary file name
- < if (strcmp (GetPreferredLangId(), "en") == 0
- < || GetPreferredLangId() == NULL)
- < {
- < strcpy (++lpszTmp, "TrueCrypt User Guide.pdf");
- < }
- < else
- < {
- < sprintf (szTemp, "TrueCrypt User Guide.%s.pdf", GetPreferredLangId());
- < strcpy (++lpszTmp, szTemp);
- < }
- <
- < // Secondary file name (used when localized documentation is not found).
- < GetModuleFileName (NULL, szHelpFile2, sizeof (szHelpFile2));
- < lpszTmp = strrchr (szHelpFile2, '\\');
- < if (lpszTmp)
- < {
- < strcpy (++lpszTmp, "TrueCrypt User Guide.pdf");
- < }
- < }
- < }
- 2653a2295,2351
- >
- > /* Determines whether the path points to a non-system partition on the system drive.
- > IMPORTANT: As this may take a very long time if called for the first time, it should be called
- > only before performing a dangerous operation, never at WM_INITDIALOG or any other GUI events.
- > Return codes:
- > 0 - it isn't a non-system partition on the system drive
- > 1 - it's a non-system partition on the system drive
- > -1 - the result can't be determined, isn't reliable, or there was an error. */
- > int IsNonSysPartitionOnSysDrive (const char *path)
- > {
- > char tmpPath [TC_MAX_PATH + 1];
- > int pos;
- >
- > if (!GetSysDevicePaths (MainDlg))
- > return -1;
- >
- > if (strlen (SysPartitionDevicePath) <= 1 || strlen (SysDriveDevicePath) <= 1)
- > return -1;
- >
- > if (strncmp (path, SysPartitionDevicePath, max (strlen(path), strlen(SysPartitionDevicePath))) == 0
- > || strncmp (path, SysDriveDevicePath, max (strlen(path), strlen(SysDriveDevicePath))) == 0)
- > {
- > // It is the system partition/drive path (it isn't a non-system partition)
- > return 0;
- > }
- >
- > memset (tmpPath, 0, sizeof (tmpPath));
- > strncpy (tmpPath, path, sizeof (tmpPath) - 1);
- >
- >
- > pos = (int) FindString (tmpPath, "Partition", strlen (tmpPath), strlen ("Partition"), 0);
- >
- > if (pos < 0)
- > return -1;
- >
- > pos += strlen ("Partition");
- >
- > if (pos + 1 > sizeof (tmpPath) - 1)
- > return -1;
- >
- > tmpPath [pos] = '0';
- > tmpPath [pos + 1] = 0;
- >
- > if (strncmp (tmpPath, SysDriveDevicePath, max (strlen(tmpPath), strlen(SysDriveDevicePath))) == 0)
- > {
- > // It is a non-system partition on the system drive
- > return 1;
- > }
- > else
- > {
- > // The partition is not on the system drive
- > return 0;
- > }
- > }
- >
- >
- >
- 3817c3515,3519
- < if (TCBootLoaderOnInactiveSysEncDrive ())
- ---
- >
- > char szDevicePath [TC_MAX_PATH+1] = {0};
- > GetWindowText (GetDlgItem (MainDlg, IDC_VOLUME), szDevicePath, sizeof (szDevicePath));
- >
- > if (TCBootLoaderOnInactiveSysEncDrive (szDevicePath))
- 4618,4619d4319
- < ToHyperlink (hwndDlg, IDC_HW_AES_LABEL_LINK);
- <
- 4646,4647d4345
- < ToHyperlink (hwndDlg, IDC_PARALLELIZATION_LABEL_LINK);
- <
- 4684,4693d4381
- < case IDC_HW_AES_LABEL_LINK:
- <
- < Applink ("hwacceleration", TRUE, "");
- < return 1;
- <
- < case IDC_PARALLELIZATION_LABEL_LINK:
- <
- < Applink ("parallelization", TRUE, "");
- < return 1;
- <
- 5688a5377,5378
- > DisableCloseButton (hwndDlg);
- >
- 5711c5401,5402
- < EndDialog (hwndDlg, 0);
- ---
- > // This prevents the window from being closed by pressing Alt-F4 (the Close button is hidden).
- > // Note that the OS handles modal MessageBox() dialog windows the same way.
- 6354a6046
- > // Returns -1 if no drive letter is resolved
- 7750a7443,7449
- > int AskNoYesString (const wchar_t *string)
- > {
- > if (Silent) return IDNO;
- > return MessageBoxW (MainDlg, string, lpszTitle, MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2);
- > }
- >
- >
- 7840,7841c7539
- < // If the returned value is 0, the user closed the dialog window without making a choice.
- < // If the user made a choice, the returned value is the ordinal number of the choice (1..MAX_MULTI_CHOICES)
- ---
- > // The returned value is the ordinal number of the choice the user selected (1..MAX_MULTI_CHOICES)
- 7987,8016d7684
- < void OpenPageHelp (HWND hwndDlg, int nPage)
- < {
- < int r = (int)ShellExecute (NULL, "open", szHelpFile, NULL, NULL, SW_SHOWNORMAL);
- <
- < if (r == ERROR_FILE_NOT_FOUND)
- < {
- < // Try the secondary help file
- < r = (int)ShellExecute (NULL, "open", szHelpFile2, NULL, NULL, SW_SHOWNORMAL);
- <
- < if (r == ERROR_FILE_NOT_FOUND)
- < {
- < OpenOnlineHelp ();
- < return;
- < }
- < }
- <
- < if (r == SE_ERR_NOASSOC)
- < {
- < if (AskYesNo ("HELP_READER_ERROR") == IDYES)
- < OpenOnlineHelp ();
- < }
- < }
- <
- <
- < void OpenOnlineHelp ()
- < {
- < Applink ("help", TRUE, "");
- < }
- <
- <
- 8324,8337d7991
- < void Applink (char *dest, BOOL bSendOS, char *extraOutput)
- < {
- < char url [MAX_URL_LENGTH];
- <
- < ArrowWaitCursor ();
- <
- < sprintf_s (url, sizeof (url), TC_APPLINK "%s%s&dest=%s", bSendOS ? ("&os=" + GetWindowsEdition()).c_str() : "", extraOutput, dest);
- < ShellExecute (NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
- <
- < Sleep (200);
- < NormalCursor ();
- < }
- <
- <
- 9543c9197
- < int AskNonSysInPlaceEncryptionResume ()
- ---
- > int AskNonSysInPlaceEncryptionResume (BOOL *decrypt)
- 9545a9200,9201
- > {
- > *decrypt = TRUE;
- 9546a9203
- > }
- diff -b -r tc-7.1/Common/Dlgcode.h tc-7.2/Common/Dlgcode.h
- 34,35c34
- < IDM_SHOW_HIDE,
- < IDM_HOMEPAGE_SYSTRAY
- ---
- > IDM_SHOW_HIDE
- 77,78d75
- < #define TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL "Post-Install Task - Tutorial"
- < #define TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES "Post-Install Task - Release Notes"
- 88,94d84
- < enum
- < {
- < TC_POST_INSTALL_CFG_REMOVE_ALL = 0,
- < TC_POST_INSTALL_CFG_TUTORIAL,
- < TC_POST_INSTALL_CFG_RELEASE_NOTES
- < };
- <
- 97,98d86
- < extern char szHelpFile[TC_MAX_PATH];
- < extern char szHelpFile2[TC_MAX_PATH];
- 130a119,122
- > extern char SysPartitionDevicePath [TC_MAX_PATH];
- > extern char SysDriveDevicePath [TC_MAX_PATH];
- > extern char bCachedSysDevicePathsValid;
- >
- 287,288d278
- < void SavePostInstallTasksSettings (int command);
- < void DoPostInstallTasks (void);
- 291d280
- < void InitHelpFileName (void);
- 296a286
- > int IsNonSysPartitionOnSysDrive (const char *path);
- 375d364
- < void OpenPageHelp (HWND hwndDlg, int nPage);
- 393a383
- > int AskNoYesString (const wchar_t *string);
- 424d413
- < void Applink (char *dest, BOOL bSendOS, char *extraOutput);
- 434d422
- < void OpenOnlineHelp ();
- 445a434,435
- > void DisableCloseButton (HWND hwndDlg);
- > void EnableCloseButton (HWND hwndDlg);
- 448a439
- > BOOL GetSysDevicePaths (HWND hwndDlg);
- 463c454
- < int AskNonSysInPlaceEncryptionResume ();
- ---
- > int AskNonSysInPlaceEncryptionResume (BOOL *decrypt);
- diff -b -r tc-7.1/Common/Fat.c tc-7.2/Common/Fat.c
- 19a20
- > #include "Dlgcode.h"
- 258,437c259
- < int write_buf_cnt = 0;
- < char sector[TC_MAX_VOLUME_SECTOR_SIZE], *write_buf;
- < unsigned __int64 nSecNo = startSector;
- < int x, n;
- < int retVal;
- < char temporaryKey[MASTER_KEYDATA_SIZE];
- <
- < LARGE_INTEGER startOffset;
- < LARGE_INTEGER newOffset;
- <
- < // Seek to start sector
- < startOffset.QuadPart = startSector * ft->sector_size;
- < if (!SetFilePointerEx ((HANDLE) dev, startOffset, &newOffset, FILE_BEGIN)
- < || newOffset.QuadPart != startOffset.QuadPart)
- < {
- < return ERR_VOL_SEEKING;
- < }
- <
- < /* Write the data area */
- <
- < write_buf = (char *)TCalloc (FormatWriteBufferSize);
- < if (!write_buf)
- < return ERR_OUTOFMEMORY;
- <
- < memset (sector, 0, ft->sector_size);
- <
- < RandgetBytes (ft->volume_id, sizeof (ft->volume_id), FALSE);
- <
- < PutBoot (ft, (unsigned char *) sector);
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- <
- < /* fat32 boot area */
- < if (ft->size_fat == 32)
- < {
- < /* fsinfo */
- < PutFSInfo((unsigned char *) sector, ft);
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- <
- < /* reserved */
- < while (nSecNo - startSector < 6)
- < {
- < memset (sector, 0, ft->sector_size);
- < sector[508+3]=0xaa; /* TrailSig */
- < sector[508+2]=0x55;
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- < }
- <
- < /* bootsector backup */
- < memset (sector, 0, ft->sector_size);
- < PutBoot (ft, (unsigned char *) sector);
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- <
- < PutFSInfo((unsigned char *) sector, ft);
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- < }
- <
- < /* reserved */
- < while (nSecNo - startSector < (unsigned int)ft->reserved)
- < {
- < memset (sector, 0, ft->sector_size);
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- < }
- <
- < /* write fat */
- < for (x = 1; x <= ft->fats; x++)
- < {
- < for (n = 0; n < ft->fat_length; n++)
- < {
- < memset (sector, 0, ft->sector_size);
- <
- < if (n == 0)
- < {
- < unsigned char fat_sig[12];
- < if (ft->size_fat == 32)
- < {
- < fat_sig[0] = (unsigned char) ft->media;
- < fat_sig[1] = fat_sig[2] = 0xff;
- < fat_sig[3] = 0x0f;
- < fat_sig[4] = fat_sig[5] = fat_sig[6] = 0xff;
- < fat_sig[7] = 0x0f;
- < fat_sig[8] = fat_sig[9] = fat_sig[10] = 0xff;
- < fat_sig[11] = 0x0f;
- < memcpy (sector, fat_sig, 12);
- < }
- < else if (ft->size_fat == 16)
- < {
- < fat_sig[0] = (unsigned char) ft->media;
- < fat_sig[1] = 0xff;
- < fat_sig[2] = 0xff;
- < fat_sig[3] = 0xff;
- < memcpy (sector, fat_sig, 4);
- < }
- < else if (ft->size_fat == 12)
- < {
- < fat_sig[0] = (unsigned char) ft->media;
- < fat_sig[1] = 0xff;
- < fat_sig[2] = 0xff;
- < fat_sig[3] = 0x00;
- < memcpy (sector, fat_sig, 4);
- < }
- < }
- <
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- < }
- < }
- <
- <
- < /* write rootdir */
- < for (x = 0; x < ft->size_root_dir / ft->sector_size; x++)
- < {
- < memset (sector, 0, ft->sector_size);
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- <
- < }
- <
- < /* Fill the rest of the data area with random data */
- <
- < if(!quickFormat)
- < {
- < if (!FlushFormatWriteBuffer (dev, write_buf, &write_buf_cnt, &nSecNo, cryptoInfo))
- < goto fail;
- <
- < /* Generate a random temporary key set to be used for "dummy" encryption that will fill
- < the free disk space (data area) with random data. This is necessary for plausible
- < deniability of hidden volumes (and also reduces the amount of predictable plaintext
- < within the volume). */
- <
- < // Temporary master key
- < if (!RandgetBytes (temporaryKey, EAGetKeySize (cryptoInfo->ea), FALSE))
- < goto fail;
- <
- < // Temporary secondary key (XTS mode)
- < if (!RandgetBytes (cryptoInfo->k2, sizeof cryptoInfo->k2, FALSE))
- < goto fail;
- <
- < retVal = EAInit (cryptoInfo->ea, temporaryKey, cryptoInfo->ks);
- < if (retVal != ERR_SUCCESS)
- < {
- < burn (temporaryKey, sizeof(temporaryKey));
- < return retVal;
- < }
- < if (!EAInitMode (cryptoInfo))
- < {
- < burn (temporaryKey, sizeof(temporaryKey));
- < return ERR_MODE_INIT_FAILED;
- < }
- <
- < x = ft->num_sectors - ft->reserved - ft->size_root_dir / ft->sector_size - ft->fat_length * 2;
- < while (x--)
- < {
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- < }
- < UpdateProgressBar (nSecNo * ft->sector_size);
- < }
- < else
- < UpdateProgressBar ((uint64) ft->num_sectors * ft->sector_size);
- <
- < if (!FlushFormatWriteBuffer (dev, write_buf, &write_buf_cnt, &nSecNo, cryptoInfo))
- < goto fail;
- <
- < TCfree (write_buf);
- < burn (temporaryKey, sizeof(temporaryKey));
- ---
- > AbortProcess ("INSECURE_APP");
- 439,444d260
- <
- < fail:
- <
- < TCfree (write_buf);
- < burn (temporaryKey, sizeof(temporaryKey));
- < return ERR_OS_ERROR;
- diff -b -r tc-7.1/Common/Format.c tc-7.2/Common/Format.c
- 75,674c75,76
- < int nStatus;
- < PCRYPTO_INFO cryptoInfo = NULL;
- < HANDLE dev = INVALID_HANDLE_VALUE;
- < DWORD dwError;
- < char header[TC_VOLUME_HEADER_EFFECTIVE_SIZE];
- < unsigned __int64 num_sectors, startSector;
- < fatparams ft;
- < FILETIME ftCreationTime;
- < FILETIME ftLastWriteTime;
- < FILETIME ftLastAccessTime;
- < BOOL bTimeStampValid = FALSE;
- < BOOL bInstantRetryOtherFilesys = FALSE;
- < char dosDev[TC_MAX_PATH] = { 0 };
- < char devName[MAX_PATH] = { 0 };
- < int driveLetter = -1;
- < WCHAR deviceName[MAX_PATH];
- < uint64 dataOffset, dataAreaSize;
- < LARGE_INTEGER offset;
- < BOOL bFailedRequiredDASD = FALSE;
- <
- < FormatSectorSize = volParams->sectorSize;
- <
- < if (FormatSectorSize < TC_MIN_VOLUME_SECTOR_SIZE
- < || FormatSectorSize > TC_MAX_VOLUME_SECTOR_SIZE
- < || FormatSectorSize % ENCRYPTION_DATA_UNIT_SIZE != 0)
- < {
- < Error ("SECTOR_SIZE_UNSUPPORTED");
- < return ERR_DONT_REPORT;
- < }
- <
- < /* WARNING: Note that if Windows fails to format the volume as NTFS and the volume size is
- < less than the maximum FAT size, the user is asked within this function whether he wants to instantly
- < retry FAT format instead (to avoid having to re-create the whole container again). If the user
- < answers yes, some of the input parameters are modified, the code below 'begin_format' is re-executed
- < and some destructive operations that were performed during the first attempt must be (and are) skipped.
- < Therefore, whenever adding or modifying any potentially destructive operations below 'begin_format',
- < determine whether they (or their portions) need to be skipped during such a second attempt; if so,
- < use the 'bInstantRetryOtherFilesys' flag to skip them. */
- <
- < if (volParams->hiddenVol)
- < {
- < dataOffset = volParams->hiddenVolHostSize - TC_VOLUME_HEADER_GROUP_SIZE - volParams->size;
- < }
- < else
- < {
- < if (volParams->size <= TC_TOTAL_VOLUME_HEADERS_SIZE)
- < return ERR_VOL_SIZE_WRONG;
- <
- < dataOffset = TC_VOLUME_DATA_OFFSET;
- < }
- <
- < dataAreaSize = GetVolumeDataAreaSize (volParams->hiddenVol, volParams->size);
- <
- < num_sectors = dataAreaSize / FormatSectorSize;
- <
- < if (volParams->bDevice)
- < {
- < strcpy ((char *)deviceName, volParams->volumePath);
- < ToUNICODE ((char *)deviceName);
- <
- < driveLetter = GetDiskDeviceDriveLetter (deviceName);
- < }
- <
- < VirtualLock (header, sizeof (header));
- <
- < nStatus = CreateVolumeHeaderInMemory (FALSE,
- < header,
- < volParams->ea,
- < FIRST_MODE_OF_OPERATION_ID,
- < volParams->password,
- < volParams->pkcs5,
- < NULL,
- < &cryptoInfo,
- < dataAreaSize,
- < volParams->hiddenVol ? dataAreaSize : 0,
- < dataOffset,
- < dataAreaSize,
- < 0,
- < volParams->headerFlags,
- < FormatSectorSize,
- < FALSE);
- <
- < if (nStatus != 0)
- < {
- < burn (header, sizeof (header));
- < VirtualUnlock (header, sizeof (header));
- < return nStatus;
- < }
- <
- < begin_format:
- <
- < if (volParams->bDevice)
- < {
- < /* Device-hosted volume */
- <
- < DWORD dwResult;
- < int nPass;
- <
- < if (FakeDosNameForDevice (volParams->volumePath, dosDev, devName, FALSE) != 0)
- < return ERR_OS_ERROR;
- <
- < if (IsDeviceMounted (devName))
- < {
- < if ((dev = DismountDrive (devName, volParams->volumePath)) == INVALID_HANDLE_VALUE)
- < {
- < Error ("FORMAT_CANT_DISMOUNT_FILESYS");
- < nStatus = ERR_DONT_REPORT;
- < goto error;
- < }
- <
- < /* Gain "raw" access to the partition (it contains a live filesystem and the filesystem driver
- < would otherwise prevent us from writing to hidden sectors). */
- <
- < if (!DeviceIoControl (dev,
- < FSCTL_ALLOW_EXTENDED_DASD_IO,
- < NULL,
- < 0,
- < NULL,
- < 0,
- < &dwResult,
- < NULL))
- < {
- < bFailedRequiredDASD = TRUE;
- < }
- < }
- < else if (IsOSAtLeast (WIN_VISTA) && driveLetter == -1)
- < {
- < // Windows Vista doesn't allow overwriting sectors belonging to an unformatted partition
- < // to which no drive letter has been assigned under the system. This problem can be worked
- < // around by assigning a drive letter to the partition temporarily.
- <
- < char szDriveLetter[] = { 'A', ':', 0 };
- < char rootPath[] = { 'A', ':', '\\', 0 };
- < char uniqVolName[MAX_PATH+1] = { 0 };
- < int tmpDriveLetter = -1;
- < BOOL bResult = FALSE;
- <
- < tmpDriveLetter = GetFirstAvailableDrive ();
- <
- < if (tmpDriveLetter != -1)
- < {
- < rootPath[0] += (char) tmpDriveLetter;
- < szDriveLetter[0] += (char) tmpDriveLetter;
- <
- < if (DefineDosDevice (DDD_RAW_TARGET_PATH, szDriveLetter, volParams->volumePath))
- < {
- < bResult = GetVolumeNameForVolumeMountPoint (rootPath, uniqVolName, MAX_PATH);
- <
- < DefineDosDevice (DDD_RAW_TARGET_PATH|DDD_REMOVE_DEFINITION|DDD_EXACT_MATCH_ON_REMOVE,
- < szDriveLetter,
- < volParams->volumePath);
- <
- < if (bResult
- < && SetVolumeMountPoint (rootPath, uniqVolName))
- < {
- < // The drive letter can be removed now
- < DeleteVolumeMountPoint (rootPath);
- < }
- < }
- < }
- < }
- <
- < // For extra safety, we will try to gain "raw" access to the partition. Note that this should actually be
- < // redundant because if the filesystem was mounted, we already tried to obtain DASD above. If we failed,
- < // bFailedRequiredDASD was set to TRUE and therefore we will perform pseudo "quick format" below. However,
- < // for extra safety, in case IsDeviceMounted() failed to detect a live filesystem, we will blindly
- < // send FSCTL_ALLOW_EXTENDED_DASD_IO (possibly for a second time) without checking the result.
- <
- < DeviceIoControl (dev,
- < FSCTL_ALLOW_EXTENDED_DASD_IO,
- < NULL,
- < 0,
- < NULL,
- < 0,
- < &dwResult,
- < NULL);
- <
- <
- < // If DASD is needed but we failed to obtain it, perform open - 'quick format' - close - open
- < // so that the filesystem driver does not prevent us from formatting hidden sectors.
- < for (nPass = (bFailedRequiredDASD ? 0 : 1); nPass < 2; nPass++)
- < {
- < int retryCount;
- <
- < retryCount = 0;
- <
- < // Try exclusive access mode first
- < // Note that when exclusive access is denied, it is worth retrying (usually succeeds after a few tries).
- < while (dev == INVALID_HANDLE_VALUE && retryCount++ < EXCL_ACCESS_MAX_AUTO_RETRIES)
- < {
- < dev = CreateFile (devName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
- <
- < if (retryCount > 1)
- < Sleep (EXCL_ACCESS_AUTO_RETRY_DELAY);
- < }
- <
- < if (dev == INVALID_HANDLE_VALUE)
- < {
- < // Exclusive access denied -- retry in shared mode
- < dev = CreateFile (devName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
- < if (dev != INVALID_HANDLE_VALUE)
- < {
- < if (IDNO == MessageBoxW (volParams->hwndDlg, GetString ("DEVICE_IN_USE_FORMAT"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2))
- < {
- < nStatus = ERR_DONT_REPORT;
- < goto error;
- < }
- < }
- < else
- < {
- < handleWin32Error (volParams->hwndDlg);
- < Error ("CANT_ACCESS_VOL");
- < nStatus = ERR_DONT_REPORT;
- < goto error;
- < }
- < }
- <
- < if (volParams->hiddenVol || bInstantRetryOtherFilesys)
- < break; // The following "quick format" operation would damage the outer volume
- <
- < if (nPass == 0)
- < {
- < char buf [2 * TC_MAX_VOLUME_SECTOR_SIZE];
- < DWORD bw;
- <
- < // Perform pseudo "quick format" so that the filesystem driver does not prevent us from
- < // formatting hidden sectors
- < memset (buf, 0, sizeof (buf));
- <
- < if (!WriteFile (dev, buf, sizeof (buf), &bw, NULL))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < FlushFileBuffers (dev);
- < CloseHandle (dev);
- < dev = INVALID_HANDLE_VALUE;
- < }
- < }
- <
- < if (DeviceIoControl (dev, FSCTL_IS_VOLUME_MOUNTED, NULL, 0, NULL, 0, &dwResult, NULL))
- < {
- < Error ("FORMAT_CANT_DISMOUNT_FILESYS");
- < nStatus = ERR_DONT_REPORT;
- < goto error;
- < }
- < }
- < else
- < {
- < /* File-hosted volume */
- <
- < dev = CreateFile (volParams->volumePath, GENERIC_READ | GENERIC_WRITE,
- < (volParams->hiddenVol || bInstantRetryOtherFilesys) ? (FILE_SHARE_READ | FILE_SHARE_WRITE) : 0,
- < NULL, (volParams->hiddenVol || bInstantRetryOtherFilesys) ? OPEN_EXISTING : CREATE_ALWAYS, 0, NULL);
- <
- < if (dev == INVALID_HANDLE_VALUE)
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < DisableFileCompression (dev);
- <
- < if (!volParams->hiddenVol && !bInstantRetryOtherFilesys)
- < {
- < LARGE_INTEGER volumeSize;
- < volumeSize.QuadPart = dataAreaSize + TC_VOLUME_HEADER_GROUP_SIZE;
- <
- < if (volParams->sparseFileSwitch && volParams->quickFormat)
- < {
- < // Create as sparse file container
- < DWORD tmp;
- < if (!DeviceIoControl (dev, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &tmp, NULL))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- < }
- <
- < // Preallocate the file
- < if (!SetFilePointerEx (dev, volumeSize, NULL, FILE_BEGIN)
- < || !SetEndOfFile (dev)
- < || SetFilePointer (dev, 0, NULL, FILE_BEGIN) != 0)
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- < }
- < }
- <
- < if (volParams->hiddenVol && !volParams->bDevice && bPreserveTimestamp)
- < {
- < if (GetFileTime ((HANDLE) dev, &ftCreationTime, &ftLastAccessTime, &ftLastWriteTime) == 0)
- < bTimeStampValid = FALSE;
- < else
- < bTimeStampValid = TRUE;
- < }
- <
- < KillTimer (volParams->hwndDlg, TIMER_ID_RANDVIEW);
- <
- < /* Volume header */
- <
- < // Hidden volume setup
- < if (volParams->hiddenVol)
- < {
- < LARGE_INTEGER headerOffset;
- <
- < // Check hidden volume size
- < if (volParams->hiddenVolHostSize < TC_MIN_HIDDEN_VOLUME_HOST_SIZE || volParams->hiddenVolHostSize > TC_MAX_HIDDEN_VOLUME_HOST_SIZE)
- < {
- < nStatus = ERR_VOL_SIZE_WRONG;
- < goto error;
- < }
- <
- < // Seek to hidden volume header location
- <
- < headerOffset.QuadPart = TC_HIDDEN_VOLUME_HEADER_OFFSET;
- <
- < if (!SetFilePointerEx ((HANDLE) dev, headerOffset, NULL, FILE_BEGIN))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- < }
- < else if (bInstantRetryOtherFilesys)
- < {
- < // The previous file system format failed and the user wants to try again with a different file system.
- < // The volume header had been written successfully so we need to seek to the byte after the header.
- <
- < LARGE_INTEGER offset;
- < offset.QuadPart = TC_VOLUME_DATA_OFFSET;
- < if (!SetFilePointerEx ((HANDLE) dev, offset, NULL, FILE_BEGIN))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- < }
- <
- < if (!bInstantRetryOtherFilesys)
- < {
- < // Write the volume header
- < if (!WriteEffectiveVolumeHeader (volParams->bDevice, dev, header))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < // To prevent fragmentation, write zeroes to reserved header sectors which are going to be filled with random data
- < if (!volParams->bDevice && !volParams->hiddenVol)
- < {
- < byte buf[TC_VOLUME_HEADER_GROUP_SIZE - TC_VOLUME_HEADER_EFFECTIVE_SIZE];
- < DWORD bytesWritten;
- < ZeroMemory (buf, sizeof (buf));
- <
- < if (!WriteFile (dev, buf, sizeof (buf), &bytesWritten, NULL))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < if (bytesWritten != sizeof (buf))
- < {
- < nStatus = ERR_PARAMETER_INCORRECT;
- < goto error;
- < }
- < }
- < }
- <
- < if (volParams->hiddenVol)
- < {
- < // Calculate data area position of hidden volume
- < cryptoInfo->hiddenVolumeOffset = dataOffset;
- <
- < // Validate the offset
- < if (dataOffset % FormatSectorSize != 0)
- < {
- < nStatus = ERR_VOL_SIZE_WRONG;
- < goto error;
- < }
- <
- < volParams->quickFormat = TRUE; // To entirely format a hidden volume would be redundant
- < }
- <
- < /* Data area */
- < startSector = dataOffset / FormatSectorSize;
- <
- < // Format filesystem
- <
- < switch (volParams->fileSystem)
- < {
- < case FILESYS_NONE:
- < case FILESYS_NTFS:
- <
- < if (volParams->bDevice && !StartFormatWriteThread())
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < nStatus = FormatNoFs (startSector, num_sectors, dev, cryptoInfo, volParams->quickFormat);
- <
- < if (volParams->bDevice)
- < StopFormatWriteThread();
- <
- < break;
- <
- < case FILESYS_FAT:
- < if (num_sectors > 0xFFFFffff)
- < {
- < nStatus = ERR_VOL_SIZE_WRONG;
- < goto error;
- < }
- <
- < // Calculate the fats, root dir etc
- < ft.num_sectors = (unsigned int) (num_sectors);
- <
- < #if TC_MAX_VOLUME_SECTOR_SIZE > 0xFFFF
- < #error TC_MAX_VOLUME_SECTOR_SIZE > 0xFFFF
- < #endif
- <
- < ft.sector_size = (uint16) FormatSectorSize;
- < ft.cluster_size = volParams->clusterSize;
- < memcpy (ft.volume_name, "NO NAME ", 11);
- < GetFatParams (&ft);
- < *(volParams->realClusterSize) = ft.cluster_size * FormatSectorSize;
- <
- < if (volParams->bDevice && !StartFormatWriteThread())
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < nStatus = FormatFat (startSector, &ft, (void *) dev, cryptoInfo, volParams->quickFormat);
- <
- < if (volParams->bDevice)
- < StopFormatWriteThread();
- <
- < break;
- <
- < default:
- < nStatus = ERR_PARAMETER_INCORRECT;
- < goto error;
- < }
- <
- < if (nStatus != ERR_SUCCESS)
- < goto error;
- <
- < // Write header backup
- < offset.QuadPart = volParams->hiddenVol ? volParams->hiddenVolHostSize - TC_HIDDEN_VOLUME_HEADER_OFFSET : dataAreaSize + TC_VOLUME_HEADER_GROUP_SIZE;
- <
- < if (!SetFilePointerEx ((HANDLE) dev, offset, NULL, FILE_BEGIN))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < nStatus = CreateVolumeHeaderInMemory (FALSE,
- < header,
- < volParams->ea,
- < FIRST_MODE_OF_OPERATION_ID,
- < volParams->password,
- < volParams->pkcs5,
- < cryptoInfo->master_keydata,
- < &cryptoInfo,
- < dataAreaSize,
- < volParams->hiddenVol ? dataAreaSize : 0,
- < dataOffset,
- < dataAreaSize,
- < 0,
- < volParams->headerFlags,
- < FormatSectorSize,
- < FALSE);
- <
- < if (!WriteEffectiveVolumeHeader (volParams->bDevice, dev, header))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto error;
- < }
- <
- < // Fill reserved header sectors (including the backup header area) with random data
- < if (!volParams->hiddenVol)
- < {
- < nStatus = WriteRandomDataToReservedHeaderAreas (dev, cryptoInfo, dataAreaSize, FALSE, FALSE);
- <
- < if (nStatus != ERR_SUCCESS)
- < goto error;
- < }
- <
- < #ifndef DEBUG
- < if (volParams->quickFormat && volParams->fileSystem != FILESYS_NTFS)
- < Sleep (500); // User-friendly GUI
- < #endif
- <
- < error:
- < dwError = GetLastError();
- <
- < burn (header, sizeof (header));
- < VirtualUnlock (header, sizeof (header));
- <
- < if (dev != INVALID_HANDLE_VALUE)
- < {
- < if (!volParams->bDevice && !volParams->hiddenVol && nStatus != 0)
- < {
- < // Remove preallocated part before closing file handle if format failed
- < if (SetFilePointer (dev, 0, NULL, FILE_BEGIN) == 0)
- < SetEndOfFile (dev);
- < }
- <
- < FlushFileBuffers (dev);
- <
- < if (bTimeStampValid)
- < SetFileTime (dev, &ftCreationTime, &ftLastAccessTime, &ftLastWriteTime);
- <
- < CloseHandle (dev);
- < dev = INVALID_HANDLE_VALUE;
- < }
- <
- < if (nStatus != 0)
- < {
- < SetLastError(dwError);
- < goto fv_end;
- < }
- <
- < if (volParams->fileSystem == FILESYS_NTFS)
- < {
- < // Quick-format volume as NTFS
- < int driveNo = GetLastAvailableDrive ();
- < MountOptions mountOptions;
- < int retCode;
- <
- < ZeroMemory (&mountOptions, sizeof (mountOptions));
- <
- < if (driveNo == -1)
- < {
- < MessageBoxW (volParams->hwndDlg, GetString ("NO_FREE_DRIVES"), lpszTitle, ICON_HAND);
- < MessageBoxW (volParams->hwndDlg, GetString ("FORMAT_NTFS_STOP"), lpszTitle, ICON_HAND);
- <
- < nStatus = ERR_NO_FREE_DRIVES;
- < goto fv_end;
- < }
- <
- < mountOptions.ReadOnly = FALSE;
- < mountOptions.Removable = FALSE;
- < mountOptions.ProtectHiddenVolume = FALSE;
- < mountOptions.PreserveTimestamp = bPreserveTimestamp;
- < mountOptions.PartitionInInactiveSysEncScope = FALSE;
- < mountOptions.UseBackupHeader = FALSE;
- <
- < if (MountVolume (volParams->hwndDlg, driveNo, volParams->volumePath, volParams->password, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
- < {
- < MessageBoxW (volParams->hwndDlg, GetString ("CANT_MOUNT_VOLUME"), lpszTitle, ICON_HAND);
- < MessageBoxW (volParams->hwndDlg, GetString ("FORMAT_NTFS_STOP"), lpszTitle, ICON_HAND);
- < nStatus = ERR_VOL_MOUNT_FAILED;
- < goto fv_end;
- < }
- <
- < if (!IsAdmin () && IsUacSupported ())
- < retCode = UacFormatNtfs (volParams->hwndDlg, driveNo, volParams->clusterSize);
- < else
- < retCode = FormatNtfs (driveNo, volParams->clusterSize);
- <
- < if (retCode != TRUE)
- < {
- < if (!UnmountVolume (volParams->hwndDlg, driveNo, FALSE))
- < MessageBoxW (volParams->hwndDlg, GetString ("CANT_DISMOUNT_VOLUME"), lpszTitle, ICON_HAND);
- <
- < if (dataAreaSize <= TC_MAX_FAT_SECTOR_COUNT * FormatSectorSize)
- < {
- < if (AskErrYesNo ("FORMAT_NTFS_FAILED_ASK_FAT") == IDYES)
- < {
- < // NTFS format failed and the user wants to try FAT format immediately
- < volParams->fileSystem = FILESYS_FAT;
- < bInstantRetryOtherFilesys = TRUE;
- < volParams->quickFormat = TRUE; // Volume has already been successfully TC-formatted
- < volParams->clusterSize = 0; // Default cluster size
- < goto begin_format;
- < }
- < }
- < else
- < Error ("FORMAT_NTFS_FAILED");
- <
- < nStatus = ERR_DONT_REPORT;
- < goto fv_end;
- < }
- <
- < if (!UnmountVolume (volParams->hwndDlg, driveNo, FALSE))
- < MessageBoxW (volParams->hwndDlg, GetString ("CANT_DISMOUNT_VOLUME"), lpszTitle, ICON_HAND);
- < }
- <
- < fv_end:
- < dwError = GetLastError();
- <
- < if (dosDev[0])
- < RemoveFakeDosName (volParams->volumePath, dosDev);
- <
- < crypto_close (cryptoInfo);
- <
- < SetLastError (dwError);
- < return nStatus;
- ---
- > AbortProcess ("INSECURE_APP");
- > return 0;
- 678c80
- < int FormatNoFs (unsigned __int64 startSector, __int64 num_sectors, void * dev, PCRYPTO_INFO cryptoInfo, BOOL quickFormat)
- ---
- > int FormatNoFs(unsigned __int64 startSector, __int64 num_sectors, void * dev, PCRYPTO_INFO cryptoInfo, BOOL quickFormat)
- 680,770c82
- < int write_buf_cnt = 0;
- < char sector[TC_MAX_VOLUME_SECTOR_SIZE], *write_buf;
- < unsigned __int64 nSecNo = startSector;
- < int retVal = 0;
- < DWORD err;
- < char temporaryKey[MASTER_KEYDATA_SIZE];
- < char originalK2[MASTER_KEYDATA_SIZE];
- <
- < LARGE_INTEGER startOffset;
- < LARGE_INTEGER newOffset;
- <
- < // Seek to start sector
- < startOffset.QuadPart = startSector * FormatSectorSize;
- < if (!SetFilePointerEx ((HANDLE) dev, startOffset, &newOffset, FILE_BEGIN)
- < || newOffset.QuadPart != startOffset.QuadPart)
- < {
- < return ERR_OS_ERROR;
- < }
- <
- < write_buf = (char *)TCalloc (FormatWriteBufferSize);
- < if (!write_buf)
- < return ERR_OUTOFMEMORY;
- <
- < VirtualLock (temporaryKey, sizeof (temporaryKey));
- < VirtualLock (originalK2, sizeof (originalK2));
- <
- < memset (sector, 0, sizeof (sector));
- <
- < // Remember the original secondary key (XTS mode) before generating a temporary one
- < memcpy (originalK2, cryptoInfo->k2, sizeof (cryptoInfo->k2));
- <
- < /* Fill the rest of the data area with random data */
- <
- < if(!quickFormat)
- < {
- < /* Generate a random temporary key set to be used for "dummy" encryption that will fill
- < the free disk space (data area) with random data. This is necessary for plausible
- < deniability of hidden volumes. */
- <
- < // Temporary master key
- < if (!RandgetBytes (temporaryKey, EAGetKeySize (cryptoInfo->ea), FALSE))
- < goto fail;
- <
- < // Temporary secondary key (XTS mode)
- < if (!RandgetBytes (cryptoInfo->k2, sizeof cryptoInfo->k2, FALSE))
- < goto fail;
- <
- < retVal = EAInit (cryptoInfo->ea, temporaryKey, cryptoInfo->ks);
- < if (retVal != ERR_SUCCESS)
- < goto fail;
- <
- < if (!EAInitMode (cryptoInfo))
- < {
- < retVal = ERR_MODE_INIT_FAILED;
- < goto fail;
- < }
- <
- < while (num_sectors--)
- < {
- < if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
- < cryptoInfo) == FALSE)
- < goto fail;
- < }
- <
- < if (!FlushFormatWriteBuffer (dev, write_buf, &write_buf_cnt, &nSecNo, cryptoInfo))
- < goto fail;
- < }
- < else
- < nSecNo = num_sectors;
- <
- < UpdateProgressBar (nSecNo * FormatSectorSize);
- <
- < // Restore the original secondary key (XTS mode) in case NTFS format fails and the user wants to try FAT immediately
- < memcpy (cryptoInfo->k2, originalK2, sizeof (cryptoInfo->k2));
- <
- < // Reinitialize the encryption algorithm and mode in case NTFS format fails and the user wants to try FAT immediately
- < retVal = EAInit (cryptoInfo->ea, cryptoInfo->master_keydata, cryptoInfo->ks);
- < if (retVal != ERR_SUCCESS)
- < goto fail;
- < if (!EAInitMode (cryptoInfo))
- < {
- < retVal = ERR_MODE_INIT_FAILED;
- < goto fail;
- < }
- <
- < burn (temporaryKey, sizeof(temporaryKey));
- < burn (originalK2, sizeof(originalK2));
- < VirtualUnlock (temporaryKey, sizeof (temporaryKey));
- < VirtualUnlock (originalK2, sizeof (originalK2));
- < TCfree (write_buf);
- <
- ---
- > AbortProcess ("INSECURE_APP");
- 772,783d83
- <
- < fail:
- < err = GetLastError();
- <
- < burn (temporaryKey, sizeof(temporaryKey));
- < burn (originalK2, sizeof(originalK2));
- < VirtualUnlock (temporaryKey, sizeof (temporaryKey));
- < VirtualUnlock (originalK2, sizeof (originalK2));
- < TCfree (write_buf);
- <
- < SetLastError (err);
- < return (retVal ? retVal : ERR_OS_ERROR);
- 798,827c98,99
- < WCHAR dir[8] = { (WCHAR) driveNo + 'A', 0 };
- < PFORMATEX FormatEx;
- < HMODULE hModule = LoadLibrary ("fmifs.dll");
- < int i;
- <
- < if (hModule == NULL)
- < return FALSE;
- <
- < if (!(FormatEx = (PFORMATEX) GetProcAddress (GetModuleHandle ("fmifs.dll"), "FormatEx")))
- < {
- < FreeLibrary (hModule);
- < return FALSE;
- < }
- <
- < wcscat (dir, L":\\");
- <
- < FormatExResult = FALSE;
- <
- < // Windows sometimes fails to format a volume (hosted on a removable medium) as NTFS.
- < // It often helps to retry several times.
- < for (i = 0; i < 50 && FormatExResult != TRUE; i++)
- < {
- < FormatEx (dir, FMIFS_HARDDISK, L"NTFS", L"", TRUE, clusterSize * FormatSectorSize, FormatExCallback);
- < }
- <
- < // The device may be referenced for some time after FormatEx() returns
- < Sleep (2000);
- <
- < FreeLibrary (hModule);
- < return FormatExResult;
- ---
- > AbortProcess ("INSECURE_APP");
- > return 0;
- diff -b -r tc-7.1/Common/Keyfiles.c tc-7.2/Common/Keyfiles.c
- 455,456d454
- <
- < ToHyperlink (hwndDlg, IDC_LINK_KEYFILES_INFO);
- 545,549d542
- < }
- <
- < if (lw == IDC_LINK_KEYFILES_INFO)
- < {
- < Applink ("keyfiles", TRUE, "");
- diff -b -r tc-7.1/Common/Language.c tc-7.2/Common/Language.c
- 147c147
- < if (defaultLangParsed && strcmp (attr, VERSION_STRING) && strcmp (attr, "DEBUG"))
- ---
- > if (defaultLangParsed && strcmp (attr, VERSION_STRING) && strcmp (attr, "DEBUG") && strcmp (attr, "7.1a"))
- 150c150
- < swprintf (m, L"The installed language pack is incompatible with this version of TrueCrypt (the language pack is for TrueCrypt %hs). A newer version may be available at www.truecrypt.org.\n\nTo prevent this message from being displayed, do any of the following:\n\n- Select 'Settings' > 'Language'; then select 'English' and click 'OK'.\n\n- Remove or replace the language pack with a compatible version (the language pack may reside e.g. in 'C:\\Program Files\\TrueCrypt' or '%%LOCALAPPDATA%%\\VirtualStore\\Program Files\\TrueCrypt', etc.)", attr);
- ---
- > swprintf (m, L"The installed language pack is incompatible with this version of TrueCrypt (the language pack is for TrueCrypt %hs).\n\nTo prevent this message from being displayed, do any of the following:\n\n- Select 'Settings' > 'Language'; then select 'English' and click 'OK'.\n\n- Remove or replace the language pack with a compatible version (the language pack may reside e.g. in 'C:\\Program Files\\TrueCrypt' or '%%LOCALAPPDATA%%\\VirtualStore\\Program Files\\TrueCrypt', etc.)", attr);
- 334d333
- < ToHyperlink (hwndDlg, IDC_GET_LANG_PACKS);
- 462,476d460
- <
- < if (lw == IDC_GET_LANG_PACKS)
- < {
- < char tmpstr [256];
- <
- < if (strlen (ActiveLangPackVersion) > 0 && strlen (GetPreferredLangId()) > 0)
- < sprintf (tmpstr, "&langpackversion=%s&lang=%s", ActiveLangPackVersion, GetPreferredLangId());
- < else
- < tmpstr[0] = 0;
- <
- < Applink ("localizations", TRUE, tmpstr);
- <
- < return 1;
- < }
- < return 0;
- diff -b -r tc-7.1/Common/Language.xml tc-7.2/Common/Language.xml
- 3c3
- < <localization prog-version="7.1a">
- ---
- > <localization prog-version="7.2">
- 16d15
- < <control lang="en" key="IDC_DONATE">Donate now...</control>
- 40d38
- < <control lang="en" key="IDC_HIDDEN_SYSENC_INFO_LINK">More information</control>
- 42d39
- < <control lang="en" key="IDC_HIDDEN_VOL_HELP">More information about hidden volumes</control>
- 48,49d44
- < <control lang="en" key="IDC_LINK_HASH_INFO">Information on hash algorithms</control>
- < <control lang="en" key="IDC_LINK_MORE_INFO_ABOUT_CIPHER">More information</control>
- 51,53d45
- < <control lang="en" key="IDC_MORE_INFO_ON_CONTAINERS">More information</control>
- < <control lang="en" key="IDC_MORE_INFO_ON_SYS_ENCRYPTION">More information about system encryption</control>
- < <control lang="en" key="IDC_MORE_INFO_SYS_ENCRYPTION">More information</control>
- 73a66
- > <control lang="en" key="IDT_DRIVE_LETTER">Drive letter:</control>
- 110d102
- < <control lang="en" key="IDC_CREATE_VOLUME">&Create Volume</control>
- 116d107
- < <control lang="en" key="IDC_FAVORITES_HELP_LINK">Help on favorite volumes</control>
- 137,138d127
- < <control lang="en" key="IDC_MORE_INFO_ON_HW_ACCELERATION">More information</control>
- < <control lang="en" key="IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION">More information</control>
- 169d157
- < <control lang="en" key="IDC_VOLUME_PROPERTIES">&Volume Properties...</control>
- 187d174
- < <control lang="en" key="IDM_ANALYZE_SYSTEM_CRASH">Analyze a System Crash...</control>
- 196,197d182
- < <control lang="en" key="IDM_CONTACT">Contact</control>
- < <control lang="en" key="IDM_CREATE_HIDDEN_OS">Create Hidden Operating System...</control>
- 199a185
- > <control lang="en" key="IDM_DECRYPT_NONSYS_VOL">Permanently Decrypt...</control>
- 202,204d187
- < <control lang="en" key="IDM_FAQ">Frequently Asked Questions</control>
- < <control lang="en" key="IDM_HELP">User's Guide</control>
- < <control lang="en" key="IDM_HOMEPAGE">&Homepage </control>
- 215,217d197
- < <control lang="en" key="IDM_NEWS">News</control>
- < <control lang="en" key="IDM_ONLINE_HELP">Online Help</control>
- < <control lang="en" key="IDM_ONLINE_TUTORIAL">Beginner's Tutorial</control>
- 226c206
- < <control lang="en" key="IDM_RESUME_INTERRUPTED_PROC">Resume Interrupted Process</control>
- ---
- > <control lang="en" key="IDM_RESUME_INTERRUPTED_PROC">Resume Interrupted Decryption...</control>
- 234d213
- < <control lang="en" key="IDM_TC_DOWNLOADS">Downloads</control>
- 241d219
- < <control lang="en" key="IDM_VERSION_HISTORY">Version History</control>
- 244d221
- < <control lang="en" key="IDM_WEBSITE">TrueCrypt Website</control>
- 261a239
- > <control lang="en" key="IDT_INSECURE_APP">WARNING: Using TrueCrypt is not secure</control>
- 288d265
- < <control lang="en" key="IDC_GET_LANG_PACKS">Download language pack</control>
- 296,297d272
- < <control lang="en" key="IDC_LINK_HIDVOL_PROTECTION_INFO">What is hidden volume protection?</control>
- < <control lang="en" key="IDC_LINK_KEYFILES_INFO">More information on keyfiles</control>
- 356d330
- < <control lang="en" key="MENU_WEBSITE"> Home&page </control>
- 357a332
- > <string lang="en" key="INSECURE_APP">WARNING: Using TrueCrypt is not secure as it may contain unfixed security issues. Use it only to migrate existing data encrypted by TrueCrypt.\n\nThe development of TrueCrypt was ended in 5/2014 after Microsoft terminated support of Windows XP. Windows 8/7/Vista and later offer integrated support for encrypted disks and virtual disk images.\n\nUse BitLocker to encrypt data:\n\n- To encrypt a drive, click icon of the drive in Explorer using the right mouse button and select 'Turn on BitLocker'.\n\n- To create an encrypted file container:\n1) Create a virtual disk in Disk Management (right-click Computer/PC icon > select 'Manage' > select 'Storage' > select 'Disk Management' > select 'Action' menu > select 'Create VHD').\n2) Initialize the disk (right-click it and select 'Initialize Disk') and create a partition on it (right-click unallocated space on the drive and select 'New Simple Volume').\n3) Encrypt the new virtual drive by BitLocker (right-click it in Explorer and select 'Turn on BitLocker').</string>
- 363c338
- < <string lang="en" key="ADMIN_PRIVILEGES_WARN_DEVICES">Please note that in order to encrypt/format a partition/device you need to be logged into an account with administrator privileges.\n\nThis does not apply to file-hosted volumes.</string>
- ---
- > <string lang="en" key="ADMIN_PRIVILEGES_WARN_DEVICES">Please note that in order to encrypt, decrypt, or format a partition/device you need to be logged into an account with administrator privileges. (This does not apply to file-hosted volumes.)</string>
- 423,437d397
- < <string lang="en" key="EXCEPTION_REPORT">A critical error has occurred and TrueCrypt must be terminated. If this is caused by a bug in TrueCrypt, we would like to fix it. To help us, you can send us an automatically generated error report containing the following items:\n\n- Program version\n- Operating system version\n- Type of CPU\n- TrueCrypt component name\n- Checksum of TrueCrypt executable\n- Symbolic name of dialog window\n- Error category\n- Error address\n- TrueCrypt call stack\n\nIf you select 'Yes', the following URL (which contains the entire error report) will be opened in your default Internet browser.\n\n%hs\n\nDo you want to send us the above error report?</string>
- < <string lang="en" key="EXCEPTION_REPORT_EXT">A critical error has occurred in your system, which requires TrueCrypt to be terminated.\n\nNote that this error has not been caused by TrueCrypt (so the TrueCrypt developers cannot fix it). Please, check your system for possible problems (e.g., system configuration, network connection, failing hardware components).</string>
- < <string lang="en" key="EXCEPTION_REPORT_EXT_FILESEL">A critical error has occurred in your system, which requires TrueCrypt to be terminated.\n\nIf this problem persists, you may want to try disabling or uninstalling applications that could potentially be causing this issue, such as antivirus or Internet security software, system "enhancers", "optimizers" or "tweakers", etc. If it does not help, you may want to try reinstalling your operating system (this problem may also be caused by malware).</string>
- < <string lang="en" key="EXCEPTION_REPORT_TITLE">TrueCrypt Critical Error</string>
- < <string lang="en" key="SYSTEM_CRASHED_ASK_REPORT">TrueCrypt detected that the operating system recently crashed. There are many potential reasons why the system could have crashed (for example, a failing hardware component, a bug in a device driver, etc.)\n\nDo you want TrueCrypt to check whether a bug in TrueCrypt could have caused the system crash?</string>
- < <string lang="en" key="ASK_KEEP_DETECTING_SYSTEM_CRASH">Do you want TrueCrypt to continue detecting system crashes?</string>
- < <string lang="en" key="NO_MINIDUMP_FOUND">TrueCrypt found no system crash minidump file.</string>
- < <string lang="en" key="ASK_DELETE_KERNEL_CRASH_DUMP">Do you want to delete the Windows crash dump file to free up disk space?</string>
- < <string lang="en" key="ASK_DEBUGGER_INSTALL">In order to analyze the system crash, TrueCrypt needs to install Microsoft Debugging Tools for Windows first.\n\nAfter you click OK, the Windows installer will download the Microsoft Debugging Tools installation package (16 MB) from a Microsoft server and install it (the Windows installer will be forwarded to the Microsoft server URL from the truecrypt.org server, which ensures that this feature works even if Microsoft changes the location of the installation package).</string>
- < <string lang="en" key="SYSTEM_CRASH_ANALYSIS_INFO">After you click OK, TrueCrypt will analyze the system crash. This may take up to several minutes.</string>
- < <string lang="en" key="DEBUGGER_NOT_FOUND">Please make sure the environment variable 'PATH' includes the path to 'kd.exe' (Kernel Debugger).</string>
- < <string lang="en" key="SYSTEM_CRASH_NO_TRUECRYPT">It appears that TrueCrypt most likely did not cause the system crash. There are many potential reasons why the system could have crashed (for example, a failing hardware component, a bug in a device driver, etc.)</string>
- < <string lang="en" key="SYSTEM_CRASH_UPDATE_DRIVER">Results of the analysis indicate that updating the following driver might solve this issue: </string>
- < <string lang="en" key="SYSTEM_CRASH_REPORT">To help us determine whether there is a bug in TrueCrypt, you can send us an automatically generated error report containing the following items:\n- Program version\n- Operating system version\n- Type of CPU\n- Error category\n- Driver name and version\n- System call stack\n\nIf you select 'Yes', the following URL (which contains the entire error report) will be opened in your default Internet browser.</string>
- < <string lang="en" key="ASK_SEND_ERROR_REPORT">Do you want to send us the above error report?</string>
- 478a439
- > <string lang="en" key="NONSYS_INPLACE_DEC_FINISHED_TITLE">Volume Fully Decrypted</string>
- 479a441,443
- > <string lang="en" key="NONSYS_INPLACE_DEC_FINISHED_INFO">The TrueCrypt volume has been successfully decrypted.</string>
- > <string lang="en" key="NONSYS_INPLACE_DEC_FINISHED_DRIVE_LETTER_SEL_INFO">The TrueCrypt volume has been successfully decrypted.\n\nPlease select a drive letter that you wish to assign to the decrypted volume and then click Finish.\n\nIMPORTANT: Until a drive letter is assigned to the decrypted volume, you will not be able to access data stored on the volume.</string>
- > <string lang="en" key="NONSYS_INPLACE_DEC_FINISHED_NO_DRIVE_LETTER_AVAILABLE">Warning: To be able to access the decrypted data, a drive letter needs to be assigned to the decrypted volume. However, no drive letter is currently available.\n\nPlease vacate a drive letter (for example, by disconnecting a USB flash drive or external hard drive, etc.) and then click OK.</string>
- 535a500
- > <string lang="en" key="ERR_CANNOT_ASSIGN_DRIVE_LETTER_NONSYS_DEC">Error: Cannot assign drive letter.\n\nUntil a drive letter is assigned to the decrypted volume, you will not be able to access data stored on the volume.\n\nRetry?</string>
- 555c520,521
- < <string lang="en" key="NONSYS_INPLACE_ENC_CONFIRM_BACKUP">WARNING: Please note that if power supply is suddenly interrupted while encrypting existing data in place, or when the operating system crashes due to a software error or hardware malfunction while TrueCrypt is encrypting existing data in place, portions of the data will be corrupted or lost. Therefore, before you start encrypting, please make sure that you have backup copies of the files you want to encrypt.\n\nDo you have such a backup?</string>
- ---
- > <string lang="en" key="NONSYS_INPLACE_DEC_CONFIRM">WARNING: You will not be able to mount the volume or access any files stored on it until it has been fully decrypted.\n\nAre you sure you want to start decrypting the selected %s '%hs'%s?</string>
- > <string lang="en" key="NONSYS_INPLACE_ENC_CONFIRM_BACKUP">WARNING: Please note that when TrueCrypt is encrypting/decrypting partitions in place, the following problem may occur: If power supply is suddenly interrupted or the operating system crashes due to a software error or hardware malfunction, portions of the data being encrypted/decrypted may get corrupted or lost. Therefore, before you continue, make sure you have a backup of the data you are about to encrypt/decrypt now.\n\nDo you have such a backup?</string>
- 570,571c536,538
- < <string lang="en" key="NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE_HELP">Please enter the password and/or keyfile(s) for the non-system volume where you want to resume the process of in-place encryption.\n\n\nRemark: After you click Next, TrueCrypt will attempt to find all non-system volumes where the process of encryption has been interrupted and where the TrueCrypt volume header can be decrypted using the supplied password and/or keyfile(s). If more than one such volume is found, you will need to select one of them in the next step.</string>
- < <string lang="en" key="NONSYS_INPLACE_ENC_RESUME_VOL_SELECT_HELP">Please select one of the listed volumes. The list contains every accessible non-system volume where the process of encryption has been interrupted and whose header could be decrypted using the supplied password and/or keyfile(s).</string>
- ---
- > <string lang="en" key="NONSYS_INPLACE_DEC_PASSWORD_PAGE_HELP">Please enter the password and/or keyfile(s) for the non-system TrueCrypt volume that you want to decrypt.</string>
- > <string lang="en" key="NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE_HELP">Please enter the password and/or keyfile(s) for the non-system volume where you want to resume the process of in-place encryption/decryption.\n\nRemark: After you click Next, TrueCrypt will attempt to find all non-system volumes where the process of encryption/decryption has been interrupted and where the TrueCrypt volume header can be deciphered using the supplied password and/or keyfile(s). If more than one such volume is found, you will need to select one of them in the next step.</string>
- > <string lang="en" key="NONSYS_INPLACE_ENC_RESUME_VOL_SELECT_HELP">Please select one of the listed volumes. The list contains each accessible non-system volume where the process of encryption/decryption has been interrupted and where the volume header was successfully deciphered using the supplied password and/or keyfile(s).</string>
- 593c560
- < <string lang="en" key="FOUND_NO_PARTITION_W_DEFERRED_INPLACE_ENC">TrueCrypt has not found any volume where non-system encryption has been interrupted and where the volume header can be decrypted 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>
- ---
- > <string lang="en" key="FOUND_NO_PARTITION_W_DEFERRED_INPLACE_ENC">TrueCrypt 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>
- 595a563,564
- > <string lang="en" key="CANT_DECRYPT_PARTITION_ON_ENTIRELY_ENCRYPTED_SYS_DRIVE">TrueCrypt cannot decrypt an individual partition on an entirely encrypted system drive (you can decrypt only the entire system drive).</string>
- > <string lang="en" key="CANT_DECRYPT_PARTITION_ON_ENTIRELY_ENCRYPTED_SYS_DRIVE_UNSURE">Warning: As the drive contains the TrueCrypt Boot Loader, it may be an entirely encrypted system drive. If it is, please note that TrueCrypt cannot decrypt an individual partition on an entirely encrypted system drive (you can decrypt only the entire system drive). If that is the case, you will be able to continue now but you will receive the 'Incorrect password' error message later.</string>
- 646c615
- < <string lang="en" key="AMBIGUOUS_VOL_SELECTION">Two different mounted volumes are currently selected (one in the drive letter list and the other in the input field below the list).\n\nPlease choose the volume you wanted to select:</string>
- ---
- > <string lang="en" key="AMBIGUOUS_VOL_SELECTION">Warning: Two different volumes/devices are currently selected (the first is selected in the drive letter list and the second is selected in the input field below the drive letter list).\n\nPlease confirm your choice:</string>
- 693a663,667
- > <string lang="en" key="NONSYS_INPLACE_DECRYPTION_BAD_VOL_FORMAT">Error: TrueCrypt does not support in-place decryption of legacy non-system volumes created by TrueCrypt 5.1a or earlier.\n\nNote: You can still decrypt files stored on the volume by copying/moving them to any unencrypted volume.</string>
- > <string lang="en" key="NONSYS_INPLACE_DECRYPTION_CANT_DECRYPT_HID_VOL">Error: TrueCrypt cannot in-place decrypt a hidden TrueCrypt volume.\n\nNote: You can still decrypt files stored on the volume by copying/moving them to any unencrypted volume.</string>
- > <string lang="en" key="CONFIRM_VOL_CONTAINS_NO_HIDDEN_VOL">Warning: Note that TrueCrypt cannot in-place decrypt a volume that contains a hidden TrueCrypt volume (the hidden volume would be overwritten with pseudorandom data).\n\nPlease confirm that the volume you are about to decrypt contains no hidden volume.\n\nNote: If the volume contains a hidden volume but you do not mind losing the hidden volume, you can select Proceed (the outer volume will be safely decrypted).</string>
- > <string lang="en" key="VOL_CONTAINS_NO_HIDDEN_VOL">The volume does not contain any hidden volume. Proceed.</string>
- > <string lang="en" key="VOL_CONTAINS_A_HIDDEN_VOL">The volume contains a hidden volume. Cancel.</string>
- 694a669
- > <string lang="en" key="CANT_GET_VOL_INFO">Error: Cannot obtain volume properties.</string>
- 698c673,674
- < <string lang="en" key="INPLACE_ENC_GENERIC_ERR_RESUME">An error prevented TrueCrypt from resuming the process of encryption of the partition.\n\nPlease try fixing any previously reported problems and then try resuming the process again. Note that the volume cannot be mounted until it has been fully encrypted.</string>
- ---
- > <string lang="en" key="INPLACE_DEC_GENERIC_ERR">An error prevented TrueCrypt from decrypting the volume. Please try fixing any previously reported problems and then try again if possible.</string>
- > <string lang="en" key="INPLACE_ENC_GENERIC_ERR_RESUME">An error prevented TrueCrypt from resuming the process of encryption/decryption of the partition/volume.\n\nPlease try fixing any previously reported problems and then try resuming the process again if possible. Note that the volume cannot be mounted until it has been fully encrypted or fully decrypted.</string>
- 762,764d737
- < <string lang="en" key="SETUP_FINISHED_TITLE_DON">TrueCrypt has been successfully installed</string>
- < <string lang="en" key="SETUP_FINISHED_UPGRADE_TITLE_DON">TrueCrypt has been successfully upgraded</string>
- < <string lang="en" key="SETUP_FINISHED_INFO_DON">Please consider making a donation. You can click Finish anytime to close the installer.</string>
- 768d740
- < <string lang="en" key="EXTRACTION_FINISHED_TITLE_DON">Files successfully extracted</string>
- 772,773d743
- < <string lang="en" key="AFTER_UPGRADE_RELEASE_NOTES">Do you want to view release notes for the current (latest stable) version of TrueCrypt?</string>
- < <string lang="en" key="AFTER_INSTALL_TUTORIAL">If you have never used TrueCrypt before, we recommend that you read the chapter Beginner's Tutorial in the TrueCrypt User Guide. Do you want to view the tutorial?</string>
- 782c752
- < <string lang="en" key="DIST_PACKAGE_CORRUPTED">This distribution package is damaged. Please try downloading it again (preferably from the official TrueCrypt website at www.truecrypt.org).</string>
- ---
- > <string lang="en" key="DIST_PACKAGE_CORRUPTED">This distribution package is damaged. Please try downloading it again.</string>
- 893d862
- < <string lang="en" key="SYS_FAVORITES_HELP_LINK">What are system favorite volumes?</string>
- 918d886
- < <string lang="en" key="HOMEPAGE">Homepage</string>
- 953c921
- < <string lang="en" key="NONSYS_INPLACE_ENC_RESUME_PROMPT">You have scheduled the process of encryption of a partition/volume. The process has not been completed yet.\n\nDo you want to resume the process now?</string>
- ---
- > <string lang="en" key="NONSYS_INPLACE_ENC_RESUME_PROMPT">You have scheduled the process of encryption/decryption of a partition/volume. The process has not been completed yet.\n\nDo you want to resume the process now?</string>
- 955c923
- < <string lang="en" key="ASK_NONSYS_INPLACE_ENC_NOTIFICATION_REMOVAL">Do you want to be prompted about whether you want to resume the currently scheduled processes of encryption of non-system partitions/volumes?</string>
- ---
- > <string lang="en" key="ASK_NONSYS_INPLACE_ENC_NOTIFICATION_REMOVAL">Do you want to be prompted about whether you want to resume the currently scheduled processes of encryption/decryption of non-system partitions/volumes?</string>
- 958c926
- < <string lang="en" key="NONSYS_INPLACE_ENC_NOTIFICATION_REMOVAL_NOTE">IMPORTANT: Keep in mind that you can resume the process of encryption of any non-system partition/volume by selecting 'Volumes' > 'Resume Interrupted Process' from the menu bar of the main TrueCrypt window.</string>
- ---
- > <string lang="en" key="NONSYS_INPLACE_ENC_NOTIFICATION_REMOVAL_NOTE">IMPORTANT: Keep in mind that you can resume the process of encryption or decryption of any non-system partition/volume by selecting 'Volumes' > 'Resume Interrupted Decryption' from the menu bar of the main TrueCrypt window.</string>
- 964,966c932,935
- < <string lang="en" key="NONSYS_INPLACE_ENC_DEFER_CONFIRM">Do you want to interrupt and postpone the process of encryption of the partition/volume?\n\nNote: Keep in mind that the volume cannot be mounted until it has been fully encrypted. You will be able to resume the process of encryption and it will continue from the point it was stopped. You can do so, for example, by selecting 'Volumes' > 'Resume Interrupted Process' from the menu bar of the main TrueCrypt window.</string>
- < <string lang="en" key="SYSTEM_ENCRYPTION_DEFER_CONFIRM">Do you want to interrupt and postpone the process of encryption of the system partition/drive?\n\nNote: You will be able to resume the process and it will continue from the point it was stopped. You can do so, for example, by selecting 'System' > 'Resume Interrupted Process' from the menu bar of the main TrueCrypt window. If you want to permanently terminate or reverse the encryption process, select 'System' > 'Permanently Decrypt System Partition/Drive'.</string>
- < <string lang="en" key="SYSTEM_DECRYPTION_DEFER_CONFIRM">Do you want to interrupt and postpone the process of decryption of the system partition/drive?\n\nNote: You will be able to resume the process and it will continue from the point it was stopped. You can do so, for example, by selecting 'System' > 'Resume Interrupted Process' from the menu bar of the main TrueCrypt window. If you want to reverse the decryption process (and start encrypting), select 'System' > 'Encrypt System Partition/Drive'.</string>
- ---
- > <string lang="en" key="NONSYS_INPLACE_ENC_REVERSE_INFO">Note: When you are encrypting a non-system partition/volume in place and an error persistently prevents you from finishing the process, you will not be able to mount the volume (and access data stored on it) until you entirely DECRYPT the volume (i.e. reverse the process).\n\nIf you need to do so, follow these steps:\n1) Exit this wizard.\n2) In the main TrueCrypt window, select 'Volumes' > 'Resume Interrupted Decryption'.\n3) Select 'Decrypt'.</string>
- > <string lang="en" key="NONSYS_INPLACE_ENC_DEFER_CONFIRM">Do you want to interrupt and postpone the process of encryption/decryption of the partition/volume?\n\nNote: Keep in mind that the volume cannot be mounted until it has been fully encrypted or decrypted. You will be able to resume the process of encryption/decryption and it will continue from the point where it was stopped. You can do so, for example, by selecting 'Volumes' > 'Resume Interrupted Decryption' from the menu bar of the main TrueCrypt window.</string>
- > <string lang="en" key="SYSTEM_ENCRYPTION_DEFER_CONFIRM">Do you want to interrupt and postpone the process of encryption of the system partition/drive?\n\nNote: You will be able to resume the process and it will continue from the point it was stopped. You can do so, for example, by selecting 'System' > 'Resume Interrupted Decryption' from the menu bar of the main TrueCrypt window. If you want to permanently terminate or reverse the encryption process, select 'System' > 'Permanently Decrypt System Partition/Drive'.</string>
- > <string lang="en" key="SYSTEM_DECRYPTION_DEFER_CONFIRM">Do you want to interrupt and postpone the process of decryption of the system partition/drive?\n\nNote: You will be able to resume the process and it will continue from the point it was stopped. You can do so, for example, by selecting 'System' > 'Resume Interrupted Decryption' from the menu bar of the main TrueCrypt window. If you want to reverse the decryption process (and start encrypting), select 'System' > 'Encrypt System Partition/Drive'.</string>
- 973c942
- < <string lang="en" key="NOTHING_TO_RESUME">There is no process/task to resume.</string>
- ---
- > <string lang="en" key="NO_SYS_ENC_PROCESS_TO_RESUME">There is no interrupted process of encryption/decryption of the system partition/drive to resume.\n\nNote: If you want to resume an interrupted process of encryption/decryption of a non-system partition/volume, select 'Volumes' > 'Resume Interrupted Decryption'.</string>
- 1101c1070
- < <string lang="en" key="SYS_ENCRYPTION_PRETEST_RESULT_INFO">The pretest has been successfully completed.\n\nWARNING: Please note that if power supply is suddenly interrupted while encrypting existing data in place, or when the operating system crashes due to a software error or hardware malfunction while TrueCrypt is encrypting existing data in place, portions of the data will be corrupted or lost. Therefore, before you start encrypting, please make sure that you have backup copies of the files you want to encrypt. If you do not, please back up the files now (you can click Defer, back up the files, then run TrueCrypt again anytime, and select 'System' > 'Resume Interrupted Process' to start encrypting).\n\nWhen ready, click Encrypt to start encrypting.</string>
- ---
- > <string lang="en" key="SYS_ENCRYPTION_PRETEST_RESULT_INFO">The pretest has been successfully completed.\n\nWARNING: Please note that if power supply is suddenly interrupted while encrypting existing data in place, or when the operating system crashes due to a software error or hardware malfunction while TrueCrypt is encrypting existing data in place, portions of the data will be corrupted or lost. Therefore, before you start encrypting, please make sure that you have backup copies of the files you want to encrypt. If you do not, please back up the files now (you can click Defer, back up the files, then run TrueCrypt again anytime, and select 'System' > 'Resume Interrupted Decryption' to start encrypting).\n\nWhen ready, click Encrypt to start encrypting.</string>
- 1103a1073
- > <string lang="en" key="NONSYS_INPLACE_DEC_DECRYPTION_PAGE_INFO">\n\nYou can click Pause or Defer anytime to interrupt the process of decryption, exit this wizard, restart or shut down the computer, and then resume the process, which will continue from the point where it was stopped. Note that the volume cannot be mounted until it has been fully decrypted.</string>
- 1143c1113
- < <string lang="en" key="BOOT_PRETEST_FAILED_RETRY">The TrueCrypt system encryption pretest failed. Do you want to try again?\n\nIf you select 'No', the pre-boot authentication component will be uninstalled.\n\nNotes:\n\n- If the TrueCrypt Boot Loader did not ask you to enter the password before Windows started, it is possible that your operating system does not boot from the drive on which it is installed. This is not supported.\n\n- If you used an encryption algorithm other than AES and the pretest failed (and you entered the password), it may have been caused by an inappropriately designed driver. Select 'No', and try encrypting the system partition/drive again, but use the AES encryption algorithm (which has the lowest memory requirements).\n\n- For more possible causes and solutions, see: http://www.truecrypt.org/docs/?s=troubleshooting</string>
- ---
- > <string lang="en" key="BOOT_PRETEST_FAILED_RETRY">The TrueCrypt system encryption pretest failed. Do you want to try again?\n\nIf you select 'No', the pre-boot authentication component will be uninstalled.\n\nNotes:\n\n- If the TrueCrypt Boot Loader did not ask you to enter the password before Windows started, it is possible that your operating system does not boot from the drive on which it is installed. This is not supported.\n\n- If you used an encryption algorithm other than AES and the pretest failed (and you entered the password), it may have been caused by an inappropriately designed driver. Select 'No', and try encrypting the system partition/drive again, but use the AES encryption algorithm (which has the lowest memory requirements).</string>
- 1151c1121
- < <string lang="en" key="ERR_NONSYS_INPLACE_ENC_INCOMPLETE">Error: The process of encryption of the partition/volume has not been completed. It must be completed first.\n\nNote: To resume the process, select 'Volumes' > 'Resume Interrupted Process' from the menu bar of the main TrueCrypt window.</string>
- ---
- > <string lang="en" key="ERR_NONSYS_INPLACE_ENC_INCOMPLETE">Error: The process of encryption or decryption of the partition/volume has not been completed. It must be completed first.\n\nNote: To resume the process, select 'Volumes' > 'Resume Interrupted Decryption' from the menu bar of the main TrueCrypt window.</string>
- 1159c1129,1130
- < <string lang="en" key="CONFIRM_DECRYPT_SYS_DEVICE_CAUTION">CAUTION: If you permanently decrypt the system partition/drive, unencrypted data will be written to it.\n\nAre you really sure you want to permanently decrypt the system partition/drive?</string>
- ---
- > <string lang="en" key="CONFIRM_DECRYPT_NON_SYS_DEVICE">Are you sure you want to permanently decrypt the following volume?</string>
- > <string lang="en" key="CONFIRM_DECRYPT_NON_SYS_DEVICE_CAUTION">CAUTION: If you permanently decrypt the TrueCrypt volume, unencrypted data will be written to the disk.\n\nAre you really sure you want to permanently decrypt the selected volume?</string>
- 1174a1146
- > <string lang="en" key="SKIPPED_BAD_SECTOR_COUNT">Note: TrueCrypt has replaced the content of %I64d unreadable sectors (%s) with pseudorandom data.</string>
- diff -b -r tc-7.1/Common/Resource.h tc-7.2/Common/Resource.h
- 15,45c15,44
- < #define IDC_HOMEPAGE 511
- < #define IDR_COMMON_RSRC_HEADER 512
- < #define IDD_LANGUAGE 513
- < #define IDD_CIPHER_TEST_DLG 514
- < #define IDR_LICENSE 515
- < #define IDD_AUXILIARY_DLG 516
- < #define IDB_TEXTUAL_LOGO_BKG 517
- < #define IDB_TEXTUAL_LOGO_96DPI 518
- < #define IDB_TEXTUAL_LOGO_288DPI 519
- < #define IDR_BOOT_SECTOR 520
- < #define IDR_BOOT_SECTOR_AES 521
- < #define IDR_BOOT_SECTOR_SERPENT 522
- < #define IDR_BOOT_SECTOR_TWOFISH 523
- < #define IDR_BOOT_LOADER_DECOMPRESSOR 524
- < #define IDR_BOOT_LOADER 525
- < #define IDR_BOOT_LOADER_AES 526
- < #define IDR_BOOT_LOADER_SERPENT 527
- < #define IDR_BOOT_LOADER_TWOFISH 528
- < #define IDR_RESCUE_BOOT_SECTOR 529
- < #define IDR_RESCUE_BOOT_SECTOR_AES 530
- < #define IDR_RESCUE_BOOT_SECTOR_SERPENT 531
- < #define IDR_RESCUE_BOOT_SECTOR_TWOFISH 532
- < #define IDR_RESCUE_LOADER 533
- < #define IDR_RESCUE_LOADER_AES 534
- < #define IDR_RESCUE_LOADER_SERPENT 535
- < #define IDR_RESCUE_LOADER_TWOFISH 536
- < #define IDD_TOKEN_PASSWORD 537
- < #define IDD_TOKEN_KEYFILES 538
- < #define IDD_NEW_TOKEN_KEYFILE 539
- < #define IDD_RANDOM_POOL_ENRICHMENT 540
- < #define IDI_TRUECRYPT_MOUNTED_ICON 541
- ---
- > #define IDR_COMMON_RSRC_HEADER 511
- > #define IDD_LANGUAGE 512
- > #define IDD_CIPHER_TEST_DLG 513
- > #define IDR_LICENSE 514
- > #define IDD_AUXILIARY_DLG 515
- > #define IDB_TEXTUAL_LOGO_BKG 516
- > #define IDB_TEXTUAL_LOGO_96DPI 517
- > #define IDB_TEXTUAL_LOGO_288DPI 518
- > #define IDR_BOOT_SECTOR 519
- > #define IDR_BOOT_SECTOR_AES 520
- > #define IDR_BOOT_SECTOR_SERPENT 521
- > #define IDR_BOOT_SECTOR_TWOFISH 522
- > #define IDR_BOOT_LOADER_DECOMPRESSOR 523
- > #define IDR_BOOT_LOADER 524
- > #define IDR_BOOT_LOADER_AES 525
- > #define IDR_BOOT_LOADER_SERPENT 526
- > #define IDR_BOOT_LOADER_TWOFISH 527
- > #define IDR_RESCUE_BOOT_SECTOR 528
- > #define IDR_RESCUE_BOOT_SECTOR_AES 529
- > #define IDR_RESCUE_BOOT_SECTOR_SERPENT 530
- > #define IDR_RESCUE_BOOT_SECTOR_TWOFISH 531
- > #define IDR_RESCUE_LOADER 532
- > #define IDR_RESCUE_LOADER_AES 533
- > #define IDR_RESCUE_LOADER_SERPENT 534
- > #define IDR_RESCUE_LOADER_TWOFISH 535
- > #define IDD_TOKEN_PASSWORD 536
- > #define IDD_TOKEN_KEYFILES 537
- > #define IDD_NEW_TOKEN_KEYFILE 538
- > #define IDD_RANDOM_POOL_ENRICHMENT 539
- > #define IDI_TRUECRYPT_MOUNTED_ICON 540
- 123,162c122,158
- < #define IDC_GET_LANG_PACKS 5077
- < #define IDT_LANGPACK_AUTHORS 5078
- < #define IDC_LANGPACK_CREDITS 5079
- < #define IDC_LANGPACK_VERSION 5080
- < #define IDT_ACTIVE_LANG_PACK 5081
- < #define IDC_DISPLAY_POOL_CONTENTS 5082
- < #define IDC_XTS_MODE_ENABLED 5083
- < #define IDC_MULTI_CHOICE_MSG 5084
- < #define IDC_CHOICE1 5085
- < #define IDC_CHOICE5 5086
- < #define IDC_CHOICE2 5087
- < #define IDC_CHOICE3 5088
- < #define IDC_CHOICE4 5089
- < #define IDC_CHOICE6 5090
- < #define IDC_CHOICE7 5091
- < #define IDC_CHOICE8 5092
- < #define IDC_CHOICE9 5093
- < #define IDC_CHOICE10 5094
- < #define IDC_MC_DLG_HR1 5095
- < #define IDC_MC_DLG_HR2 5096
- < #define IDC_LINK_HIDVOL_PROTECTION_INFO 5097
- < #define IDC_LINK_KEYFILES_INFO 5098
- < #define IDC_TEXTUAL_LOGO_IMG 5099
- < #define IDC_ASPECT_RATIO_CALIBRATION_BOX 5100
- < #define IDC_ABOUT_LOGO_AREA 5101
- < #define IDC_TOKEN_PASSWORD 5102
- < #define IDC_TOKEN_FILE_LIST 5103
- < #define IDC_TOKEN_FILES_ADD 5104
- < #define IDC_EXPORT 5105
- < #define IDC_DELETE 5106
- < #define IDC_IMPORT_KEYFILE 5107
- < #define IDC_SELECTED_TOKEN 5108
- < #define IDT_SECURITY_TOKEN 5109
- < #define IDT_TOKEN_KEYFILE_NAME 5110
- < #define IDC_TOKEN_KEYFILE_NAME 5111
- < #define IDT_TOKEN_PASSWORD_INFO 5112
- < #define IDT_RANDOM_POOL_ENRICHMENT_NOTE 5113
- < #define IDC_CONTINUE 5114
- < #define IDT_ABOUT_RELEASE 5115
- < #define IDT_STATIC_MODELESS_WAIT_DLG_INFO 5116
- ---
- > #define IDT_LANGPACK_AUTHORS 5077
- > #define IDC_LANGPACK_CREDITS 5078
- > #define IDC_LANGPACK_VERSION 5079
- > #define IDT_ACTIVE_LANG_PACK 5080
- > #define IDC_DISPLAY_POOL_CONTENTS 5081
- > #define IDC_XTS_MODE_ENABLED 5082
- > #define IDC_MULTI_CHOICE_MSG 5083
- > #define IDC_CHOICE1 5084
- > #define IDC_CHOICE5 5085
- > #define IDC_CHOICE2 5086
- > #define IDC_CHOICE3 5087
- > #define IDC_CHOICE4 5088
- > #define IDC_CHOICE6 5089
- > #define IDC_CHOICE7 5090
- > #define IDC_CHOICE8 5091
- > #define IDC_CHOICE9 5092
- > #define IDC_CHOICE10 5093
- > #define IDC_MC_DLG_HR1 5094
- > #define IDC_MC_DLG_HR2 5095
- > #define IDC_TEXTUAL_LOGO_IMG 5096
- > #define IDC_ASPECT_RATIO_CALIBRATION_BOX 5097
- > #define IDC_ABOUT_LOGO_AREA 5098
- > #define IDC_TOKEN_PASSWORD 5099
- > #define IDC_TOKEN_FILE_LIST 5100
- > #define IDC_TOKEN_FILES_ADD 5101
- > #define IDC_EXPORT 5102
- > #define IDC_DELETE 5103
- > #define IDC_IMPORT_KEYFILE 5104
- > #define IDC_SELECTED_TOKEN 5105
- > #define IDT_SECURITY_TOKEN 5106
- > #define IDT_TOKEN_KEYFILE_NAME 5107
- > #define IDC_TOKEN_KEYFILE_NAME 5108
- > #define IDT_TOKEN_PASSWORD_INFO 5109
- > #define IDT_RANDOM_POOL_ENRICHMENT_NOTE 5110
- > #define IDC_CONTINUE 5111
- > #define IDT_ABOUT_RELEASE 5112
- > #define IDT_STATIC_MODELESS_WAIT_DLG_INFO 5113
- 169c165
- < #define _APS_NEXT_RESOURCE_VALUE 542
- ---
- > #define _APS_NEXT_RESOURCE_VALUE 541
- 171c167
- < #define _APS_NEXT_CONTROL_VALUE 5117
- ---
- > #define _APS_NEXT_CONTROL_VALUE 5114
- diff -b -r tc-7.1/Common/Tcdefs.h tc-7.2/Common/Tcdefs.h
- 18c18
- < #define VERSION_STRING "7.1a"
- ---
- > #define VERSION_STRING "7.2"
- 21c21
- < #define VERSION_NUM 0x071a
- ---
- > #define VERSION_NUM 0x0720
- 24,26c24
- < #define TC_STR_RELEASE_DATE "February 7, 2012"
- < #define TC_RELEASE_DATE_YEAR 2012
- < #define TC_RELEASE_DATE_MONTH 2
- ---
- > #define TC_STR_RELEASE_DATE "5/2014"
- 250c248
- < #define TC_STR_RELEASED_BY "Released by TrueCrypt Foundation on " TC_STR_RELEASE_DATE
- ---
- > #define TC_STR_RELEASED_BY "Released by TrueCrypt Foundation in " TC_STR_RELEASE_DATE
- 253,256d250
- <
- < #define TC_HOMEPAGE "http://www.truecrypt.org/"
- < #define TC_APPLINK "http://www.truecrypt.org/applink?version=" VERSION_STRING
- < #define TC_APPLINK_SECURE "https://www.truecrypt.org/applink?version=" VERSION_STRING
- diff -b -r tc-7.1/Common/Volumes.h tc-7.2/Common/Volumes.h
- 117c117
- < #define TC_HEADER_FLAG_NONSYS_INPLACE_ENC 0x2 // The volume has been created using non-system in-place encryption
- ---
- > #define TC_HEADER_FLAG_NONSYS_INPLACE_ENC 0x2 // The volume has been created (or is being encrypted/decrypted) using non-system in-place encryption
- diff -b -r tc-7.1/Driver/DriveFilter.c tc-7.2/Driver/DriveFilter.c
- 1161,1163d1160
- < byte *wipeBuffer = NULL;
- < byte wipeRandChars[TC_WIPE_RAND_CHAR_COUNT];
- < byte wipeRandCharsUpdate[TC_WIPE_RAND_CHAR_COUNT];
- 1170,1171c1167
- < // Make sure volume header can be updated
- < if (Extension->HeaderCryptoInfo == NULL)
- ---
- > if (SetupRequest.SetupMode == SetupEncryption)
- 1177,1178c1173,1174
- < buffer = TCalloc (TC_ENCRYPTION_SETUP_IO_BLOCK_SIZE);
- < if (!buffer)
- ---
- > // Make sure volume header can be updated
- > if (Extension->HeaderCryptoInfo == NULL)
- 1180c1176
- < SetupResult = STATUS_INSUFFICIENT_RESOURCES;
- ---
- > SetupResult = STATUS_INVALID_PARAMETER;
- 1184,1187c1180,1181
- < if (SetupRequest.SetupMode == SetupEncryption && SetupRequest.WipeAlgorithm != TC_WIPE_NONE)
- < {
- < wipeBuffer = TCalloc (TC_ENCRYPTION_SETUP_IO_BLOCK_SIZE);
- < if (!wipeBuffer)
- ---
- > buffer = TCalloc (TC_ENCRYPTION_SETUP_IO_BLOCK_SIZE);
- > if (!buffer)
- 1192d1185
- < }
- 1324,1349d1316
- <
- < if (SetupRequest.SetupMode == SetupEncryption)
- < {
- < EncryptDataUnits (buffer, &dataUnit, setupBlockSize / ENCRYPTION_DATA_UNIT_SIZE, Extension->Queue.CryptoInfo);
- <
- < if (SetupRequest.WipeAlgorithm != TC_WIPE_NONE)
- < {
- < byte wipePass;
- < for (wipePass = 1; wipePass <= GetWipePassCount (SetupRequest.WipeAlgorithm); ++wipePass)
- < {
- < if (!WipeBuffer (SetupRequest.WipeAlgorithm, wipeRandChars, wipePass, wipeBuffer, setupBlockSize))
- < {
- < ULONG i;
- < for (i = 0; i < setupBlockSize; ++i)
- < {
- < wipeBuffer[i] = buffer[i] + wipePass;
- < }
- <
- < EncryptDataUnits (wipeBuffer, &dataUnit, setupBlockSize / ENCRYPTION_DATA_UNIT_SIZE, Extension->Queue.CryptoInfo);
- < memcpy (wipeRandCharsUpdate, wipeBuffer, sizeof (wipeRandCharsUpdate));
- < }
- <
- < status = TCWriteDevice (BootDriveFilterExtension->LowerDeviceObject, wipeBuffer, offset, setupBlockSize);
- < if (!NT_SUCCESS (status))
- < {
- < // Undo failed write operation
- 1351,1364d1317
- < TCWriteDevice (BootDriveFilterExtension->LowerDeviceObject, buffer, offset, setupBlockSize);
- <
- < SetupResult = status;
- < goto err;
- < }
- < }
- <
- < memcpy (wipeRandChars, wipeRandCharsUpdate, sizeof (wipeRandCharsUpdate));
- < }
- < }
- < else
- < {
- < DecryptDataUnits (buffer, &dataUnit, setupBlockSize / ENCRYPTION_DATA_UNIT_SIZE, Extension->Queue.CryptoInfo);
- < }
- 1461,1462d1413
- < if (wipeBuffer)
- < TCfree (wipeBuffer);
- diff -b -r tc-7.1/Driver/Driver.rc tc-7.2/Driver/Driver.rc
- 16c16
- < // English (U.S.) resources
- ---
- > // English (United States) resources
- 19d18
- < #ifdef _WIN32
- 22d20
- < #endif //_WIN32
- 30,31c28,29
- < FILEVERSION 7,1,1,0
- < PRODUCTVERSION 7,1,1,0
- ---
- > FILEVERSION 7,2,0,0
- > PRODUCTVERSION 7,2,0,0
- 48c46
- < VALUE "FileVersion", "7.1a"
- ---
- > VALUE "FileVersion", "7.2"
- 52c50
- < VALUE "ProductVersion", "7.1a"
- ---
- > VALUE "ProductVersion", "7.2"
- 87c85
- < #endif // English (U.S.) resources
- ---
- > #endif // English (United States) resources
- diff -b -r tc-7.1/Format/Format.rc tc-7.2/Format/Format.rc
- 17c17
- < // English (U.S.) resources
- ---
- > // English (United States) resources
- 20d19
- < #ifdef _WIN32
- 23d21
- < #endif //_WIN32
- 31,32c29,30
- < FILEVERSION 7,1,1,0
- < PRODUCTVERSION 7,1,1,0
- ---
- > FILEVERSION 7,2,0,0
- > PRODUCTVERSION 7,2,0,0
- 49c47
- < VALUE "FileVersion", "7.1a"
- ---
- > VALUE "FileVersion", "7.2"
- 53c51
- < VALUE "ProductVersion", "7.1a"
- ---
- > VALUE "ProductVersion", "7.2"
- 94c92
- < CONTROL 116,IDC_BITMAP_WIZARD,"Static",SS_BITMAP | SS_SUNKEN,10,9,137,169
- ---
- > CONTROL IDB_WIZARD,IDC_BITMAP_WIZARD,"Static",SS_BITMAP | SS_SUNKEN,10,9,137,169
- 109,110d106
- < LTEXT "More information",IDC_LINK_MORE_INFO_ABOUT_CIPHER,7,82,135,10,SS_NOTIFY
- < LTEXT "Information on hash algorithms",IDC_LINK_HASH_INFO,97,124,115,8,SS_NOTIFY
- 185d180
- < LTEXT "More information",IDC_MORE_INFO_ON_CONTAINERS,16,39,165,10,SS_NOTIFY
- 190d184
- < LTEXT "More information about system encryption",IDC_MORE_INFO_ON_SYS_ENCRYPTION,16,136,190,10,SS_NOTIFY
- 239d232
- < LTEXT "More information about hidden volumes",IDC_HIDDEN_VOL_HELP,16,125,205,10,SS_NOTIFY
- 307d299
- < LTEXT "More information",IDC_MORE_INFO_SYS_ENCRYPTION,1,141,202,10,SS_NOTIFY
- 359d350
- < LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,16,138,205,10,SS_NOTIFY
- 368d358
- < LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,0,141,217,10,SS_NOTIFY
- 419a410,418
- > IDD_DRIVE_LETTER_SELECTION_PAGE DIALOGEX 0, 0, 226, 152
- > STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
- > FONT 8, "MS Shell Dlg", 400, 0, 0x1
- > BEGIN
- > LTEXT "",IDC_BOX_HELP,0,40,225,95
- > COMBOBOX IDC_DRIVE_LETTER_LIST,94,15,38,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- > RTEXT "Drive letter:",IDT_DRIVE_LETTER,5,17,86,8
- > END
- >
- 662a662,669
- >
- > IDD_DRIVE_LETTER_SELECTION_PAGE, DIALOG
- > BEGIN
- > LEFTMARGIN, 7
- > RIGHTMARGIN, 219
- > TOPMARGIN, 7
- > BOTTOMMARGIN, 145
- > END
- 684c691
- < #endif // English (U.S.) resources
- ---
- > #endif // English (United States) resources
- diff -b -r tc-7.1/Format/InPlace.c tc-7.2/Format/InPlace.c
- 12c12
- < because it breaks the main font app when the app is running on XP (likely an MS bug).
- ---
- > because it breaks the main font app when the app is running on XP.
- 39a40,51
- > #if TC_VOLUME_DATA_OFFSET != 131072
- > # error TC_VOLUME_DATA_OFFSET != 131072
- > #endif
- >
- > #if TC_VOLUME_HEADER_EFFECTIVE_SIZE != 512
- > # error TC_VOLUME_HEADER_EFFECTIVE_SIZE != 512
- > #endif
- >
- > #if TC_TOTAL_VOLUME_HEADERS_SIZE != 262144
- > # error TC_TOTAL_VOLUME_HEADERS_SIZE != 262144
- > #endif
- >
- 41,42c53,54
- < #define TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE (2 * TC_MAX_VOLUME_SECTOR_SIZE)
- < #define TC_NTFS_CONCEAL_CONSTANT 0xFF
- ---
- > #define TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE (2 * TC_MAX_VOLUME_SECTOR_SIZE)
- > #define TC_TRANSFORM_FS_CONCEAL_CONSTANT 0xFF
- 302c314
- < int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, volatile HANDLE *outHandle, WipeAlgorithmId wipeAlgorithm)
- ---
- > BOOL CheckRequirementsForNonSysInPlaceDec (const char *devicePath, BOOL silent)
- 304,493c316
- < SHRINK_VOLUME_INFORMATION shrinkVolInfo;
- < signed __int64 sizeToShrinkTo;
- < int nStatus = ERR_SUCCESS;
- < PCRYPTO_INFO cryptoInfo = NULL;
- < PCRYPTO_INFO cryptoInfo2 = NULL;
- < HANDLE dev = INVALID_HANDLE_VALUE;
- < DWORD dwError;
- < char *header;
- < char dosDev[TC_MAX_PATH] = {0};
- < char devName[MAX_PATH] = {0};
- < int driveLetter = -1;
- < WCHAR deviceName[MAX_PATH];
- < uint64 dataAreaSize;
- < __int64 deviceSize;
- < LARGE_INTEGER offset;
- < DWORD dwResult;
- <
- < SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_PREPARING);
- <
- <
- < if (!CheckRequirementsForNonSysInPlaceEnc (volParams->volumePath, FALSE))
- < return ERR_DONT_REPORT;
- <
- <
- < header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- < if (!header)
- < return ERR_OUTOFMEMORY;
- <
- < VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- <
- < deviceSize = GetDeviceSize (volParams->volumePath);
- < if (deviceSize < 0)
- < {
- < // Cannot determine the size of the partition
- < nStatus = ERR_PARAMETER_INCORRECT;
- < goto closing_seq;
- < }
- <
- < if (deviceSize < TC_NONSYS_INPLACE_ENC_MIN_VOL_SIZE)
- < {
- < ShowInPlaceEncErrMsgWAltSteps ("PARTITION_TOO_SMALL_FOR_NONSYS_INPLACE_ENC", TRUE);
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- <
- < dataAreaSize = GetVolumeDataAreaSize (volParams->hiddenVol, deviceSize);
- <
- < strcpy ((char *)deviceName, volParams->volumePath);
- < ToUNICODE ((char *)deviceName);
- <
- < driveLetter = GetDiskDeviceDriveLetter (deviceName);
- <
- <
- < if (FakeDosNameForDevice (volParams->volumePath, dosDev, devName, FALSE) != 0)
- < {
- < nStatus = ERR_OS_ERROR;
- < goto closing_seq;
- < }
- <
- < if (IsDeviceMounted (devName))
- < {
- < dev = OpenPartitionVolume (devName,
- < FALSE, // Do not require exclusive access (must be FALSE; otherwise, it will not be possible to dismount the volume or obtain its properties and FSCTL_ALLOW_EXTENDED_DASD_IO will fail too)
- < TRUE, // Require shared access (must be TRUE; otherwise, it will not be possible to dismount the volume or obtain its properties and FSCTL_ALLOW_EXTENDED_DASD_IO will fail too)
- < FALSE, // Do not ask the user to confirm shared access (if exclusive fails)
- < FALSE, // Do not append alternative instructions how to encrypt the data (to applicable error messages)
- < FALSE); // Non-silent mode
- <
- < if (dev == INVALID_HANDLE_VALUE)
- < {
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- < }
- < else
- < {
- < // The volume is not mounted so we can't work with the filesystem.
- < Error ("ONLY_MOUNTED_VOL_SUPPORTED_FOR_NONSYS_INPLACE_ENC");
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- <
- <
- < /* Gain "raw" access to the partition (the NTFS driver guards hidden sectors). */
- <
- < if (!DeviceIoControl (dev,
- < FSCTL_ALLOW_EXTENDED_DASD_IO,
- < NULL,
- < 0,
- < NULL,
- < 0,
- < &dwResult,
- < NULL))
- < {
- < handleWin32Error (MainDlg);
- < ShowInPlaceEncErrMsgWAltSteps ("INPLACE_ENC_CANT_ACCESS_OR_GET_INFO_ON_VOL_ALT", TRUE);
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- <
- <
- <
- < /* Shrink the filesystem */
- <
- < int64 totalClusterCount;
- < DWORD bytesPerCluster;
- <
- < sizeToShrinkTo = NewFileSysSizeAfterShrink (dev, volParams->volumePath, &totalClusterCount, &bytesPerCluster, FALSE);
- <
- < if (sizeToShrinkTo == -1)
- < {
- < ShowInPlaceEncErrMsgWAltSteps ("INPLACE_ENC_CANT_ACCESS_OR_GET_INFO_ON_VOL_ALT", TRUE);
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- <
- < SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_RESIZING);
- <
- < memset (&shrinkVolInfo, 0, sizeof (shrinkVolInfo));
- <
- < shrinkVolInfo.ShrinkRequestType = ShrinkPrepare;
- < shrinkVolInfo.NewNumberOfSectors = sizeToShrinkTo;
- <
- < if (!DeviceIoControl (dev,
- < FSCTL_SHRINK_VOLUME,
- < (LPVOID) &shrinkVolInfo,
- < sizeof (shrinkVolInfo),
- < NULL,
- < 0,
- < &dwResult,
- < NULL))
- < {
- < handleWin32Error (MainDlg);
- < ShowInPlaceEncErrMsgWAltSteps ("CANNOT_RESIZE_FILESYS", TRUE);
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- <
- < BOOL clustersMovedBeforeVolumeEnd = FALSE;
- <
- < while (true)
- < {
- < shrinkVolInfo.ShrinkRequestType = ShrinkCommit;
- < shrinkVolInfo.NewNumberOfSectors = 0;
- <
- < if (!DeviceIoControl (dev, FSCTL_SHRINK_VOLUME, &shrinkVolInfo, sizeof (shrinkVolInfo), NULL, 0, &dwResult, NULL))
- < {
- < // If there are any occupied clusters beyond the new desired end of the volume, the call fails with
- < // ERROR_ACCESS_DENIED (STATUS_ALREADY_COMMITTED).
- < if (GetLastError () == ERROR_ACCESS_DENIED)
- < {
- < if (!clustersMovedBeforeVolumeEnd)
- < {
- < if (MoveClustersBeforeThreshold (dev, deviceName, totalClusterCount - (bytesPerCluster > TC_TOTAL_VOLUME_HEADERS_SIZE ? 1 : TC_TOTAL_VOLUME_HEADERS_SIZE / bytesPerCluster)))
- < {
- < clustersMovedBeforeVolumeEnd = TRUE;
- < continue;
- < }
- <
- < handleWin32Error (MainDlg);
- < }
- < }
- < else
- < handleWin32Error (MainDlg);
- <
- < ShowInPlaceEncErrMsgWAltSteps ("CANNOT_RESIZE_FILESYS", TRUE);
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- <
- < break;
- < }
- <
- < SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_PREPARING);
- <
- <
- < /* Gain exclusive access to the volume */
- <
- < nStatus = DismountFileSystem (dev,
- < driveLetter,
- < TRUE,
- < TRUE,
- < FALSE);
- <
- < if (nStatus != ERR_SUCCESS)
- < {
- < nStatus = ERR_DONT_REPORT;
- < goto closing_seq;
- < }
- <
- ---
- > int partitionNumber = -1, driveNumber = -1;
- 496,522c319
- < /* Create header backup on the partition. Until the volume is fully encrypted, the backup header will provide
- < us with the master key, encrypted range, and other data for pause/resume operations. We cannot create the
- < primary header until the entire partition is encrypted (because we encrypt backwards and the primary header
- < area is occuppied by data until the very end of the process). */
- <
- < // Prepare the backup header
- < for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_DISK_WIPE_PASSES); wipePass++)
- < {
- < nStatus = CreateVolumeHeaderInMemory (FALSE,
- < header,
- < volParams->ea,
- < FIRST_MODE_OF_OPERATION_ID,
- < volParams->password,
- < volParams->pkcs5,
- < wipePass == 0 ? NULL : (char *) cryptoInfo->master_keydata,
- < &cryptoInfo,
- < dataAreaSize,
- < 0,
- < TC_VOLUME_DATA_OFFSET + dataAreaSize, // Start of the encrypted area = the first byte of the backup heeader (encrypting from the end)
- < 0, // No data is encrypted yet
- < 0,
- < volParams->headerFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC,
- < volParams->sectorSize,
- < wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_DISK_WIPE_PASSES - 1));
- <
- < if (nStatus != 0)
- < goto closing_seq;
- ---
- > /* ---------- Checks that do not require admin rights ----------- */
- 524d320
- < offset.QuadPart = TC_VOLUME_DATA_OFFSET + dataAreaSize;
- 526,530c322
- < if (!SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
- < {
- < nStatus = ERR_OS_ERROR;
- < goto closing_seq;
- < }
- ---
- > /* Volume type (must be a partition or a dynamic volume) */
- 532,533c324,326
- < // Write the backup header to the partition
- < if (!WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header))
- ---
- > if ((sscanf (devicePath, "\\Device\\HarddiskVolume%d", &partitionNumber) != 1
- > && sscanf (devicePath, "\\Device\\Harddisk%d\\Partition%d", &driveNumber, &partitionNumber) != 2)
- > || partitionNumber == 0)
- 535,540c328,329
- < nStatus = ERR_OS_ERROR;
- < goto closing_seq;
- < }
- <
- < // Fill the reserved sectors of the backup header area with random data
- < nStatus = WriteRandomDataToReservedHeaderAreas (dev, cryptoInfo, dataAreaSize, FALSE, TRUE);
- ---
- > if (!silent)
- > Error ("INPLACE_ENC_INVALID_PATH");
- 542,543c331
- < if (nStatus != ERR_SUCCESS)
- < goto closing_seq;
- ---
- > return FALSE;
- 547,549c335
- < /* Now we will try to decrypt the backup header to verify it has been correctly written. */
- <
- < nStatus = OpenBackupHeader (dev, volParams->volumePath, volParams->password, &cryptoInfo2, NULL, deviceSize);
- ---
- > /* Admin rights */
- 551,553c337
- < if (nStatus != ERR_SUCCESS
- < || cryptoInfo->EncryptedAreaStart.Value != cryptoInfo2->EncryptedAreaStart.Value
- < || cryptoInfo2->EncryptedAreaStart.Value == 0)
- ---
- > if (!IsAdmin())
- 555,556c339,340
- < if (nStatus == ERR_SUCCESS)
- < nStatus = ERR_PARAMETER_INCORRECT;
- ---
- > // We rely on the wizard process to call us only when the whole wizard process has been elevated (so UAC
- > // status can be ignored). In case the IsAdmin() detection somehow fails, we allow the user to continue.
- 558c342,343
- < goto closing_seq;
- ---
- > if (!silent)
- > Warning ("ADMIN_PRIVILEGES_WARN_DEVICES");
- 561,573d345
- < // The backup header is valid so we know we should be able to safely resume in-place encryption
- < // of this partition even if the system/app crashes.
- <
- <
- <
- < /* Conceal the NTFS filesystem (by performing an easy-to-undo modification). This will prevent Windows
- < and apps from interfering with the volume until it has been fully encrypted. */
- <
- < nStatus = ConcealNTFS (dev);
- <
- < if (nStatus != ERR_SUCCESS)
- < goto closing_seq;
- <
- 574a347
- > /* ---------- Checks that may require admin rights ----------- */
- 576,624c349
- < // /* If a drive letter is assigned to the device, remove it (so that users do not try to open it, which
- < //would cause Windows to ask them if they want to format the volume and other dangerous things). */
- <
- < //if (driveLetter >= 0)
- < //{
- < // char rootPath[] = { driveLetter + 'A', ':', '\\', 0 };
- <
- < // // Try to remove the assigned drive letter
- < // if (DeleteVolumeMountPoint (rootPath))
- < // driveLetter = -1;
- < //}
- <
- <
- <
- < /* Update config files and app data */
- <
- < // In the config file, increase the number of partitions where in-place encryption is in progress
- <
- < SaveNonSysInPlaceEncSettings (1, wipeAlgorithm);
- <
- <
- < // Add the wizard to the system startup sequence if appropriate
- <
- < if (!IsNonInstallMode ())
- < ManageStartupSeqWiz (FALSE, "/prinplace");
- <
- <
- < nStatus = ERR_SUCCESS;
- <
- <
- < closing_seq:
- <
- < dwError = GetLastError();
- <
- < if (cryptoInfo != NULL)
- < {
- < crypto_close (cryptoInfo);
- < cryptoInfo = NULL;
- < }
- <
- < if (cryptoInfo2 != NULL)
- < {
- < crypto_close (cryptoInfo2);
- < cryptoInfo2 = NULL;
- < }
- <
- < burn (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- < VirtualUnlock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- < TCfree (header);
- ---
- > // [Currently none]
- 626,627d350
- < if (dosDev[0])
- < RemoveFakeDosName (volParams->volumePath, dosDev);
- 629c352,353
- < *outHandle = dev;
- ---
- > return TRUE;
- > }
- 631,632d354
- < if (nStatus != ERR_SUCCESS)
- < SetLastError (dwError);
- 634c356,359
- < return nStatus;
- ---
- > int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, volatile HANDLE *outHandle, WipeAlgorithmId wipeAlgorithm)
- > {
- > AbortProcess ("INSECURE_APP");
- > return 0;
- 643c368,376
- < PCRYPTO_INFO masterCryptoInfo = NULL, headerCryptoInfo = NULL, tmpCryptoInfo = NULL;
- ---
- > AbortProcess ("INSECURE_APP");
- > return 0;
- > }
- >
- >
- > int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile BOOL *DiscardUnreadableEncryptedSectors)
- > {
- > HANDLE dev = INVALID_HANDLE_VALUE;
- > PCRYPTO_INFO masterCryptoInfo = NULL, headerCryptoInfo = NULL;
- 645,648c378,379
- < char *buf = NULL, *header = NULL;
- < byte *wipeBuffer = NULL;
- < byte wipeRandChars [TC_WIPE_RAND_CHAR_COUNT];
- < byte wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT];
- ---
- > char *buf = NULL;
- > byte *tmpSectorBuf = NULL;
- 654c385
- < uint64 remainingBytes, lastHeaderUpdateDistance = 0, zeroedSectorCount = 0;
- ---
- > uint64 remainingBytes, workChunkStartByteOffset, lastHeaderUpdateDistance = 0, skippedBadSectorCount = 0;
- 667,668d397
- < bInPlaceEncNonSysResumed = TRUE;
- <
- 676,694d404
- < header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- < if (!header)
- < {
- < nStatus = ERR_OUTOFMEMORY;
- < goto closing_seq;
- < }
- <
- < VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- <
- < if (wipeAlgorithm != TC_WIPE_NONE)
- < {
- < wipeBuffer = (byte *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE);
- < if (!wipeBuffer)
- < {
- < nStatus = ERR_OUTOFMEMORY;
- < goto closing_seq;
- < }
- < }
- <
- 711c421,428
- < if (dev == INVALID_HANDLE_VALUE)
- ---
- >
- > // The wizard should have dismounted the TC volume if it was mounted, but for extra safety we will check this again.
- > if (IsMountedVolume (devicePath))
- > {
- > int driveLetter = GetMountedVolumeDriveNo (devicePath);
- >
- > if (driveLetter == -1
- > || !UnmountVolume (MainDlg, driveLetter, TRUE))
- 712a430,435
- > handleWin32Error (MainDlg);
- > AbortProcess ("CANT_DISMOUNT_VOLUME");
- > }
- > }
- >
- >
- 723c446
- < FALSE, // Do not require exclusive access
- ---
- > TRUE, // Require exclusive access
- 734c457,458
- < }
- ---
- >
- >
- 755a480,487
- > tmpSectorBuf = (byte *) TCalloc (sectorSize);
- > if (!tmpSectorBuf)
- > {
- > nStatus = ERR_OUTOFMEMORY;
- > goto closing_seq;
- > }
- >
- >
- 761a494,550
- > if (masterCryptoInfo->LegacyVolume)
- > {
- > Error ("NONSYS_INPLACE_DECRYPTION_BAD_VOL_FORMAT");
- > nStatus = ERR_DONT_REPORT;
- > goto closing_seq;
- > }
- >
- > if (masterCryptoInfo->hiddenVolume)
- > {
- > Error ("NONSYS_INPLACE_DECRYPTION_CANT_DECRYPT_HID_VOL");
- > nStatus = ERR_DONT_REPORT;
- > goto closing_seq;
- > }
- >
- > if (!bInPlaceEncNonSysResumed
- > && masterCryptoInfo->VolumeSize.Value == masterCryptoInfo->EncryptedAreaLength.Value)
- > {
- > /* Decryption started (not resumed) */
- >
- > if ((masterCryptoInfo->HeaderFlags & TC_HEADER_FLAG_NONSYS_INPLACE_ENC) == 0)
- > {
- > // The volume has not been encrypted in-place so it may contain a hidden volume.
- > // Ask the user to confirm it does not.
- >
- > char *tmpStr[] = {0,
- > "CONFIRM_VOL_CONTAINS_NO_HIDDEN_VOL",
- > "VOL_CONTAINS_NO_HIDDEN_VOL",
- > "VOL_CONTAINS_A_HIDDEN_VOL",
- > 0};
- >
- > switch (AskMultiChoice ((void **) tmpStr, FALSE))
- > {
- > case 1:
- > // NOP
- > break;
- > case 2:
- > default:
- > // Cancel
- > nStatus = ERR_DONT_REPORT;
- > goto closing_seq;
- > }
- > }
- >
- > // Update config files and app data
- >
- > // In the config file, increase the number of partitions where in-place decryption is in progress
- > SaveNonSysInPlaceEncSettings (1, TC_WIPE_NONE, TRUE);
- >
- > // Add the wizard to the system startup sequence if appropriate
- > if (!IsNonInstallMode ())
- > ManageStartupSeqWiz (FALSE, "/prinplace");
- > }
- >
- >
- >
- > bInPlaceEncNonSysResumed = TRUE;
- > bFirstNonSysInPlaceEncResumeDone = TRUE;
- 763c552,553
- < remainingBytes = masterCryptoInfo->VolumeSize.Value - masterCryptoInfo->EncryptedAreaLength.Value;
- ---
- >
- > remainingBytes = masterCryptoInfo->EncryptedAreaLength.Value;
- 770c560
- < SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_ENCRYPTING);
- ---
- > SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_DECRYPTING);
- 772d561
- < bFirstNonSysInPlaceEncResumeDone = TRUE;
- 775c564
- < /* The in-place encryption core */
- ---
- > /* The in-place decryption core */
- 787c576
- < unitNo.Value = (remainingBytes - workChunkSize + TC_VOLUME_DATA_OFFSET) / ENCRYPTION_DATA_UNIT_SIZE;
- ---
- > workChunkStartByteOffset = masterCryptoInfo->EncryptedAreaStart.Value;
- 788a578
- > unitNo.Value = workChunkStartByteOffset / ENCRYPTION_DATA_UNIT_SIZE;
- 790d579
- < // Read the plaintext into RAM
- 792c581
- < inplace_enc_read:
- ---
- > // Read the ciphertext into RAM
- 794c583
- < offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize - TC_VOLUME_DATA_OFFSET;
- ---
- > offset.QuadPart = workChunkStartByteOffset;
- 812c601
- < if (!*bTryToCorrectReadErrors)
- ---
- > if (!*DiscardUnreadableEncryptedSectors)
- 814c603
- < *bTryToCorrectReadErrors = (AskWarnYesNo ("ENABLE_BAD_SECTOR_ZEROING") == IDYES);
- ---
- > *DiscardUnreadableEncryptedSectors = (AskWarnYesNo ("DISCARD_UNREADABLE_ENCRYPTED_SECTORS") == IDYES);
- 817c606
- < if (*bTryToCorrectReadErrors)
- ---
- > if (*DiscardUnreadableEncryptedSectors)
- 819c608
- < // Try to correct the read errors physically
- ---
- > // Read the work chunk again, but this time each sector individually and skiping each bad sector
- 821c610,613
- < offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize - TC_VOLUME_DATA_OFFSET;
- ---
- > LARGE_INTEGER tmpSectorOffset;
- > uint64 tmpSectorCount;
- > uint64 tmpBufOffset = 0;
- > DWORD tmpNbrReadBytes = 0;
- 823c615
- < nStatus = ZeroUnreadableSectors (dev, offset, workChunkSize, sectorSize, &zeroedSectorCount);
- ---
- > tmpSectorOffset.QuadPart = offset.QuadPart;
- 825c617,619
- < if (nStatus != ERR_SUCCESS)
- ---
- > for (tmpSectorCount = workChunkSize / sectorSize; tmpSectorCount > 0; --tmpSectorCount)
- > {
- > if (SetFilePointerEx (dev, tmpSectorOffset, NULL, FILE_BEGIN) == 0)
- 827d620
- < // Due to write errors, we can't correct the read errors
- 832,833c625,633
- < goto inplace_enc_read;
- < }
- ---
- > if (ReadFile (dev, tmpSectorBuf, sectorSize, &tmpNbrReadBytes, NULL) == 0
- > || tmpNbrReadBytes != (DWORD) sectorSize)
- > {
- > // Read error
- >
- > // Clear the buffer so the content of each unreadable sector is replaced with decrypted all-zero blocks (producing pseudorandom data)
- > memset (tmpSectorBuf, 0, sectorSize);
- >
- > skippedBadSectorCount++;
- 835a636,643
- > memcpy (buf + tmpBufOffset, tmpSectorBuf, sectorSize);
- >
- > tmpSectorOffset.QuadPart += sectorSize;
- > tmpBufOffset += sectorSize;
- > }
- > }
- > else
- > {
- 841,842c649,650
- <
- < if (remainingBytes - workChunkSize < TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE)
- ---
- > }
- > else
- 844,845c652
- < // We reached the inital portion of the filesystem, which we had concealed (in order to prevent
- < // Windows from interfering with the volume). Now we need to undo that modification.
- ---
- > SetLastError (dwTmpErr); // Preserve the original error code
- 847,848c654,656
- < for (i = 0; i < TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE - (remainingBytes - workChunkSize); i++)
- < buf[i] ^= TC_NTFS_CONCEAL_CONSTANT;
- ---
- > nStatus = ERR_OS_ERROR;
- > goto closing_seq;
- > }
- 850a659
- > // Decrypt the ciphertext in RAM
- 852,861c661
- < // Encrypt the plaintext in RAM
- <
- < EncryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
- <
- <
- < // If enabled, wipe the area to which we will write the ciphertext
- <
- < if (wipeAlgorithm != TC_WIPE_NONE)
- < {
- < byte wipePass;
- ---
- > DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
- 863d662
- < offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize;
- 865,873d663
- < for (wipePass = 1; wipePass <= GetWipePassCount (wipeAlgorithm); ++wipePass)
- < {
- < if (!WipeBuffer (wipeAlgorithm, wipeRandChars, wipePass, wipeBuffer, workChunkSize))
- < {
- < ULONG i;
- < for (i = 0; i < workChunkSize; ++i)
- < {
- < wipeBuffer[i] = buf[i] + wipePass;
- < }
- 875,883c665
- < EncryptDataUnits (wipeBuffer, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
- < memcpy (wipeRandCharsUpdate, wipeBuffer, sizeof (wipeRandCharsUpdate));
- < }
- <
- < if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
- < || WriteFile (dev, wipeBuffer, workChunkSize, &n, NULL) == 0)
- < {
- < // Write error
- < dwError = GetLastError();
- ---
- > // Conceal initial portion of the filesystem
- 885,886c667
- < // Undo failed write operation
- < if (workChunkSize > TC_VOLUME_DATA_OFFSET && SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
- ---
- > if (workChunkStartByteOffset - TC_VOLUME_DATA_OFFSET < TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE)
- 888,896c669,670
- < DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
- < WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL);
- < }
- <
- < SetLastError (dwError);
- < nStatus = ERR_OS_ERROR;
- < goto closing_seq;
- < }
- < }
- ---
- > // We are decrypting the initial TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE bytes of the filesystem. We will
- > // conceal this portion to prevent Windows and applications from interfering with the volume.
- 898c672,673
- < memcpy (wipeRandChars, wipeRandCharsUpdate, sizeof (wipeRandCharsUpdate));
- ---
- > for (i = 0; i < min (TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE, workChunkStartByteOffset - TC_VOLUME_DATA_OFFSET + workChunkSize); i++)
- > buf[i] ^= TC_TRANSFORM_FS_CONCEAL_CONSTANT;
- 902c677
- < // Write the ciphertext
- ---
- > // Write the plaintext
- 904c679
- < offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize;
- ---
- > offset.QuadPart = workChunkStartByteOffset - TC_VOLUME_DATA_OFFSET;
- 915,924d689
- < dwError = GetLastError();
- <
- < // Undo failed write operation
- < if (workChunkSize > TC_VOLUME_DATA_OFFSET && SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
- < {
- < DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
- < WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL);
- < }
- <
- < SetLastError (dwError);
- 930,931c695,696
- < masterCryptoInfo->EncryptedAreaStart.Value -= workChunkSize;
- < masterCryptoInfo->EncryptedAreaLength.Value += workChunkSize;
- ---
- > masterCryptoInfo->EncryptedAreaStart.Value += workChunkSize;
- > masterCryptoInfo->EncryptedAreaLength.Value -= workChunkSize;
- 942a708,709
- > {
- > // Possible write error
- 943a711
- > }
- 960a729,730
- > {
- > // Possible write error
- 961a732
- > }
- 966c737,742
- < /* The data area has been fully encrypted; create and write the primary volume header */
- ---
- > /* Volume has been fully decrypted. */
- >
- >
- > // Prevent attempts to update volume header during the closing sequence
- > bEncryptedAreaSizeChanged = FALSE;
- >
- 970,987c746,750
- < for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_DISK_WIPE_PASSES); wipePass++)
- < {
- < nStatus = CreateVolumeHeaderInMemory (FALSE,
- < header,
- < headerCryptoInfo->ea,
- < headerCryptoInfo->mode,
- < password,
- < masterCryptoInfo->pkcs5,
- < (char *) masterCryptoInfo->master_keydata,
- < &tmpCryptoInfo,
- < masterCryptoInfo->VolumeSize.Value,
- < 0,
- < masterCryptoInfo->EncryptedAreaStart.Value,
- < masterCryptoInfo->EncryptedAreaLength.Value,
- < masterCryptoInfo->RequiredProgramVersion,
- < masterCryptoInfo->HeaderFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC,
- < masterCryptoInfo->SectorSize,
- < wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_DISK_WIPE_PASSES - 1));
- ---
- >
- >
- > /* Undo concealing of the filesystem */
- >
- > nStatus = ConcealNTFS (dev);
- 993d755
- < offset.QuadPart = TC_VOLUME_HEADER_OFFSET;
- 995,996c757,765
- < if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
- < || !WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header))
- ---
- > /* Ovewrite the backup header and the remaining ciphertext with all-zero blocks (the primary header was overwritten with the decrypted data). */
- >
- > memset (tmpSectorBuf, 0, sectorSize);
- >
- > for (offset.QuadPart = masterCryptoInfo->VolumeSize.Value;
- > offset.QuadPart <= deviceSize - sectorSize;
- > offset.QuadPart += sectorSize)
- > {
- > if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
- 1002,1003c771,774
- < // Fill the reserved sectors of the header area with random data
- < nStatus = WriteRandomDataToReservedHeaderAreas (dev, headerCryptoInfo, masterCryptoInfo->VolumeSize.Value, TRUE, FALSE);
- ---
- > if (WriteFile (dev, tmpSectorBuf, sectorSize, &n, NULL) == 0)
- > {
- > // Write error
- > dwError = GetLastError();
- 1005c776,777
- < if (nStatus != ERR_SUCCESS)
- ---
- > SetLastError (dwError);
- > nStatus = ERR_OS_ERROR;
- 1007a780,782
- > }
- >
- >
- 1009c784
- < // Update the configuration files
- ---
- > /* Update the configuration files */
- 1011c786
- < SaveNonSysInPlaceEncSettings (-1, wipeAlgorithm);
- ---
- > SaveNonSysInPlaceEncSettings (-1, TC_WIPE_NONE, TRUE);
- 1017a793
- >
- 1027a804,809
- > if (dev != INVALID_HANDLE_VALUE)
- > {
- > CloseHandle (dev);
- > dev = INVALID_HANDLE_VALUE;
- > }
- >
- 1042a825,830
- > if (dev != INVALID_HANDLE_VALUE)
- > {
- > CloseHandle (dev);
- > dev = INVALID_HANDLE_VALUE;
- > }
- >
- 1055,1060d842
- < if (tmpCryptoInfo != NULL)
- < {
- < crypto_close (tmpCryptoInfo);
- < tmpCryptoInfo = NULL;
- < }
- <
- 1064,1069d845
- < if (dev != INVALID_HANDLE_VALUE)
- < {
- < CloseHandle (dev);
- < dev = INVALID_HANDLE_VALUE;
- < }
- <
- 1070a847
- > {
- 1071a849,850
- > buf = NULL;
- > }
- 1073c852
- < if (header != NULL)
- ---
- > if (tmpSectorBuf != NULL)
- 1075,1077c854,855
- < burn (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- < VirtualUnlock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- < TCfree (header);
- ---
- > TCfree (tmpSectorBuf);
- > tmpSectorBuf = NULL;
- 1080,1083c858
- < if (wipeBuffer != NULL)
- < TCfree (wipeBuffer);
- <
- < if (zeroedSectorCount > 0)
- ---
- > if (skippedBadSectorCount > 0)
- 1088c863
- < GetSizeString (zeroedSectorCount * sectorSize, sizeStr);
- ---
- > GetSizeString (skippedBadSectorCount * sectorSize, sizeStr);
- 1091,1092c866,867
- < GetString ("ZEROED_BAD_SECTOR_COUNT"),
- < zeroedSectorCount,
- ---
- > GetString ("SKIPPED_BAD_SECTOR_COUNT"),
- > skippedBadSectorCount,
- 1146a922,929
- > // We need to ensure the TC_HEADER_FLAG_NONSYS_INPLACE_ENC flag bit is set, because if volumes created by TC-format
- > // were decrypted in place, it would be possible to mount them partially encrypted and it wouldn't be possible
- > // to resume interrupted decryption after the wizard exits.
- > masterCryptoInfo->HeaderFlags |= TC_HEADER_FLAG_NONSYS_INPLACE_ENC;
- > fieldPos = (byte *) header + TC_HEADER_OFFSET_FLAGS;
- > mputLong (fieldPos, (masterCryptoInfo->HeaderFlags));
- >
- >
- 1150a934
- >
- 1250,1311d1033
- < static int DismountFileSystem (HANDLE dev,
- < int driveLetter,
- < BOOL bForcedAllowed,
- < BOOL bForcedRequiresConfirmation,
- < BOOL bSilent)
- < {
- < int attempt;
- < BOOL bResult;
- < DWORD dwResult;
- <
- < CloseVolumeExplorerWindows (MainDlg, driveLetter);
- <
- < attempt = UNMOUNT_MAX_AUTO_RETRIES * 10;
- <
- < while (!(bResult = DeviceIoControl (dev, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &dwResult, NULL))
- < && attempt > 0)
- < {
- < Sleep (UNMOUNT_AUTO_RETRY_DELAY);
- < attempt--;
- < }
- <
- < if (!bResult)
- < {
- < if (!bForcedAllowed)
- < {
- < if (!bSilent)
- < ShowInPlaceEncErrMsgWAltSteps ("INPLACE_ENC_CANT_LOCK_OR_DISMOUNT_FILESYS", TRUE);
- <
- < return ERR_DONT_REPORT;
- < }
- <
- < if (bForcedRequiresConfirmation
- < && !bSilent
- < && AskWarnYesNo ("VOL_LOCK_FAILED_OFFER_FORCED_DISMOUNT") == IDNO)
- < {
- < return ERR_DONT_REPORT;
- < }
- < }
- <
- < // Dismount the volume
- <
- < attempt = UNMOUNT_MAX_AUTO_RETRIES * 10;
- <
- < while (!(bResult = DeviceIoControl (dev, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &dwResult, NULL))
- < && attempt > 0)
- < {
- < Sleep (UNMOUNT_AUTO_RETRY_DELAY);
- < attempt--;
- < }
- <
- < if (!bResult)
- < {
- < if (!bSilent)
- < ShowInPlaceEncErrMsgWAltSteps ("INPLACE_ENC_CANT_LOCK_OR_DISMOUNT_FILESYS", TRUE);
- <
- < return ERR_DONT_REPORT;
- < }
- <
- < return ERR_SUCCESS;
- < }
- <
- <
- 1318c1040
- < char buf [TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE];
- ---
- > char buf [TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE];
- 1329c1051
- < if (ReadFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0)
- ---
- > if (ReadFile (dev, buf, TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0)
- 1332,1333c1054,1055
- < for (i = 0; i < TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE; i++)
- < buf[i] ^= TC_NTFS_CONCEAL_CONSTANT;
- ---
- > for (i = 0; i < TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE; i++)
- > buf[i] ^= TC_TRANSFORM_FS_CONCEAL_CONSTANT;
- 1340c1062
- < if (WriteFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0)
- ---
- > if (WriteFile (dev, buf, TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0)
- 1347,1348c1069,1070
- < for (i = 0; i < TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE; i++)
- < buf[i] ^= TC_NTFS_CONCEAL_CONSTANT;
- ---
- > for (i = 0; i < TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE; i++)
- > buf[i] ^= TC_TRANSFORM_FS_CONCEAL_CONSTANT;
- 1357c1079
- < || WriteFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed2, NULL) == 0);
- ---
- > || WriteFile (dev, buf, TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed2, NULL) == 0);
- 1397c1119
- < BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm)
- ---
- > BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm, BOOL decrypting)
- 1413c1135,1136
- < else
- ---
- >
- > if (!decrypting)
- 1424a1148
- > }
- 1429d1152
- < }
- diff -b -r tc-7.1/Format/InPlace.h tc-7.2/Format/InPlace.h
- 20a21
- > NONSYS_INPLACE_ENC_STATUS_DECRYPTING,
- 27a29
- > BOOL CheckRequirementsForNonSysInPlaceDec (const char *devicePath, BOOL silent);
- 29a32
- > int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile BOOL *DiscardUnreadableEncryptedSectors);
- 35d37
- < static int DismountFileSystem (HANDLE dev, int driveLetter, BOOL bForcedAllowed, BOOL bForcedRequiresConfirmation, BOOL bSilent);
- 37c39
- < BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId wipeAlgorithm);
- ---
- > BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId wipeAlgorithm, BOOL decrypting);
- diff -b -r tc-7.1/Format/Resource.h tc-7.2/Format/Resource.h
- 36a37
- > #define IDD_DRIVE_LETTER_SELECTION_PAGE 132
- 45,139c46,134
- < #define IDC_COMBO_BOX_HASH_ALGO 1008
- < #define IDC_SPACE_LEFT 1009
- < #define IDC_VERIFY 1010
- < #define IDC_KB 1011
- < #define IDC_NO_HISTORY 1012
- < #define IDC_MB 1013
- < #define IDC_PROGRESS_BAR 1014
- < #define IDC_GB 1015
- < #define IDC_ABORT_BUTTON 1016
- < #define IDC_HEADER_KEY 1017
- < #define IDC_LIST_BOX 1018
- < #define IDC_DISK_KEY 1019
- < #define IDC_RANDOM_BYTES 1020
- < #define IDC_CIPHER_TEST 1021
- < #define IDC_BENCHMARK 1022
- < #define IDC_QUICKFORMAT 1023
- < #define IDC_BYTESWRITTEN 1024
- < #define IDC_WRITESPEED 1025
- < #define IDC_KEY_FILES 1026
- < #define IDC_TIMEREMAIN 1027
- < #define IDC_CLUSTERSIZE 1028
- < #define IDC_FILESYS 1029
- < #define IDC_SHOW_KEYS 1030
- < #define IDC_STD_VOL 1031
- < #define IDC_HIDDEN_VOL 1032
- < #define IDC_HIDDEN_VOL_HELP 1033
- < #define IDC_OPEN_OUTER_VOLUME 1034
- < #define IDC_HIDVOL_WIZ_MODE_FULL 1035
- < #define IDC_HIDVOL_WIZ_MODE_DIRECT 1036
- < #define IDC_PASSWORD_DIRECT 1037
- < #define IDC_SIZEBOX 1038
- < #define IDC_SELECT_VOLUME_LOCATION 1039
- < #define IDC_NEXT 1040
- < #define IDC_PREV 1041
- < #define IDT_ENCRYPTION_ALGO 1042
- < #define IDT_HASH_ALGO 1043
- < #define IDT_FORMAT_OPTIONS 1044
- < #define IDT_FILESYSTEM 1045
- < #define IDT_CLUSTER 1046
- < #define IDT_RANDOM_POOL 1047
- < #define IDT_HEADER_KEY 1048
- < #define IDT_MASTER_KEY 1049
- < #define IDT_DONE 1050
- < #define IDT_SPEED 1051
- < #define IDT_LEFT 1052
- < #define IDT_CONFIRM 1053
- < #define IDT_PASSWORD 1054
- < #define IDC_SHOW_PASSWORD_SINGLE 1055
- < #define IDC_SHOW_PASSWORD 1056
- < #define IDC_LINK_MORE_INFO_ABOUT_CIPHER 1057
- < #define IDC_LINK_HASH_INFO 1058
- < #define IDC_POS_BOX 1059
- < #define IDC_BITMAP_WIZARD 1060
- < #define IDC_FILE_CONTAINER 1061
- < #define IDC_NONSYS_DEVICE 1062
- < #define IDC_SYS_DEVICE 1063
- < #define IDT_FILE_CONTAINER 1064
- < #define IDT_NON_SYS_DEVICE 1065
- < #define IDT_SYS_DEVICE 1066
- < #define IDC_WHOLE_SYS_DRIVE 1067
- < #define IDC_SYS_PARTITION 1068
- < #define IDT_WHOLE_SYS_DRIVE 1069
- < #define IDT_SYS_PARTITION 1070
- < #define IDT_RESCUE_DISK_INFO 1071
- < #define IDC_MORE_INFO 1072
- < #define IDC_MORE_INFO_ON_SYS_ENCRYPTION 1073
- < #define IDT_COLLECTING_RANDOM_DATA_NOTE 1074
- < #define IDC_MORE_INFO_ON_CONTAINERS 1075
- < #define IDC_SINGLE_BOOT 1076
- < #define IDC_MULTI_BOOT 1077
- < #define IDT_MULTI_BOOT 1078
- < #define IDT_SINGLE_BOOT 1079
- < #define IDC_SYS_POOL_CONTENTS 1080
- < #define IDT_PARTIAL_POOL_CONTENTS 1081
- < #define IDC_DOWNLOAD_CD_BURN_SOFTWARE 1082
- < #define IDT_RESCUE_DISK_BURN_INFO 1083
- < #define IDT_WIPE_MODE_INFO 1084
- < #define IDC_WIPE_MODE 1085
- < #define IDC_SELECT 1086
- < #define IDT_SYSENC_KEYS_GEN_INFO 1087
- < #define IDC_DISPLAY_KEYS 1088
- < #define IDC_PAUSE 1089
- < #define IDT_WIPE_MODE 1090
- < #define IDC_MORE_INFO_SYS_ENCRYPTION 1091
- < #define IDC_BOX_HELP_NORMAL_VOL 1092
- < #define IDT_STATUS 1093
- < #define IDT_PROGRESS 1094
- < #define IDT_SYSENC_DRIVE_ANALYSIS_INFO 1095
- < #define IDC_SYSENC_NORMAL 1096
- < #define IDC_SYSENC_HIDDEN 1097
- < #define IDC_BOX_HELP_SYSENC_NORMAL 1098
- < #define IDC_HIDDEN_SYSENC_INFO_LINK 1099
- < #define IDT_PASS 1100
- < #define IDC_DEVICE_TRANSFORM_MODE_FORMAT 1101
- < #define IDC_DEVICE_TRANSFORM_MODE_INPLACE 1102
- ---
- > #define IDC_DRIVE_LETTER_LIST 1008
- > #define IDC_COMBO_BOX_HASH_ALGO 1009
- > #define IDC_SPACE_LEFT 1010
- > #define IDC_VERIFY 1011
- > #define IDC_KB 1012
- > #define IDC_NO_HISTORY 1013
- > #define IDC_MB 1014
- > #define IDC_PROGRESS_BAR 1015
- > #define IDC_GB 1016
- > #define IDC_ABORT_BUTTON 1017
- > #define IDC_HEADER_KEY 1018
- > #define IDC_LIST_BOX 1019
- > #define IDC_DISK_KEY 1020
- > #define IDC_RANDOM_BYTES 1021
- > #define IDC_CIPHER_TEST 1022
- > #define IDC_BENCHMARK 1023
- > #define IDC_QUICKFORMAT 1024
- > #define IDC_BYTESWRITTEN 1025
- > #define IDC_WRITESPEED 1026
- > #define IDC_KEY_FILES 1027
- > #define IDC_TIMEREMAIN 1028
- > #define IDC_CLUSTERSIZE 1029
- > #define IDC_FILESYS 1030
- > #define IDT_DRIVE_LETTER 1031
- > #define IDC_SHOW_KEYS 1032
- > #define IDC_STD_VOL 1033
- > #define IDC_HIDDEN_VOL 1034
- > #define IDC_OPEN_OUTER_VOLUME 1035
- > #define IDC_HIDVOL_WIZ_MODE_FULL 1036
- > #define IDC_HIDVOL_WIZ_MODE_DIRECT 1037
- > #define IDC_PASSWORD_DIRECT 1038
- > #define IDC_SIZEBOX 1039
- > #define IDC_SELECT_VOLUME_LOCATION 1040
- > #define IDC_NEXT 1041
- > #define IDC_PREV 1042
- > #define IDT_ENCRYPTION_ALGO 1043
- > #define IDT_HASH_ALGO 1044
- > #define IDT_FORMAT_OPTIONS 1045
- > #define IDT_FILESYSTEM 1046
- > #define IDT_CLUSTER 1047
- > #define IDT_RANDOM_POOL 1048
- > #define IDT_HEADER_KEY 1049
- > #define IDT_MASTER_KEY 1050
- > #define IDT_DONE 1051
- > #define IDT_SPEED 1052
- > #define IDT_LEFT 1053
- > #define IDT_CONFIRM 1054
- > #define IDT_PASSWORD 1055
- > #define IDC_SHOW_PASSWORD_SINGLE 1056
- > #define IDC_SHOW_PASSWORD 1057
- > #define IDC_POS_BOX 1058
- > #define IDC_BITMAP_WIZARD 1059
- > #define IDC_FILE_CONTAINER 1060
- > #define IDC_NONSYS_DEVICE 1061
- > #define IDC_SYS_DEVICE 1062
- > #define IDT_FILE_CONTAINER 1063
- > #define IDT_NON_SYS_DEVICE 1064
- > #define IDT_SYS_DEVICE 1065
- > #define IDC_WHOLE_SYS_DRIVE 1066
- > #define IDC_SYS_PARTITION 1067
- > #define IDT_WHOLE_SYS_DRIVE 1068
- > #define IDT_SYS_PARTITION 1069
- > #define IDT_RESCUE_DISK_INFO 1070
- > #define IDT_COLLECTING_RANDOM_DATA_NOTE 1071
- > #define IDC_SINGLE_BOOT 1072
- > #define IDC_MULTI_BOOT 1073
- > #define IDT_MULTI_BOOT 1074
- > #define IDT_SINGLE_BOOT 1075
- > #define IDC_SYS_POOL_CONTENTS 1076
- > #define IDT_PARTIAL_POOL_CONTENTS 1077
- > #define IDC_DOWNLOAD_CD_BURN_SOFTWARE 1078
- > #define IDT_RESCUE_DISK_BURN_INFO 1079
- > #define IDT_WIPE_MODE_INFO 1080
- > #define IDC_WIPE_MODE 1081
- > #define IDC_SELECT 1082
- > #define IDT_SYSENC_KEYS_GEN_INFO 1083
- > #define IDC_DISPLAY_KEYS 1084
- > #define IDC_PAUSE 1085
- > #define IDT_WIPE_MODE 1086
- > #define IDC_BOX_HELP_NORMAL_VOL 1087
- > #define IDT_STATUS 1088
- > #define IDT_PROGRESS 1089
- > #define IDT_SYSENC_DRIVE_ANALYSIS_INFO 1090
- > #define IDC_SYSENC_NORMAL 1091
- > #define IDC_SYSENC_HIDDEN 1092
- > #define IDC_BOX_HELP_SYSENC_NORMAL 1093
- > #define IDT_PASS 1094
- > #define IDC_DEVICE_TRANSFORM_MODE_FORMAT 1095
- > #define IDC_DEVICE_TRANSFORM_MODE_INPLACE 1096
- 146c141
- < #define _APS_NEXT_RESOURCE_VALUE 132
- ---
- > #define _APS_NEXT_RESOURCE_VALUE 133
- 148c143
- < #define _APS_NEXT_CONTROL_VALUE 1103
- ---
- > #define _APS_NEXT_CONTROL_VALUE 1097
- diff -b -r tc-7.1/Format/Tcformat.c tc-7.2/Format/Tcformat.c
- 90c90
- < NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE,
- ---
- > NONSYS_INPLACE_ENC_PASSWORD_PAGE,
- 94,95c94,96
- < NONSYS_INPLACE_ENC_ENCRYPTION_PAGE,
- < NONSYS_INPLACE_ENC_ENCRYPTION_FINISHED_PAGE,
- ---
- > NONSYS_INPLACE_ENC_TRANSFORM_PAGE,
- > NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE,
- > NONSYS_INPLACE_DEC_TRANSFORM_FINISHED_DRIVE_LETTER_PAGE,
- 147a149
- > BOOL DirectNonSysInplaceDecStartMode = FALSE;
- 148a151
- > BOOL DirectNonSysInplaceDecResumeMode = FALSE;
- 150,151c153,155
- < volatile BOOL bInPlaceEncNonSys = FALSE; /* If TRUE, existing data on a non-system partition/volume are to be encrypted (for system encryption, this flag is ignored) */
- < volatile BOOL bInPlaceEncNonSysResumed = FALSE; /* If TRUE, the wizard is supposed to resume (or has resumed) process of non-system in-place encryption. */
- ---
- > volatile BOOL bInPlaceEncNonSys = FALSE; /* If TRUE, existing data on a non-system partition/volume are to be encrypted (or decrypted if bInPlaceDecNonSys is TRUE) in place (for system encryption, this flag is ignored) */
- > volatile BOOL bInPlaceDecNonSys = FALSE; /* If TRUE, existing data on a non-system partition/volume are to be decrypted in place (for system encryption, this flag is ignored) */
- > volatile BOOL bInPlaceEncNonSysResumed = FALSE; /* If TRUE, the wizard is supposed to resume (or has resumed) process of non-system in-place encryption/decryption. */
- 568a573
- > {
- 569a575,576
- > bInPlaceDecNonSys = FALSE;
- > }
- 576a584
- > {
- 577a586,587
- >
- > if (! (bInPlaceDecNonSys && !bInPlaceEncNonSysResumed)) // If we are starting (but not resuming) decryption of non-system volume, we actually need szFileName as it contains the command line param.
- 578a589
- >
- 581a593
- > }
- 978a991
- > bInPlaceDecNonSys = FALSE;
- 1014c1027
- < void SwitchWizardToNonSysInplaceEncResumeMode (void)
- ---
- > void SwitchWizardToNonSysInplaceEncResumeMode (BOOL decrypt)
- 1018c1031
- < if (!ElevateWholeWizardProcess ("/zinplace"))
- ---
- > if (!ElevateWholeWizardProcess (decrypt ? "/resumeinplacedec" : "/zinplace"))
- 1027a1041
- > bInPlaceDecNonSys = decrypt;
- 1032c1046,1071
- < LoadPage (MainDlg, NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE);
- ---
- > LoadPage (MainDlg, NONSYS_INPLACE_ENC_PASSWORD_PAGE);
- > }
- >
- > void SwitchWizardToNonSysInplaceDecStartMode (char *volPath)
- > {
- > if (!IsAdmin() && IsUacSupported())
- > {
- > if (!ElevateWholeWizardProcess ((string ("/inplacedec \"") + volPath + "\"").c_str()))
- > AbortProcessSilent ();
- > }
- >
- > if (!IsAdmin())
- > AbortProcess("ADMIN_PRIVILEGES_WARN_DEVICES");
- >
- > if (!CheckRequirementsForNonSysInPlaceDec (volPath, FALSE))
- > AbortProcessSilent ();
- >
- > CreateNonSysInplaceEncMutex ();
- >
- > bInPlaceEncNonSys = TRUE;
- > bInPlaceDecNonSys = TRUE;
- > bInPlaceEncNonSysResumed = FALSE;
- >
- > ChangeWizardMode (WIZARD_MODE_NONSYS_DEVICE);
- >
- > LoadPage (MainDlg, NONSYS_INPLACE_ENC_PASSWORD_PAGE);
- 1238,1239d1276
- < wcscpy_s (hyperLink, sizeof(hyperLink) / 2, GetString ("IDC_LINK_MORE_INFO_ABOUT_CIPHER"));
- <
- 1247,1251d1283
- <
- <
- < // Update hyperlink
- < SetWindowTextW (GetDlgItem (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER), hyperLink);
- < AccommodateTextField (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER, FALSE, hUserUnderlineFont);
- 1641a1674
- > bVolTransformThreadCancel = FALSE;
- 1817a1851,1853
- > case NONSYS_INPLACE_ENC_STATUS_DECRYPTING:
- > wcscpy (nonSysInplaceEncUIStatus, GetString ("PROGRESS_STATUS_DECRYPTING"));
- > break;
- 1837c1873,1878
- < EnableWindow (GetDlgItem (hCurPage, IDC_WIPE_MODE), !(bVolTransformThreadRunning || bVolTransformThreadToRun));
- ---
- > // Reduce flickering by updating a GUI element only when a relevant change affects it
- > static BOOL lastbVolTransformThreadRunning = !bVolTransformThreadRunning;
- > static BOOL lastbVolTransformThreadToRun = !bVolTransformThreadToRun;
- > static BOOL lastbInPlaceEncNonSysResumed = !bInPlaceEncNonSysResumed;
- >
- > EnableWindow (GetDlgItem (hCurPage, IDC_WIPE_MODE), !(bVolTransformThreadRunning || bVolTransformThreadToRun) && !bInPlaceDecNonSys);
- 1838a1880,1882
- > if (lastbVolTransformThreadRunning != bVolTransformThreadRunning
- > || lastbVolTransformThreadToRun != bVolTransformThreadToRun)
- > {
- 1841a1886,1891
- > lastbVolTransformThreadRunning = bVolTransformThreadRunning;
- > lastbVolTransformThreadToRun = bVolTransformThreadToRun;
- > }
- >
- > if (lastbInPlaceEncNonSysResumed != bInPlaceEncNonSysResumed)
- > {
- 1842a1893,1894
- > lastbInPlaceEncNonSysResumed = bInPlaceEncNonSysResumed;
- > }
- 1906a1959
- > || nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_DECRYPTING
- 1911c1964
- < && nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_ENCRYPTING)
- ---
- > && (nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_ENCRYPTING || nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_DECRYPTING))
- 1945c1998
- < FALSE,
- ---
- > bInPlaceDecNonSys,
- 2348c2401
- < volParams->headerFlags = CreatingHiddenSysVol() ? TC_HEADER_FLAG_ENCRYPTED_SYSTEM : 0;
- ---
- > volParams->headerFlags = (CreatingHiddenSysVol() ? TC_HEADER_FLAG_ENCRYPTED_SYSTEM : 0);
- 2358c2411,2420
- < if (bInPlaceEncNonSys)
- ---
- > if (bInPlaceDecNonSys)
- > {
- > // In-place decryption of non-system volume
- >
- > if (!bInPlaceEncNonSysResumed)
- > DiscardUnreadableEncryptedSectors = FALSE;
- >
- > nStatus = DecryptPartitionInPlace (volParams, &DiscardUnreadableEncryptedSectors);
- > }
- > else if (bInPlaceEncNonSys)
- 2359a2422,2423
- > // In-place encryption of non-system volume
- >
- 2386a2451,2452
- > // Format-encryption
- >
- 2404c2470
- < // Ignore user abort if non-system in-place encryption successfully finished
- ---
- > // Ignore user abort if non-system in-place encryption/decryption successfully finished
- 2431c2497
- < && !(bInPlaceEncNonSys && NonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_FINISHED)) // Ignore user abort if non-system in-place encryption successfully finished.
- ---
- > && !(bInPlaceEncNonSys && NonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_FINISHED)) // Ignore user abort if non-system in-place encryption/decryption successfully finished.
- 2460a2527,2530
- >
- > if (bInPlaceDecNonSys)
- > Error ("INPLACE_DEC_GENERIC_ERR");
- > else
- 2500a2571,2572
- > if (!bInPlaceDecNonSys)
- > {
- 2502d2573
- <
- 2506a2578,2582
- > // NOP - Final steps for in-place decryption are handled with the TC_APPMSG_NONSYS_INPLACE_ENC_FINISHED message.
- > }
- > }
- > else
- > {
- 2632,2633c2708
- < hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_INTRO_PAGE_DLG), hwndDlg,
- < (DLGPROC) PageDialogProc);
- ---
- > AbortProcess ("INSECURE_APP");
- 2771c2846
- < case NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE:
- ---
- > case NONSYS_INPLACE_ENC_PASSWORD_PAGE:
- 2781c2856
- < case NONSYS_INPLACE_ENC_ENCRYPTION_PAGE:
- ---
- > case NONSYS_INPLACE_ENC_TRANSFORM_PAGE:
- 2786c2861
- < case NONSYS_INPLACE_ENC_ENCRYPTION_FINISHED_PAGE:
- ---
- > case NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE:
- 2790a2866,2870
- > case NONSYS_INPLACE_DEC_TRANSFORM_FINISHED_DRIVE_LETTER_PAGE:
- > hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_DRIVE_LETTER_SELECTION_PAGE), hwndDlg,
- > (DLGPROC) PageDialogProc);
- > break;
- >
- 3185c3265
- < swprintf (szTmp, GetString (bInPlaceEncNonSys ? "NONSYS_INPLACE_ENC_CONFIRM" : "OVERWRITEPROMPT_DEVICE"), type, szFileName, drive);
- ---
- > swprintf (szTmp, GetString (bInPlaceEncNonSys ? (bInPlaceDecNonSys ? "NONSYS_INPLACE_DEC_CONFIRM" : "NONSYS_INPLACE_ENC_CONFIRM") : "OVERWRITEPROMPT_DEVICE"), type, szFileName, drive);
- 3251a3332,3341
- >
- > void UpdateLastDialogId (void)
- > {
- > static char PageDebugId[128];
- >
- > sprintf (PageDebugId, "FORMAT_PAGE_%d", nCurPageNo);
- > LastDialogId = PageDebugId;
- > }
- >
- >
- 3294d3383
- < static char PageDebugId[128];
- 3305,3306c3394
- < sprintf (PageDebugId, "FORMAT_PAGE_%d", nCurPageNo);
- < LastDialogId = PageDebugId;
- ---
- > UpdateLastDialogId ();
- 3318,3320d3405
- < ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_CONTAINERS);
- < ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_SYS_ENCRYPTION);
- <
- 3347,3348d3431
- < ToHyperlink (hwndDlg, IDC_HIDDEN_SYSENC_INFO_LINK);
- <
- 3368d3450
- < ToHyperlink (hwndDlg, IDC_HIDDEN_SYSENC_INFO_LINK);
- 3537,3538d3618
- < ToHyperlink (hwndDlg, IDC_HIDDEN_VOL_HELP);
- <
- 3728,3729d3807
- < ToHyperlink (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER);
- <
- 3747,3748d3824
- < ToHyperlink (hwndDlg, IDC_LINK_HASH_INFO);
- <
- 3851c3927
- < case NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE:
- ---
- > case NONSYS_INPLACE_ENC_PASSWORD_PAGE:
- 3861c3937
- < SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (bInPlaceEncNonSys ? "NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE_HELP" : "PASSWORD_HIDDENVOL_HOST_DIRECT_HELP"));
- ---
- > 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"));
- 4206,4207d4281
- < ToHyperlink (hwndDlg, IDC_MORE_INFO_SYS_ENCRYPTION);
- <
- 4253c4327
- < case NONSYS_INPLACE_ENC_ENCRYPTION_PAGE:
- ---
- > case NONSYS_INPLACE_ENC_TRANSFORM_PAGE:
- 4263c4337
- < SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("ENCRYPTION"));
- ---
- > SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bInPlaceDecNonSys ? "DECRYPTION" : "ENCRYPTION"));
- 4265c4339
- < SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("NONSYS_INPLACE_ENC_ENCRYPTION_PAGE_INFO"));
- ---
- > SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (bInPlaceDecNonSys ? "NONSYS_INPLACE_DEC_DECRYPTION_PAGE_INFO" : "NONSYS_INPLACE_ENC_ENCRYPTION_PAGE_INFO"));
- 4271c4345
- < SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString (bInPlaceEncNonSysResumed ? "RESUME" : "ENCRYPT"));
- ---
- > SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString (bInPlaceEncNonSysResumed ? "RESUME" : (bInPlaceDecNonSys ? "DECRYPT" : "ENCRYPT")));
- 4275c4349
- < EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), !bInPlaceEncNonSysResumed);
- ---
- > EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), !bInPlaceEncNonSysResumed && !bInPlaceDecNonSys);
- 4281,4282c4355,4362
- < ShowWindow (GetDlgItem (hwndDlg, IDC_MORE_INFO_SYS_ENCRYPTION), SW_HIDE);
- <
- ---
- > if (bInPlaceDecNonSys)
- > {
- > ShowWindow(GetDlgItem(hwndDlg, IDT_FORMAT_OPTIONS), SW_HIDE);
- > ShowWindow(GetDlgItem(hwndDlg, IDT_WIPE_MODE), SW_HIDE);
- > ShowWindow(GetDlgItem(hwndDlg, IDC_WIPE_MODE), SW_HIDE);
- > }
- > else
- > {
- 4285a4366
- > }
- 4289c4370
- < case NONSYS_INPLACE_ENC_ENCRYPTION_FINISHED_PAGE:
- ---
- > case NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE:
- 4293c4374
- < SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("NONSYS_INPLACE_ENC_FINISHED_TITLE"));
- ---
- > SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bInPlaceDecNonSys ? "NONSYS_INPLACE_DEC_FINISHED_TITLE" : "NONSYS_INPLACE_ENC_FINISHED_TITLE"));
- 4295c4376
- < SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("NONSYS_INPLACE_ENC_FINISHED_INFO"));
- ---
- > SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (bInPlaceDecNonSys ? "NONSYS_INPLACE_DEC_FINISHED_INFO" : "NONSYS_INPLACE_ENC_FINISHED_INFO"));
- 4306a4388,4435
- > case NONSYS_INPLACE_DEC_TRANSFORM_FINISHED_DRIVE_LETTER_PAGE:
- >
- > SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("NONSYS_INPLACE_DEC_FINISHED_TITLE"));
- >
- > SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("NONSYS_INPLACE_DEC_FINISHED_DRIVE_LETTER_SEL_INFO"));
- >
- > SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
- > SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("FINALIZE"));
- > EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), FALSE);
- > EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
- >
- > SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDCANCEL), GetString ("CANCEL"));
- >
- > // The Cancel button and the X button must be disabled to prevent the user from forgetting to assign a drive letter to the partition by closing
- > // the window accidentally or clicking Cancel. The user is forced to click Finish to assign at least the pre-selected free drive letter.
- > // This is critical because inexperienced users would not know how to access data on the decrypted volume without a drive letter.
- > EnableWindow (GetDlgItem (GetParent (hwndDlg), IDCANCEL), FALSE);
- > DisableCloseButton (MainDlg);
- > bConfirmQuit = TRUE; // Alt-F4 will still work but the user will be prompted to confirm the action.
- >
- > // Decryption of non-system volume finished, no drive letter is assigned to the decrypted volume, and free drive letters are available.
- > // This is critical because inexperienced users would not know how to access data on the decrypted volume. We cannot allow exit
- > // until a drive letter is freed up and assigned to the decrypted volume.
- >
- > while (GetFirstAvailableDrive () == -1)
- > {
- > Error ("NONSYS_INPLACE_DEC_FINISHED_NO_DRIVE_LETTER_AVAILABLE");
- > }
- >
- > // Populate the combobox with free drive letters
- > {
- > DWORD dwUsedDrives = GetLogicalDrives();
- > char szDriveLetter[] = {' ', ':', 0 };
- > int i;
- >
- > for (i = 3; i < 26; i++)
- > {
- > if (!(dwUsedDrives & 1 << i))
- > {
- > // Add
- > szDriveLetter [0] = (char) (i + 'A');
- > AddComboPair (GetDlgItem (hCurPage, IDC_DRIVE_LETTER_LIST), szDriveLetter, i);
- > }
- > }
- > }
- > SendMessage (GetDlgItem (hwndDlg, IDC_DRIVE_LETTER_LIST), CB_SETCURSEL, 0, 0);
- > break;
- >
- 4623,4626d4751
- < case WM_HELP:
- < OpenPageHelp (GetParent (hwndDlg), nCurPageNo);
- < return 1;
- <
- 4648,4655d4772
- <
- < case IDC_MORE_INFO_ON_CONTAINERS:
- < Applink ("introcontainer", TRUE, "");
- < return 1;
- <
- < case IDC_MORE_INFO_ON_SYS_ENCRYPTION:
- < Applink ("introsysenc", TRUE, "");
- < return 1;
- 4674,4677d4790
- <
- < case IDC_HIDDEN_SYSENC_INFO_LINK:
- < Applink ("hiddensysenc", TRUE, "");
- < return 1;
- 4681,4686d4793
- < if (nCurPageNo == SYSENC_HIDDEN_OS_REQ_CHECK_PAGE && lw == IDC_HIDDEN_SYSENC_INFO_LINK)
- < {
- < Applink ("hiddensysenc", TRUE, "");
- < return 1;
- < }
- <
- 4804,4807d4910
- <
- < case IDC_MORE_INFO_SYS_ENCRYPTION:
- < Applink ("sysencprogressinfo", TRUE, "");
- < return 1;
- 4853c4956
- < case NONSYS_INPLACE_ENC_ENCRYPTION_PAGE:
- ---
- > case NONSYS_INPLACE_ENC_TRANSFORM_PAGE:
- 4895,4900d4997
- < if (lw == IDC_HIDDEN_VOL_HELP && nCurPageNo == VOLUME_TYPE_PAGE)
- < {
- < Applink ("hiddenvolume", TRUE, "");
- < return 1;
- < }
- <
- 4940,4965d5036
- < if (lw == IDC_LINK_MORE_INFO_ABOUT_CIPHER && nCurPageNo == CIPHER_PAGE)
- < {
- < char name[100];
- <
- < int nIndex = SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETCURSEL, 0, 0);
- < nIndex = SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0);
- < EAGetName (name, nIndex);
- <
- < if (strcmp (name, "AES") == 0)
- < Applink ("aes", FALSE, "");
- < else if (strcmp (name, "Serpent") == 0)
- < Applink ("serpent", FALSE, "");
- < else if (strcmp (name, "Twofish") == 0)
- < Applink ("twofish", FALSE, "");
- < else if (EAGetCipherCount (nIndex) > 1)
- < Applink ("cascades", TRUE, "");
- <
- < return 1;
- < }
- <
- < if (lw == IDC_LINK_HASH_INFO && nCurPageNo == CIPHER_PAGE)
- < {
- < Applink ("hashalgorithms", TRUE, "");
- < return 1;
- < }
- <
- 5031c5102
- < || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
- ---
- > || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
- 5054c5125
- < if (nCurPageNo != HIDDEN_VOL_HOST_PASSWORD_PAGE && nCurPageNo != NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
- ---
- > if (nCurPageNo != HIDDEN_VOL_HOST_PASSWORD_PAGE && nCurPageNo != NONSYS_INPLACE_ENC_PASSWORD_PAGE)
- 5057c5128
- < if (nCurPageNo != HIDDEN_VOL_HOST_PASSWORD_PAGE && nCurPageNo != NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
- ---
- > if (nCurPageNo != HIDDEN_VOL_HOST_PASSWORD_PAGE && nCurPageNo != NONSYS_INPLACE_ENC_PASSWORD_PAGE)
- 5073c5144
- < if (nCurPageNo != HIDDEN_VOL_HOST_PASSWORD_PAGE && nCurPageNo != NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
- ---
- > if (nCurPageNo != HIDDEN_VOL_HOST_PASSWORD_PAGE && nCurPageNo != NONSYS_INPLACE_ENC_PASSWORD_PAGE)
- 5088c5159
- < || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
- ---
- > || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
- 5320,5321d5390
- < else
- < Applink ("isoburning", TRUE, "");
- 5546a5616,5617
- > UpdateLastDialogId ();
- >
- 5670a5742,5743
- >
- > UpdateLastDialogId ();
- 5747a5821
- >
- 5809a5884
- > UpdateLastDialogId ();
- 5893c5968,5988
- < LoadPage (hwndDlg, NONSYS_INPLACE_ENC_ENCRYPTION_FINISHED_PAGE);
- ---
- > if (bInPlaceDecNonSys)
- > {
- > // Decryption of non-system volume finished and free drive letters are available. Check if a drive letter is assigned to the decrypted volume.
- >
- > WCHAR deviceName[MAX_PATH];
- >
- > strcpy ((char *)deviceName, szDiskFile);
- > ToUNICODE ((char *)deviceName);
- >
- > if (GetDiskDeviceDriveLetter (deviceName) < 0)
- > {
- > // No drive letter is assigned to the device
- > MessageBeep (MB_OK);
- > LoadPage (hwndDlg, NONSYS_INPLACE_DEC_TRANSFORM_FINISHED_DRIVE_LETTER_PAGE);
- > return 1;
- > }
- > else
- > {
- > Info ("NONSYS_INPLACE_DEC_FINISHED_INFO");
- > }
- > }
- 5894a5990
- > LoadPage (hwndDlg, NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE);
- 5926,5930d6021
- < case WM_HELP:
- <
- < OpenPageHelp (hwndDlg, nCurPageNo);
- < return 1;
- <
- 5933c6024
- < if (nCurPageNo == NONSYS_INPLACE_ENC_ENCRYPTION_PAGE
- ---
- > if (nCurPageNo == NONSYS_INPLACE_ENC_TRANSFORM_PAGE
- 6026,6031c6117
- < if (lw == IDHELP)
- < {
- < OpenPageHelp (hwndDlg, nCurPageNo);
- < return 1;
- < }
- < else if (lw == IDCANCEL)
- ---
- > if (lw == IDCANCEL)
- 6713c6799
- < || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
- ---
- > || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
- 6852c6938
- < else
- ---
- > else if (bInPlaceEncNonSysResumed)
- 6855c6941
- < encryption has been interrupted. */
- ---
- > encryption/decryption has been interrupted. */
- 6898c6984
- < nNewPageNo = NONSYS_INPLACE_ENC_ENCRYPTION_PAGE - 1; // Skip irrelevant pages
- ---
- > nNewPageNo = NONSYS_INPLACE_ENC_TRANSFORM_PAGE - 1; // Skip irrelevant pages
- 6902a6989,7001
- > else
- > {
- > /* Try to mount the non-system volume to decrypt in place (the process has not started yet, we are NOT trying to resume it).
- > We will try to mount it using the backup header, which we require to work (i.e. be non-damaged) before we start writing
- > to the volume (the primary header will be overwritten by decrypted data soon after the decryption process begins, so the
- > backup header will contain the only copy of the master key). */
- >
- > int driveNo = -1;
- >
- > // The volume may already be mounted. We need to dismount it first in order to verify the supplied password/keyfile(s) is/are correct.
- > if (IsMountedVolume (szFileName))
- > {
- > driveNo = GetMountedVolumeDriveNo (szFileName);
- 6903a7003,7092
- > if (driveNo == -1
- > || !UnmountVolume (hwndDlg, driveNo, TRUE))
- > {
- > handleWin32Error (MainDlg);
- > AbortProcess ("CANT_DISMOUNT_VOLUME");
- > }
- > }
- >
- > driveNo = GetLastAvailableDrive ();
- >
- > if (driveNo < 0)
- > AbortProcess ("NO_FREE_DRIVES");
- >
- > MountOptions mountOptions;
- > ZeroMemory (&mountOptions, sizeof (mountOptions));
- >
- > mountOptions.UseBackupHeader = FALSE; // This must be FALSE at this point because otherwise we wouldn't be able to detect a legacy volume
- > mountOptions.ReadOnly = TRUE;
- > mountOptions.Removable = ConfigReadInt ("MountVolumesRemovable", FALSE);
- >
- > // Check that it is not a hidden or legacy volume
- >
- > if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
- > {
- > NormalCursor();
- > return 1;
- > }
- >
- > {
- > DWORD dwResult;
- > VOLUME_PROPERTIES_STRUCT volProp;
- >
- > memset (&volProp, 0, sizeof(volProp));
- > volProp.driveNo = driveNo;
- > if (!DeviceIoControl (hDriver, TC_IOCTL_GET_VOLUME_PROPERTIES, &volProp, sizeof (volProp), &volProp, sizeof (volProp), &dwResult, NULL) || dwResult == 0)
- > {
- > handleWin32Error (hwndDlg);
- > UnmountVolume (hwndDlg, driveNo, TRUE);
- > AbortProcess ("CANT_GET_VOL_INFO");
- > }
- >
- > if (volProp.volFormatVersion == TC_VOLUME_FORMAT_VERSION_PRE_6_0)
- > {
- > UnmountVolume (hwndDlg, driveNo, TRUE);
- > AbortProcess ("NONSYS_INPLACE_DECRYPTION_BAD_VOL_FORMAT");
- > }
- >
- > if (volProp.hiddenVolume)
- > {
- > UnmountVolume (hwndDlg, driveNo, TRUE);
- > AbortProcess ("NONSYS_INPLACE_DECRYPTION_CANT_DECRYPT_HID_VOL");
- > }
- > }
- >
- > // Remount the volume using the backup header to verify it is working
- >
- > if (!UnmountVolume (hwndDlg, driveNo, TRUE))
- > {
- > handleWin32Error (MainDlg);
- > AbortProcess ("CANT_DISMOUNT_VOLUME");
- > }
- >
- > mountOptions.UseBackupHeader = TRUE; // This must be TRUE at this point (we won't be using the regular header, which will be lost soon after the decryption process starts)
- >
- > if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
- > {
- > NormalCursor();
- > return 1;
- > }
- >
- > if (!UnmountVolume (hwndDlg, driveNo, TRUE))
- > {
- > handleWin32Error (MainDlg);
- > AbortProcess ("CANT_DISMOUNT_VOLUME");
- > }
- >
- > BOOL tmpbDevice;
- >
- > CreateFullVolumePath (szDiskFile, szFileName, &tmpbDevice);
- >
- > nVolumeSize = GetDeviceSize (szDiskFile);
- > if (nVolumeSize == -1)
- > {
- > handleWin32Error (MainDlg);
- > AbortProcessSilent ();
- > }
- >
- > nNewPageNo = NONSYS_INPLACE_ENC_TRANSFORM_PAGE - 1; // Skip irrelevant pages
- > NormalCursor();
- > }
- 7208c7397
- < nNewPageNo = NONSYS_INPLACE_ENC_ENCRYPTION_PAGE - 1; // Skip irrelevant pages
- ---
- > nNewPageNo = NONSYS_INPLACE_ENC_TRANSFORM_PAGE - 1; // Skip irrelevant pages
- 7210c7399
- < else if (nCurPageNo == NONSYS_INPLACE_ENC_ENCRYPTION_PAGE)
- ---
- > else if (nCurPageNo == NONSYS_INPLACE_ENC_TRANSFORM_PAGE)
- 7213a7403,7410
- > if (bInPlaceDecNonSys
- > && !bInPlaceEncNonSysResumed
- > && AskWarnYesNo ("NONSYS_INPLACE_ENC_CONFIRM_BACKUP") == IDNO)
- > {
- > // Cancel
- > return 1;
- > }
- >
- 7217c7414,7419
- < else if (nCurPageNo == NONSYS_INPLACE_ENC_ENCRYPTION_FINISHED_PAGE)
- ---
- > else if (nCurPageNo == NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE)
- > {
- > PostMessage (hwndDlg, TC_APPMSG_FORMAT_USER_QUIT, 0, 0);
- > return 1;
- > }
- > else if (nCurPageNo == NONSYS_INPLACE_DEC_TRANSFORM_FINISHED_DRIVE_LETTER_PAGE)
- 7218a7421,7464
- > BOOL bDrvLetterAssignResult = FALSE;
- >
- > int tmpDriveLetter = (int) SendMessage (GetDlgItem (hCurPage, IDC_DRIVE_LETTER_LIST),
- > CB_GETITEMDATA,
- > SendMessage (GetDlgItem (hCurPage, IDC_DRIVE_LETTER_LIST), CB_GETCURSEL, 0, 0),
- > 0);
- >
- > if (tmpDriveLetter < 0)
- > tmpDriveLetter = GetFirstAvailableDrive ();
- >
- > do
- > {
- > char szDriveLetter[] = {'A', ':', 0 };
- > char rootPath[] = {'A', ':', '\\', 0 };
- > char uniqVolName[MAX_PATH+1] = { 0 };
- >
- > rootPath[0] += (char) tmpDriveLetter;
- > szDriveLetter[0] += (char) tmpDriveLetter;
- >
- > if (DefineDosDevice (DDD_RAW_TARGET_PATH, szDriveLetter, szDiskFile))
- > {
- > bDrvLetterAssignResult = GetVolumeNameForVolumeMountPoint (rootPath, uniqVolName, MAX_PATH);
- >
- > DefineDosDevice (DDD_RAW_TARGET_PATH|DDD_REMOVE_DEFINITION|DDD_EXACT_MATCH_ON_REMOVE,
- > szDriveLetter,
- > szDiskFile);
- >
- > if (bDrvLetterAssignResult)
- > {
- > if (SetVolumeMountPoint (rootPath, uniqVolName) == 0)
- > bDrvLetterAssignResult = FALSE;
- > }
- > }
- >
- > if (!bDrvLetterAssignResult)
- > {
- > if (AskErrYesNo ("ERR_CANNOT_ASSIGN_DRIVE_LETTER_NONSYS_DEC") == IDNO)
- > break;
- > }
- >
- > } while (bDrvLetterAssignResult == FALSE);
- >
- > bConfirmQuit = FALSE;
- >
- 7680c7926
- < || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
- ---
- > || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
- 7802c8048
- < CommandResumeInplaceLogOn,
- ---
- > CommandResumeNonSysInplaceLogOn,
- 7804a8051,8052
- > CommandInplaceDec,
- > CommandResumeInplaceDec,
- 7809a8058
- > // Public
- 7814a8064
- > // Internal
- 7820c8070
- < { CommandResumeInplaceLogOn, "/prinplace", "/p", TRUE },
- ---
- > { CommandResumeNonSysInplaceLogOn, "/prinplace", "/p", TRUE },
- 7822a8073,8074
- > { CommandInplaceDec, "/inplacedec", NULL, TRUE },
- > { CommandResumeInplaceDec, "/resumeinplacedec",NULL, TRUE },
- 7842,7856c8094
- < // Encrypt system partition/drive (passed by Mount if system encryption hasn't started or to reverse decryption)
- <
- < // From now on, we should be the only instance of the TC wizard allowed to deal with system encryption
- < if (CreateSysEncMutex ())
- < {
- < bDirectSysEncMode = TRUE;
- < bDirectSysEncModeCommand = SYSENC_COMMAND_ENCRYPT;
- < ChangeWizardMode (WIZARD_MODE_SYS_DEVICE);
- < }
- < else
- < {
- < Warning ("SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE");
- < exit(0);
- < }
- <
- ---
- > AbortProcess ("INSECURE_APP");
- 7877,7891c8115
- < // Create a hidden operating system (passed by Mount when the user selects System -> Create Hidden Operating System)
- <
- < // From now on, we should be the only instance of the TC wizard allowed to deal with system encryption
- < if (CreateSysEncMutex ())
- < {
- < bDirectSysEncMode = TRUE;
- < bDirectSysEncModeCommand = SYSENC_COMMAND_CREATE_HIDDEN_OS;
- < ChangeWizardMode (WIZARD_MODE_SYS_DEVICE);
- < }
- < else
- < {
- < Warning ("SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE");
- < exit(0);
- < }
- <
- ---
- > AbortProcess ("INSECURE_APP");
- 7895,7909c8119
- < // Resume process of creation of a hidden operating system (passed by Wizard when the user needs to UAC-elevate the whole wizard process)
- <
- < // From now on, we should be the only instance of the TC wizard allowed to deal with system encryption
- < if (CreateSysEncMutex ())
- < {
- < bDirectSysEncMode = TRUE;
- < bDirectSysEncModeCommand = SYSENC_COMMAND_CREATE_HIDDEN_OS_ELEV;
- < ChangeWizardMode (WIZARD_MODE_SYS_DEVICE);
- < }
- < else
- < {
- < Warning ("SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE");
- < exit(0);
- < }
- <
- ---
- > AbortProcess ("INSECURE_APP");
- 7947,7948c8157,8176
- < // Resume process of creation of a non-sys-device-hosted volume (passed by Wizard when the user needs to UAC-elevate)
- < DirectDeviceEncMode = TRUE;
- ---
- > AbortProcess ("INSECURE_APP");
- > break;
- >
- > case CommandInplaceDec:
- > // Start (not resume) decrypting the specified non-system volume in place
- > {
- > char szTmp [TC_MAX_PATH + 8000] = {0};
- >
- > GetArgumentValue (lpszCommandLineArgs, nArgPos, &i, nNoCommandLineArgs, szTmp, sizeof (szTmp));
- >
- > if (strlen (szTmp) < 1)
- > {
- > // No valid volume path specified as command-line parameter
- > AbortProcess ("ERR_PARAMETER_INCORRECT");
- > }
- >
- > memset (szFileName, 0, sizeof (szFileName));
- > strncpy (szFileName, szTmp, sizeof (szFileName));
- > DirectNonSysInplaceDecStartMode = TRUE;
- > }
- 7952,7953c8180,8185
- < // Resume interrupted process of non-system in-place encryption of a partition
- < DirectNonSysInplaceEncResumeMode = TRUE;
- ---
- > AbortProcess ("INSECURE_APP");
- > break;
- >
- > case CommandResumeInplaceDec:
- > // Resume interrupted process of non-system in-place decryption of a partition
- > DirectNonSysInplaceDecResumeMode = TRUE;
- 7956,7957c8188,8189
- < case CommandResumeInplaceLogOn:
- < // Ask the user whether to resume interrupted process of non-system in-place encryption of a partition
- ---
- > case CommandResumeNonSysInplaceLogOn:
- > // Ask the user whether to resume interrupted process of non-system in-place encryption/decryption of a partition
- 8089c8321
- < if (volProp.volFormatVersion < TC_VOLUME_FORMAT_VERSION)
- ---
- > if (volProp.volFormatVersion == TC_VOLUME_FORMAT_VERSION_PRE_6_0)
- 8142c8374
- < // The Windows API sometimes fails to indentify the file system correctly so we're using "raw" analysis too.
- ---
- > // The Windows API sometimes fails to indentify the file system correctly (observed under Windows XP) so we're using "raw" analysis below too.
- 8532c8764
- < Warning ("NOTHING_TO_RESUME");
- ---
- > Warning ("NO_SYS_ENC_PROCESS_TO_RESUME");
- 8876c9108
- < // a non-system in-place encryption process. However, no config file indicates that any such process
- ---
- > // a non-system in-place encryption/decryption process. However, no config file indicates that any such process
- 8887c9119,9126
- < if (DirectNonSysInplaceEncResumeMode)
- ---
- > BOOL decrypt = FALSE;
- >
- > if (DirectNonSysInplaceDecStartMode)
- > {
- > SwitchWizardToNonSysInplaceDecStartMode (szFileName);
- > return;
- > }
- > else if (DirectNonSysInplaceEncResumeMode || DirectNonSysInplaceDecResumeMode)
- 8889c9128
- < SwitchWizardToNonSysInplaceEncResumeMode();
- ---
- > SwitchWizardToNonSysInplaceEncResumeMode (DirectNonSysInplaceDecResumeMode);
- 8897,8898c9136,9137
- < if (AskNonSysInPlaceEncryptionResume() == IDYES)
- < SwitchWizardToNonSysInplaceEncResumeMode();
- ---
- > if (AskNonSysInPlaceEncryptionResume (&decrypt) == IDYES)
- > SwitchWizardToNonSysInplaceEncResumeMode (decrypt);
- 8906c9145
- < && AskNonSysInPlaceEncryptionResume() == IDYES)
- ---
- > && AskNonSysInPlaceEncryptionResume (&decrypt) == IDYES)
- 8908c9147
- < SwitchWizardToNonSysInplaceEncResumeMode();
- ---
- > SwitchWizardToNonSysInplaceEncResumeMode (decrypt);
- diff -b -r tc-7.1/Format/Tcformat.h tc-7.2/Format/Tcformat.h
- 44a45
- > void UpdateLastDialogId (void);
- 92a94
- > extern volatile BOOL bInPlaceDecNonSys;
- diff -b -r tc-7.1/License.html tc-7.2/License.html
- 13c13
- < <b>TrueCrypt License Version 3.0</b><br>
- ---
- > <b>TrueCrypt License Version 3.1</b><br>
- 43,45c43
- < <li>Phrase "<i>Based on TrueCrypt, freely available at http://www.truecrypt.org/</i>" must be displayed by Your Product (if technically feasible) and contained in its documentation. Alternatively, if This Product or its portion You included in Your Product constitutes only a minor portion of Your Product, phrase "<i>Portions of this product are based in part on TrueCrypt, freely available at http://www.truecrypt.org/</i>" may be displayed instead. In each of the cases mentioned above in this paragraph, "<i>http://www.truecrypt.org/</i>" must be a hyperlink (if technically feasible) pointing to http://www.truecrypt.org/ and You may freely choose the location within the user interface (if there is any) of Your Product (e.g., an "About" window, etc.) and the way in which Your Product will display the respective phrase.<br>
- < <br>
- < Your Product (and any associated materials, e.g., the documentation, the content of the official web site of Your Product, etc.) must not present any Internet address containing the domain name truecrypt.org (or any domain name that forwards to the domain name truecrypt.org) in a manner that might suggest that it is where information about Your Product may be obtained or where bugs found in Your Product may be reported or where support for Your Product may be available or otherwise attempt to indicate that the domain name truecrypt.org is associated with Your Product.<br>
- ---
- > <li>Your Product (and any associated materials, e.g., the documentation, the content of the official web site of Your Product, etc.) must not present any Internet address containing the domain name truecrypt (or any domain name that forwards to the domain name truecrypt) in a manner that might suggest that it is where information about Your Product may be obtained or where bugs found in Your Product may be reported or where support for Your Product may be available or otherwise attempt to indicate that the domain name truecrypt is associated with Your Product.<br>
- diff -b -r tc-7.1/License.txt tc-7.2/License.txt
- 1c1
- < TrueCrypt License Version 3.0
- ---
- > TrueCrypt License Version 3.1
- 115,131c115
- < c. Phrase "Based on TrueCrypt, freely available at
- < http://www.truecrypt.org/" must be displayed by Your Product
- < (if technically feasible) and contained in its
- < documentation. Alternatively, if This Product or its portion
- < You included in Your Product constitutes only a minor
- < portion of Your Product, phrase "Portions of this product
- < are based in part on TrueCrypt, freely available at
- < http://www.truecrypt.org/" may be displayed instead. In each
- < of the cases mentioned above in this paragraph,
- < "http://www.truecrypt.org/" must be a hyperlink (if
- < technically feasible) pointing to http://www.truecrypt.org/
- < and You may freely choose the location within the user
- < interface (if there is any) of Your Product (e.g., an
- < "About" window, etc.) and the way in which Your Product will
- < display the respective phrase.
- <
- < Your Product (and any associated materials, e.g., the
- ---
- > c. Your Product (and any associated materials, e.g., the
- 134,135c118,119
- < containing the domain name truecrypt.org (or any domain name
- < that forwards to the domain name truecrypt.org) in a manner
- ---
- > containing the domain name truecrypt (or any domain name
- > that forwards to the domain name truecrypt) in a manner
- 140c124
- < name truecrypt.org is associated with Your Product.
- ---
- > name truecrypt is associated with Your Product.
- diff -b -r tc-7.1/Mount/Favorites.cpp tc-7.2/Mount/Favorites.cpp
- 210,214d209
- <
- < if (SystemFavoritesMode)
- < SetDlgItemTextW (hwndDlg, IDC_FAVORITES_HELP_LINK, GetString ("SYS_FAVORITES_HELP_LINK"));
- <
- < ToHyperlink (hwndDlg, IDC_FAVORITES_HELP_LINK);
- 365,368d359
- < return 1;
- <
- < case IDC_FAVORITES_HELP_LINK:
- < Applink (SystemFavoritesMode ? "sysfavorites" : "favorites", TRUE, "");
- diff -b -r tc-7.1/Mount/MainCom.cpp tc-7.2/Mount/MainCom.cpp
- 70,75d69
- < virtual void STDMETHODCALLTYPE AnalyzeKernelMiniDump (LONG_PTR hwndDlg)
- < {
- < MainDlg = (HWND) hwndDlg;
- < ::AnalyzeKernelMiniDump ((HWND) hwndDlg);
- < }
- <
- 196,212d189
- < }
- <
- <
- < extern "C" void UacAnalyzeKernelMiniDump (HWND hwndDlg)
- < {
- < CComPtr<ITrueCryptMainCom> tc;
- <
- < CoInitialize (NULL);
- <
- < if (ComGetInstance (hwndDlg, &tc))
- < {
- < WaitCursor();
- < tc->AnalyzeKernelMiniDump ((LONG_PTR) hwndDlg);
- < NormalCursor();
- < }
- <
- < CoUninitialize ();
- diff -b -r tc-7.1/Mount/MainCom.h tc-7.2/Mount/MainCom.h
- 23d22
- < void UacAnalyzeKernelMiniDump (HWND hwndDlg);
- diff -b -r tc-7.1/Mount/MainCom.idl tc-7.2/Mount/MainCom.idl
- 15c15
- < version(2.4) // Update ComSetup.cpp when changing version number
- ---
- > version(2.5) // Update ComSetup.cpp when changing version number
- 27d26
- < void AnalyzeKernelMiniDump (LONG_PTR hwndDlg);
- diff -b -r tc-7.1/Mount/Mount.c tc-7.2/Mount/Mount.c
- 102d101
- < BOOL SystemCrashDetected = FALSE;
- 223c222
- < char *popupTexts[] = {"MENU_VOLUMES", "MENU_SYSTEM_ENCRYPTION", "MENU_FAVORITES", "MENU_TOOLS", "MENU_SETTINGS", "MENU_HELP", "MENU_WEBSITE", 0};
- ---
- > char *popupTexts[] = {"MENU_VOLUMES", "MENU_SYSTEM_ENCRYPTION", "MENU_FAVORITES", "MENU_TOOLS", "MENU_SETTINGS", "MENU_HELP", 0};
- 238,240d236
- < // Help file name
- < InitHelpFileName();
- <
- 259,262d254
- <
- < if (strcmp (popupTexts[i], "MENU_WEBSITE") == 0)
- < info.fType = MFT_STRING | MFT_RIGHTJUSTIFY;
- < else
- 303a296,297
- >
- > ToHyperlink (hwndDlg, IDT_INSECURE_APP);
- 391a386,563
- >
- > // When a function does not require the affected volume to be dismounted, there may be cases where we have two valid
- > // paths selected in the main window and we cannot be sure which of them the user really intends to apply the function to.
- > // This function asks the user to explicitly select either the volume path specified in the input field below the main
- > // drive list (whether mounted or not), or the path to the volume selected in the main drive list. If, however, both
- > // of the GUI elements contain the same volume (or one of them does not contain any path), this function does not
- > // ask the user and returns the volume path directly (no selection ambiguity).
- > // If driveNoPtr is not NULL, and the volume is mounted, its drive letter is returned in *driveNoPtr (if no valid drive
- > // letter is resolved, -1 is stored instead).
- > static string ResolveAmbiguousSelection (int *driveNoPtr)
- > {
- > LPARAM selectedDrive = GetSelectedLong (GetDlgItem (MainDlg, IDC_DRIVELIST));
- >
- > char volPathInputField [TC_MAX_PATH];
- > wchar_t volPathInputFieldW [TC_MAX_PATH];
- >
- > wchar_t volPathDriveListW [TC_MAX_PATH];
- > string volPathDriveListStr;
- > wstring volPathDriveListWStr;
- >
- > string retPath;
- >
- > VOLUME_PROPERTIES_STRUCT prop;
- > DWORD dwResult;
- >
- > BOOL useInputField = TRUE;
- >
- > memset (&prop, 0, sizeof(prop));
- >
- > BOOL ambig = (LOWORD (selectedDrive) != TC_MLIST_ITEM_FREE && LOWORD (selectedDrive) != 0xffff && HIWORD (selectedDrive) != 0xffff
- > && VolumeSelected (MainDlg));
- >
- > if (VolumeSelected (MainDlg))
- > {
- > // volPathInputField will contain the volume path (if any) from the input field below the drive list
- > GetWindowText (GetDlgItem (MainDlg, IDC_VOLUME), volPathInputField, sizeof (volPathInputField));
- >
- > if (!ambig)
- > retPath = (string) volPathInputField;
- > }
- >
- > if (LOWORD (selectedDrive) != TC_MLIST_ITEM_FREE && LOWORD (selectedDrive) != 0xffff && HIWORD (selectedDrive) != 0xffff)
- > {
- > // A volume is selected in the main drive list.
- >
- > switch (LOWORD (selectedDrive))
- > {
- > case TC_MLIST_ITEM_NONSYS_VOL:
- > prop.driveNo = HIWORD (selectedDrive) - 'A';
- >
- > if (!DeviceIoControl (hDriver, TC_IOCTL_GET_VOLUME_PROPERTIES, &prop, sizeof (prop), &prop, sizeof (prop), &dwResult, NULL) || dwResult == 0)
- > {
- > // The driver did not return any path for this drive letter (the volume may have been dismounted).
- >
- > // Return whatever is in the input field below the drive list (even if empty)
- > return ((string) volPathInputField);
- > }
- >
- > // volPathDriveListWStr will contain the volume path selected in the main drive list
- > volPathDriveListWStr = (wstring) prop.wszVolume;
- > volPathDriveListStr = WideToSingleString (volPathDriveListWStr);
- > break;
- >
- > case TC_MLIST_ITEM_SYS_PARTITION:
- >
- > GetSysDevicePaths (MainDlg);
- >
- > if (bCachedSysDevicePathsValid)
- > {
- > volPathDriveListStr = (string) SysPartitionDevicePath;
- > volPathDriveListWStr = SingleStringToWide (volPathDriveListStr);
- > }
- >
- > break;
- >
- > case TC_MLIST_ITEM_SYS_DRIVE:
- >
- > GetSysDevicePaths (MainDlg);
- >
- > if (bCachedSysDevicePathsValid)
- > {
- > volPathDriveListStr = (string) SysDriveDevicePath;
- > volPathDriveListWStr = SingleStringToWide (volPathDriveListStr);
- > }
- >
- > break;
- > }
- >
- > if (!ambig)
- > {
- > useInputField = FALSE;
- > retPath = volPathDriveListStr;
- > }
- > }
- >
- > if (ambig)
- > {
- > /* We have two paths. Compare them and if they don't match, ask the user to select one of them. Otherwise, return the path without asking. */
- >
- > if (memcmp (volPathDriveListStr.c_str (), "\\??\\", 4) == 0)
- > {
- > // The volume path starts with "\\??\\" which is used for file-hosted containers. We're going to strip this prefix.
- >
- > volPathDriveListStr = (string) (volPathDriveListStr.c_str () + 4);
- > volPathDriveListWStr = SingleStringToWide (volPathDriveListStr);
- > }
- >
- > wcscpy (volPathDriveListW, SingleStringToWide (volPathDriveListStr).c_str ());
- >
- > ToSBCS (volPathDriveListW);
- > strcpy ((char *) volPathInputFieldW, volPathInputField);
- > ToUNICODE ((char *) volPathInputFieldW);
- >
- > if (strcmp (((memcmp ((char *) volPathDriveListW, "\\??\\", 4) == 0) ? (char *) volPathDriveListW + 4 : (char *) volPathDriveListW), volPathInputField) != 0)
- > {
- > // The path selected in the input field is different from the path to the volume selected
- > // in the drive lettter list. We have to resolve possible ambiguity.
- >
- > wchar_t *tmp[] = {L"", L"", L"", L"", L"", 0};
- > const int maxVolPathLen = 80;
- >
- > if (volPathDriveListWStr.length () > maxVolPathLen)
- > {
- > // Ellipsis (path too long)
- > volPathDriveListWStr = wstring (L"...") + volPathDriveListWStr.substr (volPathDriveListWStr.length () - maxVolPathLen, maxVolPathLen);
- > }
- >
- > wstring volPathInputFieldWStr (volPathInputFieldW);
- >
- > if (volPathInputFieldWStr.length () > maxVolPathLen)
- > {
- > // Ellipsis (path too long)
- > volPathInputFieldWStr = wstring (L"...") + volPathInputFieldWStr.substr (volPathInputFieldWStr.length () - maxVolPathLen, maxVolPathLen);
- > }
- >
- > tmp[1] = GetString ("AMBIGUOUS_VOL_SELECTION");
- > tmp[2] = (wchar_t *) volPathDriveListWStr.c_str();
- > tmp[3] = (wchar_t *) volPathInputFieldWStr.c_str();
- > tmp[4] = GetString ("IDCANCEL");
- >
- > switch (AskMultiChoice ((void **) tmp, FALSE))
- > {
- > case 1:
- > retPath = volPathDriveListStr;
- > break;
- >
- > case 2:
- > retPath = (string) volPathInputField;
- > break;
- >
- > default:
- > if (driveNoPtr != NULL)
- > *driveNoPtr = -1;
- >
- > return string ("");
- > }
- > }
- > else
- > {
- > // Both selected paths are the same
- > retPath = (string) volPathInputField;
- > }
- > }
- >
- > if (driveNoPtr != NULL)
- > *driveNoPtr = GetMountedVolumeDriveNo ((char *) retPath.c_str ());
- >
- >
- > if (memcmp (retPath.c_str (), "\\??\\", 4) == 0)
- > {
- > // The selected volume path starts with "\\??\\" which is used for file-hosted containers. We're going to strip this prefix.
- >
- > retPath = (string) (retPath.c_str () + 4);
- > }
- >
- > return retPath;
- > }
- >
- 650c822
- < // Returns TRUE if the entire system drive (as opposed to the system partition only) is (or is to be) encrypted
- ---
- > // Returns TRUE if the entire system drive (as opposed to the system partition only) of the currently running OS is (or is to be) encrypted
- 859c1031
- < BOOL TCBootLoaderOnInactiveSysEncDrive (void)
- ---
- > BOOL TCBootLoaderOnInactiveSysEncDrive (char *szDevicePath)
- 864d1035
- < char szDevicePath [TC_MAX_PATH+1];
- 870,871d1040
- < GetWindowText (GetDlgItem (MainDlg, IDC_VOLUME), szDevicePath, sizeof (szDevicePath));
- <
- 940c1109
- < char t[TC_MAX_PATH] = {'"',0};
- ---
- > char t[TC_MAX_PATH + 1024] = {'"',0};
- 1945a2115,2116
- >
- > ToHyperlink (hwndDlg, IDT_INSECURE_APP);
- 2029a2201,2206
- > if (lw == IDT_INSECURE_APP)
- > {
- > Warning ("INSECURE_APP");
- > return 1;
- > }
- >
- 2438,2440d2614
- <
- < ToHyperlink (hwndDlg, IDC_LINK_HIDVOL_PROTECTION_INFO);
- <
- 2494,2498d2667
- < if (lw == IDC_LINK_HIDVOL_PROTECTION_INFO)
- < {
- < Applink ("hiddenvolprotection", TRUE, "");
- < }
- <
- 3322c3491,3493
- < if (ListView_GetItem (hTree, &item) == FALSE)
- ---
- > if (ListView_GetItemCount (hTree) < 1
- > || ListView_GetItem (hTree, &item) == FALSE)
- > {
- 3323a3495
- > }
- 4130,4132d4301
- < if (AskWarnNoYes ("CONFIRM_DECRYPT_SYS_DEVICE_CAUTION") == IDNO)
- < return;
- <
- 4172,4173c4341
- < // Initiates the process of creation of a hidden operating system
- < static void CreateHiddenOS (void)
- ---
- > static void DecryptNonSysDevice (BOOL bResolveAmbiguousSelection, BOOL bUseDriveListSel)
- 4174a4343,4438
- > string scPath;
- >
- > if (bResolveAmbiguousSelection)
- > {
- > scPath = ResolveAmbiguousSelection (NULL);
- >
- > if (scPath.empty ())
- > {
- > // The user selected Cancel
- > return;
- > }
- > }
- > else if (bUseDriveListSel)
- > {
- > // Decrypt mounted volume selected in the main drive list
- >
- > LPARAM lLetter = GetSelectedLong (GetDlgItem (MainDlg, IDC_DRIVELIST));
- >
- > if (LOWORD (lLetter) != 0xffff)
- > {
- > VOLUME_PROPERTIES_STRUCT prop;
- > DWORD bytesReturned;
- >
- > memset (&prop, 0, sizeof (prop));
- > prop.driveNo = (char) HIWORD (lLetter) - 'A';
- >
- > if (!DeviceIoControl (hDriver, TC_IOCTL_GET_VOLUME_PROPERTIES, &prop, sizeof (prop), &prop, sizeof (prop), &bytesReturned, NULL))
- > {
- > handleWin32Error (MainDlg);
- > return;
- > }
- >
- > scPath = WideToSingleString ((wchar_t *) prop.wszVolume);
- > }
- > else
- > return;
- > }
- > else
- > {
- > // Decrypt volume specified in the input field below the main drive list
- >
- > char volPath [TC_MAX_PATH];
- >
- > GetWindowText (GetDlgItem (MainDlg, IDC_VOLUME), volPath, sizeof (volPath));
- >
- > scPath = volPath;
- > }
- >
- > if (scPath.empty ())
- > {
- > Warning ("NO_VOLUME_SELECTED");
- > return;
- > }
- >
- > WaitCursor();
- >
- > switch (IsSystemDevicePath ((char *) scPath.c_str (), MainDlg, TRUE))
- > {
- > case 1:
- > case 2:
- > // The user wants to decrypt the system partition/drive. Divert to the appropriate function.
- >
- > NormalCursor ();
- >
- > DecryptSystemDevice ();
- > return;
- > }
- >
- > WaitCursor();
- >
- > // Make sure the user is not attempting to decrypt a partition on an entirely encrypted system drive.
- > if (IsNonSysPartitionOnSysDrive (scPath.c_str ()) == 1)
- > {
- > if (WholeSysDriveEncryption (TRUE))
- > {
- > // The system drive is entirely encrypted and the encrypted OS is running
- >
- > NormalCursor ();
- >
- > Warning ("CANT_DECRYPT_PARTITION_ON_ENTIRELY_ENCRYPTED_SYS_DRIVE");
- > return;
- > }
- > }
- > else if (TCBootLoaderOnInactiveSysEncDrive ((char *) scPath.c_str ()))
- > {
- > // The system drive MAY be entirely encrypted (external access without PBA) and the potentially encrypted OS is not running
- >
- > NormalCursor ();
- >
- > Warning ("CANT_DECRYPT_PARTITION_ON_ENTIRELY_ENCRYPTED_SYS_DRIVE_UNSURE");
- >
- > // We allow the user to continue as we don't know if the drive is really an encrypted system drive.
- > // If it is, the user has been warned and he will not be able to start decrypting, because the
- > // format wizard will not enable (nor will it allow the user to enable) the mount option for
- > // external without-PBA access (the user will receive the 'Incorrect password' error message).
- > }
- 4176,4179c4440,4444
- < // Display brief information as to what a hidden operating system is and what it's good for. This needs to be
- < // done, because if the system partition/drive is currently encrypted, the wizard will not display any
- < // such information, but will exit (displaying only an error meessage).
- < Info("HIDDEN_OS_PREINFO");
- ---
- > NormalCursor ();
- >
- >
- > if (AskNoYesString ((wstring (GetString ("CONFIRM_DECRYPT_NON_SYS_DEVICE")) + L"\n\n" + SingleStringToWide (scPath)).c_str()) == IDNO)
- > return;
- 4181c4446,4449
- < LaunchVolCreationWizard (MainDlg, "/isysenc");
- ---
- > if (AskWarnNoYes ("CONFIRM_DECRYPT_NON_SYS_DEVICE_CAUTION") == IDNO)
- > return;
- >
- > LaunchVolCreationWizard (MainDlg, (string ("/inplacedec \"") + scPath + "\"").c_str ());
- 4384c4652
- < static void ResumeInterruptedNonSysInplaceEncProcess (void)
- ---
- > static void ResumeInterruptedNonSysInplaceEncProcess (BOOL decrypt)
- 4389c4657
- < LaunchVolCreationWizard (MainDlg, "/zinplace");
- ---
- > LaunchVolCreationWizard (MainDlg, decrypt ? "/resumeinplacedec" : "/zinplace");
- 4991,4999c5259
- < if (AskNonSysInPlaceEncryptionResume() == IDYES)
- < ResumeInterruptedNonSysInplaceEncProcess ();
- < }
- < }
- <
- < if (!DisableSystemCrashDetection
- < && IsOSAtLeast (WIN_7))
- < {
- < // Auto-detect a system crash
- ---
- > BOOL decrypt = FALSE;
- 5001,5042c5261,5262
- < const int detectionPeriodInMonthsSinceReleaseDate = 2;
- < int maxYear = TC_RELEASE_DATE_YEAR;
- < int maxMonth = TC_RELEASE_DATE_MONTH + detectionPeriodInMonthsSinceReleaseDate;
- < if (maxMonth > 12)
- < {
- < ++maxYear;
- < maxMonth -= 12;
- < }
- <
- < SYSTEMTIME systemTime;
- < GetSystemTime (&systemTime);
- <
- < if (systemTime.wYear >= TC_RELEASE_DATE_YEAR
- < && !(systemTime.wYear == TC_RELEASE_DATE_YEAR && systemTime.wMonth < TC_RELEASE_DATE_MONTH)
- < && systemTime.wYear <= maxYear
- < && !(systemTime.wYear == maxYear && systemTime.wMonth > maxMonth))
- < {
- < char winDir[MAX_PATH] = { 0 };
- < GetWindowsDirectory (winDir, sizeof (winDir));
- <
- < WIN32_FIND_DATA findData;
- < HANDLE find = FindFirstFile ((string (winDir) + "\\MEMORY.DMP").c_str(), &findData);
- <
- < if (find != INVALID_HANDLE_VALUE)
- < {
- < SYSTEMTIME systemTime;
- < FILETIME ft;
- < GetSystemTime (&systemTime);
- < SystemTimeToFileTime (&systemTime, &ft);
- <
- < ULARGE_INTEGER sysTime, fileTime;
- < sysTime.HighPart = ft.dwHighDateTime;
- < sysTime.LowPart = ft.dwLowDateTime;
- < fileTime.HighPart = findData.ftLastWriteTime.dwHighDateTime;
- < fileTime.LowPart = findData.ftLastWriteTime.dwLowDateTime;
- <
- < // Memory dump must not be older than 10 minutes
- < if (sysTime.QuadPart - fileTime.QuadPart < 10I64 * 1000 * 1000 * 60 * 10)
- < SystemCrashDetected = TRUE;
- <
- < FindClose (find);
- < }
- ---
- > if (AskNonSysInPlaceEncryptionResume (&decrypt) == IDYES)
- > ResumeInterruptedNonSysInplaceEncProcess (decrypt);
- 5046d5265
- < DoPostInstallTasks ();
- 5072,5075d5290
- < case WM_HELP:
- < OpenPageHelp (hwndDlg, 0);
- < return 1;
- <
- 5136,5160d5350
- < // Handle system crash
- < static BOOL systemCrashHandlerLocked = FALSE;
- < if (SystemCrashDetected && !systemCrashHandlerLocked)
- < {
- < systemCrashHandlerLocked = TRUE;
- <
- < SetForegroundWindow (hwndDlg);
- < MainWindowHidden = FALSE;
- < ShowWindow (hwndDlg, SW_SHOW);
- < ShowWindow (hwndDlg, SW_RESTORE);
- <
- < if (AskYesNoTopmost ("SYSTEM_CRASHED_ASK_REPORT") == IDYES)
- < {
- < if (!IsAdmin() && IsUacSupported())
- < UacAnalyzeKernelMiniDump (hwndDlg);
- < else
- < AnalyzeKernelMiniDump (hwndDlg);
- < }
- < else if (AskYesNoTopmost ("ASK_KEEP_DETECTING_SYSTEM_CRASH") == IDNO)
- < {
- < DisableSystemCrashDetection = TRUE;
- < SaveSettings (hwndDlg);
- < }
- < }
- <
- 5366,5367d5555
- < AppendMenuW (popup, MF_STRING, IDM_HELP, GetString ("MENU_HELP"));
- < AppendMenuW (popup, MF_STRING, IDM_HOMEPAGE_SYSTRAY, GetString ("HOMEPAGE"));
- 5406,5409d5593
- < else if (sel == IDM_HOMEPAGE_SYSTRAY)
- < {
- < Applink ("home", TRUE, "");
- < }
- 5623a5808,5809
- > AppendMenuW (popup, MF_STRING, IDM_DECRYPT_NONSYS_VOL, GetString ("IDM_DECRYPT_NONSYS_VOL"));
- > AppendMenu (popup, MF_SEPARATOR, 0, NULL);
- 5674a5861,5865
- > case IDM_DECRYPT_NONSYS_VOL:
- > if (CheckMountList ())
- > DecryptNonSysDevice (FALSE, TRUE);
- > break;
- >
- 5738,5743d5928
- < if (lw == IDHELP || lw == IDM_HELP)
- < {
- < OpenPageHelp (hwndDlg, 0);
- < return 1;
- < }
- <
- 5816,5818d6000
- < case IDM_CREATE_HIDDEN_OS:
- < CreateHiddenOS ();
- < break;
- 5873a6056,6057
- > AppendMenuW (popup, MF_STRING, IDM_DECRYPT_NONSYS_VOL, GetString ("IDM_DECRYPT_NONSYS_VOL"));
- > AppendMenu (popup, MF_SEPARATOR, 0, NULL);
- 5891a6076,6086
- > case IDM_DECRYPT_NONSYS_VOL:
- > if (!VolumeSelected(hwndDlg))
- > {
- > Warning ("NO_VOLUME_SELECTED");
- > }
- > else
- > {
- > DecryptNonSysDevice (TRUE, FALSE);
- > }
- > break;
- >
- 5986a6182,6197
- > if (lw == IDM_DECRYPT_NONSYS_VOL)
- > {
- > LPARAM selectedDrive = GetSelectedLong (GetDlgItem (hwndDlg, IDC_DRIVELIST));
- >
- > if (LOWORD (selectedDrive) == TC_MLIST_ITEM_FREE && !VolumeSelected (MainDlg))
- > {
- > Warning ("NO_VOLUME_SELECTED");
- > }
- > else
- > {
- > DecryptNonSysDevice (TRUE, FALSE);
- > }
- >
- > return 1;
- > }
- >
- 6028a6240,6245
- > if (lw == IDT_INSECURE_APP)
- > {
- > Warning ("INSECURE_APP");
- > return 1;
- > }
- >
- 6042c6259
- < if (lw == IDC_CREATE_VOLUME || lw == IDM_CREATE_VOLUME || lw == IDM_VOLUME_WIZARD)
- ---
- > if (lw == IDM_CREATE_VOLUME || lw == IDM_VOLUME_WIZARD)
- 6111,6165d6327
- < if (lw == IDM_WEBSITE)
- < {
- < Applink ("website", TRUE, "");
- < return 1;
- < }
- < else if (lw == IDM_HOMEPAGE)
- < {
- < Applink ("homepage", TRUE, "");
- < return 1;
- < }
- < else if (lw == IDM_ONLINE_TUTORIAL)
- < {
- < Applink ("tutorial", TRUE, "");
- < return 1;
- < }
- < else if (lw == IDM_ONLINE_HELP)
- < {
- < OpenOnlineHelp ();
- < return 1;
- < }
- < else if (lw == IDM_FAQ)
- < {
- < Applink ("faq", TRUE, "");
- < return 1;
- < }
- < else if (lw == IDM_TC_DOWNLOADS)
- < {
- < Applink ("downloads", TRUE, "");
- < return 1;
- < }
- < else if (lw == IDM_NEWS)
- < {
- < Applink ("news", TRUE, "");
- < return 1;
- < }
- < else if (lw == IDM_VERSION_HISTORY)
- < {
- < Applink ("history", TRUE, "");
- < return 1;
- < }
- < else if (lw == IDM_ANALYZE_SYSTEM_CRASH)
- < {
- < if (!IsAdmin() && IsUacSupported())
- < UacAnalyzeKernelMiniDump (hwndDlg);
- < else
- < AnalyzeKernelMiniDump (hwndDlg);
- <
- < return 1;
- < }
- < else if (lw == IDM_CONTACT)
- < {
- < Applink ("contact", FALSE, "");
- < return 1;
- < }
- <
- 6456c6618
- < ResumeInterruptedNonSysInplaceEncProcess ();
- ---
- > ResumeInterruptedNonSysInplaceEncProcess (TRUE);
- 8127,8129d8288
- <
- < ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_HW_ACCELERATION);
- < ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION);
- 8240,8247d8398
- <
- < case IDC_MORE_INFO_ON_HW_ACCELERATION:
- < Applink ("hwacceleration", TRUE, "");
- < return 1;
- <
- < case IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION:
- < Applink ("parallelization", TRUE, "");
- < return 1;
- 8606,8939d8756
- < }
- <
- <
- < void AnalyzeKernelMiniDump (HWND hwndDlg)
- < {
- < char winDir[MAX_PATH] = { 0 };
- < GetWindowsDirectory (winDir, sizeof (winDir));
- < string memDumpPath = string (winDir) + "\\MEMORY.DMP";
- < string tmpDumpPath;
- <
- < string dumpPath = FindLatestFileOrDirectory (string (winDir) + "\\Minidump", "*.dmp", false, true);
- < if (dumpPath.empty())
- < {
- < Error ("NO_MINIDUMP_FOUND");
- < return;
- < }
- <
- < WIN32_FIND_DATA findData;
- < HANDLE find = FindFirstFile (memDumpPath.c_str(), &findData);
- <
- < if (find != INVALID_HANDLE_VALUE)
- < {
- < ULARGE_INTEGER memDumpTime, miniDumpTime;
- < memDumpTime.HighPart = findData.ftLastWriteTime.dwHighDateTime;
- < memDumpTime.LowPart = findData.ftLastWriteTime.dwLowDateTime;
- <
- < FindClose (find);
- <
- < find = FindFirstFile (dumpPath.c_str(), &findData);
- < if (find != INVALID_HANDLE_VALUE)
- < {
- < miniDumpTime.HighPart = findData.ftLastWriteTime.dwHighDateTime;
- < miniDumpTime.LowPart = findData.ftLastWriteTime.dwLowDateTime;
- <
- < if (_abs64 (miniDumpTime.QuadPart - memDumpTime.QuadPart) < 10I64 * 1000 * 1000 * 60 * 5)
- < {
- < // Rename MEMORY.DMP file first as it can be deleted by Windows when system crash dialog is closed
- < tmpDumpPath = memDumpPath + ".true_crypt.dmp"; // Application name must be mangled to avoid interfering with crash analysis
- <
- < if (MoveFile (memDumpPath.c_str(), tmpDumpPath.c_str()))
- < dumpPath = tmpDumpPath;
- < else
- < tmpDumpPath.clear();
- < }
- <
- < FindClose (find);
- < }
- < }
- <
- < finally_do_arg2 (string, tmpDumpPath, string, memDumpPath,
- < {
- < if (!finally_arg.empty())
- < {
- < if (AskYesNo ("ASK_DELETE_KERNEL_CRASH_DUMP") == IDYES)
- < DeleteFile (finally_arg.c_str());
- < else
- < MoveFile (finally_arg.c_str(), finally_arg2.c_str());
- < }
- < });
- <
- < STARTUPINFO startupInfo;
- < PROCESS_INFORMATION procInfo;
- <
- < ZeroMemory (&startupInfo, sizeof (startupInfo));
- < ZeroMemory (&procInfo, sizeof (procInfo));
- <
- < if (!IsApplicationInstalled (Is64BitOs() ? "Debugging Tools for Windows (x64)" : "Debugging Tools for Windows (x86)"))
- < {
- < if (AskOkCancel ("ASK_DEBUGGER_INSTALL") != IDOK)
- < return;
- <
- < if (!CreateProcess (NULL, (LPSTR) (string ("msiexec.exe /qb /i " TC_APPLINK "&dest=ms-debug-tools-x") + (Is64BitOs() ? "64" : "86")).c_str(),
- < NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &procInfo))
- < {
- < handleWin32Error (hwndDlg);
- < return;
- < }
- <
- < WaitCursor();
- < WaitForSingleObject (procInfo.hProcess, INFINITE);
- < NormalCursor();
- <
- < DWORD exitCode;
- < if (!GetExitCodeProcess (procInfo.hProcess, &exitCode) || exitCode != 0)
- < return;
- < }
- <
- < if (AskOkCancel ("SYSTEM_CRASH_ANALYSIS_INFO") == IDCANCEL)
- < return;
- <
- < ZeroMemory (&startupInfo, sizeof (startupInfo));
- < ZeroMemory (&procInfo, sizeof (procInfo));
- <
- < SECURITY_ATTRIBUTES securityAttrib;
- < securityAttrib.bInheritHandle = TRUE;
- < securityAttrib.nLength = sizeof (securityAttrib);
- < securityAttrib.lpSecurityDescriptor = NULL;
- <
- < HANDLE hChildStdoutWrite = INVALID_HANDLE_VALUE;
- < HANDLE hChildStdoutRead = INVALID_HANDLE_VALUE;
- < if (!CreatePipe (&hChildStdoutRead, &hChildStdoutWrite, &securityAttrib, 0))
- < {
- < handleWin32Error (hwndDlg);
- < return;
- < }
- < SetHandleInformation (hChildStdoutRead, HANDLE_FLAG_INHERIT, 0);
- <
- < startupInfo.hStdInput = INVALID_HANDLE_VALUE;
- < startupInfo.hStdOutput = hChildStdoutWrite;
- < startupInfo.cb = sizeof (startupInfo);
- < startupInfo.hStdError = hChildStdoutWrite;
- < startupInfo.dwFlags |= STARTF_USESTDHANDLES;
- <
- < list <string> kdPaths;
- < string kdPath;
- < char progPath[MAX_PATH];
- < if (SHGetSpecialFolderPath (hwndDlg, progPath, CSIDL_PROGRAM_FILES, FALSE))
- < {
- < if (Is64BitOs())
- < {
- < string s = progPath;
- < size_t p = s.find (" (x86)");
- < if (p != string::npos)
- < {
- < s = s.substr (0, p);
- < if (_access (s.c_str(), 0) != -1)
- < strcpy_s (progPath, sizeof (progPath), s.c_str());
- < }
- < }
- <
- < kdPath = string (progPath) + "\\Debugging Tools for Windows (" + (Is64BitOs() ? "x64" : "x86") + ")\\kd.exe";
- < kdPaths.push_back (kdPath);
- < }
- <
- < kdPath = FindLatestFileOrDirectory (string (winDir).substr (0, 1) + ":\\WinDDK", "*", true, false);
- < kdPath += "\\Debuggers\\kd.exe";
- < kdPaths.push_back (kdPath);
- <
- < kdPaths.push_back ("kd.exe");
- <
- < bool kdRunning = false;
- < foreach (const string &kdPath, kdPaths)
- < {
- < if (CreateProcess (NULL, (LPSTR) ("\"" + kdPath + "\" -z \"" + dumpPath + "\" -y http://msdl.microsoft.com/download/symbols -c \".bugcheck; !analyze -v; q\"").c_str(),
- < NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &startupInfo, &procInfo))
- < {
- < kdRunning = true;
- < break;
- < }
- < }
- <
- < if (!kdRunning)
- < {
- < handleWin32Error (hwndDlg);
- < Error ("DEBUGGER_NOT_FOUND");
- < return;
- < }
- <
- < EnableElevatedCursorChange (hwndDlg);
- < WaitCursor();
- <
- < CloseHandle (procInfo.hProcess);
- < CloseHandle (procInfo.hThread);
- < CloseHandle (hChildStdoutWrite);
- <
- < string output;
- <
- < while (TRUE)
- < {
- < DWORD bytesReceived;
- < char pipeBuffer [4096];
- <
- < if (!ReadFile (hChildStdoutRead, pipeBuffer, sizeof (pipeBuffer), &bytesReceived, NULL))
- < break;
- <
- < output.insert (output.size(), pipeBuffer, bytesReceived);
- < }
- <
- < NormalCursor();
- <
- < bool otherDriver = (StringToUpperCase (output).find (StringToUpperCase (TC_APP_NAME)) == string::npos);
- <
- < size_t p, p2;
- < while ((p = output.find ('`')) != string::npos)
- < output.erase (output.begin() + p);
- <
- < p = output.find ("Bugcheck code ");
- < if (p == string::npos)
- < {
- < Error ("ERR_PARAMETER_INCORRECT");
- < return;
- < }
- <
- < uint64 bugcheckCode;
- < int n = sscanf (output.substr (p + 14, 8).c_str(), "%I64X", &bugcheckCode);
- < if (n != 1)
- < {
- < Error ("ERR_PARAMETER_INCORRECT");
- < return;
- < }
- <
- < p = output.find ("Arguments ", p);
- <
- < uint64 bugcheckArgs[4];
- < n = sscanf (output.substr (p + 10, (Is64BitOs() ? 17 : 9) * 4).c_str(), "%I64X %I64X %I64X %I64X", &bugcheckArgs[0], &bugcheckArgs[1], &bugcheckArgs[2], &bugcheckArgs[3]);
- < if (n != 4)
- < {
- < Error ("ERR_PARAMETER_INCORRECT");
- < return;
- < }
- <
- < // Image name
- < string imageName, imageVersion;
- < p = output.find ("IMAGE_NAME:");
- < if (p != string::npos)
- < {
- < p += 13;
- < p2 = output.find ('\n', p);
- < if (p2 != string::npos)
- < imageName = output.substr (p, p2 - p);
- < }
- <
- < // Stack trace
- < p = output.find ("STACK_TEXT:");
- < if (p == string::npos)
- < {
- < Error ("ERR_PARAMETER_INCORRECT");
- < return;
- < }
- <
- < p2 = output.find ("FOLLOWUP_IP:", p);
- < if (p2 == string::npos)
- < p2 = output.find ("STACK_COMMAND:", p);
- < if (p2 == string::npos)
- < p2 = output.size();
- <
- < output = output.substr (p, p2 - p);
- <
- < list <string> retAddrs;
- < p = 0;
- < while ((p = output.find ("+", p)) != string::npos)
- < {
- < size_t p1 = output.rfind (" ", p);
- < if (p1 == string::npos)
- < break;
- <
- < p = output.find ('\n', p);
- < if (p == string::npos)
- < p = output.size() - 1;
- <
- < string s = output.substr (p1 + 1, p - p1 - 1);
- <
- < if (s.find ('(') == 0)
- < s = s.substr (1);
- < if (s.rfind (')') == s.size() - 1)
- < s = s.substr (0, s.size() - 1);
- <
- < retAddrs.push_back (s);
- < }
- <
- < char url[MAX_URL_LENGTH];
- < sprintf (url, TC_APPLINK_SECURE "&dest=syserr-report&os=%s&osver=%d.%d.%d&arch=%s&err=%I64x&arg1=%I64x&arg2=%I64x&arg3=%I64x&arg4=%I64x&flag=%s&drv=%s",
- < GetWindowsEdition().c_str(),
- < CurrentOSMajor,
- < CurrentOSMinor,
- < CurrentOSServicePack,
- < Is64BitOs() ? "x64" : "x86",
- < bugcheckCode,
- < bugcheckArgs[0],
- < bugcheckArgs[1],
- < bugcheckArgs[2],
- < bugcheckArgs[3],
- < otherDriver ? "0" : "1",
- < imageName.empty() ? "-" : imageName.c_str()
- < );
- <
- < stringstream stackTraceArgs;
- < int i = 0;
- < foreach (const string &retAddr, retAddrs)
- < {
- < stackTraceArgs << "&st" << i++ << "=" << retAddr;
- < }
- <
- < wstring msg;
- <
- < if (!imageName.empty() && StringToUpperCase (imageName) != StringToUpperCase (TC_APP_NAME) + ".SYS")
- < {
- < msg += wstring (GetString ("SYSTEM_CRASH_UPDATE_DRIVER")) + L"\n\n" + SingleStringToWide (imageName);
- <
- < string description, company, product;
- < if (GetExecutableImageInformation (string (winDir) + "\\System32\\drivers\\" + imageName, imageVersion, description, company, product))
- < {
- < string s;
- < if (!description.empty())
- < s += description;
- < if (!company.empty())
- < s += "; " + company;
- < if (!product.empty())
- < s += "; " + product;
- <
- < if (s.find ("; ") == 0)
- < s = s.substr (3);
- <
- < if (!s.empty())
- < msg += SingleStringToWide (" (" + s + ")");
- < }
- <
- < msg += L"\n\n";
- < }
- <
- < if (otherDriver)
- < {
- < msg += GetString ("SYSTEM_CRASH_NO_TRUECRYPT");
- < msg += L"\n\n";
- < }
- <
- < string urlStr = string (url) + "&drvver=" + (imageVersion.empty() ? "-" : imageVersion) + stackTraceArgs.str();
- <
- < for (size_t i = 0; i < urlStr.size(); ++i)
- < {
- < if (urlStr[i] == '+')
- < urlStr[i] = '.';
- < }
- <
- < msg += GetString ("SYSTEM_CRASH_REPORT");
- < msg += L"\n\n";
- <
- < msg += SingleStringToWide (urlStr);
- <
- < msg += L"\n\n";
- < msg += GetString ("ASK_SEND_ERROR_REPORT");
- <
- < if (AskYesNoString (msg.c_str()) == IDYES)
- < ShellExecute (NULL, "open", urlStr.c_str(), NULL, NULL, SW_SHOWNORMAL);
- diff -b -r tc-7.1/Mount/Mount.h tc-7.2/Mount/Mount.h
- 92d91
- < void LaunchVolCreationWizard (HWND hwndDlg);
- 95c94
- < BOOL TCBootLoaderOnInactiveSysEncDrive (void);
- ---
- > BOOL TCBootLoaderOnInactiveSysEncDrive (char *szDevicePath);
- 104d102
- < void AnalyzeKernelMiniDump (HWND hwndDlg);
- diff -b -r tc-7.1/Mount/Mount.rc tc-7.2/Mount/Mount.rc
- 17c17
- < // English (U.S.) resources
- ---
- > // English (United States) resources
- 20d19
- < #ifdef _WIN32
- 23d21
- < #endif //_WIN32
- 138,139d135
- < PUSHBUTTON "&Create Volume",IDC_CREATE_VOLUME,16,159,84,14
- < PUSHBUTTON "&Volume Properties...",IDC_VOLUME_PROPERTIES,146,159,84,14
- 150c146
- < CONTROL 112,IDC_LOGO,"Static",SS_BITMAP | SS_NOTIFY | WS_BORDER,16,192,27,31
- ---
- > CONTROL IDB_LOGO_96DPI,IDC_LOGO,"Static",SS_BITMAP | SS_NOTIFY | WS_BORDER,16,192,27,31
- 157a154
- > LTEXT "WARNING: Using TrueCrypt is not secure",IDT_INSECURE_APP,83,161,141,10,SS_NOTIFY
- 160c157
- < IDD_PASSWORD_DLG DIALOGEX 0, 0, 280, 68
- ---
- > IDD_PASSWORD_DLG DIALOGEX 0, 0, 281, 85
- 165c162
- < EDITTEXT IDC_PASSWORD,48,8,153,14,ES_PASSWORD | ES_AUTOHSCROLL
- ---
- > EDITTEXT IDC_PASSWORD,48,7,153,14,ES_PASSWORD | ES_AUTOHSCROLL
- 167,174c164,172
- < "Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,27,153,10
- < CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,40,83,10
- < CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,52,83,11
- < PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,137,49,64,14
- < PUSHBUTTON "Mount Opti&ons...",IDC_MOUNT_OPTIONS,208,49,64,14
- < DEFPUSHBUTTON "OK",IDOK,208,8,64,14
- < PUSHBUTTON "Cancel",IDCANCEL,208,25,64,14
- < RTEXT "Password:",IDT_PASSWORD,0,10,46,19
- ---
- > "Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,43,153,10
- > CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,56,83,10
- > CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,68,83,11
- > PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,137,65,64,14
- > PUSHBUTTON "Mount Opti&ons...",IDC_MOUNT_OPTIONS,208,65,64,14
- > DEFPUSHBUTTON "OK",IDOK,208,7,64,14
- > PUSHBUTTON "Cancel",IDCANCEL,208,24,64,14
- > RTEXT "Password:",IDT_PASSWORD,0,9,46,19
- > LTEXT "WARNING: Using TrueCrypt is not secure",IDT_INSECURE_APP,51,27,146,10,SS_NOTIFY
- 280d277
- < LTEXT "More information",IDC_MORE_INFO_ON_HW_ACCELERATION,18,61,165,10,SS_NOTIFY
- 284d280
- < LTEXT "More information",IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION,18,159,165,10,SS_NOTIFY
- 316d311
- < LTEXT "Help on favorite volumes",IDC_FAVORITES_HELP_LINK,17,259,237,10,SS_NOTIFY
- 365c360
- < BOTTOMMARGIN, 63
- ---
- > BOTTOMMARGIN, 80
- 424,425c419,420
- < FILEVERSION 7,1,1,0
- < PRODUCTVERSION 7,1,1,0
- ---
- > FILEVERSION 7,2,0,0
- > PRODUCTVERSION 7,2,0,0
- 442c437
- < VALUE "FileVersion", "7.1a"
- ---
- > VALUE "FileVersion", "7.2"
- 446c441
- < VALUE "ProductVersion", "7.1a"
- ---
- > VALUE "ProductVersion", "7.2"
- 506a502,503
- > MENUITEM "Permanently Decrypt...", IDM_DECRYPT_NONSYS_VOL
- > MENUITEM "Resume Interrupted Decryption...", IDM_RESUME_INTERRUPTED_PROC
- 508d504
- < MENUITEM "Resume Interrupted Process", IDM_RESUME_INTERRUPTED_PROC
- 526d521
- < MENUITEM "Encrypt System Partition/Drive...", IDM_ENCRYPT_SYSTEM_DEVICE
- 529,530c524
- < MENUITEM SEPARATOR
- < MENUITEM "Create Hidden Operating System...", IDM_CREATE_HIDDEN_OS
- ---
- > MENUITEM "Encrypt System Partition/Drive...", IDM_ENCRYPT_SYSTEM_DEVICE
- 591,603d584
- < MENUITEM "User's Guide", IDM_HELP
- < MENUITEM "Online Help", IDM_ONLINE_HELP
- < MENUITEM "Beginner's Tutorial", IDM_ONLINE_TUTORIAL
- < MENUITEM "Frequently Asked Questions", IDM_FAQ
- < MENUITEM SEPARATOR
- < MENUITEM "TrueCrypt Website", IDM_WEBSITE
- < MENUITEM "Downloads", IDM_TC_DOWNLOADS
- < MENUITEM "News", IDM_NEWS
- < MENUITEM "Version History", IDM_VERSION_HISTORY
- < MENUITEM SEPARATOR
- < MENUITEM "Analyze a System Crash...", IDM_ANALYZE_SYSTEM_CRASH
- < MENUITEM SEPARATOR
- < MENUITEM "Contact", IDM_CONTACT
- 607d587
- < MENUITEM "&Homepage ", IDM_HOMEPAGE
- 621c601
- < #endif // English (U.S.) resources
- ---
- > #endif // English (United States) resources
- diff -b -r tc-7.1/Mount/Resource.h tc-7.2/Mount/Resource.h
- 61,222c61,208
- < #define IDC_CREATE_VOLUME 1038
- < #define IDC_VOLUME_TOOLS 1039
- < #define IDC_WIPE_CACHE 1040
- < #define IDC_MOUNTALL 1041
- < #define IDD_TRAVELER_DLG 1042
- < #define IDC_SELECT_FILE 1043
- < #define IDD_HOTKEYS_DLG 1044
- < #define IDC_VOLUME_PROPERTIES 1045
- < #define IDT_FILE_SETTINGS 1046
- < #define IDD_PERFORMANCE_SETTINGS 1047
- < #define IDT_AUTORUN 1048
- < #define IDT_TRAVEL_INSERTION 1049
- < #define IDT_TRAVEL_ROOT 1050
- < #define IDT_VOLUME 1051
- < #define IDT_PASSWORD 1052
- < #define IDT_CURRENT 1053
- < #define IDT_NEW 1054
- < #define IDT_NEW_PASSWORD 1055
- < #define IDT_CONFIRM_PASSWORD 1056
- < #define IDT_PKCS5_PRF 1057
- < #define IDT_PW_CACHE_OPTIONS 1058
- < #define IDT_DEFAULT_MOUNT_OPTIONS 1059
- < #define IDT_WINDOWS_RELATED_SETTING 1060
- < #define IDC_CREATE 1061
- < #define IDC_EXIT 1062
- < #define IDC_TRAVEL_OPEN_EXPLORER 1063
- < #define IDC_TRAV_CACHE_PASSWORDS 1064
- < #define IDC_UNMOUNTALL 1065
- < #define IDT_TASKBAR_ICON 1066
- < #define IDT_AUTO_DISMOUNT 1067
- < #define IDC_PREF_FORCE_AUTO_DISMOUNT 1068
- < #define IDC_PREF_DISMOUNT_INACTIVE_TIME 1069
- < #define IDT_MINUTES 1070
- < #define IDC_PREF_DISMOUNT_SCREENSAVER 1071
- < #define IDC_PREF_DISMOUNT_POWERSAVING 1072
- < #define IDT_AUTO_DISMOUNT_ON 1073
- < #define IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT 1074
- < #define IDC_CLOSE_BKG_TASK_WHEN_NOVOL 1075
- < #define IDC_MORE_INFO_ON_HW_ACCELERATION 1076
- < #define IDT_LOGON 1077
- < #define IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION 1078
- < #define IDC_PREF_LOGON_START 1079
- < #define IDC_PREF_LOGON_MOUNT_DEVICES 1080
- < #define IDC_SHOW_PASSWORD_CHPWD_NEW 1081
- < #define IDC_HK_DISMOUNT_BALLOON_TOOLTIP 1082
- < #define IDC_SHOW_PASSWORD_CHPWD_ORI 1083
- < #define IDC_HK_DISMOUNT_PLAY_SOUND 1084
- < #define IDC_HOTKEY_ASSIGN 1085
- < #define IDC_HOTKEY_REMOVE 1086
- < #define IDC_HOTKEY_KEY 1087
- < #define IDT_HOTKEY_KEY 1088
- < #define IDC_HOTKEY_LIST 1089
- < #define IDC_RESET_HOTKEYS 1090
- < #define IDT_DISMOUNT_ACTION 1091
- < #define IDT_ASSIGN_HOTKEY 1092
- < #define IDC_HK_MOD_SHIFT 1093
- < #define IDC_HK_MOD_CTRL 1094
- < #define IDC_HK_MOD_ALT 1095
- < #define IDC_HK_MOD_WIN 1096
- < #define IDC_SHOW_PASSWORD 1097
- < #define IDC_LOGO 1098
- < #define IDT_PKCS11_LIB_PATH 1099
- < #define IDC_PKCS11_MODULE 1100
- < #define IDC_SELECT_PKCS11_MODULE 1101
- < #define IDC_AUTO_DETECT_PKCS11_MODULE 1102
- < #define IDC_CLOSE_TOKEN_SESSION_AFTER_MOUNT 1103
- < #define IDT_SECURITY_OPTIONS 1104
- < #define IDC_DISABLE_BOOT_LOADER_OUTPUT 1105
- < #define IDC_ALLOW_ESC_PBA_BYPASS 1106
- < #define IDC_CUSTOM_BOOT_LOADER_MESSAGE 1107
- < #define IDC_BOOT_LOADER_CACHE_PASSWORD 1108
- < #define IDC_MORE_SETTINGS 1109
- < #define IDT_CUSTOM_BOOT_LOADER_MESSAGE 1110
- < #define IDC_CUSTOM_BOOT_LOADER_MESSAGE_HELP 1111
- < #define IDT_BOOT_LOADER_SCREEN_OPTIONS 1112
- < #define IDT_PKCS11_LIB_HELP 1113
- < #define IDT_ACCELERATION_OPTIONS 1114
- < #define IDC_ENABLE_HARDWARE_ENCRYPTION 1115
- < #define IDC_FAVORITE_VOLUMES_LIST 1116
- < #define IDC_FAVORITE_MOUNT_READONLY 1117
- < #define IDC_FAVORITE_MOUNT_REMOVABLE 1118
- < #define IDC_FAVORITE_MOUNT_ON_ARRIVAL 1119
- < #define IDC_FAVORITE_LABEL 1120
- < #define IDT_FAVORITE_LABEL 1121
- < #define IDC_FAVORITE_MOUNT_ON_LOGON 1122
- < #define IDC_FAVORITE_DISABLE_HOTKEY 1123
- < #define IDC_FAVORITE_MOVE_UP 1124
- < #define IDC_FAVORITE_MOVE_DOWN 1125
- < #define IDC_FAVORITE_REMOVE 1126
- < #define IDT_HW_AES_SUPPORTED_BY_CPU 1127
- < #define IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT 1128
- < #define IDC_HW_AES_SUPPORTED_BY_CPU 1129
- < #define IDC_LIMIT_ENC_THREAD_POOL 1130
- < #define IDC_ENCRYPTION_FREE_CPU_COUNT 1131
- < #define IDT_PARALLELIZATION_OPTIONS 1132
- < #define IDT_LIMIT_ENC_THREAD_POOL_NOTE 1133
- < #define IDC_FAV_VOL_OPTIONS_GROUP_BOX 1134
- < #define IDC_FAVORITES_HELP_LINK 1135
- < #define IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX 1136
- < #define IDM_HELP 40001
- < #define IDM_ABOUT 40002
- < #define IDM_UNMOUNT_VOLUME 40003
- < #define IDM_CLEAR_HISTORY 40004
- < #define IDM_BENCHMARK 40005
- < #define IDM_TRAVELER 40006
- < #define IDM_MOUNT_VOLUME_OPTIONS 40007
- < #define IDM_FAQ 40008
- < #define IDM_REFRESH_DRIVE_LETTERS 40009
- < #define IDM_DEFAULT_KEYFILES 40010
- < #define IDM_WEBSITE 40011
- < #define IDM_MOUNTALL 40012
- < #define IDM_UNMOUNTALL 40013
- < #define IDM_MOUNT_VOLUME 40014
- < #define IDM_CHANGE_PASSWORD 40015
- < #define IDM_VOLUME_WIZARD 40016
- < #define IDM_CREATE_VOLUME 40017
- < #define IDM_WIPE_CACHE 40018
- < #define IDM_PREFERENCES 40019
- < #define IDM_LICENSE 40020
- < #define IDM_SELECT_FILE 40021
- < #define IDM_SELECT_DEVICE 40022
- < #define IDM_VOLUME_PROPERTIES 40023
- < #define IDM_LANGUAGE 40024
- < #define IDM_MOUNT_FAVORITE_VOLUMES 40025
- < #define IDM_BACKUP_VOL_HEADER 40026
- < #define IDM_RESTORE_VOL_HEADER 40027
- < #define IDM_HOTKEY_SETTINGS 40028
- < #define IDM_TC_DOWNLOADS 40029
- < #define IDM_NEWS 40030
- < #define IDM_CONTACT 40031
- < #define IDM_VERSION_HISTORY 40032
- < #define IDM_HOMEPAGE 40033
- < #define IDM_TEST_VECTORS 40034
- < #define IDM_ADD_REMOVE_VOL_KEYFILES 40035
- < #define IDM_REMOVE_ALL_KEYFILES_FROM_VOL 40036
- < #define IDM_CHANGE_HEADER_KEY_DERIV_ALGO 40037
- < #define IDM_KEYFILE_GENERATOR 40038
- < #define IDM_ONLINE_TUTORIAL 40039
- < #define IDM_ONLINE_HELP 40040
- < #define IDM_CHANGE_SYS_HEADER_KEY_DERIV_ALGO 40041
- < #define IDM_CHANGE_SYS_PASSWORD 40042
- < #define IDM_CREATE_RESCUE_DISK 40043
- < #define IDM_PERMANENTLY_DECRYPT_SYS 40044
- < #define IDM_VERIFY_RESCUE_DISK 40045
- < #define IDM_SYSTEM_ENCRYPTION_STATUS 40046
- < #define IDM_ENCRYPT_SYSTEM_DEVICE 40047
- < #define IDM_SYSENC_RESUME 40048
- < #define IDM_MOUNT_SYSENC_PART_WITHOUT_PBA 40049
- < #define IDM_CREATE_HIDDEN_OS 40050
- < #define IDM_TOKEN_PREFERENCES 40051
- < #define IDM_CLOSE_ALL_TOKEN_SESSIONS 40052
- < #define IDM_SYS_ENC_SETTINGS 40053
- < #define IDM_SYSENC_SETTINGS 40054
- < #define IDM_RESUME_INTERRUPTED_PROC 40055
- < #define IDM_MANAGE_TOKEN_KEYFILES 40056
- < #define IDM_SYS_FAVORITES_SETTINGS 40057
- < #define IDM_ORGANIZE_FAVORITES 40058
- < #define IDM_ORGANIZE_SYSTEM_FAVORITES 40059
- < #define IDM_ADD_VOLUME_TO_FAVORITES 40060
- < #define IDM_ADD_VOLUME_TO_SYSTEM_FAVORITES 40061
- < #define IDM_PERFORMANCE_SETTINGS 40062
- < #define IDM_ANALYZE_SYSTEM_CRASH 40063
- ---
- > #define IDC_VOLUME_TOOLS 1038
- > #define IDC_WIPE_CACHE 1039
- > #define IDC_MOUNTALL 1040
- > #define IDD_TRAVELER_DLG 1041
- > #define IDC_SELECT_FILE 1042
- > #define IDD_HOTKEYS_DLG 1043
- > #define IDC_VOLUME_PROPERTIES 1044
- > #define IDT_FILE_SETTINGS 1045
- > #define IDD_PERFORMANCE_SETTINGS 1046
- > #define IDT_AUTORUN 1047
- > #define IDT_TRAVEL_INSERTION 1048
- > #define IDT_TRAVEL_ROOT 1049
- > #define IDT_VOLUME 1050
- > #define IDT_PASSWORD 1051
- > #define IDT_CURRENT 1052
- > #define IDT_NEW 1053
- > #define IDT_NEW_PASSWORD 1054
- > #define IDT_CONFIRM_PASSWORD 1055
- > #define IDT_PKCS5_PRF 1056
- > #define IDT_PW_CACHE_OPTIONS 1057
- > #define IDT_DEFAULT_MOUNT_OPTIONS 1058
- > #define IDT_WINDOWS_RELATED_SETTING 1059
- > #define IDC_CREATE 1060
- > #define IDC_EXIT 1061
- > #define IDC_TRAVEL_OPEN_EXPLORER 1062
- > #define IDC_TRAV_CACHE_PASSWORDS 1063
- > #define IDC_UNMOUNTALL 1064
- > #define IDT_TASKBAR_ICON 1065
- > #define IDT_AUTO_DISMOUNT 1066
- > #define IDC_PREF_FORCE_AUTO_DISMOUNT 1067
- > #define IDC_PREF_DISMOUNT_INACTIVE_TIME 1068
- > #define IDT_MINUTES 1069
- > #define IDC_PREF_DISMOUNT_SCREENSAVER 1070
- > #define IDC_PREF_DISMOUNT_POWERSAVING 1071
- > #define IDT_AUTO_DISMOUNT_ON 1072
- > #define IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT 1073
- > #define IDC_CLOSE_BKG_TASK_WHEN_NOVOL 1074
- > #define IDT_LOGON 1075
- > #define IDC_PREF_LOGON_START 1076
- > #define IDC_PREF_LOGON_MOUNT_DEVICES 1077
- > #define IDC_SHOW_PASSWORD_CHPWD_NEW 1078
- > #define IDC_HK_DISMOUNT_BALLOON_TOOLTIP 1079
- > #define IDC_SHOW_PASSWORD_CHPWD_ORI 1080
- > #define IDC_HK_DISMOUNT_PLAY_SOUND 1081
- > #define IDC_HOTKEY_ASSIGN 1082
- > #define IDC_HOTKEY_REMOVE 1083
- > #define IDC_HOTKEY_KEY 1084
- > #define IDT_HOTKEY_KEY 1085
- > #define IDC_HOTKEY_LIST 1086
- > #define IDC_RESET_HOTKEYS 1087
- > #define IDT_DISMOUNT_ACTION 1088
- > #define IDT_ASSIGN_HOTKEY 1089
- > #define IDC_HK_MOD_SHIFT 1090
- > #define IDC_HK_MOD_CTRL 1091
- > #define IDC_HK_MOD_ALT 1092
- > #define IDC_HK_MOD_WIN 1093
- > #define IDC_SHOW_PASSWORD 1094
- > #define IDC_LOGO 1095
- > #define IDT_PKCS11_LIB_PATH 1096
- > #define IDC_PKCS11_MODULE 1097
- > #define IDC_SELECT_PKCS11_MODULE 1098
- > #define IDC_AUTO_DETECT_PKCS11_MODULE 1099
- > #define IDC_CLOSE_TOKEN_SESSION_AFTER_MOUNT 1100
- > #define IDT_SECURITY_OPTIONS 1101
- > #define IDC_DISABLE_BOOT_LOADER_OUTPUT 1102
- > #define IDC_ALLOW_ESC_PBA_BYPASS 1103
- > #define IDC_CUSTOM_BOOT_LOADER_MESSAGE 1104
- > #define IDC_BOOT_LOADER_CACHE_PASSWORD 1105
- > #define IDC_MORE_SETTINGS 1106
- > #define IDT_CUSTOM_BOOT_LOADER_MESSAGE 1107
- > #define IDC_CUSTOM_BOOT_LOADER_MESSAGE_HELP 1108
- > #define IDT_BOOT_LOADER_SCREEN_OPTIONS 1109
- > #define IDT_PKCS11_LIB_HELP 1110
- > #define IDT_ACCELERATION_OPTIONS 1111
- > #define IDC_ENABLE_HARDWARE_ENCRYPTION 1112
- > #define IDC_FAVORITE_VOLUMES_LIST 1113
- > #define IDC_FAVORITE_MOUNT_READONLY 1114
- > #define IDC_FAVORITE_MOUNT_REMOVABLE 1115
- > #define IDC_FAVORITE_MOUNT_ON_ARRIVAL 1116
- > #define IDC_FAVORITE_LABEL 1117
- > #define IDT_FAVORITE_LABEL 1118
- > #define IDC_FAVORITE_MOUNT_ON_LOGON 1119
- > #define IDC_FAVORITE_DISABLE_HOTKEY 1120
- > #define IDC_FAVORITE_MOVE_UP 1121
- > #define IDC_FAVORITE_MOVE_DOWN 1122
- > #define IDC_FAVORITE_REMOVE 1123
- > #define IDT_HW_AES_SUPPORTED_BY_CPU 1124
- > #define IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT 1125
- > #define IDC_HW_AES_SUPPORTED_BY_CPU 1126
- > #define IDC_LIMIT_ENC_THREAD_POOL 1127
- > #define IDC_ENCRYPTION_FREE_CPU_COUNT 1128
- > #define IDT_PARALLELIZATION_OPTIONS 1129
- > #define IDT_LIMIT_ENC_THREAD_POOL_NOTE 1130
- > #define IDC_FAV_VOL_OPTIONS_GROUP_BOX 1131
- > #define IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX 1132
- > #define IDT_INSECURE_APP 1133
- > #define IDM_ABOUT 40001
- > #define IDM_UNMOUNT_VOLUME 40002
- > #define IDM_CLEAR_HISTORY 40003
- > #define IDM_BENCHMARK 40004
- > #define IDM_TRAVELER 40005
- > #define IDM_MOUNT_VOLUME_OPTIONS 40006
- > #define IDM_REFRESH_DRIVE_LETTERS 40007
- > #define IDM_DEFAULT_KEYFILES 40008
- > #define IDM_MOUNTALL 40009
- > #define IDM_UNMOUNTALL 40010
- > #define IDM_MOUNT_VOLUME 40011
- > #define IDM_CHANGE_PASSWORD 40012
- > #define IDM_VOLUME_WIZARD 40013
- > #define IDM_CREATE_VOLUME 40014
- > #define IDM_WIPE_CACHE 40015
- > #define IDM_PREFERENCES 40016
- > #define IDM_LICENSE 40017
- > #define IDM_SELECT_FILE 40018
- > #define IDM_SELECT_DEVICE 40019
- > #define IDM_VOLUME_PROPERTIES 40020
- > #define IDM_LANGUAGE 40021
- > #define IDM_MOUNT_FAVORITE_VOLUMES 40022
- > #define IDM_BACKUP_VOL_HEADER 40023
- > #define IDM_RESTORE_VOL_HEADER 40024
- > #define IDM_HOTKEY_SETTINGS 40025
- > #define IDM_TEST_VECTORS 40026
- > #define IDM_ADD_REMOVE_VOL_KEYFILES 40027
- > #define IDM_REMOVE_ALL_KEYFILES_FROM_VOL 40028
- > #define IDM_CHANGE_HEADER_KEY_DERIV_ALGO 40029
- > #define IDM_KEYFILE_GENERATOR 40030
- > #define IDM_CHANGE_SYS_HEADER_KEY_DERIV_ALGO 40031
- > #define IDM_CHANGE_SYS_PASSWORD 40032
- > #define IDM_CREATE_RESCUE_DISK 40033
- > #define IDM_PERMANENTLY_DECRYPT_SYS 40034
- > #define IDM_VERIFY_RESCUE_DISK 40035
- > #define IDM_SYSTEM_ENCRYPTION_STATUS 40036
- > #define IDM_ENCRYPT_SYSTEM_DEVICE 40037
- > #define IDM_SYSENC_RESUME 40038
- > #define IDM_MOUNT_SYSENC_PART_WITHOUT_PBA 40039
- > #define IDM_TOKEN_PREFERENCES 40040
- > #define IDM_CLOSE_ALL_TOKEN_SESSIONS 40041
- > #define IDM_SYS_ENC_SETTINGS 40042
- > #define IDM_SYSENC_SETTINGS 40043
- > #define IDM_RESUME_INTERRUPTED_PROC 40044
- > #define IDM_MANAGE_TOKEN_KEYFILES 40045
- > #define IDM_SYS_FAVORITES_SETTINGS 40046
- > #define IDM_ORGANIZE_FAVORITES 40047
- > #define IDM_ORGANIZE_SYSTEM_FAVORITES 40048
- > #define IDM_ADD_VOLUME_TO_FAVORITES 40049
- > #define IDM_ADD_VOLUME_TO_SYSTEM_FAVORITES 40050
- > #define IDM_PERFORMANCE_SETTINGS 40051
- > #define IDM_DECRYPT_NONSYS_VOL 40052
- 230,231c216,217
- < #define _APS_NEXT_COMMAND_VALUE 40064
- < #define _APS_NEXT_CONTROL_VALUE 1137
- ---
- > #define _APS_NEXT_COMMAND_VALUE 40053
- > #define _APS_NEXT_CONTROL_VALUE 1134
- diff -b -r tc-7.1/Readme.txt tc-7.2/Readme.txt
- 1c1,9
- < This archive contains the source code of TrueCrypt 7.1a.
- ---
- >
- > WARNING: Using TrueCrypt is not secure as it may contain unfixed security issues
- >
- > The development of TrueCrypt was ended in 5/2014 after Microsoft terminated
- > support of Windows XP. Windows 8/7/Vista and later offer integrated support for
- > encrypted disks and virtual disk images. Such integrated support is also
- > available on other platforms. You should migrate any data encrypted by TrueCrypt
- > to encrypted disks or virtual disk images supported on your platform.
- >
- 27,34d34
- < III. FreeBSD and OpenSolaris
- <
- < IV. Third-Party Developers (Contributors)
- <
- < V. Legal Information
- <
- < VI. Further Information
- <
- 44c44
- < - Microsoft Visual C++ 1.52 (available from MSDN Subscriber Downloads)
- ---
- > - Microsoft Visual C++ 1.52
- 48c48
- < header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
- ---
- > header files
- 52,70d51
- < IMPORTANT:
- <
- < The 64-bit editions of Windows Vista and later versions of Windows, and in
- < some cases (e.g. playback of HD DVD content) also the 32-bit editions, do not
- < allow the TrueCrypt driver to run without an appropriate digital signature.
- < Therefore, all .sys files in official TrueCrypt binary packages are digitally
- < signed with the digital certificate of the TrueCrypt Foundation, which was
- < issued by a certification authority. At the end of each official .exe and
- < .sys file, there are embedded digital signatures and all related certificates
- < (i.e. all certificates in the relevant certification chain, such as the
- < certification authority certificates, CA-MS cross-certificate, and the
- < TrueCrypt Foundation certificate). Keep this in mind if you compile TrueCrypt
- < and compare your binaries with the official binaries. If your binaries are
- < unsigned, the sizes of the official binaries will usually be approximately
- < 10 KB greater than sizes of your binaries (there may be further differences
- < if you use a different version of the compiler, or if you install a different
- < or no service pack for Visual Studio, or different hotfixes for it, or if you
- < use different versions of the required SDKs).
- <
- 114,116c95,96
- < wxWidgets 2.8 library source code (available at http://www.wxwidgets.org)
- < - FUSE library and header files (available at http://fuse.sourceforge.net
- < and http://code.google.com/p/macfuse)
- ---
- > wxWidgets 2.8 library source code
- > - FUSE library and header files
- 118,120c98,99
- < header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
- < located in a standard include path or in a directory defined by the
- < environment variable 'PKCS11_INC'.
- ---
- > header files located in a standard include path or in a directory
- > defined by the environment variable 'PKCS11_INC'
- 155,209d133
- <
- <
- <
- < III. FreeBSD and OpenSolaris
- < ============================
- <
- < Support status for FreeBSD: http://www.truecrypt.org/misc/freebsd
- < Support status for OpenSolaris: http://www.truecrypt.org/misc/opensolaris
- <
- <
- <
- < IV. Third-Party Developers (Contributors)
- < =========================================
- <
- < If you intend to implement a feature, please contact us first to make sure:
- <
- < 1) That the feature has not been implemented (we may have already implemented
- < it, but haven't released the code yet).
- < 2) That the feature is acceptable.
- < 3) Whether we need help of third-party developers with implementing the feature.
- <
- < Information on how to contact us can be found at:
- < http://www.truecrypt.org/contact
- <
- <
- <
- < V. Legal Information
- < ====================
- <
- < Copyright Information
- < ---------------------
- <
- < This software as a whole:
- < Copyright (c) 2012 TrueCrypt Developers Association. All rights reserved.
- <
- < Portions of this software:
- < Copyright (c) 2003-2012 TrueCrypt Developers Association. All rights reserved.
- < Copyright (c) 1998-2000 Paul Le Roux. All rights reserved.
- < Copyright (c) 1998-2008 Brian Gladman, Worcester, UK. All rights reserved.
- < Copyright (c) 2002-2004 Mark Adler. All rights reserved.
- < For more information, please see the legal notices attached to parts of the
- < source code.
- <
- < Trademark Information
- < ---------------------
- <
- < Any trademarks contained in the source code, binaries, and/or in the
- < documentation, are the sole property of their respective owners.
- <
- <
- <
- < VI. Further Information
- < =======================
- <
- < http://www.truecrypt.org
- diff -b -r tc-7.1/Release/Setup Files/License.txt tc-7.2/Release/Setup Files/License.txt
- 1c1
- < TrueCrypt License Version 3.0
- ---
- > TrueCrypt License Version 3.1
- 115,131c115
- < c. Phrase "Based on TrueCrypt, freely available at
- < http://www.truecrypt.org/" must be displayed by Your Product
- < (if technically feasible) and contained in its
- < documentation. Alternatively, if This Product or its portion
- < You included in Your Product constitutes only a minor
- < portion of Your Product, phrase "Portions of this product
- < are based in part on TrueCrypt, freely available at
- < http://www.truecrypt.org/" may be displayed instead. In each
- < of the cases mentioned above in this paragraph,
- < "http://www.truecrypt.org/" must be a hyperlink (if
- < technically feasible) pointing to http://www.truecrypt.org/
- < and You may freely choose the location within the user
- < interface (if there is any) of Your Product (e.g., an
- < "About" window, etc.) and the way in which Your Product will
- < display the respective phrase.
- <
- < Your Product (and any associated materials, e.g., the
- ---
- > c. Your Product (and any associated materials, e.g., the
- 134,135c118,119
- < containing the domain name truecrypt.org (or any domain name
- < that forwards to the domain name truecrypt.org) in a manner
- ---
- > containing the domain name truecrypt (or any domain name
- > that forwards to the domain name truecrypt) in a manner
- 140c124
- < name truecrypt.org is associated with Your Product.
- ---
- > name truecrypt is associated with Your Product.
- Only in tc-7.1/Release/Setup Files: TrueCrypt User Guide.pdf
- diff -b -r tc-7.1/Resources/Texts/License.rtf tc-7.2/Resources/Texts/License.rtf
- 61c61
- < \pard\plain \ltrpar\s3\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\sa283\rtlch\af2\afs16\lang255\ltrch\dbch\af2\langfe255\hich\f2\fs16\lang1033\loch\f2\fs16\lang1033{\rtlch \ltrch\loch\f2\fs16\lang1033\i0\b0{\ltrch\hich\b\loch\b TrueCrypt License Version 3.0}}{\rtlch \ltrch\loch\f2\fs16\lang1033\i0\b0 \line \line Software distributed under this license is distributed on an "AS IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO USES, COPIES, MODIFIES, OR (RE)DISTRIB
- ---
- > \pard\plain \ltrpar\s3\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\sa283\rtlch\af2\afs16\lang255\ltrch\dbch\af2\langfe255\hich\f2\fs16\lang1033\loch\f2\fs16\lang1033{\rtlch \ltrch\loch\f2\fs16\lang1033\i0\b0{\ltrch\hich\b\loch\b TrueCrypt License Version 3.1}}{\rtlch \ltrch\loch\f2\fs16\lang1033\i0\b0 \line \line Software distributed under this license is distributed on an "AS IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO USES, COPIES, MODIFIES, OR (RE)DISTRIB
- 82,87c82,84
- < \par \pard\plain {\listtext\pard\plain \li707\ri0\lin707\rin0\fi-283\sa283\f2\fs16\f2\fs16\f2\fs16 c.\tab}\ilvl0 \ltrpar\s3\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ls2\li707\ri0\lin707\rin0\fi-283\sa283\rtlch\af2\afs16\lang255\ltrch\dbch\af2\langfe255\hich\f2\fs16\lang1033\loch\f2\fs16\lang1033 {\rtlch \ltrch\loch\f2\fs16\lang1033\i0\b0 Phrase "{\ltrch\hich\i\loch\i Based on TrueCrypt, freely available at http://www.truecrypt.org/}" must be displayed by Your Product (if technically feasible) and contained in its documentation. Alternatively, if This Product or its portion You included in Your Product constitute
- < s only a minor portion of Your Product, phrase "{\ltrch\hich\i\loch\i Portions of this product are based in part on TrueCrypt, freely available at http://www.truecrypt.org/}" may be displayed instead. In each of the cases mentioned above in this paragraph, "{\ltrch\hich\i\loch\i http://www.truecrypt.
- < org/}" must be a hyperlink (if technically feasible) pointing to http://www.truecrypt.org/ and You may freely choose the location within the user interface (if there is any) of Your Product (e.g., an "About" window, etc.) and the way in which Your Product w
- < ill display the respective phrase.\line \line Your Product (and any associated materials, e.g., the documentation, the content of the official web site of Your Product, etc.) must not present any Internet address containing the domain name truecrypt.org (or any doma
- < in name that forwards to the domain name truecrypt.org) in a manner that might suggest that it is where information about Your Product may be obtained or where bugs found in Your Product may be reported or where support for Your Product may be available or
- < otherwise attempt to indicate that the domain name truecrypt.org is associated with Your Product.}
- ---
- > \par \pard\plain {\listtext\pard\plain \li707\ri0\lin707\rin0\fi-283\sa283\f2\fs16\f2\fs16\f2\fs16 c.\tab}\ilvl0 \ltrpar\s3\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ls2\li707\ri0\lin707\rin0\fi-283\sa283\rtlch\af2\afs16\lang255\ltrch\dbch\af2\langfe255\hich\f2\fs16\lang1033\loch\f2\fs16\lang1033 {\rtlch \ltrch\loch\f2\fs16\lang1033\i0\b0 Your Product (and any associated materials, e.g., the documentation, the content of the official web site of Your Product, etc.) must not present any Internet address containing the domain name truecrypt (or any doma
- > in name that forwards to the domain name truecrypt) in a manner that might suggest that it is where information about Your Product may be obtained or where bugs found in Your Product may be reported or where support for Your Product may be available or
- > otherwise attempt to indicate that the domain name truecrypt is associated with Your Product.}
- diff -b -r tc-7.1/Setup/ComSetup.cpp tc-7.2/Setup/ComSetup.cpp
- 10c10
- < #define TC_MAIN_COM_VERSION_MINOR 4
- ---
- > #define TC_MAIN_COM_VERSION_MINOR 5
- diff -b -r tc-7.1/Setup/Resource.h tc-7.2/Setup/Resource.h
- 19d18
- < #define IDD_DONATIONS_PAGE_DLG 114
- 52d50
- < #define IDC_DONATE 1032
- 59c57
- < #define _APS_NEXT_RESOURCE_VALUE 115
- ---
- > #define _APS_NEXT_RESOURCE_VALUE 114
- 61c59
- < #define _APS_NEXT_CONTROL_VALUE 1033
- ---
- > #define _APS_NEXT_CONTROL_VALUE 1032
- diff -b -r tc-7.1/Setup/Setup.c tc-7.2/Setup/Setup.c
- 483a484,485
- > DeleteFile ((string(szDestDir) + "\\TrueCrypt User Guide.pdf").c_str());
- >
- 536,537c538
- < strcpy (szTmp, TC_HOMEPAGE);
- < RegSetValueEx (hkey, "URLInfoAbout", 0, REG_SZ, (BYTE *) szTmp, strlen (szTmp) + 1);
- ---
- > RegDeleteValue (hkey, "URLInfoAbout");
- 661,663c662
- < strcpy (szTmp, TC_HOMEPAGE);
- < if (RegSetValueEx (hkey, "URLInfoAbout", 0, REG_SZ, (BYTE *) szTmp, strlen (szTmp) + 1) != ERROR_SUCCESS)
- < goto error;
- ---
- > RegDeleteValue(hkey, "URLInfoAbout");
- 1232,1233d1230
- < FILE *f;
- <
- 1255,1265c1252
- < IconMessage (hwndDlg, szTmp2);
- < f = fopen (szTmp2, "w");
- < if (f)
- < {
- < fprintf (f, "[InternetShortcut]\nURL=%s\n", TC_HOMEPAGE);
- <
- < CheckFileStreamWriteErrors (f, szTmp2);
- < fclose (f);
- < }
- < else
- < goto error;
- ---
- > DeleteFile (szTmp2);
- 1742,1775d1728
- <
- < if (bOK && !bUninstall && !bDowngrade && !bRepairMode && !bDevm)
- < {
- < if (!IsHiddenOSRunning()) // A hidden OS user should not see the post-install notes twice (on decoy OS and then on hidden OS).
- < {
- < if (bRestartRequired || SystemEncryptionUpdate)
- < {
- < // Restart required
- <
- < if (bUpgrade)
- < {
- < SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_RELEASE_NOTES);
- < }
- < else if (bPossiblyFirstTimeInstall)
- < {
- < SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_TUTORIAL);
- < }
- < }
- < else
- < {
- < // No restart will be required
- <
- < if (bUpgrade)
- < {
- < bPromptReleaseNotes = TRUE;
- < }
- < else if (bPossiblyFirstTimeInstall)
- < {
- < bPromptTutorial = TRUE;
- < }
- < }
- < }
- < }
- <
- 2072a2026,2027
- > else
- > WarningTopMost ("INSECURE_APP");
- diff -b -r tc-7.1/Setup/Setup.h tc-7.2/Setup/Setup.h
- 22d21
- < "ATrueCrypt User Guide.pdf",
- 35d33
- < "TrueCrypt User Guide.pdf",
- diff -b -r tc-7.1/Setup/Setup.rc tc-7.2/Setup/Setup.rc
- 17c17
- < // English (U.S.) resources
- ---
- > // English (United States) resources
- 20d19
- < #ifdef _WIN32
- 23d21
- < #endif //_WIN32
- 31,32c29,30
- < FILEVERSION 7,1,1,0
- < PRODUCTVERSION 7,1,1,0
- ---
- > FILEVERSION 7,2,0,0
- > PRODUCTVERSION 7,2,0,0
- 49c47
- < VALUE "FileVersion", "7.1a"
- ---
- > VALUE "FileVersion", "7.2"
- 53c51
- < VALUE "ProductVersion", "7.1a"
- ---
- > VALUE "ProductVersion", "7.2"
- 139,140c137,138
- < CONTROL 107,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30
- < CONTROL 109,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10
- ---
- > CONTROL IDB_SETUP_WIZARD,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30
- > CONTROL IDB_SETUP_WIZARD_BKG,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10
- 180,187d177
- < IDD_DONATIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152
- < STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
- < EXSTYLE WS_EX_TRANSPARENT
- < FONT 8, "MS Shell Dlg", 0, 0, 0x0
- < BEGIN
- < PUSHBUTTON "Donate now...",IDC_DONATE,124,94,96,14
- < END
- <
- 294,301d283
- <
- < IDD_DONATIONS_PAGE_DLG, DIALOG
- < BEGIN
- < LEFTMARGIN, 7
- < RIGHTMARGIN, 339
- < TOPMARGIN, 7
- < BOTTOMMARGIN, 147
- < END
- 313c295
- < #endif // English (U.S.) resources
- ---
- > #endif // English (United States) resources
- diff -b -r tc-7.1/Setup/Setup.vcproj tc-7.2/Setup/Setup.vcproj
- 258,261d257
- < <File
- < RelativePath="..\Common\Xml.c"
- < >
- < </File>
- 326a323,326
- > >
- > </File>
- > <File
- > RelativePath="..\Common\Xml.c"
- diff -b -r tc-7.1/Setup/Wizard.c tc-7.2/Setup/Wizard.c
- 34,35c34
- < EXTRACTION_PROGRESS_PAGE,
- < DONATIONS_PAGE
- ---
- > EXTRACTION_PROGRESS_PAGE
- 53,54d51
- < BOOL bPromptTutorial = FALSE;
- < BOOL bPromptReleaseNotes = FALSE;
- 58,66d54
- < static HFONT hDonTextFont;
- < static BOOL OsPrngAvailable;
- < static HCRYPTPROV hCryptProv;
- < static int DonColorSchemeId;
- < static COLORREF DonTextColor;
- < static COLORREF DonBkgColor;
- <
- < wstring DonText = L"";
- <
- 75,87d62
- <
- < if (hCryptProv != 0)
- < {
- < OsPrngAvailable = FALSE;
- < CryptReleaseContext (hCryptProv, 0);
- < hCryptProv = 0;
- < }
- <
- < if (hDonTextFont != NULL)
- < {
- < DeleteObject (hDonTextFont);
- < hDonTextFont = NULL;
- < }
- 148,152d122
- <
- < case DONATIONS_PAGE:
- < hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_DONATIONS_PAGE_DLG), hwndDlg,
- < (DLGPROC) PageDialogProc);
- < break;
- 172,199d141
- < static int GetDonVal (int minVal, int maxVal)
- < {
- < static BOOL prngInitialized = FALSE;
- < static unsigned __int8 buffer [2];
- <
- < if (!prngInitialized)
- < {
- < if (!CryptAcquireContext (&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)
- < && !CryptAcquireContext (&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET))
- < OsPrngAvailable = FALSE;
- < else
- < OsPrngAvailable = TRUE;
- <
- < srand ((unsigned int) time (NULL));
- < rand(); // Generate and discard the inital value, as it always appears to be somewhat non-random.
- <
- < prngInitialized = TRUE;
- < }
- <
- < if (OsPrngAvailable && CryptGenRandom (hCryptProv, sizeof (buffer), buffer) != 0)
- < {
- < return ((int) ((double) *((uint16 *) buffer) / (0xFFFF+1) * (maxVal + 1 - minVal)) + minVal);
- < }
- < else
- < return ((int) ((double) rand() / (RAND_MAX+1) * (maxVal + 1 - minVal)) + minVal);
- < }
- <
- <
- 480,567d421
- <
- < case DONATIONS_PAGE:
- <
- < SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bExtractOnly ? "EXTRACTION_FINISHED_TITLE_DON" : (bUpgrade ? "SETUP_FINISHED_UPGRADE_TITLE_DON" : "SETUP_FINISHED_TITLE_DON")));
- < SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_INFO), GetString ("SETUP_FINISHED_INFO_DON"));
- <
- < DonText = L"Please consider making a donation.";
- <
- <
- < // Colors
- <
- < switch (DonColorSchemeId)
- < {
- < case 2:
- < // NOP - Default OS colors (foreground and background)
- < break;
- <
- < case 3:
- < // Red
- < DonTextColor = RGB (255, 255, 255);
- < DonBkgColor = RGB (255, 0, 0);
- < break;
- <
- < case 4:
- < // Yellow
- < DonTextColor = RGB (255, 15, 49);
- < DonBkgColor = RGB (255, 255, 0);
- < break;
- <
- < case 5:
- < // Light red
- < DonTextColor = RGB (255, 255, 255);
- < DonBkgColor = RGB (255, 141, 144);
- < break;
- <
- < case 6:
- < // Pink
- < DonTextColor = RGB (255, 255, 255);
- < DonBkgColor = RGB (248, 148, 207);
- < break;
- <
- < case 7:
- < // White + red text
- < DonTextColor = RGB (255, 15, 49);
- < DonBkgColor = RGB (255, 255, 255);
- < break;
- <
- < case 8:
- < // Blue
- < DonTextColor = RGB (255, 255, 255);
- < DonBkgColor = RGB (54, 140, 255);
- < break;
- <
- < case 9:
- < // Green
- < DonTextColor = RGB (255, 255, 255);
- < DonBkgColor = RGB (70, 180, 80);
- < break;
- < }
- <
- < {
- < // Font
- <
- < LOGFONTW lf;
- < memset (&lf, 0, sizeof(lf));
- <
- < // Main font
- < wcsncpy (lf.lfFaceName, L"Times New Roman", sizeof (lf.lfFaceName)/2);
- < lf.lfHeight = CompensateDPIFont (-21);
- < lf.lfWeight = FW_NORMAL;
- < lf.lfWidth = 0;
- < lf.lfEscapement = 0;
- < lf.lfOrientation = 0;
- < lf.lfItalic = FALSE;
- < lf.lfUnderline = FALSE;
- < lf.lfStrikeOut = FALSE;
- < lf.lfCharSet = DEFAULT_CHARSET;
- < lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
- < lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
- < lf.lfQuality = PROOF_QUALITY;
- < lf.lfPitchAndFamily = FF_DONTCARE;
- < hDonTextFont = CreateFontIndirectW (&lf);
- <
- < if (hDonTextFont == NULL)
- < AbortProcessSilent ();
- < }
- <
- < return 1;
- 572,576d425
- < case WM_HELP:
- < if (bLicenseAccepted)
- < OpenPageHelp (GetParent (hwndDlg), nCurPageNo);
- <
- < return 1;
- 580,582d428
- < bPromptTutorial = FALSE;
- < bPromptReleaseNotes = FALSE;
- <
- 679,740d524
- < if (nCurPageNo == DONATIONS_PAGE)
- < {
- < switch (lw)
- < {
- < case IDC_DONATE:
- < {
- < char tmpstr [200];
- <
- < sprintf (tmpstr, "&ref=%d", DonColorSchemeId);
- <
- < Applink ("donate", FALSE, tmpstr);
- < }
- < return 1;
- < }
- < }
- <
- < return 0;
- <
- <
- < case WM_PAINT:
- <
- < if (nCurPageNo == DONATIONS_PAGE)
- < {
- < PAINTSTRUCT tmpPaintStruct;
- < HDC hdc = BeginPaint (hCurPage, &tmpPaintStruct);
- <
- < if (hdc == NULL)
- < AbortProcessSilent ();
- <
- < SelectObject (hdc, hDonTextFont);
- <
- < if (DonColorSchemeId != 2)
- < {
- < HBRUSH tmpBrush = CreateSolidBrush (DonBkgColor);
- <
- < if (tmpBrush == NULL)
- < AbortProcessSilent ();
- <
- < RECT trect;
- <
- < trect.left = 0;
- < trect.right = CompensateXDPI (526);
- < trect.top = 0;
- < trect.bottom = CompensateYDPI (246);
- <
- < FillRect (hdc, &trect, tmpBrush);
- <
- < SetTextColor (hdc, DonTextColor);
- < SetBkColor (hdc, DonBkgColor);
- < }
- <
- < SetTextAlign(hdc, TA_CENTER);
- <
- < TextOutW (hdc,
- < CompensateXDPI (258),
- < CompensateYDPI (70),
- < DonText.c_str(),
- < DonText.length());
- <
- < EndPaint (hCurPage, &tmpPaintStruct);
- < ReleaseDC (hCurPage, hdc);
- < }
- 843,844d626
- < DonColorSchemeId = GetDonVal (2, 9);
- <
- 872,877d653
- < case WM_HELP:
- < if (bLicenseAccepted)
- < OpenPageHelp (hwndDlg, nCurPageNo);
- <
- < return 1;
- <
- 880,886d655
- < if (lw == IDHELP)
- < {
- < if (bLicenseAccepted)
- < OpenPageHelp (hwndDlg, nCurPageNo);
- <
- < return 1;
- < }
- 906,908d674
- < WarningDirect (L"Warning: Please note that this may be the last version of TrueCrypt that supports Windows 2000. If you want to be able to upgrade to future versions of TrueCrypt (which is highly recommended), you will need to upgrade to Windows XP or a later version of Windows.\n\nNote: Microsoft stopped issuing security updates for Windows 2000 to the general public on 7/13/2010 (the last non-security update for Windows 2000 was issued to the general public in 2005).");
- <
- <
- 964,972d729
- < else if (nCurPageNo == DONATIONS_PAGE)
- < {
- < // 'Finish' button clicked
- <
- < PostMessage (hwndDlg, WM_CLOSE, 0, 0);
- <
- < return 1;
- < }
- <
- 1004,1034d760
- <
- < case WM_PAINT:
- <
- < if (nCurPageNo == DONATIONS_PAGE && DonColorSchemeId != 2)
- < {
- < HWND hwndItem = GetDlgItem (MainDlg, IDC_MAIN_CONTENT_CANVAS);
- <
- < PAINTSTRUCT tmpPaintStruct;
- < HDC hdc = BeginPaint (hwndItem, &tmpPaintStruct);
- <
- < if (DonColorSchemeId != 2)
- < {
- < HBRUSH tmpBrush = CreateSolidBrush (DonBkgColor);
- <
- < RECT trect;
- <
- < trect.left = CompensateXDPI (1);
- < trect.right = CompensateXDPI (560);
- < trect.top = CompensateYDPI (DonColorSchemeId == 7 ? 11 : 0);
- < trect.bottom = CompensateYDPI (260);
- <
- < FillRect (hdc, &trect, tmpBrush);
- < }
- <
- < EndPaint(hwndItem, &tmpPaintStruct);
- < ReleaseDC (hwndItem, hdc);
- < }
- < return 0;
- <
- <
- <
- 1058,1061d783
- <
- < nCurPageNo = DONATIONS_PAGE;
- < LoadPage (hwndDlg, DONATIONS_PAGE);
- <
- 1071d792
- <
- 1120,1122d840
- < nCurPageNo = DONATIONS_PAGE;
- < LoadPage (hwndDlg, DONATIONS_PAGE);
- <
- 1169,1186d886
- < }
- < else
- < {
- < if (bPromptReleaseNotes
- < && AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES") == IDYES)
- < {
- < Applink ("releasenotes", TRUE, "");
- < }
- <
- < bPromptReleaseNotes = FALSE;
- <
- < if (bPromptTutorial
- < && AskYesNo ("AFTER_INSTALL_TUTORIAL") == IDYES)
- < {
- < Applink ("beginnerstutorial", TRUE, "");
- < }
- <
- < bPromptTutorial = FALSE;
- diff -b -r tc-7.1/Setup/Wizard.h tc-7.2/Setup/Wizard.h
- 24,26d23
- < extern BOOL bPromptTutorial;
- < extern BOOL bPromptReleaseNotes;
- <
Add Comment
Please, Sign In to add comment