diff options
Diffstat (limited to 'src/Common/BootEncryption.h')
-rw-r--r-- | src/Common/BootEncryption.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/Common/BootEncryption.h b/src/Common/BootEncryption.h index a94f1918..ddf6f3e5 100644 --- a/src/Common/BootEncryption.h +++ b/src/Common/BootEncryption.h @@ -18,16 +18,6 @@ #include "Exception.h" #include "Platform/PlatformBase.h" #include "Volumes.h" -#include <Winternl.h> - -#define SYSPARTITIONINFORMATION 0x62 - -typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)( - SYSTEM_INFORMATION_CLASS SystemInformationClass, - PVOID SystemInformation, - ULONG SystemInformationLength, - PULONG ReturnLength -); typedef ULONG (WINAPI *RtlNtStatusToDosErrorFn)( NTSTATUS Status @@ -209,7 +199,7 @@ namespace VeraCrypt bool IsEfiBoot(); void DeleteStartExec(uint16 statrtOrderNum = 0xDC5B, wchar_t* type = NULL); - void SetStartExec(wstring description, wstring execPath, bool setBootNext = true, uint16 statrtOrderNum = 0xDC5B, wchar_t* type = NULL, uint32 attr = 1); + void SetStartExec(wstring description, wstring execPath, bool setBootEntry = true, bool forceFirstBootEntry = true, bool setBootNext = true, uint16 statrtOrderNum = 0xDC5B, wchar_t* type = NULL, uint32 attr = 1); void SaveFile(const wchar_t* name, byte* data, DWORD size); void GetFileSize(const wchar_t* name, unsigned __int64& size); void ReadFile(const wchar_t* name, byte* data, DWORD size); @@ -240,7 +230,7 @@ namespace VeraCrypt class BootEncryption { public: - BootEncryption (HWND parent, bool postOOBE = false, bool setBootNext = false); + BootEncryption (HWND parent, bool postOOBE = false, bool setBootEntry = true, bool forceFirstBootEntry = true, bool setBootNext = false); ~BootEncryption (); enum FilterType @@ -323,6 +313,8 @@ namespace VeraCrypt void RestoreSystemLoader (); static void UpdateSetupConfigFile (bool bForInstall); void GetSecureBootConfig (BOOL* pSecureBootEnabled, BOOL *pVeraCryptKeysLoaded); + bool IsUsingUnsupportedAlgorithm(LONG driverVersion); + void NotifyService (DWORD dwNotifyCmd); protected: static const uint32 RescueIsoImageSize = 1835008; // Size of ISO9660 image with bootable emulated 1.44MB floppy disk image @@ -353,6 +345,8 @@ namespace VeraCrypt bool VolumeHeaderValid; bool PostOOBEMode; bool SetBootNext; + bool SetBootEntry; + bool ForceFirstBootEntry; }; } @@ -368,9 +362,12 @@ namespace VeraCrypt #define TC_SYSTEM_FAVORITES_SERVICE_LOAD_ORDER_GROUP L"Event Log" #define TC_SYSTEM_FAVORITES_SERVICE_CMDLINE_OPTION L"/systemFavoritesService" #define VC_SYSTEM_FAVORITES_SERVICE_ARG_SKIP_MOUNT L"/SkipMount" +#define VC_SYSTEM_FAVORITES_SERVICE_ARG_UPDATE_LOADER L"/UpdateLoader" #define VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER 0x1 #define VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT 0x2 +#define VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_SET_BOOTENTRY 0x4 +#define VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_FORCE_FIRST_BOOTENTRY 0x8 #define VC_WINDOWS_UPGRADE_POSTOOBE_CMDLINE_OPTION L"/PostOOBE" |