diff options
Diffstat (limited to 'src/Mount')
-rw-r--r-- | src/Mount/Mount.c | 40 | ||||
-rw-r--r-- | src/Mount/Mount.rc | 1 | ||||
-rw-r--r-- | src/Mount/Resource.h | 3 |
3 files changed, 36 insertions, 8 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 84baea17..2a4f8030 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -1092,6 +1092,7 @@ static void PopulateSysEncContextMenu (HMENU popup, BOOL bToolsOnly) AppendMenu (popup, MF_SEPARATOR, 0, "");
AppendMenuW (popup, MF_STRING, IDM_CREATE_RESCUE_DISK, GetString ("IDM_CREATE_RESCUE_DISK"));
AppendMenuW (popup, MF_STRING, IDM_VERIFY_RESCUE_DISK, GetString ("IDM_VERIFY_RESCUE_DISK"));
+ AppendMenuW (popup, MF_STRING, IDM_VERIFY_RESCUE_DISK_ISO, GetString ("IDM_VERIFY_RESCUE_DISK_ISO"));
}
if (!bToolsOnly)
@@ -5567,7 +5568,7 @@ void CreateRescueDisk (HWND hwndDlg) Warning ("SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE", hwndDlg);
}
-static void VerifyRescueDisk (HWND hwndDlg)
+static void VerifyRescueDisk (HWND hwndDlg, bool checkIsoFile)
{
try
{
@@ -5598,7 +5599,7 @@ static void VerifyRescueDisk (HWND hwndDlg) {
try
{
- if (AskOkCancel ("RESCUE_DISK_NON_WIZARD_CHECK_INSERT", hwndDlg) != IDOK)
+ if (!checkIsoFile && (AskOkCancel ("RESCUE_DISK_NON_WIZARD_CHECK_INSERT", hwndDlg) != IDOK))
{
CloseSysEncMutex ();
return;
@@ -5607,11 +5608,33 @@ static void VerifyRescueDisk (HWND hwndDlg) // Create a temporary up-to-date rescue disk image in RAM (with it the CD/DVD content will be compared)
BootEncObj->CreateRescueIsoImage (false, "");
- WaitCursor();
- if (!BootEncObj->VerifyRescueDisk ())
- Error ("RESCUE_DISK_NON_WIZARD_CHECK_FAILED", hwndDlg);
+
+ if (checkIsoFile)
+ {
+ char szRescueDiskISO [TC_MAX_PATH+1];
+ char initialDir[MAX_PATH];
+ SHGetFolderPath (NULL, CSIDL_MYDOCUMENTS, NULL, 0, initialDir);
+
+ if (!BrowseFilesInDir (hwndDlg, "OPEN_TITLE", initialDir, szRescueDiskISO, FALSE, FALSE, NULL, L"VeraCrypt Rescue Disk.iso", L"iso"))
+ {
+ CloseSysEncMutex ();
+ return;
+ }
+
+ WaitCursor();
+ if (!BootEncObj->VerifyRescueDiskIsoImage (szRescueDiskISO))
+ Error ("RESCUE_DISK_ISO_IMAGE_CHECK_FAILED", hwndDlg);
+ else
+ Info ("RESCUE_DISK_ISO_IMAGE_CHECK_PASSED", hwndDlg);
+ }
else
- Info ("RESCUE_DISK_NON_WIZARD_CHECK_PASSED", hwndDlg);
+ {
+ WaitCursor();
+ if (!BootEncObj->VerifyRescueDisk ())
+ Error ("RESCUE_DISK_NON_WIZARD_CHECK_FAILED", hwndDlg);
+ else
+ Info ("RESCUE_DISK_NON_WIZARD_CHECK_PASSED", hwndDlg);
+ }
}
catch (Exception &e)
{
@@ -7136,7 +7159,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa CreateRescueDisk (hwndDlg);
break;
case IDM_VERIFY_RESCUE_DISK:
- VerifyRescueDisk (hwndDlg);
+ VerifyRescueDisk (hwndDlg, false);
+ break;
+ case IDM_VERIFY_RESCUE_DISK_ISO:
+ VerifyRescueDisk (hwndDlg, true);
break;
case IDM_MOUNT_SYSENC_PART_WITHOUT_PBA:
diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc index 4d40c358..2365998b 100644 --- a/src/Mount/Mount.rc +++ b/src/Mount/Mount.rc @@ -588,6 +588,7 @@ BEGIN MENUITEM SEPARATOR
MENUITEM "Create Rescue Disk...", IDM_CREATE_RESCUE_DISK
MENUITEM "Verify Rescue Disk", IDM_VERIFY_RESCUE_DISK
+ MENUITEM "Verify Rescue Disk ISO Image",IDM_VERIFY_RESCUE_DISK_ISO
MENUITEM SEPARATOR
MENUITEM "Mount Without Pre-Boot &Authentication...", IDM_MOUNT_SYSENC_PART_WITHOUT_PBA
MENUITEM SEPARATOR
diff --git a/src/Mount/Resource.h b/src/Mount/Resource.h index 78642bf2..8301b2dc 100644 --- a/src/Mount/Resource.h +++ b/src/Mount/Resource.h @@ -239,6 +239,7 @@ #define IDM_VOLUME_EXPANDER 40065
#define IDM_DEFAULT_MOUNT_PARAMETERS 40066
#define IDM_DECRYPT_NONSYS_VOL 40067
+#define IDM_VERIFY_RESCUE_DISK_ISO 40068
// Next default values for new objects
//
@@ -246,7 +247,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 119
-#define _APS_NEXT_COMMAND_VALUE 40068
+#define _APS_NEXT_COMMAND_VALUE 40069
#define _APS_NEXT_CONTROL_VALUE 1151
#define _APS_NEXT_SYMED_VALUE 101
#endif
|