VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/Mount.c57
-rw-r--r--src/Mount/Mount.rc25
-rw-r--r--src/Mount/Resource.h4
3 files changed, 60 insertions, 26 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 6c1aeedf..32f57a4e 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -10899,6 +10899,7 @@ void SecurityTokenPreferencesDialog (HWND hwndDlg)
DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_TOKEN_PREFERENCES), hwndDlg, (DLGPROC) SecurityTokenPreferencesDlgProc, 0);
}
+INT_PTR TextEditDialogBox (int type, HWND parent, const WCHAR* Title, std::string& text);
static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -10916,21 +10917,9 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA
return 1;
}
- byte platforminfo[10*1024];
- platforminfo[0] = 0;
- DWORD cbread;
- try
- {
- BootEncObj->ReadEfiConfig(L"\\EFI\\VeraCrypt\\PlatformInfo", platforminfo, 10*1024 - 1, &cbread);
- platforminfo[cbread - 1] = 0;
- }
- catch (Exception &e) { }
- SetDlgItemTextA (hwndDlg, IDC_PLATFORMINFO, (char*)platforminfo);
-
try
{
LocalizeDialog (hwndDlg, "IDD_SYSENC_SETTINGS");
-
uint32 driverConfig = ReadDriverConfigurationFlags();
byte userConfig;
string customUserMessage;
@@ -10983,6 +10972,50 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA
case IDCANCEL:
EndDialog (hwndDlg, lw);
return 1;
+ case IDB_SHOW_PLATFORMINFO:
+ {
+ try
+ {
+ std::string platforminfo;
+ DWORD sz;
+ std::wstring path;
+ GetVolumeESP(path);
+ path += L"\\EFI\\VeraCrypt\\PlatformInfo";
+ File fPlatformInfo(path);
+ fPlatformInfo.GetFileSize(sz);
+ platforminfo.resize(sz + 1);
+ platforminfo[sz] = 0;
+ fPlatformInfo.Read((byte*)&platforminfo[0], sz);
+ TextEditDialogBox(0, hwndDlg, L"PlatformInfo", platforminfo);
+ }
+ catch (Exception &e) { e.Show(hwndDlg); }
+ }
+ return 0;
+
+ case IDB_EDIT_DCSPROP:
+ {
+ try
+ {
+ std::string dcsprop;
+ DWORD sz;
+ std::wstring path;
+ GetVolumeESP(path);
+ path += L"\\EFI\\VeraCrypt\\DcsProp";
+ File f1(path);
+ f1.GetFileSize(sz);
+ dcsprop.resize(sz + 1);
+ dcsprop[sz] = 0;
+ f1.Read((byte*)&dcsprop[0], sz);
+ f1.Close();
+ if(TextEditDialogBox(0, hwndDlg, L"DcsProp", dcsprop) == IDOK) {
+ File f2(path,false,true);
+ f2.Write((byte*)&dcsprop[0], dcsprop.length());
+ f2.Close();
+ }
+ }
+ catch (Exception &e) { e.Show(hwndDlg); }
+ }
+ return 0;
case IDOK:
{
diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc
index 2b703f07..46d385ba 100644
--- a/src/Mount/Mount.rc
+++ b/src/Mount/Mount.rc
@@ -285,24 +285,25 @@ BEGIN
LTEXT "",IDT_PKCS11_LIB_HELP,16,63,286,65
END
-IDD_EFI_SYSENC_SETTINGS DIALOGEX 0, 0, 370, 245
+IDD_EFI_SYSENC_SETTINGS DIALOGEX 0, 0, 367, 134
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt - System Encryption Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Cache pre-boot authentication password in driver memory (for mounting of non-system volumes)",IDC_BOOT_LOADER_CACHE_PASSWORD,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,79,339,10
- DEFPUSHBUTTON "OK",IDOK,267,225,50,14
- PUSHBUTTON "Cancel",IDCANCEL,318,225,50,14
- GROUPBOX "Boot Loader Screen Options",IDT_BOOT_LOADER_SCREEN_OPTIONS,8,7,355,53
- GROUPBOX "Security Options",IDT_SECURITY_OPTIONS,8,64,355,44
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,90,339,10
+ DEFPUSHBUTTON "OK",IDOK,261,120,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,315,120,50,14
+ GROUPBOX "Boot Loader Screen Options",IDT_BOOT_LOADER_SCREEN_OPTIONS,8,7,355,65
+ GROUPBOX "Security Options",IDT_SECURITY_OPTIONS,6,75,355,44
CONTROL "Include PIM when caching pre-boot authentication password",IDC_BOOT_LOADER_CACHE_PIM,
- "Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,18,94,340,10
+ "Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,16,105,340,10
CONTROL "Do not request PIM in the pre-boot authentication screen (PIM value is stored unencrypted on disk)",IDC_DISABLE_BOOT_LOADER_PIM_PROMPT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,20,339,9
CONTROL "Do not request Hash algorithm in the pre-boot authentication screen",IDC_DISABLE_BOOT_LOADER_HASH_PROMPT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,35,339,9
- EDITTEXT IDC_PLATFORMINFO,9,111,351,111,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_VSCROLL | WS_HSCROLL
+ PUSHBUTTON "Show PlatformInfo",IDB_SHOW_PLATFORMINFO,75,51,68,14
+ DEFPUSHBUTTON "Edit DcsProp",IDB_EDIT_DCSPROP,15,51,50,14
END
IDD_PERFORMANCE_SETTINGS DIALOGEX 0, 0, 370, 248
@@ -482,9 +483,9 @@ BEGIN
IDD_EFI_SYSENC_SETTINGS, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 363
+ RIGHTMARGIN, 360
TOPMARGIN, 7
- BOTTOMMARGIN, 235
+ BOTTOMMARGIN, 124
END
IDD_PERFORMANCE_SETTINGS, DIALOG
@@ -546,11 +547,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt"
- VALUE "FileVersion", "1.20-BETA2"
+ VALUE "FileVersion", "1.20-BETA2p1"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.20-BETA2"
+ VALUE "ProductVersion", "1.20-BETA2p1"
END
END
BLOCK "VarFileInfo"
diff --git a/src/Mount/Resource.h b/src/Mount/Resource.h
index 83e30b2d..c3a61c6e 100644
--- a/src/Mount/Resource.h
+++ b/src/Mount/Resource.h
@@ -184,8 +184,8 @@
#define IDC_HIDE_WAITING_DIALOG 1161
#define IDC_DISABLE_BOOT_LOADER_HASH_PROMPT 1162
#define IDC_SECURE_DESKTOP_PASSWORD_ENTRY 1163
-#define IDB_PLATFORMINFO 1164
-#define IDC_PLATFORMINFO 1165
+#define IDB_SHOW_PLATFORMINFO 1164
+#define IDB_EDIT_DCSPROP 1165
#define IDM_HELP 40001
#define IDM_ABOUT 40002
#define IDM_UNMOUNT_VOLUME 40003