Skip to content

Instantly share code, notes, and snippets.

@riverar
Created May 28, 2014 20:33
Show Gist options
  • Save riverar/4052f4a792ad2b784f8f to your computer and use it in GitHub Desktop.
Save riverar/4052f4a792ad2b784f8f to your computer and use it in GitHub Desktop.
Diff of TrueCrypt 7.1a and "TrueCrypt 7.2" sources
--- Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
+++ Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
@@ -75,7 +75,9 @@
#endif // TC_WINDOWS_BOOT_RESCUE_DISK_MODE
- PrintEndl (3);
+ PrintEndl (2);
+ Print ("WARNING: Using TrueCrypt is not secure");
+ PrintEndl (2);
}
@@ -574,125 +576,6 @@
#ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
-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;
-}
-
-
#else // TC_WINDOWS_BOOT_RESCUE_DISK_MODE
@@ -1105,28 +988,6 @@
#ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
- // 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
PrintMainMenu();
exitKey = BootEncryptedDrive();
--- Common/BootEncryption.cpp Mon Jan 19 14:26:12 1970
+++ Common/BootEncryption.cpp Mon Jan 19 14:26:12 1970
@@ -1861,6 +1861,8 @@
void BootEncryption::CheckRequirements ()
{
+ AbortProcess ("INSECURE_APP");
+
if (nCurrentOS == WIN_2000)
throw ErrorException ("SYS_ENCRYPTION_UNSUPPORTED_ON_CURRENT_OS");
@@ -2232,72 +2234,13 @@
void BootEncryption::PrepareHiddenOSCreation (int ea, int mode, int pkcs5)
{
- BootEncryptionStatus encStatus = GetStatus();
- if (encStatus.DriveMounted)
- throw ParameterIncorrect (SRC_POS);
-
- CheckRequirements();
- BackupSystemLoader();
-
- SelectedEncryptionAlgorithmId = ea;
+ AbortProcess ("INSECURE_APP");
}
void BootEncryption::PrepareInstallation (bool systemPartitionOnly, Password &password, int ea, int mode, int pkcs5, const string &rescueIsoImagePath)
{
- 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");
}
bool BootEncryption::IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly)
@@ -2358,19 +2301,7 @@
void BootEncryption::StartEncryption (WipeAlgorithmId wipeAlgorithm, bool zeroUnreadableSectors)
{
- 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");
}
void BootEncryption::CopyFileAdmin (const string &sourceFile, const string &destinationFile)
--- Common/Cmdline.c Mon Jan 19 14:26:12 1970
+++ Common/Cmdline.c Mon Jan 19 14:26:12 1970
@@ -54,6 +54,8 @@
}
}
+ 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");
+
SetWindowText (GetDlgItem (hwndDlg, IDC_COMMANDHELP_TEXT), (char*) tmp);
return 1;
}
--- Common/Common.rc Mon Jan 19 14:26:12 1970
+++ Common/Common.rc Mon Jan 19 14:26:12 1970
@@ -13,13 +13,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -34,25 +32,24 @@
BEGIN
EDITTEXT IDC_ABOUT_CREDITS,7,111,277,45,ES_MULTILINE | WS_VSCROLL | NOT WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,230,178,52,14
- LTEXT "",IDC_HOMEPAGE,18,87,117,9,SS_NOTIFY
LTEXT "",IDT_ABOUT_RELEASE,18,71,235,8
- 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
LTEXT "",IDT_ABOUT_VERSION,18,61,161,8
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,167,291,1,WS_EX_STATICEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,169,291,1,WS_EX_STATICEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,107,291,1,WS_EX_STATICEDGE
CONTROL "",IDC_ABOUT_LOGO_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,293,50,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
- 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
END
-IDD_COMMANDHELP_DLG DIALOGEX 0, 0, 249, 213
+IDD_COMMANDHELP_DLG DIALOGEX 0, 0, 249, 234
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Command Line Help"
CLASS "CustomDlg"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- 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
END
IDD_RAWDEVICES_DLG DIALOGEX 0, 0, 305, 209
@@ -65,7 +62,7 @@
PUSHBUTTON "Cancel",IDCANCEL,248,190,50,14
END
-IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 172
+IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 159
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "TrueCrypt - Mount Options"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -81,11 +78,10 @@
CONTROL "&Display password",IDC_SHOW_PASSWORD_MO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,123,90,10
CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE_HIDVOL_PROT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,136,90,10
PUSHBUTTON "&Keyfiles...",IDC_KEYFILES_HIDVOL_PROT,203,125,60,14
- LTEXT "What is hidden volume protection?",IDC_LINK_HIDVOL_PROTECTION_INFO,16,151,247,10,SS_NOTIFY
DEFPUSHBUTTON "OK",IDOK,211,7,60,14
PUSHBUTTON "Cancel",IDCANCEL,211,24,60,14
RTEXT "P&assword to hidden volume:\n(if empty, cache is used)",IDT_HIDDEN_PROT_PASSWD,15,103,91,17,0,WS_EX_RIGHT
- GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,72,265,95
+ GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,72,265,81
CONTROL "Use backup header embedded in &volume if available",IDC_USE_EMBEDDED_HEADER_BAK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,39,257,11
END
@@ -109,7 +105,6 @@
LTEXT "WARNING: If you lose a keyfile or if any bit of its first 1024 kilobytes changes, it will be impossible to mount volumes that use the keyfile!",IDT_KEYFILE_WARNING,279,44,58,85,0,WS_EX_TRANSPARENT
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,2,154,343,1,WS_EX_STATICEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,2,209,343,1,WS_EX_STATICEDGE
- LTEXT "More information on keyfiles",IDC_LINK_KEYFILES_INFO,96,220,108,10,SS_NOTIFY
END
IDD_LANGUAGE DIALOGEX 0, 0, 209, 183
@@ -119,7 +114,6 @@
BEGIN
LISTBOX IDC_LANGLIST,6,7,197,67,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_LANGPACK_CREDITS,6,108,197,28,ES_MULTILINE | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
- CTEXT "Download language pack",IDC_GET_LANG_PACKS,2,146,205,10,SS_NOTIFY
DEFPUSHBUTTON "OK",IDOK,97,165,50,14
PUSHBUTTON "Cancel",IDCANCEL,153,165,50,14
LTEXT "Translated by:",IDT_LANGPACK_AUTHORS,6,99,101,9,SS_NOTIFY,WS_EX_TRANSPARENT
@@ -211,7 +205,7 @@
END
IDD_MULTI_CHOICE_DLG DIALOGEX 0, 0, 167, 322
-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
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
PUSHBUTTON "",IDC_CHOICE10,7,292,153,24,BS_CENTER | BS_MULTILINE,WS_EX_STATICEDGE
@@ -308,9 +302,13 @@
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
+ IDD_ABOUT_DLG, DIALOG
+ BEGIN
+ END
+
IDD_COMMANDHELP_DLG, DIALOG
BEGIN
- BOTTOMMARGIN, 205
+ BOTTOMMARGIN, 226
END
IDD_RAWDEVICES_DLG, DIALOG
@@ -325,7 +323,7 @@
BEGIN
LEFTMARGIN, 7
TOPMARGIN, 7
- BOTTOMMARGIN, 166
+ BOTTOMMARGIN, 153
END
IDD_KEYFILES, DIALOG
@@ -524,7 +522,7 @@
IDB_TEXTUAL_LOGO_BKG BITMAP "..\\Common\\Textual_logo_background.bmp"
IDB_TEXTUAL_LOGO_96DPI BITMAP "..\\Common\\Textual_logo_96dpi.bmp"
IDB_TEXTUAL_LOGO_288DPI BITMAP "..\\Common\\Textual_logo_288dpi.bmp"
-#endif // English (U.S.) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
--- Common/Dlgcode.c Mon Jan 19 14:26:12 1970
+++ Common/Dlgcode.c Mon Jan 19 14:26:12 1970
@@ -51,6 +51,7 @@
#ifdef TCMOUNT
#include "Mount/Mount.h"
+#include "Mount/resource.h"
#endif
#ifdef VOLFORMAT
@@ -66,8 +67,6 @@
LONG DriverVersion;
char *LastDialogId;
-char szHelpFile[TC_MAX_PATH];
-char szHelpFile2[TC_MAX_PATH];
char SecurityTokenLibraryPath[TC_MAX_PATH];
HFONT hFixedDigitFont = NULL;
@@ -405,14 +404,14 @@
{
// Note that this function also causes localcleanup() to be called (see atexit())
MessageBeep (MB_ICONEXCLAMATION);
- MessageBoxW (NULL, GetString (stringId), lpszTitle, ICON_HAND);
- exit (1);
+ MessageBoxW (NULL, GetString (stringId), lpszTitle, ICON_HAND | MB_SETFOREGROUND | MB_TOPMOST);
+ ExitProcess (1);
}
void AbortProcessSilent (void)
{
// Note that this function also causes localcleanup() to be called (see atexit())
- exit (1);
+ ExitProcess (1);
}
@@ -769,6 +768,19 @@
}
+// 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);
+}
+
+
// Protects an input field from having its content updated by a Paste action (call ToBootPwdField() to use this).
static LRESULT CALLBACK BootPwdFieldProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
@@ -869,10 +881,6 @@
LocalizeDialog (hwndDlg, "IDD_ABOUT_DLG");
- // Hyperlink
- SetWindowText (GetDlgItem (hwndDlg, IDC_HOMEPAGE), "www.truecrypt.org");
- ToHyperlink (hwndDlg, IDC_HOMEPAGE);
-
// Logo area background (must not keep aspect ratio; must retain Windows-imposed distortion)
GetClientRect (GetDlgItem (hwndDlg, IDC_ABOUT_LOGO_AREA), &rec);
SetWindowPos (GetDlgItem (hwndDlg, IDC_ABOUT_BKG), HWND_TOP, 0, 0, rec.right, rec.bottom, SWP_NOMOVE);
@@ -915,13 +923,13 @@
"Paulo Barreto, Brian Gladman, Wei Dai, Peter Gutmann, and many others.\r\n\r\n"
"Portions of this software:\r\n"
- "Copyright \xA9 2003-2012 TrueCrypt Developers Association. All Rights Reserved.\r\n"
+ "Copyright \xA9 2003-2014 TrueCrypt Developers Association. All Rights Reserved.\r\n"
"Copyright \xA9 1998-2000 Paul Le Roux. All Rights Reserved.\r\n"
"Copyright \xA9 1998-2008 Brian Gladman. All Rights Reserved.\r\n"
"Copyright \xA9 2002-2004 Mark Adler. All Rights Reserved.\r\n\r\n"
"This software as a whole:\r\n"
- "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"
"A TrueCrypt Foundation Release");
@@ -934,12 +942,6 @@
return 1;
}
- if (lw == IDC_HOMEPAGE)
- {
- Applink ("main", TRUE, "");
- return 1;
- }
-
// Disallow modification of credits
if (HIWORD (wParam) == EN_UPDATE)
{
@@ -1625,264 +1627,6 @@
}
-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;
-}
-
-
static LRESULT CALLBACK NonInstallUacWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
return DefWindowProc (hWnd, message, wParam, lParam);
@@ -2105,7 +1849,7 @@
}
-// 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
// but was interrupted. In addition, via the passed pointer, returns the last selected wipe algorithm ID.
int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm)
{
@@ -2153,73 +1897,6 @@
}
-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);
-}
-
-
void InitOSVersionInfo ()
{
OSVERSIONINFO os;
@@ -2355,9 +2032,6 @@
}
#endif
- SetUnhandledExceptionFilter (ExceptionHandler);
- _set_invalid_parameter_handler (InvalidParameterHandler);
-
RemoteSession = GetSystemMetrics (SM_REMOTESESSION) != 0;
// OS version check
@@ -2460,8 +2134,6 @@
DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_AUXILIARY_DLG), NULL,
(DLGPROC) AuxiliaryDlgProc, (LPARAM) 1);
- InitHelpFileName ();
-
#ifndef SETUP
if (!EncryptionThreadPoolStart (ReadEncryptionThreadPoolFreeCpuCountLimit()))
{
@@ -2471,37 +2143,6 @@
#endif
}
-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");
- }
- }
-}
BOOL OpenDevice (const char *lpszPath, OPEN_TEST_STRUCT *driver, BOOL detectFilesystem)
{
@@ -2651,6 +2292,63 @@
}
+
+/* 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;
+ }
+}
+
+
+
wstring GetSysEncryptionPretestInfo2String (void)
{
// This huge string is divided into smaller portions to make it easier for translators to
@@ -3814,7 +3512,11 @@
wcscat (szTmp, GetString ("PASSWORD_WRONG_CAPSLOCK_ON"));
#ifdef TCMOUNT
- if (TCBootLoaderOnInactiveSysEncDrive ())
+
+ char szDevicePath [TC_MAX_PATH+1] = {0};
+ GetWindowText (GetDlgItem (MainDlg, IDC_VOLUME), szDevicePath, sizeof (szDevicePath));
+
+ if (TCBootLoaderOnInactiveSysEncDrive (szDevicePath))
{
swprintf (szTmp, GetString (KeyFilesEnable ? "PASSWORD_OR_KEYFILE_OR_MODE_WRONG" : "PASSWORD_OR_MODE_WRONG"));
@@ -4615,8 +4317,6 @@
SetDlgItemTextW (hwndDlg, IDC_HW_AES, (wstring (L" ") + (GetString (is_aes_hw_cpu_supported() ? ((driverConfig & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION) ? "UISTR_DISABLED" : "UISTR_YES") : "NOT_APPLICABLE_OR_NOT_AVAILABLE"))).c_str());
- ToHyperlink (hwndDlg, IDC_HW_AES_LABEL_LINK);
-
if (is_aes_hw_cpu_supported() && (driverConfig & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION))
{
Warning ("DISABLED_HW_AES_AFFECTS_PERFORMANCE");
@@ -4643,8 +4343,6 @@
SetDlgItemTextW (hwndDlg, IDC_PARALLELIZATION, (wstring (L" ") + nbrThreadsStr).c_str());
- ToHyperlink (hwndDlg, IDC_PARALLELIZATION_LABEL_LINK);
-
if (nbrThreads < min (sysInfo.dwNumberOfProcessors, GetMaxEncryptionThreadCount())
&& sysInfo.dwNumberOfProcessors > 1)
{
@@ -4681,16 +4379,6 @@
}
return 1;
- case IDC_HW_AES_LABEL_LINK:
-
- Applink ("hwacceleration", TRUE, "");
- return 1;
-
- case IDC_PARALLELIZATION_LABEL_LINK:
-
- Applink ("parallelization", TRUE, "");
- return 1;
-
case IDCLOSE:
case IDCANCEL:
@@ -5686,6 +5374,8 @@
wrec.bottom - wrec.top - vertSubOffset + 1 + vertMsgHeightOffset,
TRUE);
+ DisableCloseButton (hwndDlg);
+
return 1;
}
@@ -5708,7 +5398,8 @@
break;
case WM_CLOSE:
- 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.
return 1;
}
@@ -6352,6 +6043,7 @@
}
+// Returns -1 if no drive letter is resolved
int GetMountedVolumeDriveNo (char *volname)
{
MOUNT_LIST_STRUCT mlist;
@@ -7748,6 +7440,13 @@
}
+int AskNoYesString (const wchar_t *string)
+{
+ if (Silent) return IDNO;
+ return MessageBoxW (MainDlg, string, lpszTitle, MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2);
+}
+
+
int AskOkCancel (char *stringId)
{
if (Silent) return IDCANCEL;
@@ -7837,8 +7536,7 @@
// Input format 2: {L"", L"Message text", L"Button caption 1", ... L"Last button caption", 0};
// The second format is to be used if any of the strings contains format specification (e.g. %s, %d) or
// in any other cases where a string needs to be resolved before calling this function.
-// 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)
int AskMultiChoice (void *strings[], BOOL bBold)
{
MULTI_CHOICE_DLGPROC_PARAMS params;
@@ -7984,36 +7682,6 @@
}
-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, "");
-}
-
-
#ifndef SETUP
void RestoreDefaultKeyFilesParam (void)
@@ -8321,20 +7989,6 @@
}
-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 ();
-}
-
-
char *RelativePath2Absolute (char *szFileName)
{
if (szFileName[0] != '\\'
@@ -9540,10 +9194,13 @@
#ifndef SETUP
-int AskNonSysInPlaceEncryptionResume ()
+int AskNonSysInPlaceEncryptionResume (BOOL *decrypt)
{
if (AskWarnYesNo ("NONSYS_INPLACE_ENC_RESUME_PROMPT") == IDYES)
+ {
+ *decrypt = TRUE;
return IDYES;
+ }
char *multiChoiceStr[] = { 0, "ASK_NONSYS_INPLACE_ENC_NOTIFICATION_REMOVAL", "DO_NOT_PROMPT_ME", "KEEP_PROMPTING_ME", 0 };
--- Common/Dlgcode.h Mon Jan 19 14:26:12 1970
+++ Common/Dlgcode.h Mon Jan 19 14:26:12 1970
@@ -31,8 +31,7 @@
IDPM_SELECT_DEVICE_AND_MOUNT,
IDPM_ADD_TO_FAVORITES,
IDPM_ADD_TO_SYSTEM_FAVORITES,
- IDM_SHOW_HIDE,
- IDM_HOMEPAGE_SYSTRAY
+ IDM_SHOW_HIDE
};
enum
@@ -74,8 +73,6 @@
#define TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES TC_APP_NAME " System Favorite Volumes.xml"
#define TC_APPD_FILENAME_NONSYS_INPLACE_ENC "In-Place Encryption"
#define TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE "In-Place Encryption Wipe Algo"
-#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"
#ifndef USER_DEFAULT_SCREEN_DPI
#define USER_DEFAULT_SCREEN_DPI 96
@@ -85,17 +82,8 @@
# error Revision of GUI and graphics necessary, since everything assumes default screen DPI as 96 (note that 96 is the default on Windows 2000, XP, and Vista).
#endif
-enum
-{
- TC_POST_INSTALL_CFG_REMOVE_ALL = 0,
- TC_POST_INSTALL_CFG_TUTORIAL,
- TC_POST_INSTALL_CFG_RELEASE_NOTES
-};
-
extern char *LastDialogId;
extern char *ConfigBuffer;
-extern char szHelpFile[TC_MAX_PATH];
-extern char szHelpFile2[TC_MAX_PATH];
extern char SecurityTokenLibraryPath[TC_MAX_PATH];
extern HFONT hFixedDigitFont;
extern HFONT hBoldFont;
@@ -128,6 +116,10 @@
extern BOOL bSysPartitionSelected;
extern BOOL bSysDriveSelected;
+extern char SysPartitionDevicePath [TC_MAX_PATH];
+extern char SysDriveDevicePath [TC_MAX_PATH];
+extern char bCachedSysDevicePathsValid;
+
extern BOOL bHyperLinkBeingTracked;
extern BOOL bInPlaceEncNonSysPending;
@@ -284,16 +276,14 @@
BOOL LoadSysEncSettings (HWND hwndDlg);
int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm);
void RemoveNonSysInPlaceEncNotifications (void);
-void SavePostInstallTasksSettings (int command);
-void DoPostInstallTasks (void);
void InitOSVersionInfo ();
void InitApp ( HINSTANCE hInstance, char *lpszCommandLine );
-void InitHelpFileName (void);
BOOL OpenDevice (const char *lpszPath, OPEN_TEST_STRUCT *driver, BOOL detectFilesystem);
void NotifyDriverOfPortableMode (void);
int GetAvailableFixedDisks ( HWND hComboBox , char *lpszRootPath );
int GetAvailableRemovables ( HWND hComboBox , char *lpszRootPath );
int IsSystemDevicePath (char *path, HWND hwndDlg, BOOL bReliableRequired);
+int IsNonSysPartitionOnSysDrive (const char *path);
BOOL CALLBACK RawDevicesDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
BOOL TextInfoDialogBox (int nID);
BOOL CALLBACK TextInfoDialogBoxDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -372,7 +362,6 @@
char *GetConfigPath (char *fileName);
char *GetProgramConfigPath (char *fileName);
char GetSystemDriveLetter (void);
-void OpenPageHelp (HWND hwndDlg, int nPage);
void TaskBarIconDisplayBalloonTooltip (HWND hwnd, wchar_t *headline, wchar_t *text, BOOL warning);
void InfoBalloon (char *headingStringId, char *textStringId);
void InfoBalloonDirect (wchar_t *headingString, wchar_t *textString);
@@ -391,6 +380,7 @@
int AskYesNoString (const wchar_t *str);
int AskYesNoTopmost (char *stringId);
int AskNoYes (char *stringId);
+int AskNoYesString (const wchar_t *string);
int AskOkCancel (char *stringId);
int AskWarnYesNo (char *stringId);
int AskWarnYesNoString (const wchar_t *string);
@@ -421,7 +411,6 @@
BOOL IsHiddenOSRunning (void);
BOOL EnableWow64FsRedirection (BOOL enable);
BOOL RestartComputer (void);
-void Applink (char *dest, BOOL bSendOS, char *extraOutput);
char *RelativePath2Absolute (char *szFileName);
void HandleDriveNotReadyError ();
BOOL CALLBACK CloseTCWindowsEnum( HWND hwnd, LPARAM lParam);
@@ -431,7 +420,6 @@
void ReportUnexpectedState (char *techInfo);
BOOL SelectMultipleFiles (HWND hwndDlg, char *stringId, char *lpszFileName, BOOL keepHistory);
BOOL SelectMultipleFilesNext (char *lpszFileName);
-void OpenOnlineHelp ();
BOOL GetPartitionInfo (const char *deviceName, PPARTITION_INFORMATION rpartInfo);
BOOL GetDeviceInfo (const char *deviceName, DISK_PARTITION_INFO_STRUCT *info);
BOOL GetDriveGeometry (const char *deviceName, PDISK_GEOMETRY diskGeometry);
@@ -443,9 +431,12 @@
int GetTextGfxHeight (HWND hwndDlgItem, const wchar_t *text, HFONT hFont);
BOOL ToHyperlink (HWND hwndDlg, UINT ctrlId);
BOOL ToCustHyperlink (HWND hwndDlg, UINT ctrlId, HFONT hFont);
+void DisableCloseButton (HWND hwndDlg);
+void EnableCloseButton (HWND hwndDlg);
void ToBootPwdField (HWND hwndDlg, UINT ctrlId);
void AccommodateTextField (HWND hwndDlg, UINT ctrlId, BOOL bFirstUpdate, HFONT hFont);
BOOL GetDriveLabel (int driveNo, wchar_t *label, int labelSize);
+BOOL GetSysDevicePaths (HWND hwndDlg);
BOOL DoDriverInstall (HWND hwndDlg);
int OpenVolume (OpenVolumeContext *context, const char *volumePath, Password *password, BOOL write, BOOL preserveTimestamps, BOOL useBackupHeader);
void CloseVolume (OpenVolumeContext *context);
@@ -460,7 +451,7 @@
BOOL IsFileOnReadOnlyFilesystem (const char *path);
void CheckFilesystem (int driveNo, BOOL fixErrors);
BOOL BufferContainsString (const byte *buffer, size_t bufferSize, const char *str);
-int AskNonSysInPlaceEncryptionResume ();
+int AskNonSysInPlaceEncryptionResume (BOOL *decrypt);
BOOL RemoveDeviceWriteProtection (HWND hwndDlg, char *devicePath);
void EnableElevatedCursorChange (HWND parent);
BOOL DisableFileCompression (HANDLE file);
--- Common/Fat.c Mon Jan 19 14:26:12 1970
+++ Common/Fat.c Mon Jan 19 14:26:12 1970
@@ -17,6 +17,7 @@
#include "Crypto.h"
#include "Common/Endian.h"
+#include "Dlgcode.h"
#include "Format.h"
#include "Fat.h"
#include "Progress.h"
@@ -255,191 +256,6 @@
int
FormatFat (unsigned __int64 startSector, fatparams * ft, void * dev, PCRYPTO_INFO cryptoInfo, BOOL quickFormat)
{
- 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");
return 0;
-
-fail:
-
- TCfree (write_buf);
- burn (temporaryKey, sizeof(temporaryKey));
- return ERR_OS_ERROR;
}
--- Common/Format.c Mon Jan 19 14:26:12 1970
+++ Common/Format.c Mon Jan 19 14:26:12 1970
@@ -72,715 +72,15 @@
int TCFormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams)
{
- 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;
}
-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)
{
- 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");
return 0;
-
-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);
}
@@ -795,36 +95,8 @@
BOOL FormatNtfs (int driveNo, int clusterSize)
{
- 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;
}
--- Common/Keyfiles.c Mon Jan 19 14:26:12 1970
+++ Common/Keyfiles.c Mon Jan 19 14:26:12 1970
@@ -452,8 +452,6 @@
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, param->EnableKeyFiles);
SetWindowTextW(GetDlgItem(hwndDlg, IDT_KEYFILES_NOTE), GetString ("KEYFILES_NOTE"));
-
- ToHyperlink (hwndDlg, IDC_LINK_KEYFILES_INFO);
}
return 1;
@@ -542,11 +540,6 @@
MAKEINTRESOURCEW (IDD_KEYFILE_GENERATOR), hwndDlg,
(DLGPROC) KeyfileGeneratorDlgProc, (LPARAM) 0);
return 1;
- }
-
- if (lw == IDC_LINK_KEYFILES_INFO)
- {
- Applink ("keyfiles", TRUE, "");
}
if (lw == IDOK)
--- Common/Language.c Mon Jan 19 14:26:12 1970
+++ Common/Language.c Mon Jan 19 14:26:12 1970
@@ -144,10 +144,10 @@
XmlGetAttributeText (xml, "prog-version", attr, sizeof (attr));
// Check version of external language file
- if (defaultLangParsed && strcmp (attr, VERSION_STRING) && strcmp (attr, "DEBUG"))
+ if (defaultLangParsed && strcmp (attr, VERSION_STRING) && strcmp (attr, "DEBUG") && strcmp (attr, "7.1a"))
{
wchar_t m[2048];
- 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);
MessageBoxW (NULL, m, L"TrueCrypt", MB_ICONERROR);
continue;
}
@@ -331,7 +331,6 @@
BOOL defaultLangFound = FALSE;
LocalizeDialog (hwndDlg, "IDD_LANGUAGE");
- ToHyperlink (hwndDlg, IDC_GET_LANG_PACKS);
for (xml = MapFirstLanguageFile (); xml != NULL; xml = MapNextLanguageFile ())
{
@@ -459,21 +458,6 @@
EndDialog (hwndDlg, lw);
return 1;
}
-
- 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;
}
return 0;
--- Common/Language.xml Mon Jan 19 14:26:12 1970
+++ Common/Language.xml Mon Jan 19 14:26:12 1970
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TrueCrypt>
- <localization prog-version="7.1a">
+ <localization prog-version="7.2">
<!-- Languages -->
<language langid="en" name="English" en-name="English" version="0.0.0" translators="" />
<!-- Fonts -->
@@ -13,7 +13,6 @@
<control lang="en" key="IDC_ALL_USERS">Install &amp;for all users</control>
<control lang="en" key="IDC_BROWSE">Bro&amp;wse...</control>
<control lang="en" key="IDC_DESKTOP_ICON">Add TrueCrypt icon to &amp;desktop</control>
- <control lang="en" key="IDC_DONATE">Donate now...</control>
<control lang="en" key="IDC_FILE_TYPE">Associate the .tc file &amp;extension with TrueCrypt</control>
<control lang="en" key="IDC_OPEN_CONTAINING_FOLDER">&amp;Open the destination location when finished</control>
<control lang="en" key="IDC_PROG_GROUP">Add TrueCrypt to &amp;Start menu</control>
@@ -37,20 +36,13 @@
<control lang="en" key="IDC_DOWNLOAD_CD_BURN_SOFTWARE">Download CD/DVD recording software</control>
<control lang="en" key="IDC_FILE_CONTAINER">Create an encrypted file container</control>
<control lang="en" key="IDC_GB">&amp;GB</control>
- <control lang="en" key="IDC_HIDDEN_SYSENC_INFO_LINK">More information</control>
<control lang="en" key="IDC_HIDDEN_VOL">Hi&amp;dden TrueCrypt volume </control>
- <control lang="en" key="IDC_HIDDEN_VOL_HELP">More information about hidden volumes</control>
<control lang="en" key="IDC_HIDVOL_WIZ_MODE_DIRECT">Direct mode</control>
<control lang="en" key="IDC_HIDVOL_WIZ_MODE_FULL">Normal mode</control>
<control lang="en" key="IDC_KB">&amp;KB</control>
<control lang="en" key="IDC_KEYFILES_ENABLE">U&amp;se keyfiles</control>
<control lang="en" key="IDC_KEY_FILES">&amp;Keyfiles...</control>
- <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>
<control lang="en" key="IDC_MB">&amp;MB</control>
- <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>
<control lang="en" key="IDC_MULTI_BOOT">Multi-boot</control>
<control lang="en" key="IDC_NONSYS_DEVICE">Encrypt a non-system partition/drive</control>
<control lang="en" key="IDC_NO_HISTORY">&amp;Never save history</control>
@@ -71,6 +63,7 @@
<control lang="en" key="IDT_COLLECTING_RANDOM_DATA_NOTE">IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click Next to continue.</control>
<control lang="en" key="IDT_CONFIRM">&amp;Confirm:</control>
<control lang="en" key="IDT_DONE">Done</control>
+ <control lang="en" key="IDT_DRIVE_LETTER">Drive letter:</control>
<control lang="en" key="IDT_ENCRYPTION_ALGO">Encryption Algorithm</control>
<control lang="en" key="IDT_FILESYSTEM">Filesystem </control>
<control lang="en" key="IDT_FILE_CONTAINER">Creates a virtual encrypted disk within a file. Recommended for inexperienced users.</control>
@@ -107,13 +100,11 @@
<control lang="en" key="IDC_CLOSE_TOKEN_SESSION_AFTER_MOUNT">&amp;Close token session (log out) after a volume is successfully mounted</control>
<control lang="en" key="IDC_COPY_WIZARD">Include TrueCrypt Volume Creation Wizard</control>
<control lang="en" key="IDC_CREATE">Create</control>
- <control lang="en" key="IDC_CREATE_VOLUME">&amp;Create Volume</control>
<control lang="en" key="IDC_DISABLE_BOOT_LOADER_OUTPUT">Do not &amp;show any texts in the pre-boot authentication screen (except the below custom message)</control>
<control lang="en" key="IDC_ENABLE_HARDWARE_ENCRYPTION">Accelerate AES encryption/decryption by using the AES instructions of the processor (if available)</control>
<control lang="en" key="IDC_ENABLE_KEYFILES">Use keyfiles</control>
<control lang="en" key="IDC_ENABLE_NEW_KEYFILES">Use keyfiles</control>
<control lang="en" key="IDC_EXIT">E&amp;xit</control>
- <control lang="en" key="IDC_FAVORITES_HELP_LINK">Help on favorite volumes</control>
<control lang="en" key="IDC_FAVORITE_DISABLE_HOTKEY">Do not mount selected volume when 'Mount Favorite Volumes' &amp;hot key is pressed</control>
<control lang="en" key="IDC_FAVORITE_MOUNT_ON_ARRIVAL">Mount selected volume when its host device gets &amp;connected</control>
<control lang="en" key="IDC_FAVORITE_MOUNT_ON_LOGON">Mount selected volume upon log&amp;on</control>
@@ -134,8 +125,6 @@
<control lang="en" key="IDC_HOTKEY_REMOVE">Remove</control>
<control lang="en" key="IDC_KEYFILES">Keyfiles...</control>
<control lang="en" key="IDC_LIMIT_ENC_THREAD_POOL">Do not use the following number of processors for encryption/decryption:</control>
- <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>
<control lang="en" key="IDC_MORE_SETTINGS">More Settings...</control>
<control lang="en" key="IDC_MOUNTALL">&amp;Auto-Mount Devices</control>
<control lang="en" key="IDC_MOUNT_OPTIONS">Mount Opti&amp;ons...</control>
@@ -166,7 +155,6 @@
<control lang="en" key="IDC_TRAVEL_OPEN_EXPLORER">Open &amp;Explorer window for mounted volume</control>
<control lang="en" key="IDC_TRAV_CACHE_PASSWORDS">&amp;Cache password in driver memory</control>
<control lang="en" key="IDC_UNMOUNTALL">Di&amp;smount All</control>
- <control lang="en" key="IDC_VOLUME_PROPERTIES">&amp;Volume Properties...</control>
<control lang="en" key="IDC_VOLUME_TOOLS">Volume &amp;Tools...</control>
<control lang="en" key="IDC_WIPE_CACHE">&amp;Wipe Cache</control>
<control lang="en" key="IDD_FAVORITE_VOLUMES">TrueCrypt - Favorite Volumes</control>
@@ -184,7 +172,6 @@
<control lang="en" key="IDM_ADD_REMOVE_VOL_KEYFILES">Add/Remove Keyfiles to/from Volume...</control>
<control lang="en" key="IDM_ADD_VOLUME_TO_FAVORITES">Add Mounted Volume to Favorites...</control>
<control lang="en" key="IDM_ADD_VOLUME_TO_SYSTEM_FAVORITES">Add Mounted Volume to System Favorites...</control>
- <control lang="en" key="IDM_ANALYZE_SYSTEM_CRASH">Analyze a System Crash...</control>
<control lang="en" key="IDM_BACKUP_VOL_HEADER">Backup Volume Header...</control>
<control lang="en" key="IDM_BENCHMARK">Benchmark...</control>
<control lang="en" key="IDM_CHANGE_HEADER_KEY_DERIV_ALGO">Set Header Key Derivation Algorithm...</control>
@@ -193,15 +180,11 @@
<control lang="en" key="IDM_CHANGE_SYS_PASSWORD">Change Password...</control>
<control lang="en" key="IDM_CLEAR_HISTORY">Clear Volume History</control>
<control lang="en" key="IDM_CLOSE_ALL_TOKEN_SESSIONS">Close All Security Token Sessions</control>
- <control lang="en" key="IDM_CONTACT">Contact</control>
- <control lang="en" key="IDM_CREATE_HIDDEN_OS">Create Hidden Operating System...</control>
<control lang="en" key="IDM_CREATE_RESCUE_DISK">Create Rescue Disk...</control>
<control lang="en" key="IDM_CREATE_VOLUME">Create New Volume...</control>
+ <control lang="en" key="IDM_DECRYPT_NONSYS_VOL">Permanently Decrypt...</control>
<control lang="en" key="IDM_DEFAULT_KEYFILES">Default Keyfiles...</control>
<control lang="en" key="IDM_ENCRYPT_SYSTEM_DEVICE">Encrypt System Partition/Drive...</control>
- <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">&amp;Homepage </control>
<control lang="en" key="IDM_HOTKEY_SETTINGS">Hot Keys...</control>
<control lang="en" key="IDM_KEYFILE_GENERATOR">Keyfile Generator</control>
<control lang="en" key="IDM_LANGUAGE">Language...</control>
@@ -212,9 +195,6 @@
<control lang="en" key="IDM_MOUNT_SYSENC_PART_WITHOUT_PBA">Mount Without Pre-Boot &amp;Authentication...</control>
<control lang="en" key="IDM_MOUNT_VOLUME">Mount Volume</control>
<control lang="en" key="IDM_MOUNT_VOLUME_OPTIONS">Mount Volume with Options</control>
- <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>
<control lang="en" key="IDM_ORGANIZE_FAVORITES">Organize Favorite Volumes...</control>
<control lang="en" key="IDM_ORGANIZE_SYSTEM_FAVORITES">Organize System Favorite Volumes...</control>
<control lang="en" key="IDM_PERFORMANCE_SETTINGS">Performance...</control>
@@ -223,7 +203,7 @@
<control lang="en" key="IDM_REFRESH_DRIVE_LETTERS">Refresh Drive Letters</control>
<control lang="en" key="IDM_REMOVE_ALL_KEYFILES_FROM_VOL">Remove All Keyfiles from Volume...</control>
<control lang="en" key="IDM_RESTORE_VOL_HEADER">Restore Volume Header...</control>
- <control lang="en" key="IDM_RESUME_INTERRUPTED_PROC">Resume Interrupted Process</control>
+ <control lang="en" key="IDM_RESUME_INTERRUPTED_PROC">Resume Interrupted Decryption...</control>
<control lang="en" key="IDM_SELECT_DEVICE">Select Device...</control>
<control lang="en" key="IDM_SELECT_FILE">Select File...</control>
<control lang="en" key="IDM_SYSENC_RESUME">Resume Interrupted Process</control>
@@ -231,17 +211,14 @@
<control lang="en" key="IDM_SYSTEM_ENCRYPTION_STATUS">Properties...</control>
<control lang="en" key="IDM_SYS_ENC_SETTINGS">Settings...</control>
<control lang="en" key="IDM_SYS_FAVORITES_SETTINGS">System Favorite Volumes...</control>
- <control lang="en" key="IDM_TC_DOWNLOADS">Downloads</control>
<control lang="en" key="IDM_TEST_VECTORS">Test Vectors...</control>
<control lang="en" key="IDM_TOKEN_PREFERENCES">Security Tokens...</control>
<control lang="en" key="IDM_TRAVELER">Traveler Disk Setup...</control>
<control lang="en" key="IDM_UNMOUNTALL">Dismount All Mounted Volumes</control>
<control lang="en" key="IDM_UNMOUNT_VOLUME">Dismount Volume</control>
<control lang="en" key="IDM_VERIFY_RESCUE_DISK">Verify Rescue Disk</control>
- <control lang="en" key="IDM_VERSION_HISTORY">Version History</control>
<control lang="en" key="IDM_VOLUME_PROPERTIES">Volume Properties</control>
<control lang="en" key="IDM_VOLUME_WIZARD">Volume Creation Wizard</control>
- <control lang="en" key="IDM_WEBSITE">TrueCrypt Website</control>
<control lang="en" key="IDM_WIPE_CACHE">Wipe Cached Passwords</control>
<control lang="en" key="IDOK">OK</control>
<control lang="en" key="IDT_ACCELERATION_OPTIONS">Hardware Acceleration</control>
@@ -259,6 +236,7 @@
<control lang="en" key="IDT_FILE_SETTINGS">File Settings</control>
<control lang="en" key="IDT_HOTKEY_KEY">Key to assign:</control>
<control lang="en" key="IDT_HW_AES_SUPPORTED_BY_CPU">Processor (CPU) in this computer supports hardware acceleration for AES:</control>
+ <control lang="en" key="IDT_INSECURE_APP">WARNING: Using TrueCrypt is not secure</control>
<control lang="en" key="IDT_LOGON">Actions to perform upon logon to Windows</control>
<control lang="en" key="IDT_MINUTES">minutes</control>
<control lang="en" key="IDT_MOUNT_LETTER">Mount volume as drive letter:</control>
@@ -285,7 +263,6 @@
<control lang="en" key="IDC_EXPORT">&amp;Export...</control>
<control lang="en" key="IDC_GENERATE_AND_SAVE_KEYFILE">Generate and Save Keyfile...</control>
<control lang="en" key="IDC_GENERATE_KEYFILE">&amp;Generate Random Keyfile...</control>
- <control lang="en" key="IDC_GET_LANG_PACKS">Download language pack</control>
<control lang="en" key="IDC_HW_AES_LABEL_LINK">Hardware-accelerated AES:</control>
<control lang="en" key="IDC_IMPORT_KEYFILE">&amp;Import Keyfile to Token...</control>
<control lang="en" key="IDC_KEYADD">Add &amp;Files...</control>
@@ -293,8 +270,6 @@
<control lang="en" key="IDC_KEYFILES_HIDVOL_PROT">&amp;Keyfiles...</control>
<control lang="en" key="IDC_KEYREMOVE">&amp;Remove</control>
<control lang="en" key="IDC_KEYREMOVEALL">Remove &amp;All</control>
- <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>
<control lang="en" key="IDC_MOUNT_REMOVABLE">Mount volume as removable &amp;medium</control>
<control lang="en" key="IDC_MOUNT_SYSENC_PART_WITHOUT_PBA">Mount partition &amp;using system encryption without pre-boot authentication</control>
<control lang="en" key="IDC_PARALLELIZATION_LABEL_LINK">Parallelization:</control>
@@ -353,14 +328,14 @@
<control lang="en" key="MENU_TOOLS">T&amp;ools</control>
<control lang="en" key="MENU_SETTINGS">Settin&amp;gs</control>
<control lang="en" key="MENU_HELP">&amp;Help</control>
- <control lang="en" key="MENU_WEBSITE"> Home&amp;page </control>
<!-- Strings -->
+ <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>
<string lang="en" key="ABOUTBOX">&amp;About...</string>
<string lang="en" key="ACCESSMODEFAIL">The read-only attribute on your old volume could not be changed. Please check the file access permissions.</string>
<string lang="en" key="ACCESS_DENIED">Error: Access denied.\n\nThe partition you are trying to access is either 0 sectors long, or it is the boot device.</string>
<string lang="en" key="ADMINISTRATOR">Administrator</string>
<string lang="en" key="ADMIN_PRIVILEGES_DRIVER">In order to load the TrueCrypt driver, you need to be logged into an account with administrator privileges.</string>
- <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>
<string lang="en" key="ADMIN_PRIVILEGES_WARN_HIDVOL">In order to create a hidden volume you need to be logged into an account with administrator privileges.\n\nContinue?</string>
<string lang="en" key="ADMIN_PRIVILEGES_WARN_NTFS">Please note that in order to format the volume as NTFS you need to be logged into an account with administrator privileges.\n\nWithout administrator privileges, you can format the volume as FAT.</string>
<string lang="en" key="AES_HELP">FIPS-approved cipher (Rijndael, published in 1998) that may be used by U.S. government departments and agencies to protect classified information up to the Top Secret level. 256-bit key, 128-bit block, 14 rounds (AES-256). Mode of operation is XTS.</string>
@@ -420,21 +395,6 @@
<string lang="en" key="DRIVER_VERSION">Error: An incompatible version of the TrueCrypt driver is currently running.\n\nIf you are trying to run TrueCrypt in portable mode (i.e. without installing it) and a different version of TrueCrypt is already installed, you must uninstall it first (or upgrade it using the TrueCrypt installer). To uninstall it, follow these steps: On Windows Vista or later, select 'Start Menu' > Computer > 'Uninstall or change a program' > TrueCrypt > Uninstall; on Windows XP, select 'Start Menu' > Settings > 'Control Panel' > 'Add Or Remove Programs' > TrueCrypt > Remove.\n\nSimilarly, if you are trying to run TrueCrypt in portable mode (i.e. without installing it) and a different version of TrueCrypt is already running in portable mode, you must restart the system first and then run only this new version.</string>
<string lang="en" key="ERR_CIPHER_INIT_FAILURE">Error: Cipher initialization failure.</string>
<string lang="en" key="ERR_CIPHER_INIT_WEAK_KEY">Error: A weak or a potentially weak key has been detected. The key will be discarded. Please try again.</string>
- <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>
<string lang="en" key="ENCRYPT">&amp;Encrypt</string>
<string lang="en" key="DECRYPT">&amp;Decrypt</string>
<string lang="en" key="PERMANENTLY_DECRYPT">&amp;Permanently Decrypt</string>
@@ -476,7 +436,11 @@
<string lang="en" key="FORMAT_FINISHED_HELP">\n\nThe TrueCrypt volume has been created and is ready for use. If you wish to create another TrueCrypt volume, click Next. Otherwise, click Exit.</string>
<string lang="en" key="SYSENC_HIDDEN_VOL_FORMAT_FINISHED_HELP">\n\nThe hidden TrueCrypt volume has been successfully created (the hidden operating system will reside within this hidden volume).\n\nClick Next to continue.</string>
<string lang="en" key="NONSYS_INPLACE_ENC_FINISHED_TITLE">Volume Fully Encrypted</string>
+ <string lang="en" key="NONSYS_INPLACE_DEC_FINISHED_TITLE">Volume Fully Decrypted</string>
<string lang="en" key="NONSYS_INPLACE_ENC_FINISHED_INFO">IMPORTANT: TO MOUNT THIS NEWLY CREATED TRUECRYPT VOLUME AND TO ACCESS DATA STORED IN IT, CLICK 'Auto-Mount Devices' IN THE MAIN TRUECRYPT WINDOW. After you enter the correct password (and/or supply correct keyfiles), the volume will be mounted to the drive letter you select from the list in the main TrueCrypt window (and you will be able to access the encrypted data via the selected drive letter).\n\nPLEASE REMEMBER OR WRITE DOWN THE ABOVE STEPS. YOU MUST FOLLOW THEM WHENEVER YOU WANT TO MOUNT THE VOLUME AND ACCESS DATA STORED IN IT. Alternatively, in the main TrueCrypt window, click 'Select Device', then select this partition/volume, and click 'Mount'.\n\nThe partition/volume has been successfully encrypted (it contains a fully encrypted TrueCrypt volume now) and is ready for use.</string>
+ <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>
<string lang="en" key="FORMAT_FINISHED_INFO">The TrueCrypt volume has been successfully created.</string>
<string lang="en" key="FORMAT_FINISHED_TITLE">Volume Created</string>
<string lang="en" key="FORMAT_HELP">IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click Format to create the volume.</string>
@@ -533,6 +497,7 @@
<string lang="en" key="NODRIVER">Unable to connect to the TrueCrypt device driver. TrueCrypt cannot work if the device driver is not running.\n\nPlease note that, due to a Windows issue, it may be necessary to log off or restart the system before the device driver can be loaded.</string>
<string lang="en" key="NOFONT">Error occurred when loading/preparing fonts.</string>
<string lang="en" key="NOT_FOUND">The drive letter was not found or no drive letter was specified.</string>
+ <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>
<string lang="en" key="DRIVE_LETTER_UNAVAILABLE">Drive letter not available.</string>
<string lang="en" key="NO_FILE_SELECTED">No file selected!</string>
<string lang="en" key="NO_FREE_DRIVES">No drive letters available.</string>
@@ -552,7 +517,8 @@
<string lang="en" key="OVERWRITEPROMPT">WARNING: The file '%hs' already exists!\n\nIMPORTANT: TRUECRYPT WILL NOT ENCRYPT THE FILE, BUT IT WILL DELETE IT. Are you sure you want to delete the file and replace it with a new TrueCrypt container?</string>
<string lang="en" key="OVERWRITEPROMPT_DEVICE">CAUTION: ALL FILES CURRENTLY STORED ON THE SELECTED %s '%hs'%s WILL BE ERASED AND LOST (THEY WILL NOT BE ENCRYPTED)!\n\nAre you sure you want to proceed with format?</string>
<string lang="en" key="NONSYS_INPLACE_ENC_CONFIRM">WARNING: You will not be able to mount the volume or access any files stored on it until it has been fully encrypted.\n\nAre you sure you want to start encrypting the selected %s '%hs'%s?</string>
- <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>
<string lang="en" key="OVERWRITEPROMPT_DEVICE_HIDDEN_OS_PARTITION">CAUTION: ANY FILES CURRENTLY STORED ON THE PARTITION '%hs'%s (I.E. ON THE FIRST PARTITION BEHIND THE SYSTEM PARTITION) WILL BE ERASED AND LOST (THEY WILL NOT BE ENCRYPTED)!\n\nAre you sure you want to proceed with format?</string>
<string lang="en" key="OVERWRITEPROMPT_DEVICE_SECOND_WARNING_LOTS_OF_DATA">WARNING: THE SELECTED PARTITION CONTAINS A LARGE AMOUNT OF DATA! Any files stored on the partition will be erased and lost (they will NOT be encrypted)!</string>
<string lang="en" key="ERASE_FILES_BY_CREATING_VOLUME">Erase any files stored on the partition by creating a TrueCrypt volume within it</string>
@@ -567,8 +533,9 @@
<string lang="en" key="KEYFILE_CHANGED">Keyfile(s) successfully added/removed.</string>
<string lang="en" key="KEYFILE_EXPORTED">Keyfile exported.</string>
<string lang="en" key="PKCS5_PRF_CHANGED">Header key derivation algorithm successfully set.</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.\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>
<string lang="en" key="PASSWORD_HELP">It is very important that you choose a good password. You should avoid choosing one that contains only a single word that can be found in a dictionary (or a combination of 2, 3, or 4 such words). It should not contain any names or dates of birth. It should not be easy to guess. A good password is a random combination of upper and lower case letters, numbers, and special characters, such as @ ^ = $ * + etc. We recommend choosing a password consisting of more than 20 characters (the longer, the better). The maximum possible length is 64 characters.</string>
<string lang="en" key="PASSWORD_HIDDENVOL_HELP">Please choose a password for the hidden volume. </string>
<string lang="en" key="PASSWORD_HIDDEN_OS_HELP">Please choose a password for the hidden operating system (i.e. for the hidden volume). </string>
@@ -590,9 +557,11 @@
<string lang="en" key="PASSWORD_WRONG_CAPSLOCK_ON">\n\nWarning: Caps Lock is on. This may cause you to enter your password incorrectly.</string>
<string lang="en" key="HIDDEN_FILES_PRESENT_IN_KEYFILE_PATH">\n\nWARNING: Hidden file(s) have been found in a keyfile search path. Such hidden files cannot be used as keyfiles. If you need to use them as keyfiles, remove their 'Hidden' attribute (right-click each of them, select 'Properties', uncheck 'Hidden' and click OK). Note: Hidden files are visible only if the corresponding option is enabled (Computer > Organize > 'Folder and search options' > View).</string>
<string lang="en" key="HIDDEN_VOL_PROT_PASSWORD_US_KEYB_LAYOUT">If you are attempting to protect a hidden volume containing a hidden system, please make sure you are using the standard US keyboard layout when typing the password for the hidden volume. This is required due to the fact that the password needs to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available.</string>
- <string lang="en" key="FOUND_NO_PARTITION_W_DEFERRED_INPLACE_ENC">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>
<string lang="en" key="SYSENC_MOUNT_WITHOUT_PBA_NOTE">\n\nNote: If you are attempting to mount a partition located on an encrypted system drive without pre-boot authentication or to mount the encrypted system partition of an operating system that is not running, you can do so by selecting 'System' > 'Mount Without Pre-Boot Authentication'.</string>
<string lang="en" key="MOUNT_WITHOUT_PBA_VOL_ON_ACTIVE_SYSENC_DRIVE">In this mode, you cannot mount a partition located on a drive whose portion is within the key scope of active system encryption.\n\nBefore you can mount this partition in this mode, you need to either boot an operating system installed on a different drive (encrypted or unencrypted) or boot an unencrypted operating system.</string>
+ <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>
<string lang="en" key="PREV">&lt; &amp;Back</string>
<string lang="en" key="RAWDEVICES">Unable to list raw devices installed on your system!</string>
<string lang="en" key="READONLYPROMPT">The volume '%hs' exists, and is read-only. Are you sure you want to replace it?</string>
@@ -643,7 +612,7 @@
<string lang="en" key="WRONG_VOL_TYPE">TrueCrypt cannot change the password for a foreign volume.</string>
<string lang="en" key="SELECT_FREE_DRIVE">Please select a free drive letter from the list.</string>
<string lang="en" key="SELECT_A_MOUNTED_VOLUME">Please select a mounted volume in the drive letter list.</string>
- <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>
<string lang="en" key="CANT_CREATE_AUTORUN">Error: Cannot create autorun.inf</string>
<string lang="en" key="ERR_PROCESS_KEYFILE">Error while processing keyfile!</string>
<string lang="en" key="ERR_PROCESS_KEYFILE_PATH">Error processing keyfile path!</string>
@@ -691,11 +660,18 @@
<string lang="en" key="FOR_MORE_INFO_ON_PARTITIONS">For information on how to create and manage partitions, please refer to the documentation supplied with your operating system or contact your computer vendor's technical support team for assistance.</string>
<string lang="en" key="SYSTEM_PARTITION_NOT_ACTIVE">Error: The currently running operating system is not installed on the boot partition (first Active partition). This is not supported.</string>
<string lang="en" key="CONFIRM_FAT_FOR_FILES_OVER_4GB">You indicated that you intend to store files larger than 4 GB in this TrueCrypt volume. However, you chose the FAT file system, on which files larger than 4 GB cannot be stored.\n\nAre you sure you want to format the volume as FAT?</string>
+ <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>
<string lang="en" key="CANT_ACCESS_VOL">Error: Cannot access the volume!\n\nMake sure that the selected volume exists, that it is not mounted or being used by the system or an application, that you have read/write permission for the volume, and that it is not write-protected.</string>
+ <string lang="en" key="CANT_GET_VOL_INFO">Error: Cannot obtain volume properties.</string>
<string lang="en" key="INPLACE_ENC_CANT_ACCESS_OR_GET_INFO_ON_VOL">Error: Cannot access the volume and/or obtain information about the volume.\n\nMake sure that the selected volume exists, that it is not being used by the system or applications, that you have read/write permission for the volume, and that it is not write-protected.</string>
<string lang="en" key="INPLACE_ENC_CANT_ACCESS_OR_GET_INFO_ON_VOL_ALT">Error: Cannot access the volume and/or obtain information about the volume. Make sure that the selected volume exists, that it is not being used by the system or applications, that you have read/write permission for the volume, and that it is not write-protected.\n\nIf the problem persists, it might help to follow the below steps.</string>
<string lang="en" key="INPLACE_ENC_GENERIC_ERR_ALT_STEPS">An error prevented TrueCrypt from encrypting the partition. Please try fixing any previously reported problems and then try again. If the problems persist, it might help to follow the below steps.</string>
- <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>
<string lang="en" key="CANT_DISMOUNT_OUTER_VOL">Error: Cannot dismount the outer volume!\n\nVolume cannot be dismounted if it contains files or folders being used by a program or the system.\n\nPlease close any program that might be using files or directories on the volume and click Retry.</string>
<string lang="en" key="CANT_GET_OUTER_VOL_INFO">Error: Cannot obtain information about the outer volume!\nVolume creation cannot continue.</string>
<string lang="en" key="CANT_ACCESS_OUTER_VOL">Error: Cannot access the outer volume! Volume creation cannot continue.</string>
@@ -759,18 +735,12 @@
<string lang="en" key="SETUP_OPTIONS_INFO">Here you can set various options to control the installation process.</string>
<string lang="en" key="SETUP_PROGRESS_TITLE">Installing</string>
<string lang="en" key="SETUP_PROGRESS_INFO">Please wait while TrueCrypt is being installed.</string>
- <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>
<string lang="en" key="EXTRACTION_OPTIONS_TITLE">Extraction Options</string>
<string lang="en" key="EXTRACTION_OPTIONS_INFO">Here you can set various options to control the extraction process.</string>
<string lang="en" key="EXTRACTION_PROGRESS_INFO">Please wait while files are being extracted.</string>
- <string lang="en" key="EXTRACTION_FINISHED_TITLE_DON">Files successfully extracted</string>
<string lang="en" key="EXTRACTION_FINISHED_INFO">All files have been successfully extracted to the destination location.</string>
<string lang="en" key="AUTO_FOLDER_CREATION">If the specified folder does not exist, it will be automatically created.</string>
<string lang="en" key="SETUP_UPGRADE_DESTINATION">The TrueCrypt program files will be upgraded in the location where TrueCrypt is installed. If you need to select a different location, please uninstall TrueCrypt first.</string>
- <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>
<string lang="en" key="SELECT_AN_ACTION">Please select an action to perform from the following:</string>
<string lang="en" key="REPAIR_REINSTALL">Repair/Reinstall</string>
<string lang="en" key="UPGRADE">Upgrade</string>
@@ -779,7 +749,7 @@
<string lang="en" key="TC_INSTALLER_IS_RUNNING">TrueCrypt Installer is currently running on this system and performing or preparing installation or update of TrueCrypt. Before you proceed, please wait for it to finish or close it. If you cannot close it, please restart your computer before proceeding.</string>
<string lang="en" key="INSTALL_FAILED">Installation failed.</string>
<string lang="en" key="UNINSTALL_FAILED">Uninstallation failed.</string>
- <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>
<string lang="en" key="CANNOT_WRITE_FILE_X">Cannot write file %hs</string>
<string lang="en" key="EXTRACTING_VERB">Extracting</string>
<string lang="en" key="CANNOT_READ_FROM_PACKAGE">Cannot read data from the package.</string>
@@ -890,7 +860,6 @@
<string lang="en" key="RESCUE_DISK_CHECK_FAILED">Cannot verify that the Rescue Disk has been correctly burned.\n\nIf you have burned the Rescue Disk, please eject and reinsert the CD/DVD; then click Next to try again. If this does not help, please try another medium%s.\n\nIf you have not burned the Rescue Disk yet, please do so, and then click Next.\n\nIf you attempted to verify a TrueCrypt Rescue Disk created before you started this wizard, please note that such Rescue Disk cannot be used, because it was created for a different master key. You need to burn the newly generated Rescue Disk.</string>
<string lang="en" key="RESCUE_DISK_CHECK_FAILED_SENTENCE_APPENDIX"> and/or other CD/DVD recording software</string>
<string lang="en" key="SYSTEM_FAVORITES_DLG_TITLE">TrueCrypt - System Favorite Volumes</string>
- <string lang="en" key="SYS_FAVORITES_HELP_LINK">What are system favorite volumes?</string>
<string lang="en" key="SYS_FAVORITES_REQUIRE_PBA">The system partition/drive does not appear to be encrypted.\n\nSystem favorite volumes can be mounted using only a pre-boot authentication password. Therefore, to enable use of system favorite volumes, you need to encrypt the system partition/drive first.</string>
<string lang="en" key="DISMOUNT_FIRST">Please dismount the volume before proceeding.</string>
<string lang="en" key="CANNOT_SET_TIMER">Error: Cannot set timer.</string>
@@ -915,7 +884,6 @@
<string lang="en" key="UNSUPPORTED_CHARS_IN_PWD_RECOM">Warning: Password contains non-ASCII characters. This may cause the volume to be impossible to mount when your system configuration changes.\n\nYou should replace all non-ASCII characters in the password with ASCII characters. To do so, click 'Volumes' -&gt; 'Change Volume Password'.\n\nThe following are ASCII characters:\n\n ! " # $ % &amp; ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w k y z { | } ~</string>
<string lang="en" key="EXE_FILE_EXTENSION_CONFIRM">WARNING: We strongly recommend that you avoid file extensions that are used for executable files (such as .exe, .sys, or .dll) and other similarly problematic file extensions. Using such file extensions causes Windows and antivirus software to interfere with the container, which adversely affects the performance of the volume and may also cause other serious problems.\n\nWe strongly recommend that you remove the file extension or change it (e.g., to '.tc').\n\nAre you sure you want to use the problematic file extension?</string>
<string lang="en" key="EXE_FILE_EXTENSION_MOUNT_WARNING">WARNING: This container has a file extension that is used for executable files (such as .exe, .sys, or .dll) or some other file extension that is similarly problematic. It will very likely cause Windows and antivirus software to interfere with the container, which will adversely affect the performance of the volume and may also cause other serious problems.\n\nWe strongly recommend that you remove the file extension of the container or change it (e.g., to '.tc') after you dismount the volume.</string>
- <string lang="en" key="HOMEPAGE">Homepage</string>
<string lang="en" key="LARGE_IDE_WARNING_XP">WARNING: It appears that you have not applied any Service Pack to your Windows installation. You should not write to IDE disks larger than 128 GB under Windows XP to which you did not apply Service Pack 1 or later! If you do, data on the disk (no matter if it is a TrueCrypt volume or not) may get corrupted. Note that this is a limitation of Windows, not a bug in TrueCrypt.</string>
<string lang="en" key="LARGE_IDE_WARNING_2K">WARNING: It appears that you have not applied Service Pack 3 or later to your Windows installation. You should not write to IDE disks larger than 128 GB under Windows 2000 to which you did not apply Service Pack 3 or later! If you do, data on the disk (no matter if it is a TrueCrypt volume or not) may get corrupted. Note that this is a limitation of Windows, not a bug in TrueCrypt.\n\nNote: You may also need to enable the 48-bit LBA support in the registry; for more information, see http://support.microsoft.com/kb/305098/EN-US</string>
<string lang="en" key="LARGE_IDE_WARNING_2K_REGISTRY">WARNING: 48-bit LBA ATAPI support is disabled on your system. Therefore, you should not write to IDE disks larger than 128 GB! If you do, data on the disk (no matter if it is a TrueCrypt volume or not) may get corrupted. Note that this is a limitation of Windows, not a limitation of TrueCrypt.\n\nTo enable the 48-bit LBA support, add the 'EnableBigLba' registry value in the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\atapi\\Parameters and set it to 1.\n\nFor more information, see http://support.microsoft.com/kb/305098</string>
@@ -950,27 +918,28 @@
<string lang="en" key="CONFIRM_NO_FORCED_AUTODISMOUNT">WARNING: If this option is disabled, volumes containing open files/directories will not be possible to auto-dismount.\n\nAre you sure you want to disable this option?</string>
<string lang="en" key="WARN_PREF_AUTO_DISMOUNT">WARNING: Volumes containing open files/directories will NOT be auto-dismounted.\n\nTo prevent this, enable the following option in this dialog window: 'Force auto-dismount even if volume contains open files or directories'</string>
<string lang="en" key="WARN_PREF_AUTO_DISMOUNT_ON_POWER">WARNING: When the notebook battery power is low, Windows may omit sending the appropriate messages to running applications when the computer is entering power saving mode. Therefore, TrueCrypt may fail to auto-dismount volumes in such cases.</string>
- <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>
<string lang="en" key="SYSTEM_ENCRYPTION_RESUME_PROMPT">You have scheduled the process of encryption or decryption of the system partition/drive. The process has not been completed yet.\n\nDo you want to start (resume) the process now?</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 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>
<string lang="en" key="KEEP_PROMPTING_ME">Yes, keep prompting me</string>
<string lang="en" key="DO_NOT_PROMPT_ME">No, do not prompt me</string>
- <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' &gt; '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' &gt; 'Resume Interrupted Decryption' from the menu bar of the main TrueCrypt window.</string>
<string lang="en" key="SYSTEM_ENCRYPTION_SCHEDULED_BUT_PBA_FAILED">You have scheduled the process of encryption or decryption of the system partition/drive. However, pre-boot authentication failed (or was bypassed).\n\nNote: If you decrypted the system partition/drive in the pre-boot environment, you may need to finalize the process by selecting 'System' &gt; 'Permanently Decrypt System Partition/Drive' from the menu bar of the main TrueCrypt window.</string>
<string lang="en" key="CONFIRM_EXIT">WARNING: If TrueCrypt exits now, the following functions will be disabled:\n\n1) Hot keys\n2) Auto-dismount (e.g., upon logoff, inadvertent host device removal, time-out, etc.)\n3) Auto-mount of favorite volumes\n4) Notifications (e.g., when damage to hidden volume is prevented)\n\nNote: If you do not wish TrueCrypt to run in the background, disable the TrueCrypt Background Task in the Preferences (and, if necessary, disable the automatic start of TrueCrypt in the Preferences).\n\nAre you sure you want TrueCrypt to exit?</string>
<string lang="en" key="CONFIRM_EXIT_UNIVERSAL">Exit?</string>
<string lang="en" key="CHOOSE_ENCRYPT_OR_DECRYPT">TrueCrypt does not have sufficient information to determine whether to encrypt or decrypt.</string>
<string lang="en" key="CHOOSE_ENCRYPT_OR_DECRYPT_FINALIZE_DECRYPT_NOTE">TrueCrypt does not have sufficient information to determine whether to encrypt or decrypt.\n\nNote: If you decrypted the system partition/drive in the pre-boot environment, you may need to finalize the process by clicking Decrypt.</string>
- <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' &gt; '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' &gt; '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' &gt; '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' &gt; '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' &gt; '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' &gt; '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' &gt; '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' &gt; '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' &gt; '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' &gt; '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' &gt; 'Encrypt System Partition/Drive'.</string>
<string lang="en" key="FAILED_TO_INTERRUPT_SYSTEM_ENCRYPTION">Error: Failed to interrupt the process of encryption/decryption of the system partition/drive.</string>
<string lang="en" key="FAILED_TO_INTERRUPT_WIPING">Error: Failed to interrupt the process of wiping.</string>
<string lang="en" key="FAILED_TO_RESUME_SYSTEM_ENCRYPTION">Error: Failed to resume the process of encryption/decryption of the system partition/drive.</string>
<string lang="en" key="FAILED_TO_START_WIPING">Error: Failed to start the process of wiping.</string>
<string lang="en" key="INCONSISTENCY_RESOLVED">Inconsistency resolved.\n\n\n(If you report a bug in connection with this, please include the following technical information in the bug report:\n%hs)</string>
<string lang="en" key="UNEXPECTED_STATE">Error: Unexpected state.\n\n\n(If you report a bug in connection with this, please include the following technical information in the bug report:\n%hs)</string>
- <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' &gt; 'Resume Interrupted Decryption'.</string>
<string lang="en" key="HIDVOL_PROT_BKG_TASK_WARNING">WARNING: TrueCrypt Background Task is disabled. After you exit TrueCrypt, you will not be notified if damage to hidden volume is prevented.\n\nNote: You may shut down the Background Task anytime by right-clicking the TrueCrypt tray icon and selecting 'Exit'.\n\nEnable TrueCrypt Background Task?</string>
<string lang="en" key="LANG_PACK_VERSION">Language pack version: %s</string>
<string lang="en" key="CHECKING_FS">Checking the file system on the TrueCrypt volume mounted as %hs...</string>
@@ -1098,9 +1067,10 @@
<string lang="en" key="SYS_ENCRYPTION_PRETEST_INFO2_PORTION_3">- If the previous steps do not help or if the TrueCrypt Boot Loader screen does not appear (before Windows starts), insert the TrueCrypt Rescue Disk into your CD/DVD drive and restart your computer. If the TrueCrypt Rescue Disk screen does not appear (or if you do not see the 'Repair Options' item in the 'Keyboard Controls' section of the TrueCrypt Rescue Disk screen), it is possible that your BIOS is configured to attempt to boot from hard drives before CD/DVD drives. If that is the case, restart your computer, press F2 or Delete (as soon as you see a BIOS start-up screen), and wait until a BIOS configuration screen appears. If no BIOS configuration screen appears, restart (reset) the computer again and start pressing F2 or Delete repeatedly as soon as you restart (reset) the computer. When a BIOS configuration screen appears, configure your BIOS to boot from the CD/DVD drive first (for information on how to do so, please refer to the documentation for your BIOS/motherboard or contact your computer vendor's technical support team for assistance). Then restart your computer. The TrueCrypt Rescue Disk screen should appear now. In the TrueCrypt Rescue Disk screen, select 'Repair Options' by pressing F8 on your keyboard. From the 'Repair Options' menu, select 'Restore original system loader'. Then remove the Rescue Disk from your CD/DVD drive and restart your computer. Windows should start normally (provided that it is not encrypted).\n\n</string>
<string lang="en" key="SYS_ENCRYPTION_PRETEST_INFO2_PORTION_4">Note that the previous steps do NOT work if the system partition/drive is encrypted (nobody can start Windows or access encrypted data on the drive without the correct password even if he or she follows the previous steps).\n\n\nNote that even if you lose your TrueCrypt Rescue Disk and an attacker finds it, he or she will NOT be able to decrypt the system partition or drive without the correct password.</string>
<string lang="en" key="SYS_ENCRYPTION_PRETEST_RESULT_TITLE">Pretest Completed</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' &gt; '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' &gt; 'Resume Interrupted Decryption' to start encrypting).\n\nWhen ready, click Encrypt to start encrypting.</string>
<string lang="en" key="SYSENC_ENCRYPTION_PAGE_INFO">You can click Pause or Defer anytime to interrupt the process of encryption or decryption, exit this wizard, restart or shut down your computer, and then resume the process, which will continue from the point it was stopped. To prevent slowdown when the system or applications write or read data from the system drive, TrueCrypt automatically waits until the data is written or read (see Status above) and then automatically continues encrypting or decrypting.</string>
<string lang="en" key="NONSYS_INPLACE_ENC_ENCRYPTION_PAGE_INFO">\n\nYou can click Pause or Defer anytime to interrupt the process of encryption, exit this wizard, restart or shut down your computer, and then resume the process, which will continue from the point it was stopped. Note that the volume cannot be mounted until it has been fully encrypted.</string>
+ <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>
<string lang="en" key="SYSENC_HIDDEN_OS_INITIAL_INFO_TITLE">Hidden System Started</string>
<string lang="en" key="SYSENC_HIDDEN_OS_WIPE_INFO_TITLE">Original System</string>
<string lang="en" key="SYSENC_HIDDEN_OS_WIPE_INFO">Windows creates (typically, without your knowledge or consent) various log files, temporary files, etc., on the system partition. It also saves the content of RAM to hibernation and paging files located on the system partition. Therefore, if an adversary analyzed files stored on the partition where the original system (of which the hidden system is a clone) resides, he might find out, for example, that you used the TrueCrypt wizard in the hidden-system-creation mode (which might indicate the existence of a hidden operating system on your computer).\n\nTo prevent such issues, TrueCrypt will, in the next steps, securely erase the entire content of the partition where the original system resides. Afterwards, in order to achieve plausible deniability, you will need to install a new system on the partition and encrypt it. Thus you will create the decoy system and the whole process of creation of the hidden operating system will be completed.</string>
@@ -1140,7 +1110,7 @@
<string lang="en" key="HIDDEN_OS_CREATION_PREINFO_HELP">In the next steps, TrueCrypt will create the hidden operating system by copying the content of the system partition to the hidden volume (data being copied will be encrypted on the fly with an encryption key different from the one that will be used for the decoy operating system).\n\nPlease note that the process will be performed in the pre-boot environment (before Windows starts) and it may take a long time to complete; several hours or even several days (depending on the size of the system partition and on the performance of your computer).\n\nYou will be able to interrupt the process, shut down your computer, start the operating system and then resume the process. However, if you interrupt it, the entire process of copying the system will have to start from the beginning (because the content of the system partition must not change during cloning).</string>
<string lang="en" key="CONFIRM_CANCEL_HIDDEN_OS_CREATION">Do you want to cancel the entire process of creation of the hidden operating system?\n\nNote: You will NOT be able to resume the process if you cancel it now.</string>
<string lang="en" key="CONFIRM_CANCEL_SYS_ENC_PRETEST">Do you want to cancel the system encryption pretest?</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).\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>
<string lang="en" key="SYS_DRIVE_NOT_ENCRYPTED">The system partition/drive does not appear to be encrypted (neither partially nor fully).</string>
<string lang="en" key="SETUP_FAILED_BOOT_DRIVE_ENCRYPTED">Your system partition/drive is encrypted (partially or fully).\n\nPlease decrypt your system partition/drive entirely before proceeding. To do so, select 'System' &gt; 'Permanently Decrypt System Partition/Drive' from the menu bar of the main TrueCrypt window.</string>
<string lang="en" key="SETUP_FAILED_BOOT_DRIVE_ENCRYPTED_DOWNGRADE">When the system partition/drive is encrypted (partially or fully), you cannot downgrade TrueCrypt (but you can upgrade it or reinstall the same version).</string>
@@ -1148,7 +1118,7 @@
<string lang="en" key="SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE">An instance of the TrueCrypt Volume Creation Wizard is currently running on this system and performing or preparing encryption/decryption of the system partition/drive. Before you proceed, please wait for it to finish or close it. If you cannot close it, please restart your computer before proceeding.</string>
<string lang="en" key="SYSTEM_ENCRYPTION_NOT_COMPLETED">The process of encryption or decryption of the system partition/drive has not been completed. Please wait until it is complete before proceeding.</string>
<string lang="en" key="ERR_ENCRYPTION_NOT_COMPLETED">Error: The process of encryption of the partition/drive has not been completed. It must be completed first.</string>
- <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' &gt; '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' &gt; 'Resume Interrupted Decryption' from the menu bar of the main TrueCrypt window.</string>
<string lang="en" key="ERR_SYS_HIDVOL_HEAD_REENC_MODE_WRONG">The password is correct, TrueCrypt has successfully decrypted the volume header and detected that this volume is a hidden system volume. However, you cannot modify the header of a hidden system volume this way.\n\nTo change the password for a hidden system volume, boot the operating system residing in the hidden volume, and then select 'System' &gt; 'Change Password' from the menu bar of the main TrueCrypt window.\n\nTo set the header key derivation algorithm, boot the hidden operating system and then select 'System' &gt; 'Set Header Key Derivation Algorithm'.</string>
<string lang="en" key="CANNOT_DECRYPT_HIDDEN_OS">TrueCrypt does not support in-place decryption of a hidden system partition.\n\nNote: If you want to decrypt the decoy system partition, boot the decoy system, and then select 'System' &gt; 'Permanently Decrypt System Partition/Drive' from the menu bar of the main TrueCrypt window.</string>
<string lang="en" key="ERR_PARAMETER_INCORRECT">Error: Incorrect/invalid parameter.</string>
@@ -1156,7 +1126,8 @@
<string lang="en" key="CONFIRM_CHANGE_WIZARD_MODE_TO_FILE_CONTAINER">Do you want to create a TrueCrypt file container instead?</string>
<string lang="en" key="CONFIRM_SYSTEM_ENCRYPTION_MODE">You have selected the system partition/drive (or the boot partition), but the wizard mode you selected is suitable only for non-system partitions/drives.\n\nDo you want to set up pre-boot authentication (which means that you will need to enter your password each time before Windows boots/starts) and encrypt the system partition/drive?</string>
<string lang="en" key="CONFIRM_DECRYPT_SYS_DEVICE">Are you sure you want to permanently decrypt the system partition/drive?</string>
- <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>
<string lang="en" key="CONFIRM_CASCADE_FOR_SYS_ENCRYPTION">Warning: If you use a cascade of ciphers for system encryption, you may encounter the following issues:\n\n1) The TrueCrypt Boot Loader is larger than normal and, therefore, there is not enough space in the first drive track for a backup of the TrueCrypt Boot Loader. Hence, whenever it gets damaged (which often happens, for example, during inappropriately designed anti-piracy activation procedures of certain programs), you will need to use the TrueCrypt Rescue Disk to boot or to repair the TrueCrypt Boot Loader.\n\n2) On some computers, resuming from hibernation takes longer.\n\nThese potential issues can be prevented by choosing a non-cascade encryption algorithm (e.g. AES).\n\nAre you sure you want to use a cascade of ciphers?</string>
<string lang="en" key="NOTE_CASCADE_FOR_SYS_ENCRYPTION">If you encounter any of the previously described problems, decrypt the partition/drive (if it is encrypted) and then try encrypting it again using a non-cascade encryption algorithm (e.g. AES).</string>
<string lang="en" key="UPDATE_TC_IN_DECOY_OS_FIRST">WARNING: For safety and security reasons, you should update TrueCrypt on the decoy operating system before you update it on the hidden operating system.\n\nTo do so, boot the decoy system and run the TrueCrypt installer from within it. Then boot the hidden system and run the installer from within it as well.\n\nNote: The decoy system and the hidden system share a single boot loader. If you upgraded TrueCrypt only on the hidden system (but not on the decoy system), the decoy system would contain a TrueCrypt driver and TrueCrypt applications whose version numbers are different from the version number of the TrueCrypt Boot Loader. Such a discrepancy might indicate that there is a hidden operating system on this computer.\n\n\nDo you want to continue?</string>
@@ -1172,6 +1143,7 @@
<string lang="en" key="ENABLE_BAD_SECTOR_ZEROING">Error: Content of one or more sectors on the disk cannot be read (probably due to a physical defect).\n\nThe process of in-place encryption can continue only when the sectors have been made readable again. TrueCrypt can attempt to make these sectors readable by writing zeros to the sectors (subsequently such all-zero blocks would be encrypted). However, note that any data stored in the unreadable sectors will be lost. If you want to avoid that, you can attempt to recover portions of the corrupted data using appropriate third-party tools.\n\nNote: In case of physically damaged sectors (as opposed to mere data corruption and checksum errors) most types of storage devices internally reallocate the sectors when data is attempted to be written to them (so the existing data in the damaged sectors may remain unencrypted on the drive).\n\nDo you want TrueCrypt to write zeroes to unreadable sectors?</string>
<string lang="en" key="DISCARD_UNREADABLE_ENCRYPTED_SECTORS">Error: Content of one or more sectors on the disk cannot be read (probably due to a physical defect).\n\nTo be able to proceed with decryption, TrueCrypt will have to discard the content of the unreadable sectors (the content will be replaced with pseudorandom data). Please note that, before proceeding, you can attempt to recover portions of any corrupted data using appropriate third-party tools.\n\nDo you want TrueCrypt to discard data in the unreadable sectors now?</string>
<string lang="en" key="ZEROED_BAD_SECTOR_COUNT">Note: TrueCrypt has replaced the content of %I64d unreadable sectors (%s) with encrypted all-zero plaintext blocks.</string>
+ <string lang="en" key="SKIPPED_BAD_SECTOR_COUNT">Note: TrueCrypt has replaced the content of %I64d unreadable sectors (%s) with pseudorandom data.</string>
<string lang="en" key="ENTER_TOKEN_PASSWORD">Enter password/PIN for token '%s':</string>
<string lang="en" key="PKCS11_LIB_LOCATION_HELP">In order to allow TrueCrypt to access a security token or smart card, you need to install a PKCS #11 software library for the token or smart card first. Such a library may be supplied with the device or it may be available for download from the website of the vendor or other third parties.\n\nAfter you install the library, you can either select it manually by clicking 'Select Library' or you can let TrueCrypt find and select it automatically by clicking 'Auto-Detect Library' (only the Windows system directory will be searched).</string>
<string lang="en" key="SELECT_PKCS11_MODULE_HELP">Note: For the filename and location of the PKCS #11 library installed for your security token or smart card, please refer to the documentation supplied with the token, card, or third-party software.\n\nClick 'OK' to select the path and filename.</string>
--- Common/Resource.h Mon Jan 19 14:26:12 1970
+++ Common/Resource.h Mon Jan 19 14:26:12 1970
@@ -12,37 +12,36 @@
#define IDD_ABOUT_DLG 508
#define IDD_COMMANDHELP_DLG 509
#define IDD_RAWDEVICES_DLG 510
-#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
#define IDC_HW_AES_LABEL_LINK 5000
#define IDC_HW_AES 5001
#define IDC_PARALLELIZATION_LABEL_LINK 5002
@@ -120,55 +119,52 @@
#define IDT_KEYFILE_GENERATOR_NOTE 5074
#define IDC_GENERATE_AND_SAVE_KEYFILE 5075
#define IDT_POOL_CONTENTS 5076
-#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
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 542
+#define _APS_NEXT_RESOURCE_VALUE 541
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 5117
+#define _APS_NEXT_CONTROL_VALUE 5114
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
--- Common/Tcdefs.h Mon Jan 19 14:26:12 1970
+++ Common/Tcdefs.h Mon Jan 19 14:26:12 1970
@@ -15,15 +15,13 @@
#define TC_APP_NAME "TrueCrypt"
// Version displayed to user
-#define VERSION_STRING "7.1a"
+#define VERSION_STRING "7.2"
// Version number to compare against driver
-#define VERSION_NUM 0x071a
+#define VERSION_NUM 0x0720
// Release date
-#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"
#define BYTES_PER_KB 1024LL
#define BYTES_PER_MB 1048576LL
@@ -247,13 +245,9 @@
#define TC_MAX_PATH 260 /* Includes the null terminator */
#endif
-#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
#define MAX_URL_LENGTH 2084 /* Internet Explorer limit. Includes the terminating null character. */
-
-#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
enum
{
--- Common/Volumes.h Mon Jan 19 14:26:12 1970
+++ Common/Volumes.h Mon Jan 19 14:26:12 1970
@@ -114,7 +114,7 @@
// Volume header flags
#define TC_HEADER_FLAG_ENCRYPTED_SYSTEM 0x1
-#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
#ifndef TC_HEADER_Volume_VolumeHeader
--- Driver/DriveFilter.c Mon Jan 19 14:26:12 1970
+++ Driver/DriveFilter.c Mon Jan 19 14:26:12 1970
@@ -1158,38 +1158,31 @@
int64 bytesWrittenSinceHeaderUpdate = 0;
byte *buffer = NULL;
- byte *wipeBuffer = NULL;
- byte wipeRandChars[TC_WIPE_RAND_CHAR_COUNT];
- byte wipeRandCharsUpdate[TC_WIPE_RAND_CHAR_COUNT];
KIRQL irql;
NTSTATUS status;
SetupResult = STATUS_UNSUCCESSFUL;
- // Make sure volume header can be updated
- if (Extension->HeaderCryptoInfo == NULL)
+ if (SetupRequest.SetupMode == SetupEncryption)
{
SetupResult = STATUS_INVALID_PARAMETER;
goto ret;
}
- buffer = TCalloc (TC_ENCRYPTION_SETUP_IO_BLOCK_SIZE);
- if (!buffer)
+ // Make sure volume header can be updated
+ if (Extension->HeaderCryptoInfo == NULL)
{
- SetupResult = STATUS_INSUFFICIENT_RESOURCES;
+ SetupResult = STATUS_INVALID_PARAMETER;
goto ret;
}
- 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)
{
SetupResult = STATUS_INSUFFICIENT_RESOURCES;
goto ret;
}
- }
while (!NT_SUCCESS (EncryptedIoQueueHoldWhenIdle (&Extension->Queue, 1000)))
{
@@ -1321,47 +1314,7 @@
}
dataUnit.Value = offset.QuadPart / ENCRYPTION_DATA_UNIT_SIZE;
-
- 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
DecryptDataUnits (buffer, &dataUnit, setupBlockSize / ENCRYPTION_DATA_UNIT_SIZE, Extension->Queue.CryptoInfo);
- 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);
- }
status = TCWriteDevice (BootDriveFilterExtension->LowerDeviceObject, buffer, offset, setupBlockSize);
if (!NT_SUCCESS (status))
@@ -1458,8 +1411,6 @@
ret:
if (buffer)
TCfree (buffer);
- if (wipeBuffer)
- TCfree (wipeBuffer);
SetupInProgress = FALSE;
PsTerminateSystemThread (SetupResult);
--- Driver/Driver.rc Mon Jan 19 14:26:12 1970
+++ Driver/Driver.rc Mon Jan 19 14:26:12 1970
@@ -13,13 +13,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -27,8 +25,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 7,1,1,0
- PRODUCTVERSION 7,1,1,0
+ FILEVERSION 7,2,0,0
+ PRODUCTVERSION 7,2,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -45,11 +43,11 @@
BEGIN
VALUE "CompanyName", "TrueCrypt Foundation"
VALUE "FileDescription", "TrueCrypt Driver"
- VALUE "FileVersion", "7.1a"
+ VALUE "FileVersion", "7.2"
VALUE "LegalTrademarks", "TrueCrypt"
VALUE "OriginalFilename", "truecrypt.sys"
VALUE "ProductName", "TrueCrypt"
- VALUE "ProductVersion", "7.1a"
+ VALUE "ProductVersion", "7.2"
END
END
BLOCK "VarFileInfo"
@@ -84,7 +82,7 @@
#endif // APSTUDIO_INVOKED
-#endif // English (U.S.) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
--- Format/Format.rc Mon Jan 19 14:26:12 1970
+++ Format/Format.rc Mon Jan 19 14:26:12 1970
@@ -14,13 +14,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -28,8 +26,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 7,1,1,0
- PRODUCTVERSION 7,1,1,0
+ FILEVERSION 7,2,0,0
+ PRODUCTVERSION 7,2,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -46,11 +44,11 @@
BEGIN
VALUE "CompanyName", "TrueCrypt Foundation"
VALUE "FileDescription", "TrueCrypt Format"
- VALUE "FileVersion", "7.1a"
+ VALUE "FileVersion", "7.2"
VALUE "LegalTrademarks", "TrueCrypt"
VALUE "OriginalFilename", "TrueCrypt Format.exe"
VALUE "ProductName", "TrueCrypt"
- VALUE "ProductVersion", "7.1a"
+ VALUE "ProductVersion", "7.2"
END
END
BLOCK "VarFileInfo"
@@ -91,7 +89,7 @@
PUSHBUTTON "Cancel",IDCANCEL,343,189,50,14
LTEXT "",IDC_BOX_TITLE,160,8,233,17
GROUPBOX "",IDC_STATIC,4,0,392,183
- 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
LTEXT "",IDC_POS_BOX,160,24,231,152
END
@@ -106,8 +104,6 @@
LTEXT "",IDC_BOX_HELP,7,40,205,40
GROUPBOX "Encryption Algorithm",IDT_ENCRYPTION_ALGO,0,10,217,95
GROUPBOX "Hash Algorithm",IDT_HASH_ALGO,0,109,217,35
- 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
END
IDD_PASSWORD_PAGE_DLG DIALOGEX 0, 0, 226, 152
@@ -182,12 +178,10 @@
BEGIN
CONTROL "Create an encrypted file container",IDC_FILE_CONTAINER,
"Button",BS_AUTORADIOBUTTON,0,7,217,10
- LTEXT "More information",IDC_MORE_INFO_ON_CONTAINERS,16,39,165,10,SS_NOTIFY
CONTROL "Encrypt a non-system partition/drive",IDC_NONSYS_DEVICE,
"Button",BS_AUTORADIOBUTTON,0,53,217,10
CONTROL "Encrypt the system partition or entire system drive",IDC_SYS_DEVICE,
"Button",BS_AUTORADIOBUTTON,0,87,217,10
- LTEXT "More information about system encryption",IDC_MORE_INFO_ON_SYS_ENCRYPTION,16,136,190,10,SS_NOTIFY
LTEXT "Creates a virtual encrypted disk within a file. Recommended for inexperienced users.",IDT_FILE_CONTAINER,16,20,205,16
LTEXT "Encrypts a non-system partition on any internal or external drive (e.g. a flash drive). Optionally, creates a hidden volume.",IDT_NON_SYS_DEVICE,16,66,205,16
LTEXT "Encrypts the partition/drive where Windows is installed. Anyone who wants to gain access and use the system, read and write files, etc., will need to enter the correct password each time before Windows boots. Optionally, creates a hidden system.",IDT_SYS_DEVICE,16,100,205,33
@@ -236,7 +230,6 @@
BEGIN
CONTROL "Standard TrueCrypt volume",IDC_STD_VOL,"Button",BS_AUTORADIOBUTTON,0,7,212,10
CONTROL "Hi&dden TrueCrypt volume ",IDC_HIDDEN_VOL,"Button",BS_AUTORADIOBUTTON,0,53,212,10
- LTEXT "More information about hidden volumes",IDC_HIDDEN_VOL_HELP,16,125,205,10,SS_NOTIFY
LTEXT "",IDC_BOX_HELP_NORMAL_VOL,16,20,205,25
LTEXT "",IDC_BOX_HELP,16,66,205,57
END
@@ -304,7 +297,6 @@
BEGIN
COMBOBOX IDC_WIPE_MODE,67,13,125,90,CBS_DROPDOWNLIST | WS_TABSTOP
PUSHBUTTON "&Pause",IDC_PAUSE,169,40,50,14
- LTEXT "More information",IDC_MORE_INFO_SYS_ENCRYPTION,1,141,202,10,SS_NOTIFY
LTEXT "",IDC_BYTESWRITTEN,29,58,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
RTEXT "",IDC_WRITESPEED,103,58,46,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
RTEXT "",IDC_TIMEREMAIN,177,58,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
@@ -356,7 +348,6 @@
BEGIN
CONTROL "Normal",IDC_SYSENC_NORMAL,"Button",BS_AUTORADIOBUTTON,0,7,212,10
CONTROL "Hi&dden",IDC_SYSENC_HIDDEN,"Button",BS_AUTORADIOBUTTON,0,53,212,10
- LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,16,138,205,10,SS_NOTIFY
LTEXT "",IDC_BOX_HELP_SYSENC_NORMAL,16,20,205,25
LTEXT "",IDC_BOX_HELP,16,66,205,72
END
@@ -365,7 +356,6 @@
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,0,141,217,10,SS_NOTIFY
LTEXT "",IDC_BOX_HELP,0,2,225,136
END
@@ -417,6 +407,15 @@
LISTBOX IDC_LIST_BOX,0,3,222,100,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
END
+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
+
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -660,6 +659,14 @@
TOPMARGIN, 7
BOTTOMMARGIN, 145
END
+
+ IDD_DRIVE_LETTER_SELECTION_PAGE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 219
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 145
+ END
END
#endif // APSTUDIO_INVOKED
@@ -681,7 +688,7 @@
IDS_UACSTRING_FMT "TrueCrypt"
END
-#endif // English (U.S.) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
--- Format/InPlace.c Mon Jan 19 14:26:12 1970
+++ Format/InPlace.c Mon Jan 19 14:26:12 1970
@@ -9,7 +9,7 @@
/* In this file, _WIN32_WINNT is defined as 0x0600 to make filesystem shrink available (Vista
or later). _WIN32_WINNT cannot be defined as 0x0600 for the entire user-space projects
-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.
IMPORTANT: Due to this issue, functions in this file must not directly interact with GUI. */
#define TC_LOCAL_WIN32_WINNT_OVERRIDE 1
#if (_WIN32_WINNT < 0x0600)
@@ -37,9 +37,21 @@
using namespace std;
using namespace TrueCrypt;
+#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
+
#define TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE (2048 * BYTES_PER_KB)
-#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
#define TC_NONSYS_INPLACE_ENC_HEADER_UPDATE_INTERVAL (64 * BYTES_PER_MB)
#define TC_NONSYS_INPLACE_ENC_MIN_VOL_SIZE (TC_TOTAL_VOLUME_HEADERS_SIZE + TC_MIN_NTFS_FS_SIZE * 2)
@@ -299,339 +311,52 @@
}
-int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, volatile HANDLE *outHandle, WipeAlgorithmId wipeAlgorithm)
+BOOL CheckRequirementsForNonSysInPlaceDec (const char *devicePath, BOOL silent)
{
- 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;
- /* 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 ----------- */
- offset.QuadPart = TC_VOLUME_DATA_OFFSET + dataAreaSize;
- if (!SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
- {
- nStatus = ERR_OS_ERROR;
- goto closing_seq;
- }
+ /* Volume type (must be a partition or a dynamic volume) */
- // 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)
{
- 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");
- if (nStatus != ERR_SUCCESS)
- goto closing_seq;
+ return FALSE;
}
- /* 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 */
- if (nStatus != ERR_SUCCESS
- || cryptoInfo->EncryptedAreaStart.Value != cryptoInfo2->EncryptedAreaStart.Value
- || cryptoInfo2->EncryptedAreaStart.Value == 0)
+ if (!IsAdmin())
{
- 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.
- goto closing_seq;
+ if (!silent)
+ Warning ("ADMIN_PRIVILEGES_WARN_DEVICES");
}
- // 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;
-
+ /* ---------- Checks that may require admin rights ----------- */
- // /* 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]
- if (dosDev[0])
- RemoveFakeDosName (volParams->volumePath, dosDev);
- *outHandle = dev;
+ return TRUE;
+}
- if (nStatus != ERR_SUCCESS)
- SetLastError (dwError);
- return nStatus;
+int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, volatile HANDLE *outHandle, WipeAlgorithmId wipeAlgorithm)
+{
+ AbortProcess ("INSECURE_APP");
+ return 0;
}
@@ -640,18 +365,24 @@
WipeAlgorithmId wipeAlgorithm,
volatile BOOL *bTryToCorrectReadErrors)
{
- 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;
UINT64_STRUCT unitNo;
- 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;
char dosDev[TC_MAX_PATH] = {0};
char devName[MAX_PATH] = {0};
WCHAR deviceName[MAX_PATH];
int nStatus = ERR_SUCCESS;
__int64 deviceSize;
- uint64 remainingBytes, lastHeaderUpdateDistance = 0, zeroedSectorCount = 0;
+ uint64 remainingBytes, workChunkStartByteOffset, lastHeaderUpdateDistance = 0, skippedBadSectorCount = 0;
uint32 workChunkSize;
DWORD dwError, dwResult;
BOOL bPause = FALSE, bEncryptedAreaSizeChanged = FALSE;
@@ -664,8 +395,6 @@
DISK_GEOMETRY driveGeometry;
- bInPlaceEncNonSysResumed = TRUE;
-
buf = (char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE);
if (!buf)
{
@@ -673,25 +402,6 @@
goto closing_seq;
}
- 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;
- }
- }
-
headerCryptoInfo = crypto_open();
if (headerCryptoInfo == NULL)
@@ -708,8 +418,21 @@
goto closing_seq;
}
- 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))
{
+ handleWin32Error (MainDlg);
+ AbortProcess ("CANT_DISMOUNT_VOLUME");
+ }
+ }
+
+
strcpy ((char *)deviceName, devicePath);
ToUNICODE ((char *)deviceName);
@@ -720,7 +443,7 @@
}
dev = OpenPartitionVolume (devName,
- FALSE, // Do not require exclusive access
+ TRUE, // Require exclusive access
FALSE, // Do not require shared access
TRUE, // 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)
@@ -731,7 +454,8 @@
nStatus = ERR_DONT_REPORT;
goto closing_seq;
}
- }
+
+
// This should never be needed, but is still performed for extra safety (without checking the result)
DeviceIoControl (dev,
@@ -753,26 +477,91 @@
sectorSize = driveGeometry.BytesPerSector;
+ tmpSectorBuf = (byte *) TCalloc (sectorSize);
+ if (!tmpSectorBuf)
+ {
+ nStatus = ERR_OUTOFMEMORY;
+ goto closing_seq;
+ }
+
+
nStatus = OpenBackupHeader (dev, devicePath, password, &masterCryptoInfo, headerCryptoInfo, deviceSize);
if (nStatus != ERR_SUCCESS)
goto closing_seq;
+ 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;
- remainingBytes = masterCryptoInfo->VolumeSize.Value - masterCryptoInfo->EncryptedAreaLength.Value;
+
+ remainingBytes = masterCryptoInfo->EncryptedAreaLength.Value;
lastHeaderUpdateDistance = 0;
ExportProgressStats (masterCryptoInfo->EncryptedAreaLength.Value, masterCryptoInfo->VolumeSize.Value);
- SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_ENCRYPTING);
+ SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_DECRYPTING);
- bFirstNonSysInPlaceEncResumeDone = TRUE;
- /* The in-place encryption core */
+ /* The in-place decryption core */
while (remainingBytes > 0)
{
@@ -784,14 +573,14 @@
goto closing_seq;
}
- unitNo.Value = (remainingBytes - workChunkSize + TC_VOLUME_DATA_OFFSET) / ENCRYPTION_DATA_UNIT_SIZE;
+ workChunkStartByteOffset = masterCryptoInfo->EncryptedAreaStart.Value;
+ unitNo.Value = workChunkStartByteOffset / ENCRYPTION_DATA_UNIT_SIZE;
- // Read the plaintext into RAM
-inplace_enc_read:
+ // Read the ciphertext into RAM
- offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize - TC_VOLUME_DATA_OFFSET;
+ offset.QuadPart = workChunkStartByteOffset;
if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
{
@@ -809,99 +598,85 @@
{
// Physical defect or data corruption
- if (!*bTryToCorrectReadErrors)
+ if (!*DiscardUnreadableEncryptedSectors)
{
- *bTryToCorrectReadErrors = (AskWarnYesNo ("ENABLE_BAD_SECTOR_ZEROING") == IDYES);
+ *DiscardUnreadableEncryptedSectors = (AskWarnYesNo ("DISCARD_UNREADABLE_ENCRYPTED_SECTORS") == IDYES);
}
- if (*bTryToCorrectReadErrors)
+ if (*DiscardUnreadableEncryptedSectors)
{
- // Try to correct the read errors physically
+ // Read the work chunk again, but this time each sector individually and skiping each bad sector
- offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize - TC_VOLUME_DATA_OFFSET;
+ LARGE_INTEGER tmpSectorOffset;
+ uint64 tmpSectorCount;
+ uint64 tmpBufOffset = 0;
+ DWORD tmpNbrReadBytes = 0;
- nStatus = ZeroUnreadableSectors (dev, offset, workChunkSize, sectorSize, &zeroedSectorCount);
+ tmpSectorOffset.QuadPart = offset.QuadPart;
- if (nStatus != ERR_SUCCESS)
+ for (tmpSectorCount = workChunkSize / sectorSize; tmpSectorCount > 0; --tmpSectorCount)
+ {
+ if (SetFilePointerEx (dev, tmpSectorOffset, NULL, FILE_BEGIN) == 0)
{
- // Due to write errors, we can't correct the read errors
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
- 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++;
}
+ memcpy (buf + tmpBufOffset, tmpSectorBuf, sectorSize);
+
+ tmpSectorOffset.QuadPart += sectorSize;
+ tmpBufOffset += sectorSize;
+ }
+ }
+ else
+ {
SetLastError (dwTmpErr); // Preserve the original error code
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
-
- if (remainingBytes - workChunkSize < TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE)
+ }
+ else
{
- // 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
- 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;
+ }
}
+ // Decrypt the ciphertext in RAM
- // 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);
- offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize;
- 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;
- }
- 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
- // 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)
{
- 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.
- 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;
}
- // Write the ciphertext
+ // Write the plaintext
- offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize;
+ offset.QuadPart = workChunkStartByteOffset - TC_VOLUME_DATA_OFFSET;
if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
{
@@ -912,23 +687,13 @@
if (WriteFile (dev, buf, workChunkSize, &n, NULL) == 0)
{
// Write error
- 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);
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
- masterCryptoInfo->EncryptedAreaStart.Value -= workChunkSize;
- masterCryptoInfo->EncryptedAreaLength.Value += workChunkSize;
+ masterCryptoInfo->EncryptedAreaStart.Value += workChunkSize;
+ masterCryptoInfo->EncryptedAreaLength.Value -= workChunkSize;
remainingBytes -= workChunkSize;
lastHeaderUpdateDistance += workChunkSize;
@@ -940,7 +705,10 @@
nStatus = FastVolumeHeaderUpdate (dev, headerCryptoInfo, masterCryptoInfo, deviceSize);
if (nStatus != ERR_SUCCESS)
+ {
+ // Possible write error
goto closing_seq;
+ }
lastHeaderUpdateDistance = 0;
}
@@ -958,57 +726,64 @@
if (nStatus != ERR_SUCCESS)
+ {
+ // Possible write error
goto closing_seq;
+ }
if (!bPause)
{
- /* 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;
+
SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_FINALIZING);
- 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);
if (nStatus != ERR_SUCCESS)
goto closing_seq;
- offset.QuadPart = TC_VOLUME_HEADER_OFFSET;
- 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)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
- // 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();
- if (nStatus != ERR_SUCCESS)
+ SetLastError (dwError);
+ nStatus = ERR_OS_ERROR;
goto closing_seq;
}
+ }
+
+
- // Update the configuration files
+ /* Update the configuration files */
- SaveNonSysInPlaceEncSettings (-1, wipeAlgorithm);
+ SaveNonSysInPlaceEncSettings (-1, TC_WIPE_NONE, TRUE);
@@ -1025,6 +801,12 @@
SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_PAUSED);
}
+ if (dev != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle (dev);
+ dev = INVALID_HANDLE_VALUE;
+ }
+
closing_seq:
@@ -1040,6 +822,12 @@
FastVolumeHeaderUpdate (dev, headerCryptoInfo, masterCryptoInfo, deviceSize);
}
+ if (dev != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle (dev);
+ dev = INVALID_HANDLE_VALUE;
+ }
+
if (masterCryptoInfo != NULL)
{
crypto_close (masterCryptoInfo);
@@ -1052,44 +840,31 @@
headerCryptoInfo = NULL;
}
- if (tmpCryptoInfo != NULL)
- {
- crypto_close (tmpCryptoInfo);
- tmpCryptoInfo = NULL;
- }
-
if (dosDev[0])
RemoveFakeDosName (devicePath, dosDev);
- if (dev != INVALID_HANDLE_VALUE)
- {
- CloseHandle (dev);
- dev = INVALID_HANDLE_VALUE;
- }
-
if (buf != NULL)
+ {
TCfree (buf);
+ buf = NULL;
+ }
- if (header != NULL)
+ if (tmpSectorBuf != NULL)
{
- burn (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- VirtualUnlock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- TCfree (header);
+ TCfree (tmpSectorBuf);
+ tmpSectorBuf = NULL;
}
- if (wipeBuffer != NULL)
- TCfree (wipeBuffer);
-
- if (zeroedSectorCount > 0)
+ if (skippedBadSectorCount > 0)
{
wchar_t msg[30000] = {0};
wchar_t sizeStr[500] = {0};
- GetSizeString (zeroedSectorCount * sectorSize, sizeStr);
+ GetSizeString (skippedBadSectorCount * sectorSize, sizeStr);
wsprintfW (msg,
- GetString ("ZEROED_BAD_SECTOR_COUNT"),
- zeroedSectorCount,
+ GetString ("SKIPPED_BAD_SECTOR_COUNT"),
+ skippedBadSectorCount,
sizeStr);
WarningDirect (msg);
@@ -1144,6 +919,14 @@
mputInt64 (fieldPos, (masterCryptoInfo->EncryptedAreaLength.Value));
+ // 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));
+
+
headerCrc32 = GetCrc32 (header + TC_HEADER_OFFSET_MAGIC, TC_HEADER_OFFSET_HEADER_CRC - TC_HEADER_OFFSET_MAGIC);
fieldPos = (byte *) header + TC_HEADER_OFFSET_HEADER_CRC;
mputLong (fieldPos, headerCrc32);
@@ -1247,75 +1031,13 @@
}
-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;
-}
-
-
// Easy-to-undo modification applied to conceal the NTFS filesystem (to prevent Windows and apps from
// interfering with it until the volume has been fully encrypted). Note that this function will precisely
// undo any modifications it made to the filesystem automatically if an error occurs when writing (including
// physical drive defects).
static int ConcealNTFS (HANDLE dev)
{
- char buf [TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE];
+ char buf [TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE];
DWORD nbrBytesProcessed, nbrBytesProcessed2;
int i;
LARGE_INTEGER offset;
@@ -1326,26 +1048,26 @@
if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
return ERR_OS_ERROR;
- 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)
return ERR_OS_ERROR;
- 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;
offset.QuadPart = 0;
if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
return ERR_OS_ERROR;
- 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)
{
// One or more of the sectors is/are probably damaged and cause write errors.
// We must undo the modifications we made.
dwError = GetLastError();
- 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;
offset.QuadPart = 0;
@@ -1354,7 +1076,7 @@
Sleep (1);
}
while (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
- || WriteFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed2, NULL) == 0);
+ || WriteFile (dev, buf, TC_TRANSFORM_FS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed2, NULL) == 0);
SetLastError (dwError);
@@ -1394,7 +1116,7 @@
}
-BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm)
+BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm, BOOL decrypting)
{
int count;
char str[32];
@@ -1410,7 +1132,8 @@
RemoveNonSysInPlaceEncNotifications();
return TRUE;
}
- else
+
+ if (!decrypting)
{
if (newWipeAlgorithm != TC_WIPE_NONE)
{
@@ -1422,11 +1145,11 @@
{
remove (GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE));
}
+ }
sprintf (str, "%d", count);
return SaveBufferToFile (str, GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC), strlen(str), FALSE);
- }
}
--- Format/InPlace.h Mon Jan 19 14:26:12 1970
+++ Format/InPlace.h Mon Jan 19 14:26:12 1970
@@ -18,6 +18,7 @@
NONSYS_INPLACE_ENC_STATUS_PREPARING,
NONSYS_INPLACE_ENC_STATUS_RESIZING,
NONSYS_INPLACE_ENC_STATUS_ENCRYPTING,
+ NONSYS_INPLACE_ENC_STATUS_DECRYPTING,
NONSYS_INPLACE_ENC_STATUS_FINALIZING,
NONSYS_INPLACE_ENC_STATUS_PAUSED,
NONSYS_INPLACE_ENC_STATUS_FINISHED,
@@ -25,16 +26,17 @@
};
BOOL CheckRequirementsForNonSysInPlaceEnc (const char *devicePath, BOOL silent);
+BOOL CheckRequirementsForNonSysInPlaceDec (const char *devicePath, BOOL silent);
int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, volatile HANDLE *outHandle, WipeAlgorithmId wipeAlgorithm);
int EncryptPartitionInPlaceResume (HANDLE dev, volatile FORMAT_VOL_PARAMETERS *volParams, WipeAlgorithmId wipeAlgorithm, volatile BOOL *bTryToCorrectReadErrors);
+int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile BOOL *DiscardUnreadableEncryptedSectors);
void ShowInPlaceEncErrMsgWAltSteps (char *iniStrId, BOOL bErr);
void SetNonSysInplaceEncUIStatus (int nonSysInplaceEncStatus);
int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_INFO *masterCryptoInfo, __int64 deviceSize);
static HANDLE OpenPartitionVolume (const char *devName, BOOL bExclusiveRequired, BOOL bSharedRequired, BOOL bSharedRequiresConfirmation, BOOL bShowAlternativeSteps, BOOL bSilent);
-static int DismountFileSystem (HANDLE dev, int driveLetter, BOOL bForcedAllowed, BOOL bForcedRequiresConfirmation, BOOL bSilent);
static int ConcealNTFS (HANDLE dev);
-BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId wipeAlgorithm);
+BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId wipeAlgorithm, BOOL decrypting);
static void ExportProgressStats (__int64 bytesDone, __int64 totalSize);
int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, int sectorSize, uint64 *zeroedSectorCount);
static int OpenBackupHeader (HANDLE dev, const char *devicePath, Password *password, PCRYPTO_INFO *retCryptoInfo, CRYPTO_INFO *headerCryptoInfo, __int64 deviceSize);
--- Format/Resource.h Mon Jan 19 14:26:12 1970
+++ Format/Resource.h Mon Jan 19 14:26:12 1970
@@ -34,6 +34,7 @@
#define IDD_DEVICE_WIPE_MODE_PAGE_DLG 129
#define IDD_DEVICE_TRANSFORM_MODE_DLG 130
#define IDD_EXPANDED_LIST_SELECT_PAGE_DLG 131
+#define IDD_DRIVE_LETTER_SELECTION_PAGE 132
#define IDC_BOX_TITLE 1000
#define IDC_RESCUE_DISK_ISO_PATH 1001
#define IDC_COMBO_BOX 1002
@@ -42,110 +43,104 @@
#define IDC_BROWSE 1005
#define IDC_BOX_HELP2 1006
#define IDC_COMBO_BOX_HASH 1007
-#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
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 132
+#define _APS_NEXT_RESOURCE_VALUE 133
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1103
+#define _APS_NEXT_CONTROL_VALUE 1097
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
--- Format/Tcformat.c Mon Jan 19 14:26:12 1970
+++ Format/Tcformat.c Mon Jan 19 14:26:12 1970
@@ -87,12 +87,13 @@
SYSENC_PRETEST_INFO_PAGE,
SYSENC_PRETEST_RESULT_PAGE,
SYSENC_ENCRYPTION_PAGE,
- NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE,
+ NONSYS_INPLACE_ENC_PASSWORD_PAGE,
NONSYS_INPLACE_ENC_RESUME_PARTITION_SEL_PAGE,
NONSYS_INPLACE_ENC_RAND_DATA_PAGE,
NONSYS_INPLACE_ENC_WIPE_MODE_PAGE,
- 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,
FORMAT_PAGE,
FORMAT_FINISHED_PAGE,
SYSENC_HIDDEN_OS_INITIAL_INFO_PAGE,
@@ -145,10 +146,13 @@
BOOL bDirectSysEncMode = FALSE;
BOOL bDirectSysEncModeCommand = SYSENC_COMMAND_NONE;
BOOL DirectDeviceEncMode = FALSE;
+BOOL DirectNonSysInplaceDecStartMode = FALSE;
BOOL DirectNonSysInplaceEncResumeMode = FALSE;
+BOOL DirectNonSysInplaceDecResumeMode = FALSE;
BOOL DirectPromptNonSysInplaceEncResumeMode = FALSE;
-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. */
volatile BOOL bFirstNonSysInPlaceEncResumeDone = FALSE;
__int64 NonSysInplaceEncBytesDone = 0;
__int64 NonSysInplaceEncTotalSize = 0;
@@ -566,7 +570,10 @@
}
if (newWizardMode != WIZARD_MODE_NONSYS_DEVICE)
+ {
bInPlaceEncNonSys = FALSE;
+ bInPlaceDecNonSys = FALSE;
+ }
if (newWizardMode == WIZARD_MODE_NONSYS_DEVICE && !IsAdmin() && IsUacSupported())
{
@@ -574,8 +581,12 @@
return FALSE;
}
+ {
// The contents of the following items may be inappropriate after a change of mode
+
+ 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.
szFileName[0] = 0;
+
szDiskFile[0] = 0;
nUIVolumeSize = 0;
nVolumeSize = 0;
@@ -579,6 +590,7 @@
szDiskFile[0] = 0;
nUIVolumeSize = 0;
nVolumeSize = 0;
+ }
WizardMode = newWizardMode;
}
@@ -976,6 +988,7 @@
bHiddenVolDirect = FALSE;
bWholeSysDrive = FALSE;
bInPlaceEncNonSys = FALSE;
+ bInPlaceDecNonSys = FALSE;
if (bDirectSysEncModeCommand == SYSENC_COMMAND_CREATE_HIDDEN_OS_ELEV)
{
@@ -1011,11 +1024,11 @@
return TRUE;
}
-void SwitchWizardToNonSysInplaceEncResumeMode (void)
+void SwitchWizardToNonSysInplaceEncResumeMode (BOOL decrypt)
{
if (!IsAdmin() && IsUacSupported())
{
- if (!ElevateWholeWizardProcess ("/zinplace"))
+ if (!ElevateWholeWizardProcess (decrypt ? "/resumeinplacedec" : "/zinplace"))
AbortProcessSilent ();
}
@@ -1025,11 +1038,37 @@
CreateNonSysInplaceEncMutex ();
bInPlaceEncNonSys = TRUE;
+ bInPlaceDecNonSys = decrypt;
bInPlaceEncNonSysResumed = TRUE;
ChangeWizardMode (WIZARD_MODE_NONSYS_DEVICE);
- 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);
}
// Use this function e.g. if the config file with the system encryption settings was lost or not written
@@ -1235,8 +1274,6 @@
break;
}
- wcscpy_s (hyperLink, sizeof(hyperLink) / 2, GetString ("IDC_LINK_MORE_INFO_ABOUT_CIPHER"));
-
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), auxLine);
}
else
@@ -1244,11 +1281,6 @@
// No info available for this encryption algorithm
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), L"");
}
-
-
- // Update hyperlink
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER), hyperLink);
- AccommodateTextField (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER, FALSE, hUserUnderlineFont);
}
}
@@ -1639,6 +1671,7 @@
return;
}
+ bVolTransformThreadCancel = FALSE;
bSystemEncryptionInProgress = FALSE;
WaitCursor ();
@@ -1815,6 +1848,9 @@
case NONSYS_INPLACE_ENC_STATUS_ENCRYPTING:
wcscpy (nonSysInplaceEncUIStatus, GetString ("PROGRESS_STATUS_ENCRYPTING"));
break;
+ case NONSYS_INPLACE_ENC_STATUS_DECRYPTING:
+ wcscpy (nonSysInplaceEncUIStatus, GetString ("PROGRESS_STATUS_DECRYPTING"));
+ break;
case NONSYS_INPLACE_ENC_STATUS_FINALIZING:
wcscpy (nonSysInplaceEncUIStatus, GetString ("PROGRESS_STATUS_FINALIZING"));
break;
@@ -1834,12 +1870,28 @@
void UpdateNonSysInPlaceEncControls (void)
{
- 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);
+ if (lastbVolTransformThreadRunning != bVolTransformThreadRunning
+ || lastbVolTransformThreadToRun != bVolTransformThreadToRun)
+ {
SetWindowTextW (GetDlgItem (hCurPage, IDC_PAUSE),
GetString ((bVolTransformThreadRunning || bVolTransformThreadToRun) ? "IDC_PAUSE" : "RESUME"));
+ lastbVolTransformThreadRunning = bVolTransformThreadRunning;
+ lastbVolTransformThreadToRun = bVolTransformThreadToRun;
+ }
+
+ if (lastbInPlaceEncNonSysResumed != bInPlaceEncNonSysResumed)
+ {
SetWindowTextW (GetDlgItem (MainDlg, IDCANCEL), GetString (bInPlaceEncNonSysResumed ? "DEFER" : "CANCEL"));
+ lastbInPlaceEncNonSysResumed = bInPlaceEncNonSysResumed;
+ }
EnableWindow (GetDlgItem (hCurPage, IDC_PAUSE), bFirstNonSysInPlaceEncResumeDone
&& NonSysInplaceEncStatus != NONSYS_INPLACE_ENC_STATUS_FINALIZING
@@ -1904,11 +1956,12 @@
if (bVolTransformThreadRunning
&& (nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_ENCRYPTING
+ || nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_DECRYPTING
|| nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_FINALIZING
|| nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_FINISHED))
{
if (lastNonSysInplaceEncStatus != nonSysInplaceEncStatus
- && nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_ENCRYPTING)
+ && (nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_ENCRYPTING || nonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_DECRYPTING))
{
InitNonSysInplaceEncProgressBar ();
}
@@ -1942,7 +1995,7 @@
InitProgressBar (totalSize,
NonSysInplaceEncBytesDone,
- FALSE,
+ bInPlaceDecNonSys,
TRUE,
TRUE,
TRUE);
@@ -2345,7 +2398,7 @@
volParams->hiddenVolHostSize = nHiddenVolHostSize;
volParams->ea = nVolumeEA;
volParams->pkcs5 = hash_algo;
- volParams->headerFlags = CreatingHiddenSysVol() ? TC_HEADER_FLAG_ENCRYPTED_SYSTEM : 0;
+ volParams->headerFlags = (CreatingHiddenSysVol() ? TC_HEADER_FLAG_ENCRYPTED_SYSTEM : 0);
volParams->fileSystem = fileSystem;
volParams->clusterSize = clusterSize;
volParams->sparseFileSwitch = bSparseFileSwitch;
@@ -2355,8 +2408,19 @@
volParams->password = &volumePassword;
volParams->hwndDlg = hwndDlg;
- if (bInPlaceEncNonSys)
+ if (bInPlaceDecNonSys)
+ {
+ // In-place decryption of non-system volume
+
+ if (!bInPlaceEncNonSysResumed)
+ DiscardUnreadableEncryptedSectors = FALSE;
+
+ nStatus = DecryptPartitionInPlace (volParams, &DiscardUnreadableEncryptedSectors);
+ }
+ else if (bInPlaceEncNonSys)
{
+ // In-place encryption of non-system volume
+
HANDLE hPartition = INVALID_HANDLE_VALUE;
SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_PREPARING);
@@ -2384,6 +2448,8 @@
}
else
{
+ // Format-encryption
+
InitProgressBar (GetVolumeDataAreaSize (bHidden, nVolumeSize), 0, FALSE, FALSE, FALSE, TRUE);
nStatus = TCFormatVolume (volParams);
@@ -2401,7 +2467,7 @@
&& nStatus == ERR_USER_ABORT
&& NonSysInplaceEncStatus == NONSYS_INPLACE_ENC_STATUS_FINISHED)
{
- // Ignore user abort if non-system in-place encryption successfully finished
+ // Ignore user abort if non-system in-place encryption/decryption successfully finished
nStatus = ERR_SUCCESS;
}
@@ -2428,7 +2494,7 @@
SetLastError (dwWin32FormatError);
if ((bVolTransformThreadCancel || nStatus == ERR_USER_ABORT)
- && !(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.
{
if (!bDevice && !(bHiddenVol && !bHiddenVolHost)) // If we're not creating a hidden volume and if it's a file container
{
@@ -2458,6 +2524,10 @@
else
{
SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_ERROR);
+
+ if (bInPlaceDecNonSys)
+ Error ("INPLACE_DEC_GENERIC_ERR");
+ else
ShowInPlaceEncErrMsgWAltSteps ("INPLACE_ENC_GENERIC_ERR_ALT_STEPS", TRUE);
}
}
@@ -2498,8 +2568,9 @@
}
else if (bInPlaceEncNonSys)
{
+ if (!bInPlaceDecNonSys)
+ {
Warning ("NONSYS_INPLACE_ENC_FINISHED_INFO");
-
HandleOldAssignedDriveLetter ();
}
else
@@ -2504,6 +2575,11 @@
}
else
{
+ // NOP - Final steps for in-place decryption are handled with the TC_APPMSG_NONSYS_INPLACE_ENC_FINISHED message.
+ }
+ }
+ else
+ {
Info("FORMAT_FINISHED_INFO");
if (bSparseFileSwitch && quickFormat)
@@ -2629,8 +2705,7 @@
switch (nPageNo)
{
case INTRO_PAGE:
- hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_INTRO_PAGE_DLG), hwndDlg,
- (DLGPROC) PageDialogProc);
+ AbortProcess ("INSECURE_APP");
break;
case SYSENC_TYPE_PAGE:
@@ -2768,7 +2843,7 @@
(DLGPROC) PageDialogProc);
break;
- case NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE:
+ case NONSYS_INPLACE_ENC_PASSWORD_PAGE:
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_PASSWORD_ENTRY_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
break;
@@ -2778,16 +2853,21 @@
(DLGPROC) PageDialogProc);
break;
- case NONSYS_INPLACE_ENC_ENCRYPTION_PAGE:
+ case NONSYS_INPLACE_ENC_TRANSFORM_PAGE:
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_INPLACE_ENCRYPTION_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
break;
- case NONSYS_INPLACE_ENC_ENCRYPTION_FINISHED_PAGE:
+ case NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE:
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_INFO_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
break;
+ case NONSYS_INPLACE_DEC_TRANSFORM_FINISHED_DRIVE_LETTER_PAGE:
+ hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_DRIVE_LETTER_SELECTION_PAGE), hwndDlg,
+ (DLGPROC) PageDialogProc);
+ break;
+
case FORMAT_PAGE:
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_FORMAT_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
@@ -3182,7 +3262,7 @@
if (bHiddenOS && bHiddenVolHost)
swprintf (szTmp, GetString ("OVERWRITEPROMPT_DEVICE_HIDDEN_OS_PARTITION"), szFileName, drive);
else
- 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);
x = MessageBoxW (MainDlg, szTmp, lpszTitle, YES_NO | MB_ICONWARNING | (bInPlaceEncNonSys ? MB_DEFBUTTON1 : MB_DEFBUTTON2));
@@ -3249,6 +3329,16 @@
return TRUE;
}
+
+void UpdateLastDialogId (void)
+{
+ static char PageDebugId[128];
+
+ sprintf (PageDebugId, "FORMAT_PAGE_%d", nCurPageNo);
+ LastDialogId = PageDebugId;
+}
+
+
void HandleOldAssignedDriveLetter (void)
{
if (bDevice)
@@ -3291,7 +3381,6 @@
not. - see DialogProc */
BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- static char PageDebugId[128];
WORD lw = LOWORD (wParam);
WORD hw = HIWORD (wParam);
@@ -3302,8 +3391,7 @@
case WM_INITDIALOG:
LocalizeDialog (hwndDlg, "IDD_VOL_CREATION_WIZARD_DLG");
- sprintf (PageDebugId, "FORMAT_PAGE_%d", nCurPageNo);
- LastDialogId = PageDebugId;
+ UpdateLastDialogId ();
switch (nCurPageNo)
{
@@ -3315,9 +3403,6 @@
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("INTRO_TITLE"));
- ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_CONTAINERS);
- ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_SYS_ENCRYPTION);
-
EnableWindow (GetDlgItem (hwndDlg, IDC_STD_VOL), TRUE);
EnableWindow (GetDlgItem (hwndDlg, IDC_HIDDEN_VOL), TRUE);
@@ -3344,8 +3429,6 @@
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SYSENC_HIDDEN_TYPE_HELP"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP_SYSENC_NORMAL), GetString ("SYSENC_NORMAL_TYPE_HELP"));
- ToHyperlink (hwndDlg, IDC_HIDDEN_SYSENC_INFO_LINK);
-
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), !bDirectSysEncMode);
@@ -3365,7 +3448,6 @@
EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (MainDlg, IDC_PREV), bDirectSysEncModeCommand != SYSENC_COMMAND_CREATE_HIDDEN_OS && bDirectSysEncModeCommand != SYSENC_COMMAND_CREATE_HIDDEN_OS_ELEV);
- ToHyperlink (hwndDlg, IDC_HIDDEN_SYSENC_INFO_LINK);
break;
case SYSENC_SPAN_PAGE:
@@ -3534,8 +3616,6 @@
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("HIDDEN_VOLUME_TYPE_HELP"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP_NORMAL_VOL), GetString ("NORMAL_VOLUME_TYPE_HELP"));
- ToHyperlink (hwndDlg, IDC_HIDDEN_VOL_HELP);
-
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
@@ -3725,8 +3805,6 @@
ComboSelChangeEA (hwndDlg);
SetFocus (GetDlgItem (hwndDlg, IDC_COMBO_BOX));
- ToHyperlink (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER);
-
// Hash algorithms
if (SysEncInEffect ())
@@ -3744,8 +3822,6 @@
}
SelectAlgo (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), &hash_algo);
- ToHyperlink (hwndDlg, IDC_LINK_HASH_INFO);
-
// Wizard buttons
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
@@ -3848,7 +3924,7 @@
break;
case HIDDEN_VOL_HOST_PASSWORD_PAGE:
- case NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE:
+ case NONSYS_INPLACE_ENC_PASSWORD_PAGE:
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT), EM_LIMITTEXT, MAX_PASSWORD, 0);
@@ -3858,7 +3934,7 @@
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable);
- 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"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bInPlaceEncNonSys ? "PASSWORD" : "PASSWORD_HIDVOL_HOST_TITLE"));
@@ -4203,8 +4279,6 @@
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDCANCEL), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDHELP), TRUE);
- ToHyperlink (hwndDlg, IDC_MORE_INFO_SYS_ENCRYPTION);
-
if (SystemEncryptionStatus == SYSENC_STATUS_DECRYPTING)
{
nWipeMode = TC_WIPE_NONE;
@@ -4250,7 +4324,7 @@
break;
- case NONSYS_INPLACE_ENC_ENCRYPTION_PAGE:
+ case NONSYS_INPLACE_ENC_TRANSFORM_PAGE:
if (bInPlaceEncNonSysResumed)
{
@@ -4260,39 +4334,46 @@
nWipeMode = savedWipeAlgorithm;
}
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("ENCRYPTION"));
+ SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bInPlaceDecNonSys ? "DECRYPTION" : "ENCRYPTION"));
- 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"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDCANCEL), GetString (bInPlaceEncNonSysResumed ? "DEFER" : "CANCEL"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString (bInPlaceEncNonSysResumed ? "RESUME" : "ENCRYPT"));
+ SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString (bInPlaceEncNonSysResumed ? "RESUME" : (bInPlaceDecNonSys ? "DECRYPT" : "ENCRYPT")));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_PAUSE), GetString ("IDC_PAUSE"));
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), !bInPlaceEncNonSysResumed);
+ EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), !bInPlaceEncNonSysResumed && !bInPlaceDecNonSys);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDCANCEL), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDHELP), TRUE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PAUSE), FALSE);
- 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
+ {
EnableWindow (GetDlgItem (hwndDlg, IDC_WIPE_MODE), TRUE);
PopulateWipeModeCombo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), FALSE, TRUE);
SelectAlgo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), (int *) &nWipeMode);
+ }
break;
- case NONSYS_INPLACE_ENC_ENCRYPTION_FINISHED_PAGE:
+ case NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE:
bConfirmQuit = FALSE;
- 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"));
- 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"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("FINALIZE"));
@@ -4304,6 +4385,54 @@
break;
+ 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;
+
case FORMAT_PAGE:
{
BOOL bNTFSallowed = FALSE;
@@ -4620,10 +4749,6 @@
}
return 0;
- case WM_HELP:
- OpenPageHelp (GetParent (hwndDlg), nCurPageNo);
- return 1;
-
case TC_APPMSG_PERFORM_POST_SYSENC_WMINIT_TASKS:
AfterSysEncProgressWMInitTasks (hwndDlg);
return 1;
@@ -4645,14 +4770,6 @@
case IDC_SYS_DEVICE:
UpdateWizardModeControls (hwndDlg, WIZARD_MODE_SYS_DEVICE);
return 1;
-
- case IDC_MORE_INFO_ON_CONTAINERS:
- Applink ("introcontainer", TRUE, "");
- return 1;
-
- case IDC_MORE_INFO_ON_SYS_ENCRYPTION:
- Applink ("introsysenc", TRUE, "");
- return 1;
}
}
@@ -4671,19 +4788,9 @@
bHiddenVol = FALSE;
bHiddenVolHost = FALSE;
return 1;
-
- case IDC_HIDDEN_SYSENC_INFO_LINK:
- Applink ("hiddensysenc", TRUE, "");
- return 1;
}
}
- if (nCurPageNo == SYSENC_HIDDEN_OS_REQ_CHECK_PAGE && lw == IDC_HIDDEN_SYSENC_INFO_LINK)
- {
- Applink ("hiddensysenc", TRUE, "");
- return 1;
- }
-
if (nCurPageNo == SYSENC_SPAN_PAGE)
{
switch (lw)
@@ -4801,10 +4908,6 @@
return 1;
}
break;
-
- case IDC_MORE_INFO_SYS_ENCRYPTION:
- Applink ("sysencprogressinfo", TRUE, "");
- return 1;
}
}
@@ -4850,7 +4953,7 @@
}
break;
- case NONSYS_INPLACE_ENC_ENCRYPTION_PAGE:
+ case NONSYS_INPLACE_ENC_TRANSFORM_PAGE:
{
switch (lw)
{
@@ -4892,12 +4995,6 @@
return 1;
}
- if (lw == IDC_HIDDEN_VOL_HELP && nCurPageNo == VOLUME_TYPE_PAGE)
- {
- Applink ("hiddenvolume", TRUE, "");
- return 1;
- }
-
if (lw == IDC_ABORT_BUTTON && nCurPageNo == FORMAT_PAGE)
{
if (MessageBoxW (hwndDlg, GetString ("FORMAT_ABORT"), lpszTitle, MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) == IDYES)
@@ -4937,32 +5034,6 @@
return 1;
}
- 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;
- }
-
if (hw == CBN_EDITCHANGE && nCurPageNo == VOLUME_LOCATION_PAGE)
{
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
@@ -5028,7 +5099,7 @@
if (nCurPageNo == PASSWORD_PAGE
|| nCurPageNo == HIDDEN_VOL_HOST_PASSWORD_PAGE
- || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
+ || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
{
if (lw == IDC_KEY_FILES)
{
@@ -5051,10 +5122,10 @@
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable);
- 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)
EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable);
- 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)
{
VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
GetDlgItem (hCurPage, IDC_PASSWORD),
@@ -5070,7 +5141,7 @@
{
KeyFilesEnable = GetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE);
- 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)
{
EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable);
@@ -5085,7 +5156,7 @@
}
if (nCurPageNo == HIDDEN_VOL_HOST_PASSWORD_PAGE
- || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
+ || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
{
if (hw == EN_CHANGE)
{
@@ -5317,8 +5388,6 @@
{
if (IsWindowsIsoBurnerAvailable())
LaunchWindowsIsoBurner (hwndDlg, szRescueDiskISO);
- else
- Applink ("isoburning", TRUE, "");
return 1;
}
@@ -5544,6 +5613,8 @@
KillTimer (hwndDlg, TIMER_ID_SYSENC_PROGRESS);
+ UpdateLastDialogId ();
+
try
{
if (BootEncStatus.DriveMounted) // If we had been really encrypting/decrypting (not just proceeding to deinstall)
@@ -5668,6 +5739,8 @@
if (!bVolTransformThreadRunning && !bVolTransformThreadToRun)
{
KillTimer (hwndDlg, TIMER_ID_NONSYS_INPLACE_ENC_PROGRESS);
+
+ UpdateLastDialogId ();
}
UpdateNonSysInPlaceEncControls ();
@@ -5807,6 +5881,7 @@
// The driver stopped wiping
KillTimer (hwndDlg, TIMER_ID_WIPE_PROGRESS);
+ UpdateLastDialogId ();
try
{
@@ -5890,8 +5965,29 @@
KillTimer (hwndDlg, TIMER_ID_NONSYS_INPLACE_ENC_PROGRESS);
- 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");
+ }
+ }
+ LoadPage (hwndDlg, NONSYS_INPLACE_ENC_TRANSFORM_FINISHED_PAGE);
return 1;
case TC_APPMSG_VOL_TRANSFORM_THREAD_ENDED:
@@ -5923,14 +6019,9 @@
NormalCursor ();
return 1;
- case WM_HELP:
-
- OpenPageHelp (hwndDlg, nCurPageNo);
- return 1;
-
case TC_APPMSG_FORMAT_USER_QUIT:
- if (nCurPageNo == NONSYS_INPLACE_ENC_ENCRYPTION_PAGE
+ if (nCurPageNo == NONSYS_INPLACE_ENC_TRANSFORM_PAGE
&& (bVolTransformThreadRunning || bVolTransformThreadToRun || bInPlaceEncNonSysResumed))
{
// Non-system encryption in progress
@@ -6023,12 +6114,7 @@
case WM_COMMAND:
- if (lw == IDHELP)
- {
- OpenPageHelp (hwndDlg, nCurPageNo);
- return 1;
- }
- else if (lw == IDCANCEL)
+ if (lw == IDCANCEL)
{
PostMessage (hwndDlg, TC_APPMSG_FORMAT_USER_QUIT, 0, 0);
return 1;
@@ -6710,7 +6796,7 @@
}
else if (nCurPageNo == HIDDEN_VOL_HOST_PASSWORD_PAGE
- || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
+ || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
{
WaitCursor ();
@@ -6849,10 +6935,10 @@
}
}
}
- else
+ else if (bInPlaceEncNonSysResumed)
{
/* Scan all available partitions to discover all partitions where non-system in-place
- encryption has been interrupted. */
+ encryption/decryption has been interrupted. */
BOOL tmpbDevice;
DeferredNonSysInPlaceEncDevices.clear();
@@ -6895,12 +6981,115 @@
return 1;
}
- nNewPageNo = NONSYS_INPLACE_ENC_ENCRYPTION_PAGE - 1; // Skip irrelevant pages
+ nNewPageNo = NONSYS_INPLACE_ENC_TRANSFORM_PAGE - 1; // Skip irrelevant pages
}
NormalCursor();
}
+ 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);
+ 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();
+ }
}
else if (nCurPageNo == FILESYS_PAGE)
@@ -7205,17 +7394,74 @@
}
else if (nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PARTITION_SEL_PAGE)
{
- nNewPageNo = NONSYS_INPLACE_ENC_ENCRYPTION_PAGE - 1; // Skip irrelevant pages
+ nNewPageNo = NONSYS_INPLACE_ENC_TRANSFORM_PAGE - 1; // Skip irrelevant pages
}
- else if (nCurPageNo == NONSYS_INPLACE_ENC_ENCRYPTION_PAGE)
+ else if (nCurPageNo == NONSYS_INPLACE_ENC_TRANSFORM_PAGE)
{
/* In-place encryption start (the 'Next' button has been clicked) */
+ if (bInPlaceDecNonSys
+ && !bInPlaceEncNonSysResumed
+ && AskWarnYesNo ("NONSYS_INPLACE_ENC_CONFIRM_BACKUP") == IDNO)
+ {
+ // Cancel
+ return 1;
+ }
+
NonSysInplaceEncResume ();
return 1;
}
- 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)
{
+ 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;
+
PostMessage (hwndDlg, TC_APPMSG_FORMAT_USER_QUIT, 0, 0);
return 1;
}
@@ -7677,7 +7923,7 @@
}
else if (nCurPageNo == HIDDEN_VOL_HOST_PASSWORD_PAGE
- || nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
+ || nCurPageNo == NONSYS_INPLACE_ENC_PASSWORD_PAGE)
{
// Store the password in case we need to restore it after keyfile is applied to it
GetWindowText (GetDlgItem (hCurPage, IDC_PASSWORD_DIRECT), szRawPassword, sizeof (szRawPassword));
@@ -7799,27 +8045,33 @@
CommandDecryptSysEnc,
CommandEncDev,
CommandHiddenSys,
- CommandResumeInplaceLogOn,
+ CommandResumeNonSysInplaceLogOn,
CommandResumeHiddenSys,
CommandSysEnc,
+ CommandInplaceDec,
+ CommandResumeInplaceDec,
CommandResumeInplace,
};
argument args[]=
{
+ // Public
{ OptionHistory, "/history", "/h", FALSE },
{ OptionNoIsoCheck, "/noisocheck", "/n", FALSE },
{ OptionQuit, "/quit", "/q", FALSE },
{ OptionTokenLib, "/tokenlib", NULL, FALSE },
+ // Internal
{ CommandResumeSysEncLogOn, "/acsysenc", "/a", TRUE },
{ CommandResumeSysEnc, "/csysenc", "/c", TRUE },
{ CommandDecryptSysEnc, "/dsysenc", "/d", TRUE },
{ CommandEncDev, "/encdev", "/e", TRUE },
{ CommandHiddenSys, "/isysenc", "/i", TRUE },
- { CommandResumeInplaceLogOn, "/prinplace", "/p", TRUE },
+ { CommandResumeNonSysInplaceLogOn, "/prinplace", "/p", TRUE },
{ CommandResumeHiddenSys, "/risysenc", "/r", TRUE },
{ CommandSysEnc, "/sysenc", "/s", TRUE },
+ { CommandInplaceDec, "/inplacedec", NULL, TRUE },
+ { CommandResumeInplaceDec, "/resumeinplacedec",NULL, TRUE },
{ CommandResumeInplace, "/zinplace", "/z", TRUE }
};
@@ -7839,21 +8091,7 @@
switch (x)
{
case CommandSysEnc:
- // 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");
break;
case CommandDecryptSysEnc:
@@ -7874,39 +8112,11 @@
break;
case CommandHiddenSys:
- // 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");
break;
case CommandResumeHiddenSys:
- // 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");
break;
case CommandResumeSysEnc:
@@ -7944,17 +8154,39 @@
break;
case CommandEncDev:
- // 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;
+ }
break;
case CommandResumeInplace:
- // 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;
break;
- 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
// This switch is passed only by the system (from the startup sequence).
DirectPromptNonSysInplaceEncResumeMode = TRUE;
break;
@@ -8086,7 +8318,7 @@
goto efsf_error;
}
- if (volProp.volFormatVersion < TC_VOLUME_FORMAT_VERSION)
+ if (volProp.volFormatVersion == TC_VOLUME_FORMAT_VERSION_PRE_6_0)
{
// We do not support creating hidden volumes within volumes created by TrueCrypt 5.1a or earlier.
Error ("ERR_VOL_FORMAT_BAD");
@@ -8139,7 +8371,7 @@
GetVolumeInformation(szRootPathName, NULL, 0, NULL, NULL, NULL, szFileSystemNameBuffer, sizeof(szFileSystemNameBuffer));
- // 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.
if (!strncmp (szFileSystemNameBuffer, "FAT", 3)
|| (readBuffer[0x36] == 'F' && readBuffer[0x37] == 'A' && readBuffer[0x38] == 'T')
|| (readBuffer[0x52] == 'F' && readBuffer[0x53] == 'A' && readBuffer[0x54] == 'T'))
@@ -8529,7 +8761,7 @@
else
{
// Nothing to resume
- Warning ("NOTHING_TO_RESUME");
+ Warning ("NO_SYS_ENC_PROCESS_TO_RESUME");
EndMainDlg (MainDlg);
return;
@@ -8873,7 +9105,7 @@
&& !bInPlaceEncNonSysPending)
{
// This instance of the wizard has been launched via the system startup sequence to prompt for resume of
- // 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
// has been interrupted. This inconsistency may occur, for example, when the process is finished
// but the wizard is not removed from the startup sequence because system encryption is in progress.
// Therefore, we remove it from the startup sequence now if possible.
@@ -8884,9 +9116,16 @@
AbortProcessSilent ();
}
- if (DirectNonSysInplaceEncResumeMode)
+ BOOL decrypt = FALSE;
+
+ if (DirectNonSysInplaceDecStartMode)
+ {
+ SwitchWizardToNonSysInplaceDecStartMode (szFileName);
+ return;
+ }
+ else if (DirectNonSysInplaceEncResumeMode || DirectNonSysInplaceDecResumeMode)
{
- SwitchWizardToNonSysInplaceEncResumeMode();
+ SwitchWizardToNonSysInplaceEncResumeMode (DirectNonSysInplaceDecResumeMode);
return;
}
else if (DirectPromptNonSysInplaceEncResumeMode)
@@ -8894,8 +9133,8 @@
if (NonSysInplaceEncInProgressElsewhere ())
AbortProcessSilent ();
- if (AskNonSysInPlaceEncryptionResume() == IDYES)
- SwitchWizardToNonSysInplaceEncResumeMode();
+ if (AskNonSysInPlaceEncryptionResume (&decrypt) == IDYES)
+ SwitchWizardToNonSysInplaceEncResumeMode (decrypt);
else
AbortProcessSilent ();
@@ -8903,9 +9142,9 @@
}
else if (bInPlaceEncNonSysPending
&& !NonSysInplaceEncInProgressElsewhere ()
- && AskNonSysInPlaceEncryptionResume() == IDYES)
+ && AskNonSysInPlaceEncryptionResume (&decrypt) == IDYES)
{
- SwitchWizardToNonSysInplaceEncResumeMode();
+ SwitchWizardToNonSysInplaceEncResumeMode (decrypt);
return;
}
--- Format/Tcformat.h Mon Jan 19 14:26:12 1970
+++ Format/Tcformat.h Mon Jan 19 14:26:12 1970
@@ -42,6 +42,7 @@
void EnableDisableFileNext ( HWND hComboBox , HWND hMainButton );
BOOL QueryFreeSpace ( HWND hwndDlg , HWND hwndTextBox , BOOL display );
static BOOL FinalPreTransformPrompts (void);
+void UpdateLastDialogId (void);
void HandleOldAssignedDriveLetter (void);
void AddCipher ( HWND hComboBox , char *lpszCipher , int nCipher );
BOOL CALLBACK PageDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
@@ -90,6 +91,7 @@
extern volatile BOOL bInPlaceEncNonSysResumed;
extern volatile BOOL bFirstNonSysInPlaceEncResumeDone;
extern volatile BOOL bInPlaceEncNonSys;
+extern volatile BOOL bInPlaceDecNonSys;
extern __int64 NonSysInplaceEncBytesDone;
extern __int64 NonSysInplaceEncTotalSize;
extern int nPbar;
--- Mount/Favorites.cpp Mon Jan 19 14:26:12 1970
+++ Mount/Favorites.cpp Mon Jan 19 14:26:12 1970
@@ -207,11 +207,6 @@
ListView_SetItemState (FavoriteListControl, Favorites.size() - 1, LVIS_SELECTED, LVIS_SELECTED);
ListView_EnsureVisible (FavoriteListControl, Favorites.size() - 1, FALSE);
}
-
- if (SystemFavoritesMode)
- SetDlgItemTextW (hwndDlg, IDC_FAVORITES_HELP_LINK, GetString ("SYS_FAVORITES_HELP_LINK"));
-
- ToHyperlink (hwndDlg, IDC_FAVORITES_HELP_LINK);
}
catch (Exception &e)
{
@@ -362,10 +357,6 @@
else
Warning ("SETTING_REQUIRES_REBOOT");
}
- return 1;
-
- case IDC_FAVORITES_HELP_LINK:
- Applink (SystemFavoritesMode ? "sysfavorites" : "favorites", TRUE, "");
return 1;
}
--- Mount/MainCom.cpp Mon Jan 19 14:26:12 1970
+++ Mount/MainCom.cpp Mon Jan 19 14:26:12 1970
@@ -67,12 +67,6 @@
return S_OK;
}
- virtual void STDMETHODCALLTYPE AnalyzeKernelMiniDump (LONG_PTR hwndDlg)
- {
- MainDlg = (HWND) hwndDlg;
- ::AnalyzeKernelMiniDump ((HWND) hwndDlg);
- }
-
virtual int STDMETHODCALLTYPE BackupVolumeHeader (LONG_PTR hwndDlg, BOOL bRequireConfirmation, BSTR lpszVolume)
{
USES_CONVERSION;
@@ -193,23 +187,6 @@
throw UserAbort (SRC_POS);
return instance;
-}
-
-
-extern "C" void UacAnalyzeKernelMiniDump (HWND hwndDlg)
-{
- CComPtr<ITrueCryptMainCom> tc;
-
- CoInitialize (NULL);
-
- if (ComGetInstance (hwndDlg, &tc))
- {
- WaitCursor();
- tc->AnalyzeKernelMiniDump ((LONG_PTR) hwndDlg);
- NormalCursor();
- }
-
- CoUninitialize ();
}
--- Mount/MainCom.h Mon Jan 19 14:26:12 1970
+++ Mount/MainCom.h Mon Jan 19 14:26:12 1970
@@ -20,7 +20,6 @@
#endif
BOOL ComServerMain ();
-void UacAnalyzeKernelMiniDump (HWND hwndDlg);
int UacBackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, char *lpszVolume);
int UacRestoreVolumeHeader (HWND hwndDlg, char *lpszVolume);
int UacChangePwd (char *lpszVolume, Password *oldPassword, Password *newPassword, int pkcs5, HWND hwndDlg);
--- Mount/MainCom.idl Mon Jan 19 14:26:12 1970
+++ Mount/MainCom.idl Mon Jan 19 14:26:12 1970
@@ -12,7 +12,7 @@
[
uuid(1770F56C-7881-4591-A179-79B8001C7D42),
helpstring("TrueCrypt Main UAC Support Library"),
- version(2.4) // Update ComSetup.cpp when changing version number
+ version(2.5) // Update ComSetup.cpp when changing version number
]
library TrueCryptMainCom
{
@@ -24,7 +24,6 @@
]
interface ITrueCryptMainCom : IUnknown
{
- void AnalyzeKernelMiniDump (LONG_PTR hwndDlg);
int BackupVolumeHeader (LONG_PTR hwndDlg, BOOL bRequireConfirmation, BSTR lpszVolume);
DWORD CallDriver (DWORD ioctl, BSTR input, BSTR *output);
int ChangePassword (BSTR volumePath, Password *oldPassword, Password *newPassword, int pkcs5, LONG_PTR hWnd);
--- Mount/Mount.c Mon Jan 19 14:26:12 1970
+++ Mount/Mount.c Mon Jan 19 14:26:12 1970
@@ -99,7 +99,6 @@
BOOL bHiddenSysLeakProtNotifiedDuringSession = FALSE; /* TRUE if the user has been notified during the session that unencrypted filesystems and non-hidden TrueCrypt volumes are mounted as read-only under hidden OS. */
BOOL CloseSecurityTokenSessionsAfterMount = FALSE;
BOOL DisableSystemCrashDetection = FALSE;
-BOOL SystemCrashDetected = FALSE;
BOOL Quit = FALSE; /* Exit after processing command line */
BOOL ComServerMode = FALSE;
@@ -220,7 +219,7 @@
static void InitMainDialog (HWND hwndDlg)
{
MENUITEMINFOW info;
- 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};
wchar_t *str;
int i;
@@ -235,9 +234,6 @@
SendMessage (GetDlgItem (hwndDlg, IDC_VOLUME), CB_LIMITTEXT, TC_MAX_PATH, 0);
SetWindowTextW (hwndDlg, (IsAdmin() && !IsBuiltInAdmin() && IsUacSupported() && !IsNonInstallMode()) ? (wstring (lpszTitle) + L" [" + GetString ("ADMINISTRATOR") + L"]").c_str() : lpszTitle);
- // Help file name
- InitHelpFileName();
-
// Localize menu strings
for (i = 40001; str = (wchar_t *)GetDictionaryValueByInt (i); i++)
{
@@ -256,10 +252,6 @@
info.cbSize = sizeof (info);
info.fMask = MIIM_TYPE;
-
- if (strcmp (popupTexts[i], "MENU_WEBSITE") == 0)
- info.fType = MFT_STRING | MFT_RIGHTJUSTIFY;
- else
info.fType = MFT_STRING;
if (strcmp (popupTexts[i], "MENU_FAVORITES") == 0)
@@ -301,6 +293,8 @@
SendMessage (GetDlgItem (hwndDlg, IDC_NO_HISTORY), BM_SETCHECK, bHistory ? BST_UNCHECKED : BST_CHECKED, 0);
EnableDisableButtons (hwndDlg);
+
+ ToHyperlink (hwndDlg, IDT_INSECURE_APP);
}
void EnableDisableButtons (HWND hwndDlg)
@@ -389,6 +383,184 @@
return FALSE;
}
+
+// 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;
+}
+
void LoadSettings (HWND hwndDlg)
{
EnableHwEncryption ((ReadDriverConfigurationFlags() & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION) ? FALSE : TRUE);
@@ -647,7 +819,7 @@
return (BootEncStatus.DriveMounted);
}
-// 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
BOOL WholeSysDriveEncryption (BOOL bSilent)
{
try
@@ -856,19 +1028,16 @@
// Returns TRUE if the host drive of the specified partition contains a portion of the TrueCrypt Boot Loader
// and if the drive is not within key scope of active system encryption (e.g. the system drive of the running OS).
// If bPrebootPasswordDlgMode is TRUE, this function returns FALSE (because the check would be redundant).
-BOOL TCBootLoaderOnInactiveSysEncDrive (void)
+BOOL TCBootLoaderOnInactiveSysEncDrive (char *szDevicePath)
{
try
{
int driveNo;
- char szDevicePath [TC_MAX_PATH+1];
char parentDrivePath [TC_MAX_PATH+1];
if (bPrebootPasswordDlgMode)
return FALSE;
- GetWindowText (GetDlgItem (MainDlg, IDC_VOLUME), szDevicePath, sizeof (szDevicePath));
-
if (sscanf (szDevicePath, "\\Device\\Harddisk%d\\Partition", &driveNo) != 1)
return FALSE;
@@ -937,7 +1106,7 @@
static void LaunchVolCreationWizard (HWND hwndDlg, const char *arg)
{
- char t[TC_MAX_PATH] = {'"',0};
+ char t[TC_MAX_PATH + 1024] = {'"',0};
char *tmp;
GetModuleFileName (NULL, t+1, sizeof(t)-1);
@@ -1943,6 +2112,8 @@
SetWindowPos (hwndDlg, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
+
+ ToHyperlink (hwndDlg, IDT_INSECURE_APP);
}
return 0;
@@ -2027,6 +2198,12 @@
case WM_COMMAND:
+ if (lw == IDT_INSECURE_APP)
+ {
+ Warning ("INSECURE_APP");
+ return 1;
+ }
+
if (lw == IDC_MOUNT_OPTIONS)
{
DialogBoxParamW (hInst,
@@ -2435,9 +2612,6 @@
if (mountOptions->ProtectedHidVolPassword.Length > 0)
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_PROT_HIDVOL), (LPSTR) mountOptions->ProtectedHidVolPassword.Text);
-
- ToHyperlink (hwndDlg, IDC_LINK_HIDVOL_PROTECTION_INFO);
-
}
return 0;
@@ -2491,11 +2665,6 @@
return 1;
}
- if (lw == IDC_LINK_HIDVOL_PROTECTION_INFO)
- {
- Applink ("hiddenvolprotection", TRUE, "");
- }
-
if (lw == IDCANCEL)
{
char tmp[MAX_PASSWORD+1];
@@ -3319,8 +3488,11 @@
item.mask = LVIF_PARAM;
item.iItem = hItem;
- if (ListView_GetItem (hTree, &item) == FALSE)
+ if (ListView_GetItemCount (hTree) < 1
+ || ListView_GetItem (hTree, &item) == FALSE)
+ {
return MAKELONG (0xffff, 0xffff);
+ }
else
return item.lParam;
}
@@ -4127,9 +4299,6 @@
if (AskNoYes ("CONFIRM_DECRYPT_SYS_DEVICE") == IDNO)
return;
- if (AskWarnNoYes ("CONFIRM_DECRYPT_SYS_DEVICE_CAUTION") == IDNO)
- return;
-
if (CreateSysEncMutex ()) // If no instance of the wizard is currently taking care of system encryption
{
try
@@ -4169,16 +4338,115 @@
Warning ("SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE");
}
-// Initiates the process of creation of a hidden operating system
-static void CreateHiddenOS (void)
+static void DecryptNonSysDevice (BOOL bResolveAmbiguousSelection, BOOL bUseDriveListSel)
{
+ 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");
- // 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");
+ // 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).
+ }
- LaunchVolCreationWizard (MainDlg, "/isysenc");
+ NormalCursor ();
+
+
+ if (AskNoYesString ((wstring (GetString ("CONFIRM_DECRYPT_NON_SYS_DEVICE")) + L"\n\n" + SingleStringToWide (scPath)).c_str()) == IDNO)
+ return;
+
+ if (AskWarnNoYes ("CONFIRM_DECRYPT_NON_SYS_DEVICE_CAUTION") == IDNO)
+ return;
+
+ LaunchVolCreationWizard (MainDlg, (string ("/inplacedec \"") + scPath + "\"").c_str ());
}
// Blindly attempts (without any checks) to instruct the wizard to resume whatever system encryption process
@@ -4381,12 +4649,12 @@
}
-static void ResumeInterruptedNonSysInplaceEncProcess (void)
+static void ResumeInterruptedNonSysInplaceEncProcess (BOOL decrypt)
{
// IMPORTANT: This function must not check any config files! Otherwise, if a config file was lost or corrupt,
// the user would not be able resume encryption and the data on the volume would be inaccessible.
- LaunchVolCreationWizard (MainDlg, "/zinplace");
+ LaunchVolCreationWizard (MainDlg, decrypt ? "/resumeinplacedec" : "/zinplace");
}
static BOOL SelectContainer (HWND hwndDlg)
@@ -4988,62 +5256,13 @@
if (bInPlaceEncNonSysPending && !NonSysInplaceEncInProgressElsewhere())
{
- if (AskNonSysInPlaceEncryptionResume() == IDYES)
- ResumeInterruptedNonSysInplaceEncProcess ();
- }
- }
-
- if (!DisableSystemCrashDetection
- && IsOSAtLeast (WIN_7))
- {
- // Auto-detect a system crash
-
- const int detectionPeriodInMonthsSinceReleaseDate = 2;
- int maxYear = TC_RELEASE_DATE_YEAR;
- int maxMonth = TC_RELEASE_DATE_MONTH + detectionPeriodInMonthsSinceReleaseDate;
- if (maxMonth > 12)
- {
- ++maxYear;
- maxMonth -= 12;
- }
+ BOOL decrypt = FALSE;
- 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);
}
}
- DoPostInstallTasks ();
ResetCurrentDirectory ();
}
return 0;
@@ -5069,10 +5288,6 @@
}
return 0;
- case WM_HELP:
- OpenPageHelp (hwndDlg, 0);
- return 1;
-
case WM_ENDSESSION:
if (TaskBarIconMutex != NULL)
{
@@ -5133,31 +5348,6 @@
if (TaskBarIconMutex != NULL)
{
- // 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);
- }
- }
-
// Idle auto-dismount
if (MaxVolumeIdleTime > 0)
DismountIdleVolumes ();
@@ -5363,8 +5553,6 @@
AppendMenu (popup, MF_SEPARATOR, 0, NULL);
}
- AppendMenuW (popup, MF_STRING, IDM_HELP, GetString ("MENU_HELP"));
- AppendMenuW (popup, MF_STRING, IDM_HOMEPAGE_SYSTRAY, GetString ("HOMEPAGE"));
AppendMenuW (popup, MF_STRING, IDM_PREFERENCES, GetString ("IDM_PREFERENCES"));
AppendMenuW (popup, MF_STRING, IDM_ABOUT, GetString ("IDM_ABOUT"));
AppendMenu (popup, MF_SEPARATOR, 0, NULL);
@@ -5403,10 +5591,6 @@
{
ChangeMainWindowVisibility ();
}
- else if (sel == IDM_HOMEPAGE_SYSTRAY)
- {
- Applink ("home", TRUE, "");
- }
else if (sel == IDCANCEL)
{
if ((LastKnownMountList.ulMountedDrives == 0
@@ -5621,6 +5805,8 @@
AppendMenuW (popup, MF_STRING, IDPM_ADD_TO_FAVORITES, GetString ("IDPM_ADD_TO_FAVORITES"));
AppendMenuW (popup, MF_STRING, IDPM_ADD_TO_SYSTEM_FAVORITES, GetString ("IDPM_ADD_TO_SYSTEM_FAVORITES"));
AppendMenu (popup, MF_SEPARATOR, 0, NULL);
+ AppendMenuW (popup, MF_STRING, IDM_DECRYPT_NONSYS_VOL, GetString ("IDM_DECRYPT_NONSYS_VOL"));
+ AppendMenu (popup, MF_SEPARATOR, 0, NULL);
AppendMenuW (popup, MF_STRING, IDM_VOLUME_PROPERTIES, GetString ("IDPM_PROPERTIES"));
break;
@@ -5672,6 +5858,11 @@
Dismount (hwndDlg, 0);
break;
+ case IDM_DECRYPT_NONSYS_VOL:
+ if (CheckMountList ())
+ DecryptNonSysDevice (FALSE, TRUE);
+ break;
+
case IDPM_OPEN_VOLUME:
{
int state = GetItemLong(GetDlgItem (hwndDlg, IDC_DRIVELIST), ((LPNMITEMACTIVATE)lParam)->iItem );
@@ -5735,12 +5926,6 @@
return 1;
}
- if (lw == IDHELP || lw == IDM_HELP)
- {
- OpenPageHelp (hwndDlg, 0);
- return 1;
- }
-
if (lw == IDM_ABOUT || lw == IDC_LOGO)
{
DialogBoxW (hInst, MAKEINTRESOURCEW (IDD_ABOUT_DLG), hwndDlg, (DLGPROC) AboutDlgProc);
@@ -5813,9 +5998,6 @@
case IDM_PERMANENTLY_DECRYPT_SYS:
DecryptSystemDevice ();
break;
- case IDM_CREATE_HIDDEN_OS:
- CreateHiddenOS ();
- break;
case IDM_SYSENC_RESUME:
ResumeInterruptedSysEncProcess ();
break;
@@ -5871,6 +6053,8 @@
AppendMenuW (popup, MF_STRING, IDM_ADD_REMOVE_VOL_KEYFILES, GetString ("IDM_ADD_REMOVE_VOL_KEYFILES"));
AppendMenuW (popup, MF_STRING, IDM_REMOVE_ALL_KEYFILES_FROM_VOL, GetString ("IDM_REMOVE_ALL_KEYFILES_FROM_VOL"));
AppendMenu (popup, MF_SEPARATOR, 0, NULL);
+ AppendMenuW (popup, MF_STRING, IDM_DECRYPT_NONSYS_VOL, GetString ("IDM_DECRYPT_NONSYS_VOL"));
+ AppendMenu (popup, MF_SEPARATOR, 0, NULL);
AppendMenuW (popup, MF_STRING, IDM_BACKUP_VOL_HEADER, GetString ("IDM_BACKUP_VOL_HEADER"));
AppendMenuW (popup, MF_STRING, IDM_RESTORE_VOL_HEADER, GetString ("IDM_RESTORE_VOL_HEADER"));
}
@@ -5889,6 +6073,17 @@
switch (menuItem)
{
+ case IDM_DECRYPT_NONSYS_VOL:
+ if (!VolumeSelected(hwndDlg))
+ {
+ Warning ("NO_VOLUME_SELECTED");
+ }
+ else
+ {
+ DecryptNonSysDevice (TRUE, FALSE);
+ }
+ break;
+
case IDM_CHANGE_PASSWORD:
if (!VolumeSelected(hwndDlg))
{
@@ -5984,6 +6179,22 @@
return 1;
}
+ 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;
+ }
+
if (lw == IDM_CHANGE_PASSWORD)
{
if (!VolumeSelected(hwndDlg))
@@ -6026,6 +6237,12 @@
return 1;
}
+ if (lw == IDT_INSECURE_APP)
+ {
+ Warning ("INSECURE_APP");
+ return 1;
+ }
+
if (lw == IDC_WIPE_CACHE || lw == IDM_WIPE_CACHE)
{
WipeCache (hwndDlg, FALSE);
@@ -6039,7 +6256,7 @@
return 1;
}
- if (lw == IDC_CREATE_VOLUME || lw == IDM_CREATE_VOLUME || lw == IDM_VOLUME_WIZARD)
+ if (lw == IDM_CREATE_VOLUME || lw == IDM_VOLUME_WIZARD)
{
LaunchVolCreationWizard (hwndDlg, "");
return 1;
@@ -6108,61 +6325,6 @@
return 1;
}
- 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;
- }
-
if (lw == IDM_PREFERENCES)
{
if (IDOK == DialogBoxParamW (hInst,
@@ -6453,7 +6615,7 @@
if (lw == IDM_RESUME_INTERRUPTED_PROC)
{
- ResumeInterruptedNonSysInplaceEncProcess ();
+ ResumeInterruptedNonSysInplaceEncProcess (TRUE);
return 1;
}
@@ -8124,9 +8286,6 @@
SetWindowTextW (GetDlgItem (hwndDlg, IDT_LIMIT_ENC_THREAD_POOL_NOTE), GetString("LIMIT_ENC_THREAD_POOL_NOTE"));
SetDlgItemTextW (hwndDlg, IDC_HW_AES_SUPPORTED_BY_CPU, (wstring (L" ") + (GetString (is_aes_hw_cpu_supported() ? "UISTR_YES" : "UISTR_NO"))).c_str());
-
- ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_HW_ACCELERATION);
- ToHyperlink (hwndDlg, IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION);
}
return 0;
@@ -8237,14 +8396,6 @@
case IDC_BENCHMARK:
Benchmark (hwndDlg);
return 1;
-
- 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;
}
return 0;
@@ -8603,340 +8754,6 @@
}
return TRUE;
-}
-
-
-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);
}
--- Mount/Mount.h Mon Jan 19 14:26:12 1970
+++ Mount/Mount.h Mon Jan 19 14:26:12 1970
@@ -89,10 +89,9 @@
int GetCipherBlockSizeByDriveNo (int nDosDriveNo);
int GetModeOfOperationByDriveNo (int nDosDriveNo);
void ChangeMainWindowVisibility ();
-void LaunchVolCreationWizard (HWND hwndDlg);
BOOL WholeSysDriveEncryption (BOOL bSilent);
BOOL CheckSysEncMountWithoutPBA (const char *devicePath, BOOL quiet);
-BOOL TCBootLoaderOnInactiveSysEncDrive (void);
+BOOL TCBootLoaderOnInactiveSysEncDrive (char *szDevicePath);
void CreateRescueDisk (void);
int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, char *lpszVolume);
int RestoreVolumeHeader (HWND hwndDlg, char *lpszVolume);
@@ -101,7 +100,6 @@
static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void MountSelectedVolume (HWND hwndDlg, BOOL mountWithOptions);
uint32 ReadDriverConfigurationFlags ();
-void AnalyzeKernelMiniDump (HWND hwndDlg);
void HookMouseWheel (HWND hwndDlg, UINT ctrlId);
static BOOL HandleDriveListMouseWheelEvent (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL bListMustBePointed);
--- Mount/Mount.rc Mon Jan 19 14:26:12 1970
+++ Mount/Mount.rc Mon Jan 19 14:26:12 1970
@@ -14,13 +14,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -135,8 +133,6 @@
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "",IDC_DRIVELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,5,360,135
- PUSHBUTTON "&Create Volume",IDC_CREATE_VOLUME,16,159,84,14
- PUSHBUTTON "&Volume Properties...",IDC_VOLUME_PROPERTIES,146,159,84,14
PUSHBUTTON "&Wipe Cache",IDC_WIPE_CACHE,276,159,84,14
COMBOBOX IDC_VOLUME,56,192,212,74,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
CONTROL "&Never save history",IDC_NO_HISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,56,207,122,10
@@ -147,7 +143,7 @@
PUSHBUTTON "&Auto-Mount Devices",IDC_MOUNTALL,100,243,84,18
PUSHBUTTON "Di&smount All",IDC_UNMOUNTALL,192,243,84,18,WS_GROUP
PUSHBUTTON "E&xit",IDC_EXIT,284,243,84,18,WS_GROUP
- 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
GROUPBOX "Volume",IDT_VOLUME,8,179,360,53
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,2,0,372,147
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,282,242,88,20
@@ -155,23 +151,25 @@
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,242,88,20
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,98,242,88,20
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,2,151,372,119
+ LTEXT "WARNING: Using TrueCrypt is not secure",IDT_INSECURE_APP,83,161,141,10,SS_NOTIFY
END
-IDD_PASSWORD_DLG DIALOGEX 0, 0, 280, 68
+IDD_PASSWORD_DLG DIALOGEX 0, 0, 281, 85
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Enter TrueCrypt Volume Password"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_PASSWORD,48,8,153,14,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_PASSWORD,48,7,153,14,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "Cache passwords and keyfil&es in memory",IDC_CACHE,
- "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
END
IDD_TRAVELER_DLG DIALOGEX 0, 0, 300, 269
@@ -277,11 +275,9 @@
CONTROL "",IDC_HW_AES_SUPPORTED_BY_CPU,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,294,21,57,12,WS_EX_CLIENTEDGE
CONTROL "Accelerate AES encryption/decryption by using the AES instructions of the processor (if available)",IDC_ENABLE_HARDWARE_ENCRYPTION,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,18,41,340,17
- LTEXT "More information",IDC_MORE_INFO_ON_HW_ACCELERATION,18,61,165,10,SS_NOTIFY
CONTROL "Do not use the following number of processors for encryption/decryption:",IDC_LIMIT_ENC_THREAD_POOL,
"Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,18,103,283,11
COMBOBOX IDC_ENCRYPTION_FREE_CPU_COUNT,304,101,48,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "More information",IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION,18,159,165,10,SS_NOTIFY
PUSHBUTTON "&Benchmark",IDC_BENCHMARK,7,185,59,14
DEFPUSHBUTTON "OK",IDOK,257,185,50,14
PUSHBUTTON "Cancel",IDCANCEL,313,185,50,14
@@ -313,7 +309,6 @@
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,218,349,11
CONTROL "Do not mount selected volume when 'Mount Favorite Volumes' &hot key is pressed",IDC_FAVORITE_DISABLE_HOTKEY,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,232,349,11
- LTEXT "Help on favorite volumes",IDC_FAVORITES_HELP_LINK,17,259,237,10,SS_NOTIFY
DEFPUSHBUTTON "OK",IDOK,269,257,50,14
PUSHBUTTON "Cancel",IDCANCEL,323,257,50,14
GROUPBOX "",IDC_FAV_VOL_OPTIONS_GROUP_BOX,7,121,366,130
@@ -362,7 +357,7 @@
IDD_PASSWORD_DLG, DIALOG
BEGIN
- BOTTOMMARGIN, 63
+ BOTTOMMARGIN, 80
END
IDD_TRAVELER_DLG, DIALOG
@@ -421,8 +416,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 7,1,1,0
- PRODUCTVERSION 7,1,1,0
+ FILEVERSION 7,2,0,0
+ PRODUCTVERSION 7,2,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -439,11 +434,11 @@
BEGIN
VALUE "CompanyName", "TrueCrypt Foundation"
VALUE "FileDescription", "TrueCrypt"
- VALUE "FileVersion", "7.1a"
+ VALUE "FileVersion", "7.2"
VALUE "LegalTrademarks", "TrueCrypt"
VALUE "OriginalFilename", "TrueCrypt.exe"
VALUE "ProductName", "TrueCrypt"
- VALUE "ProductVersion", "7.1a"
+ VALUE "ProductVersion", "7.2"
END
END
BLOCK "VarFileInfo"
@@ -504,8 +499,9 @@
MENUITEM "Select File...", IDM_SELECT_FILE
MENUITEM "Select Device...", IDM_SELECT_DEVICE
MENUITEM SEPARATOR
+ MENUITEM "Permanently Decrypt...", IDM_DECRYPT_NONSYS_VOL
+ MENUITEM "Resume Interrupted Decryption...", IDM_RESUME_INTERRUPTED_PROC
MENUITEM "Create New Volume...", IDM_CREATE_VOLUME
- MENUITEM "Resume Interrupted Process", IDM_RESUME_INTERRUPTED_PROC
MENUITEM SEPARATOR
MENUITEM "Mount Volume", IDM_MOUNT_VOLUME
MENUITEM "Mount Volume with Options", IDM_MOUNT_VOLUME_OPTIONS
@@ -523,11 +519,9 @@
END
POPUP "S&ystem"
BEGIN
- MENUITEM "Encrypt System Partition/Drive...", IDM_ENCRYPT_SYSTEM_DEVICE
MENUITEM "Permanently Decrypt System Partition/Drive", IDM_PERMANENTLY_DECRYPT_SYS
MENUITEM "Resume Interrupted Process", IDM_SYSENC_RESUME
- MENUITEM SEPARATOR
- MENUITEM "Create Hidden Operating System...", IDM_CREATE_HIDDEN_OS
+ MENUITEM "Encrypt System Partition/Drive...", IDM_ENCRYPT_SYSTEM_DEVICE
MENUITEM SEPARATOR
MENUITEM "Create Rescue Disk...", IDM_CREATE_RESCUE_DISK
MENUITEM "Verify Rescue Disk", IDM_VERIFY_RESCUE_DISK
@@ -588,23 +582,9 @@
END
POPUP "Hel&p"
BEGIN
- 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
MENUITEM "Legal Notices", IDM_LICENSE
MENUITEM "About", IDM_ABOUT
END
- MENUITEM "&Homepage ", IDM_HOMEPAGE
END
@@ -618,7 +598,7 @@
IDS_UACSTRING "TrueCrypt"
END
-#endif // English (U.S.) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
--- Mount/Resource.h Mon Jan 19 14:26:12 1970
+++ Mount/Resource.h Mon Jan 19 14:26:12 1970
@@ -58,168 +58,154 @@
#define IDC_PASSWORD 1035
#define IDC_BROWSE_FILES 1036
#define IDC_SELECT_DEVICE 1037
-#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
// Next default values for new objects
//
@@ -227,8 +213,8 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 118
-#define _APS_NEXT_COMMAND_VALUE 40064
-#define _APS_NEXT_CONTROL_VALUE 1137
+#define _APS_NEXT_COMMAND_VALUE 40053
+#define _APS_NEXT_CONTROL_VALUE 1134
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
--- Release/Setup Files/License.txt Mon Jan 19 14:26:12 1970
+++ Release/Setup Files/License.txt Mon Jan 19 14:26:12 1970
@@ -1,4 +1,4 @@
-TrueCrypt License Version 3.0
+TrueCrypt License Version 3.1
Software distributed under this license is distributed on an "AS
IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND
@@ -112,32 +112,16 @@
TrueCrypt Foundation", "This is a TrueCrypt Foundation
release."
- 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
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
+ 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.org is associated with Your Product.
+ name truecrypt is associated with Your Product.
d. The complete source code of Your Product must be freely
and publicly available (for exceptions, see Section III.2)
--- Resources/Texts/License.rtf Mon Jan 19 14:26:12 1970
+++ Resources/Texts/License.rtf Mon Jan 19 14:26:12 1970
@@ -58,7 +58,7 @@
{\pgdsc1\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt1 Endnote;}
{\pgdsc2\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn567\margtsxn567\margbsxn567\pgdscnxt2 HTML;}}
{\*\pgdscno2}\paperh15840\paperw12240\margl1134\margr567\margt567\margb567\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn567\margtsxn567\margbsxn567\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
-\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
UTES ANY PART OF THE SOFTWARE IS, BY SUCH ACTION(S), ACCEPTING AND AGREEING TO BE BOUND BY ALL TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT ACCEPT THEM, DO NOT USE, COPY, MODIFY, NOR (RE)DISTRIBUTE THE SOFTWARE, NOR ANY PART(S) THEREOF.\line \line \line {\ltrch\hich\b\loch\b I. Definit
ions}\line \line {\ltrch\hich\b\loch\b 1}. "This Product" means the work (including, but not limited to, source code, graphics, texts, and accompanying files) made available under and governed by this version of this license ("License"), as may be indicated by, but is not limited to, copyr
ight notice(s) attached to or included in the work.\line \line {\ltrch\hich\b\loch\b 2}. "You" means (and "Your" refers to) an individual or a legal entity (e.g., a non-profit organization, commercial organization, government agency, etc.) exercising permissions granted by this License.\line \line
@@ -79,12 +79,9 @@
iated materials) must not incorporate and must not be confusingly similar to any of the TrueCrypt logos (including, but not limited to, the non-textual logo consisting primarily of a key in stylized form) or portion(s) thereof. All graphics contained in Th
is Product (logos, icons, etc.) must be removed from Your Product (or from Your modified version of This Product) and from any associated materials.}
\par \pard\plain {\listtext\pard\plain \li707\ri0\lin707\rin0\fi-283\sa283\f2\fs16\f2\fs16\f2\fs16 b.\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 The following phrases must be removed from Your Product and from any associated materials, except the text of this License: "A TrueCrypt Foundation Release", "Released by TrueCrypt Foundation", "This is a TrueCrypt Foundation release."}
-\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.}
\par \pard\plain {\listtext\pard\plain \li707\ri0\lin707\rin0\fi-283\sa283\f2\fs16\f2\fs16\f2\fs16 d.\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 The complete source code of Your Product must be freely and publicly available (for exceptions, see Section III.2) at least until You cease to distribute Your Product. This condition can be met in one or both of the following ways: (i) You include the comp
lete source code of Your Product with every copy of Your Product that You make and distribute and You make all such copies of Your Product available to the general public free of charge, and/or (ii) You include information (valid and correct at least until
You cease to distribute Your Product) about where the complete source code of Your Product can be obtained free of charge (e.g., an Internet address) or for a reasonable reproduction fee with every copy of Your Product that You make and distribute and, if
--- Setup/ComSetup.cpp Mon Jan 19 14:26:12 1970
+++ Setup/ComSetup.cpp Mon Jan 19 14:26:12 1970
@@ -7,7 +7,7 @@
*/
#define TC_MAIN_COM_VERSION_MAJOR 2
-#define TC_MAIN_COM_VERSION_MINOR 4
+#define TC_MAIN_COM_VERSION_MINOR 5
#define TC_FORMAT_COM_VERSION_MAJOR 2
#define TC_FORMAT_COM_VERSION_MINOR 4
--- Setup/Resource.h Mon Jan 19 14:26:12 1970
+++ Setup/Resource.h Mon Jan 19 14:26:12 1970
@@ -16,7 +16,6 @@
#define IDD_INSTL_DLG 111
#define IDD_WIZARD_MODE_PAGE_DLG 112
#define IDD_PROGRESS_PAGE_DLG 113
-#define IDD_DONATIONS_PAGE_DLG 114
#define IDC_DESTINATION 1000
#define IDC_BOX_TITLE 1001
#define IDC_BROWSE 1002
@@ -49,16 +48,15 @@
#define IDC_POS_BOX 1029
#define IDC_BITMAP_SETUP_WIZARD 1030
#define IDC_MAIN_CONTENT_CANVAS 1031
-#define IDC_DONATE 1032
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 115
+#define _APS_NEXT_RESOURCE_VALUE 114
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1033
+#define _APS_NEXT_CONTROL_VALUE 1032
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
--- Setup/Setup.c Mon Jan 19 14:26:12 1970
+++ Setup/Setup.c Mon Jan 19 14:26:12 1970
@@ -481,6 +481,8 @@
}
}
+ DeleteFile ((string(szDestDir) + "\\TrueCrypt User Guide.pdf").c_str());
+
// Language pack
if (bUninstall == FALSE)
{
@@ -533,8 +535,7 @@
strcpy (szTmp, VERSION_STRING);
RegSetValueEx (hkey, "DisplayVersion", 0, REG_SZ, (BYTE *) szTmp, strlen (szTmp) + 1);
- strcpy (szTmp, TC_HOMEPAGE);
- RegSetValueEx (hkey, "URLInfoAbout", 0, REG_SZ, (BYTE *) szTmp, strlen (szTmp) + 1);
+ RegDeleteValue (hkey, "URLInfoAbout");
RegCloseKey (hkey);
}
@@ -658,9 +659,7 @@
if (RegSetValueEx (hkey, "Publisher", 0, REG_SZ, (BYTE *) szTmp, strlen (szTmp) + 1) != ERROR_SUCCESS)
goto error;
- strcpy (szTmp, TC_HOMEPAGE);
- if (RegSetValueEx (hkey, "URLInfoAbout", 0, REG_SZ, (BYTE *) szTmp, strlen (szTmp) + 1) != ERROR_SUCCESS)
- goto error;
+ RegDeleteValue(hkey, "URLInfoAbout");
bOK = TRUE;
@@ -1229,8 +1228,6 @@
if (bProgGroup)
{
- FILE *f;
-
if (mkfulldir (szLinkDir, TRUE) != 0)
{
if (mkfulldir (szLinkDir, FALSE) != 0)
@@ -1252,17 +1249,7 @@
goto error;
sprintf (szTmp2, "%s%s", szLinkDir, "\\TrueCrypt Website.url");
- 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);
sprintf (szTmp, "%s%s", szDir, "TrueCrypt Setup.exe");
sprintf (szTmp2, "%s%s", szLinkDir, "\\Uninstall TrueCrypt.lnk");
@@ -1739,40 +1726,6 @@
outcome:
OutcomePrompt (hwndDlg, bOK);
-
- 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;
- }
- }
- }
- }
-
PostMessage (MainDlg, bOK ? TC_APPMSG_INSTALL_SUCCESS : TC_APPMSG_INSTALL_FAILURE, 0, 0);
}
@@ -2070,6 +2023,8 @@
bDevm = TRUE;
}
}
+ else
+ WarningTopMost ("INSECURE_APP");
if (bMakePackage)
{
--- Setup/Setup.h Mon Jan 19 14:26:12 1970
+++ Setup/Setup.h Mon Jan 19 14:26:12 1970
@@ -19,7 +19,6 @@
// Specifies what files to install, where (determined by the prefix), and in what order
static char *szFiles[]=
{
- "ATrueCrypt User Guide.pdf",
"ALicense.txt",
"ATrueCrypt.exe",
"ATrueCrypt Format.exe",
@@ -32,7 +31,6 @@
// Specifies what files are included in self-extracting packages (no other files will be packaged or extracted).
static char *szCompressedFiles[]=
{
- "TrueCrypt User Guide.pdf",
"License.txt",
"TrueCrypt.exe",
"TrueCrypt Format.exe",
--- Setup/Setup.rc Mon Jan 19 14:26:12 1970
+++ Setup/Setup.rc Mon Jan 19 14:26:12 1970
@@ -14,13 +14,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -28,8 +26,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 7,1,1,0
- PRODUCTVERSION 7,1,1,0
+ FILEVERSION 7,2,0,0
+ PRODUCTVERSION 7,2,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -46,11 +44,11 @@
BEGIN
VALUE "CompanyName", "TrueCrypt Foundation"
VALUE "FileDescription", "TrueCrypt Setup"
- VALUE "FileVersion", "7.1a"
+ VALUE "FileVersion", "7.2"
VALUE "LegalTrademarks", "TrueCrypt"
VALUE "OriginalFilename", "TrueCrypt Setup.exe"
VALUE "ProductName", "TrueCrypt"
- VALUE "ProductVersion", "7.1a"
+ VALUE "ProductVersion", "7.2"
END
END
BLOCK "VarFileInfo"
@@ -136,8 +134,8 @@
DEFPUSHBUTTON "",IDC_NEXT,259,211,50,14
PUSHBUTTON "Cancel",IDCANCEL,317,211,50,14
LTEXT "",IDC_BOX_TITLE,11,5,324,12,0,WS_EX_TRANSPARENT
- 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
CONTROL "",IDC_SETUP_WIZARD_GFX_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,378,36,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
CONTROL "",IDC_HR_BOTTOM,"Static",SS_ETCHEDHORZ,67,204,306,1,WS_EX_STATICEDGE
CONTROL "",IDC_HR,"Static",SS_ETCHEDHORZ,0,35,399,1,WS_EX_STATICEDGE
@@ -177,14 +175,6 @@
CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,139,345,12
END
-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
-
/////////////////////////////////////////////////////////////////////////////
//
@@ -291,14 +281,6 @@
TOPMARGIN, 7
BOTTOMMARGIN, 145
END
-
- IDD_DONATIONS_PAGE_DLG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 339
- TOPMARGIN, 7
- BOTTOMMARGIN, 147
- END
END
#endif // APSTUDIO_INVOKED
@@ -310,7 +292,7 @@
IDB_SETUP_WIZARD BITMAP "TrueCrypt_setup.bmp"
IDB_SETUP_WIZARD_BKG BITMAP "TrueCrypt_setup_background.bmp"
-#endif // English (U.S.) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
--- Setup/Setup.vcproj Mon Jan 19 14:26:12 1970
+++ Setup/Setup.vcproj Mon Jan 19 14:26:12 1970
@@ -255,10 +255,6 @@
/>
</FileConfiguration>
</File>
- <File
- RelativePath="..\Common\Xml.c"
- >
- </File>
<Filter
Name="Common"
>
@@ -324,6 +320,10 @@
</File>
<File
RelativePath="..\Common\Registry.c"
+ >
+ </File>
+ <File
+ RelativePath="..\Common\Xml.c"
>
</File>
</Filter>
--- Setup/Wizard.c Mon Jan 19 14:26:12 1970
+++ Setup/Wizard.c Mon Jan 19 14:26:12 1970
@@ -31,8 +31,7 @@
INSTALL_OPTIONS_PAGE,
INSTALL_PROGRESS_PAGE,
EXTRACTION_OPTIONS_PAGE,
- EXTRACTION_PROGRESS_PAGE,
- DONATIONS_PAGE
+ EXTRACTION_PROGRESS_PAGE
};
HWND hCurPage = NULL; /* Handle to current wizard page */
@@ -50,20 +49,9 @@
BOOL bStartInstall = FALSE;
BOOL bStartExtraction = FALSE;
BOOL bInProgress = FALSE;
-BOOL bPromptTutorial = FALSE;
-BOOL bPromptReleaseNotes = FALSE;
int nPbar = 0; /* Control ID of progress bar */
-static HFONT hDonTextFont;
-static BOOL OsPrngAvailable;
-static HCRYPTPROV hCryptProv;
-static int DonColorSchemeId;
-static COLORREF DonTextColor;
-static COLORREF DonBkgColor;
-
-wstring DonText = L"";
-
void localcleanupwiz (void)
{
/* Delete buffered bitmaps (if any) */
@@ -72,19 +60,6 @@
DeleteObject ((HGDIOBJ) hbmWizardBitmapRescaled);
hbmWizardBitmapRescaled = NULL;
}
-
- if (hCryptProv != 0)
- {
- OsPrngAvailable = FALSE;
- CryptReleaseContext (hCryptProv, 0);
- hCryptProv = 0;
- }
-
- if (hDonTextFont != NULL)
- {
- DeleteObject (hDonTextFont);
- hDonTextFont = NULL;
- }
}
static void InitWizardDestInstallPath (void)
@@ -145,11 +120,6 @@
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_PROGRESS_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
break;
-
- case DONATIONS_PAGE:
- hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_DONATIONS_PAGE_DLG), hwndDlg,
- (DLGPROC) PageDialogProc);
- break;
}
rD.left = 15;
@@ -169,34 +139,6 @@
}
-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);
-}
-
-
/* Except in response to the WM_INITDIALOG message, the dialog box procedure
should return nonzero if it processes the message, and zero if it does
not. - see DialogProc */
@@ -477,109 +419,13 @@
}
return 1;
-
- 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;
}
return 0;
- case WM_HELP:
- if (bLicenseAccepted)
- OpenPageHelp (GetParent (hwndDlg), nCurPageNo);
-
- return 1;
case WM_ENDSESSION:
- bPromptTutorial = FALSE;
- bPromptReleaseNotes = FALSE;
-
EndDialog (MainDlg, 0);
localcleanup ();
return 0;
@@ -676,68 +522,6 @@
}
}
- 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);
- }
return 0;
@@ -840,8 +624,6 @@
SetWindowText (hwndDlg, "TrueCrypt Setup " VERSION_STRING);
- DonColorSchemeId = GetDonVal (2, 9);
-
if (bDevm)
{
InitWizardDestInstallPath ();
@@ -869,21 +651,8 @@
}
return 0;
- case WM_HELP:
- if (bLicenseAccepted)
- OpenPageHelp (hwndDlg, nCurPageNo);
-
- return 1;
-
case WM_COMMAND:
- if (lw == IDHELP)
- {
- if (bLicenseAccepted)
- OpenPageHelp (hwndDlg, nCurPageNo);
-
- return 1;
- }
if (lw == IDCANCEL)
{
PostMessage (hwndDlg, WM_CLOSE, 0, 0);
@@ -903,9 +672,6 @@
if (nCurrentOS == WIN_2000)
{
- 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).");
-
-
HKEY hkey;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Updates\\Windows 2000\\SP5\\Update Rollup 1", 0, KEY_READ, &hkey) != ERROR_SUCCESS)
@@ -961,15 +727,6 @@
return 1;
}
- else if (nCurPageNo == DONATIONS_PAGE)
- {
- // 'Finish' button clicked
-
- PostMessage (hwndDlg, WM_CLOSE, 0, 0);
-
- return 1;
- }
-
LoadPage (hwndDlg, ++nCurPageNo);
return 1;
@@ -1001,37 +758,6 @@
return 0;
-
- 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;
-
-
-
case WM_CTLCOLORSTATIC:
if ((HWND) lParam != GetDlgItem (MainDlg, IDC_MAIN_CONTENT_CANVAS))
@@ -1055,10 +781,6 @@
/* Installation completed successfully */
bInProgress = FALSE;
-
- nCurPageNo = DONATIONS_PAGE;
- LoadPage (hwndDlg, DONATIONS_PAGE);
-
NormalCursor ();
SetWindowTextW (GetDlgItem (hwndDlg, IDC_NEXT), GetString ("FINALIZE"));
@@ -1117,9 +838,6 @@
SetWindowTextW (GetDlgItem (hwndDlg, IDC_NEXT), GetString ("FINALIZE"));
- nCurPageNo = DONATIONS_PAGE;
- LoadPage (hwndDlg, DONATIONS_PAGE);
-
return 1;
case TC_APPMSG_EXTRACTION_FAILURE:
@@ -1166,24 +884,6 @@
if (bOpenContainingFolder && bExtractOnly && bExtractionSuccessful)
{
ShellExecute (NULL, "open", WizardDestExtractPath, NULL, NULL, SW_SHOWNORMAL);
- }
- 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;
}
if (bRestartRequired
--- Setup/Wizard.h Mon Jan 19 14:26:12 1970
+++ Setup/Wizard.h Mon Jan 19 14:26:12 1970
@@ -21,9 +21,6 @@
BOOL CALLBACK PageDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
BOOL CALLBACK MainDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
-extern BOOL bPromptTutorial;
-extern BOOL bPromptReleaseNotes;
-
#ifdef __cplusplus
}
#endif
--- License.html Mon Jan 19 14:26:12 1970
+++ License.html Mon Jan 19 14:26:12 1970
@@ -10,7 +10,7 @@
</style>
</head>
<body>
-<b>TrueCrypt License Version 3.0</b><br>
+<b>TrueCrypt License Version 3.1</b><br>
<br>
Software distributed under this license is distributed on an &quot;AS IS&quot; BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO USES, COPIES, MODIFIES, OR (RE)DISTRIBUTES ANY PART OF THE SOFTWARE IS, BY SUCH ACTION(S), ACCEPTING AND AGREEING TO BE BOUND BY ALL TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT ACCEPT THEM, DO NOT USE, COPY, MODIFY, NOR (RE)DISTRIBUTE THE SOFTWARE, NOR ANY PART(S) THEREOF.<br>
<br>
@@ -40,9 +40,7 @@
<li>The following phrases must be removed from Your Product and from any associated materials, except the text of this License: &quot;A TrueCrypt Foundation Release&quot;, &quot;Released by TrueCrypt Foundation&quot;, &quot;This is a TrueCrypt Foundation release.&quot;<br>
<br>
</li>
- <li>Phrase &quot;<i>Based on TrueCrypt, freely available at http://www.truecrypt.org/</i>&quot; 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 &quot;<i>Portions of this product are based in part on TrueCrypt, freely available at http://www.truecrypt.org/</i>&quot; may be displayed instead. In each of the cases mentioned above in this paragraph, &quot;<i>http://www.truecrypt.org/</i>&quot; 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 &quot;About&quot; 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>
<br>
</li>
<li>The complete source code of Your Product must be freely and publicly available (for exceptions, see Section III.2) at least until You cease to distribute Your Product. This condition can be met in one or both of the following ways: (i) You include the complete source code of Your Product with every copy of Your Product that You make and distribute and You make all such copies of Your Product available to the general public free of charge, and/or (ii) You include information (valid and correct at least until You cease to distribute Your Product) about where the complete source code of Your Product can be obtained free of charge (e.g., an Internet address) or for a reasonable reproduction fee with every copy of Your Product that You make and distribute and, if there is a web site officially associated with Your Product, You include the aforementioned information about the source code on a freely and publicly accessible web page to which such web site links via an easily viewable hyperlink (at least until You cease to distribute Your Product).<br>
--- License.txt Mon Jan 19 14:26:12 1970
+++ License.txt Mon Jan 19 14:26:12 1970
@@ -1,4 +1,4 @@
-TrueCrypt License Version 3.0
+TrueCrypt License Version 3.1
Software distributed under this license is distributed on an "AS
IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND
@@ -112,32 +112,16 @@
TrueCrypt Foundation", "This is a TrueCrypt Foundation
release."
- 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
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
+ 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.org is associated with Your Product.
+ name truecrypt is associated with Your Product.
d. The complete source code of Your Product must be freely
and publicly available (for exceptions, see Section III.2)
--- Readme.txt Mon Jan 19 14:26:12 1970
+++ Readme.txt Mon Jan 19 14:26:12 1970
@@ -1,4 +1,12 @@
-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.
+
Important
@@ -24,14 +32,6 @@
Requirements for Building TrueCrypt for Linux and Mac OS X
Instructions for Building TrueCrypt for Linux and Mac OS X
-III. FreeBSD and OpenSolaris
-
-IV. Third-Party Developers (Contributors)
-
-V. Legal Information
-
-VI. Further Information
-
I. Windows
@@ -41,33 +41,14 @@
------------------------------------------------
- Microsoft Visual C++ 2008 SP1 (Professional Edition or compatible)
-- Microsoft Visual C++ 1.52 (available from MSDN Subscriber Downloads)
+- Microsoft Visual C++ 1.52
- Microsoft Windows SDK for Windows 7 (configured for Visual C++)
- Microsoft Windows Driver Kit 7.1.0 (build 7600.16385.1)
- RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
- header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
+ header files
- NASM assembler 2.08 or compatible
- gzip compressor
-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).
-
Instructions for Building TrueCrypt for Windows:
------------------------------------------------
@@ -111,13 +92,11 @@
- NASM assembler 2.08 or compatible (x86/x64 architecture only)
- pkg-config
- wxWidgets 2.8 shared library and header files installed or
- 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
- RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
- 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'
Instructions for Building TrueCrypt for Linux and Mac OS X:
@@ -152,58 +131,3 @@
$ make NOGUI=1 WX_ROOT=/usr/src/wxWidgets wxbuild
$ make NOGUI=1 WXSTATIC=1
-
-
-
-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment