From a21b2270e8db93d231fa0a3d60776043c9a0f9bc Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 4 Dec 2021 23:55:41 +0100 Subject: Windows: Implement TESTSIGNING build configuration that allows running under Windows Vista,7, 8 and 8.1. --- src/Common/Dlgcode.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/Common/Dlgcode.h') diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index 6370c2a7..3d521a21 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -18,6 +18,7 @@ #include "Apidrvr.h" #include "Keyfiles.h" #include "Wipe.h" +#include #ifdef __cplusplus extern "C" { @@ -250,6 +251,28 @@ typedef enum BitLockerEncryptionStatus BL_Status_Protected } BitLockerEncryptionStatus; +#ifndef CODEINTEGRITY_OPTION_ENABLED + +#define CODEINTEGRITY_OPTION_ENABLED 0x01 +#define CODEINTEGRITY_OPTION_TESTSIGN 0x02 + +typedef struct _SYSTEM_CODEINTEGRITY_INFORMATION { + ULONG Length; + ULONG CodeIntegrityOptions; +} SYSTEM_CODEINTEGRITY_INFORMATION, *PSYSTEM_CODEINTEGRITY_INFORMATION; + +#endif + +#define SYSPARTITIONINFORMATION 0x62 +#define SYSTEMCODEINTEGRITYINFORMATION 0x67 + +typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)( + SYSTEM_INFORMATION_CLASS SystemInformationClass, + PVOID SystemInformation, + ULONG SystemInformationLength, + PULONG ReturnLength +); + #define DEFAULT_VOL_CREATION_WIZARD_MODE WIZARD_MODE_FILE_CONTAINER @@ -560,6 +583,7 @@ BOOL BufferHasPattern (const unsigned char* buffer, size_t bufferLen, const void BOOL EnableProcessProtection(); void SafeOpenURL (LPCWSTR szUrl); BitLockerEncryptionStatus GetBitLockerEncryptionStatus(WCHAR driveLetter); +BOOL IsTestSigningModeEnabled (); #ifdef _WIN64 void GetAppRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed); #endif -- cgit v1.2.3