1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-12 11:28:26 -06:00

PlatformInfo read. (via ReadEfiConfig)

It is displayed in System settings
This commit is contained in:
kavsrf
2017-02-09 00:28:02 +03:00
committed by Mounir IDRASSI
parent a075d45a99
commit 46cd09ef50
11 changed files with 38 additions and 24 deletions

View File

@@ -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)

View File

@@ -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);
};

View File

@@ -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");

View File

@@ -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

View File

@@ -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