VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
Diffstat (limited to 'src/Format')
-rw-r--r--src/Format/Format.rc8
-rw-r--r--src/Format/InPlace.c8
-rw-r--r--src/Format/Tcformat.c14
3 files changed, 15 insertions, 15 deletions
diff --git a/src/Format/Format.rc b/src/Format/Format.rc
index c3395888..057fd837 100644
--- a/src/Format/Format.rc
+++ b/src/Format/Format.rc
@@ -11,63 +11,63 @@
#include "..\\common\\resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,26,19,0
- PRODUCTVERSION 1,26,19,0
+ FILEVERSION 1,26,20,0
+ PRODUCTVERSION 1,26,20,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Format"
- VALUE "FileVersion", "1.26.19"
+ VALUE "FileVersion", "1.26.20"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt Format.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.26.19"
+ VALUE "ProductVersion", "1.26.20"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// HEADER
//
IDR_FORMAT_RSRC_HEADER HEADER "resource.h"
/////////////////////////////////////////////////////////////////////////////
//
// TYPELIB
//
diff --git a/src/Format/InPlace.c b/src/Format/InPlace.c
index 958218c2..0c35ccce 100644
--- a/src/Format/InPlace.c
+++ b/src/Format/InPlace.c
@@ -1344,41 +1344,41 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
}
deviceSize = GetDeviceSize (devicePath);
if (deviceSize < 0)
{
// Cannot determine the size of the partition
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
// 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 (hwndDlg, driveLetter, TRUE))
{
handleWin32Error (hwndDlg, SRC_POS);
- AbortProcess ("CANT_DISMOUNT_VOLUME");
+ AbortProcess ("CANT_UNMOUNT_VOLUME");
}
}
StringCchCopyW (deviceName, ARRAYSIZE(deviceName), devicePath);
if (FakeDosNameForDevice (deviceName, dosDev, sizeof(dosDev), devName, sizeof(devName), FALSE) != 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
dev = OpenPartitionVolume (hwndDlg, devName,
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)
FALSE); // Non-silent mode
if (dev == INVALID_HANDLE_VALUE)
@@ -2004,68 +2004,68 @@ static int DismountFileSystem (HWND hwndDlg, HANDLE dev,
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 (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_DISMOUNT_FILESYS", TRUE);
+ ShowInPlaceEncErrMsgWAltSteps (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_UNMOUNT_FILESYS", TRUE);
return ERR_DONT_REPORT;
}
if (bForcedRequiresConfirmation
&& !bSilent
- && AskWarnYesNo ("VOL_LOCK_FAILED_OFFER_FORCED_DISMOUNT", hwndDlg) == IDNO)
+ && AskWarnYesNo ("VOL_LOCK_FAILED_OFFER_FORCED_UNMOUNT", hwndDlg) == 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 (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_DISMOUNT_FILESYS", TRUE);
+ ShowInPlaceEncErrMsgWAltSteps (hwndDlg, "INPLACE_ENC_CANT_LOCK_OR_UNMOUNT_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];
DWORD nbrBytesProcessed, nbrBytesProcessed2;
int i;
LARGE_INTEGER offset;
DWORD dwError;
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 4afeb174..d26564fc 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -7837,41 +7837,41 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
}
if (KeyFilesEnable)
{
KeyFilesApply (hwndDlg, &volumePassword, FirstKeyFile, NULL);
}
if (!bInPlaceEncNonSys)
{
/* Mount the volume which is to host the new hidden volume as read only */
if (hiddenVolHostDriveNo >= 0) // If the hidden volume host is currently mounted (e.g. after previous unsuccessful dismount attempt)
{
BOOL tmp_result;
// Dismount the hidden volume host (in order to remount it as read-only subsequently)
while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE)))
{
- if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY)
+ if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY)
{
// Cancel
NormalCursor();
return 1;
}
}
if (tmp_result) // If dismounted
hiddenVolHostDriveNo = -1;
}
if (hiddenVolHostDriveNo < 0) // If the hidden volume host is not mounted
{
int retCode;
// Mount the hidden volume host as read-only (to ensure consistent and secure
// results of the volume bitmap scanning)
switch (MountHiddenVolHost (hwndDlg, szDiskFile, &hiddenVolHostDriveNo, &volumePassword, hash_algo, volumePim, TRUE))
{
case ERR_NO_FREE_DRIVES:
NormalCursor ();
@@ -7915,41 +7915,41 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
case 1:
// Determine the maximum possible size of the hidden volume
if (DetermineMaxHiddenVolSize (hwndDlg) < 1)
{
// Non-fatal error while determining maximum possible size of the hidden volume
NormalCursor();
return 1;
}
else
{
BOOL tmp_result;
/* Maximum possible size of the hidden volume successfully determined */
// Dismount the hidden volume host
while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE)))
{
- if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY)
+ if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY)
{
// Cancel
NormalCursor();
return 1;
}
}
if (tmp_result) // If dismounted
{
hiddenVolHostDriveNo = -1;
bHiddenVolHost = FALSE;
bHiddenVolFinished = FALSE;
// save the outer volume password to use it for comparison with hidden volume one
memcpy (&outerVolumePassword, &volumePassword, sizeof (volumePassword));
outerVolumePim = volumePim;
// Clear the outer volume password
WipePasswordsAndKeyfiles (false);
@@ -8006,41 +8006,41 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
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, SRC_POS);
- AbortProcess ("CANT_DISMOUNT_VOLUME");
+ AbortProcess ("CANT_UNMOUNT_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, hash_algo, volumePim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
{
NormalCursor();
@@ -8061,55 +8061,55 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
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, SRC_POS);
- AbortProcess ("CANT_DISMOUNT_VOLUME");
+ AbortProcess ("CANT_UNMOUNT_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, hash_algo, volumePim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
{
NormalCursor();
return 1;
}
if (!UnmountVolume (hwndDlg, driveNo, TRUE))
{
handleWin32Error (MainDlg, SRC_POS);
- AbortProcess ("CANT_DISMOUNT_VOLUME");
+ AbortProcess ("CANT_UNMOUNT_VOLUME");
}
BOOL tmpbDevice;
CreateFullVolumePath (szDiskFile, sizeof(szDiskFile), szFileName, &tmpbDevice);
nVolumeSize = GetDeviceSize (szDiskFile);
if (nVolumeSize == -1)
{
handleWin32Error (MainDlg, SRC_POS);
AbortProcessSilent ();
}
nNewPageNo = NONSYS_INPLACE_ENC_TRANSFORM_PAGE - 1; // Skip irrelevant pages
NormalCursor();
}
}
else if (nCurPageNo == FILESYS_PAGE)
{
@@ -8698,41 +8698,41 @@ retryCDDriveCheck:
SetWindowTextW (GetDlgItem (MainDlg, IDCANCEL), GetString ("CANCEL"));
bHiddenVolFinished = FALSE;
WipePasswordsAndKeyfiles (true);
return 1;
}
else
{
/* We're going to scan the bitmap of the hidden volume host (in the non-Direct hidden volume wizard mode) */
int retCode;
WaitCursor ();
if (hiddenVolHostDriveNo != -1) // If the hidden volume host is mounted
{
BOOL tmp_result;
// Dismount the hidden volume host (in order to remount it as read-only subsequently)
CloseVolumeExplorerWindows (hwndDlg, hiddenVolHostDriveNo);
while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE)))
{
- if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL | MB_ICONERROR | MB_SETFOREGROUND) != IDRETRY)
+ if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL | MB_ICONERROR | MB_SETFOREGROUND) != IDRETRY)
{
// Cancel
NormalCursor();
return 1;
}
}
if (tmp_result) // If dismounted
hiddenVolHostDriveNo = -1;
}
if (hiddenVolHostDriveNo < 0) // If the hidden volume host is not mounted
{
// Remount the hidden volume host as read-only (to ensure consistent and secure
// results of the volume bitmap scanning)
switch (MountHiddenVolHost (hwndDlg, szDiskFile, &hiddenVolHostDriveNo, &volumePassword, hash_algo, volumePim, TRUE))
{
case ERR_NO_FREE_DRIVES:
MessageBoxW (hwndDlg, GetString ("NO_FREE_DRIVE_FOR_OUTER_VOL"), lpszTitle, ICON_HAND);
NormalCursor ();
return 1;
@@ -8767,41 +8767,41 @@ retryCDDriveCheck:
case 0: // Unsupported file system (or other non-fatal error which has already been reported)
NormalCursor ();
return 1;
case 1: // Success
{
BOOL tmp_result;
// Determine the maximum possible size of the hidden volume
if (DetermineMaxHiddenVolSize (hwndDlg) < 1)
{
NormalCursor ();
goto ovf_end;
}
/* Maximum possible size of the hidden volume successfully determined */
// Dismount the hidden volume host
while (!(tmp_result = UnmountVolume (hwndDlg, hiddenVolHostDriveNo, TRUE)))
{
- if (MessageBoxW (hwndDlg, GetString ("CANT_DISMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY)
+ if (MessageBoxW (hwndDlg, GetString ("CANT_UNMOUNT_OUTER_VOL"), lpszTitle, MB_RETRYCANCEL) != IDRETRY)
{
// Cancel
NormalCursor ();
goto ovf_end;
}
}
// Prevent having to recreate the outer volume due to inadvertent exit
bConfirmQuit = TRUE;
hiddenVolHostDriveNo = -1;
nNewPageNo = HIDDEN_VOL_HOST_PRE_CIPHER_PAGE;
// save the outer volume password to use it for comparison with hidden volume one
memcpy (&outerVolumePassword, &volumePassword, sizeof (volumePassword));
outerVolumePim = volumePim;
// Clear the outer volume password
WipePasswordsAndKeyfiles (false);