VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2017-02-09 00:28:02 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 17:45:45 +0200
commit46cd09ef50bb63fa2b30b9c4f9fd284e130a46d4 (patch)
tree152e3767b8ae81a2dd6dc7e5e81e1411e02ce7e3 /src/Mount
parenta075d45a99d31340c0de57262cd18eb717c3722a (diff)
downloadVeraCrypt-46cd09ef50bb63fa2b30b9c4f9fd284e130a46d4.tar.gz
VeraCrypt-46cd09ef50bb63fa2b30b9c4f9fd284e130a46d4.zip
PlatformInfo read. (via ReadEfiConfig)
It is displayed in System settings
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/MainCom.cpp4
-rw-r--r--src/Mount/MainCom.idl2
-rw-r--r--src/Mount/Mount.c11
-rw-r--r--src/Mount/Mount.rc9
-rw-r--r--src/Mount/Resource.h4
5 files changed, 22 insertions, 8 deletions
diff --git a/src/Mount/MainCom.cpp b/src/Mount/MainCom.cpp
index 6056697c..13e1e67a 100644
--- a/src/Mount/MainCom.cpp
+++ b/src/Mount/MainCom.cpp
@@ -188,9 +188,9 @@ public:
return BaseCom::GetEfiBootDeviceNumber (pSdn);
}
- virtual DWORD STDMETHODCALLTYPE ReadEfiConfig (BSTR* pContent, DWORD *pcbRead)
+ virtual DWORD STDMETHODCALLTYPE ReadEfiConfig (BSTR filename, BSTR* pContent, DWORD *pcbRead)
{
- return BaseCom::ReadEfiConfig (pContent, pcbRead);
+ return BaseCom::ReadEfiConfig (filename, pContent, pcbRead);
}
virtual DWORD STDMETHODCALLTYPE WriteEfiBootSectorUserConfig (DWORD userConfig, BSTR customUserMessage, int pim, int hashAlg)
diff --git a/src/Mount/MainCom.idl b/src/Mount/MainCom.idl
index 9c3ef372..3b1c62d8 100644
--- a/src/Mount/MainCom.idl
+++ b/src/Mount/MainCom.idl
@@ -50,7 +50,7 @@ library TrueCryptMainCom
DWORD BackupEfiSystemLoader ();
DWORD RestoreEfiSystemLoader ();
DWORD GetEfiBootDeviceNumber (BSTR* pSdn);
- DWORD ReadEfiConfig (BSTR* pContent, DWORD *pcbRead);
+ DWORD ReadEfiConfig (BSTR filename, BSTR* pContent, DWORD *pcbRead);
DWORD WriteEfiBootSectorUserConfig (DWORD userConfig, BSTR customUserMessage, int pim, int hashAlg);
};
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 50f6e8f0..6c1aeedf 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -10916,6 +10916,17 @@ 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");
diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc
index ff2ab845..2b703f07 100644
--- a/src/Mount/Mount.rc
+++ b/src/Mount/Mount.rc
@@ -285,15 +285,15 @@ BEGIN
LTEXT "",IDT_PKCS11_LIB_HELP,16,63,286,65
END
-IDD_EFI_SYSENC_SETTINGS DIALOGEX 0, 0, 370, 139
+IDD_EFI_SYSENC_SETTINGS DIALOGEX 0, 0, 370, 245
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,257,115,50,14
- PUSHBUTTON "Cancel",IDCANCEL,313,115,50,14
+ 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
CONTROL "Include PIM when caching pre-boot authentication password",IDC_BOOT_LOADER_CACHE_PIM,
@@ -302,6 +302,7 @@ BEGIN
"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
END
IDD_PERFORMANCE_SETTINGS DIALOGEX 0, 0, 370, 248
@@ -483,7 +484,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 363
TOPMARGIN, 7
- BOTTOMMARGIN, 129
+ BOTTOMMARGIN, 235
END
IDD_PERFORMANCE_SETTINGS, DIALOG
diff --git a/src/Mount/Resource.h b/src/Mount/Resource.h
index 0c863386..83e30b2d 100644
--- a/src/Mount/Resource.h
+++ b/src/Mount/Resource.h
@@ -184,6 +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 IDM_HELP 40001
#define IDM_ABOUT 40002
#define IDM_UNMOUNT_VOLUME 40003
@@ -260,7 +262,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 120
#define _APS_NEXT_COMMAND_VALUE 40069
-#define _APS_NEXT_CONTROL_VALUE 1164
+#define _APS_NEXT_CONTROL_VALUE 1166
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif