diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-01-26 01:18:03 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-01-26 01:20:51 +0100 |
commit | a20b3083b058901572953364dccbdd4cad8f3c5a (patch) | |
tree | 6a208ab4663e8e7d7da021ac61c8aa290fa0edde /src/Common | |
parent | 7b95b375a0aeb7fcba50437944d94bab074e7df4 (diff) | |
download | VeraCrypt-a20b3083b058901572953364dccbdd4cad8f3c5a.tar.gz VeraCrypt-a20b3083b058901572953364dccbdd4cad8f3c5a.zip |
Windows: Add a build configuration containing EFI bootloader signed with custom SecureBoot key instead
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/BootEncryption.cpp | 5 | ||||
-rw-r--r-- | src/Common/Cmdline.c | 2 | ||||
-rw-r--r-- | src/Common/Dlgcode.c | 2 | ||||
-rw-r--r-- | src/Common/Language.c | 2 | ||||
-rw-r--r-- | src/Common/Tcdefs.h | 6 |
5 files changed, 13 insertions, 4 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index 2bf7991c..4061bde9 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -4740,7 +4740,9 @@ namespace VeraCrypt throw SystemException (SRC_POS); } } +#endif +#if defined(VC_EFI_CUSTOM_MODE) || !defined(SETUP) void BootEncryption::GetSecureBootConfig (BOOL* pSecureBootEnabled, BOOL *pVeraCryptKeysLoaded) { SystemDriveConfiguration config = GetSystemDriveConfiguration (); @@ -4780,7 +4782,8 @@ namespace VeraCrypt throw SystemException (SRC_POS); } } - +#endif +#ifndef SETUP void BootEncryption::CheckRequirements () { if (nCurrentOS == WIN_2000) diff --git a/src/Common/Cmdline.c b/src/Common/Cmdline.c index bc304578..d2056734 100644 --- a/src/Common/Cmdline.c +++ b/src/Common/Cmdline.c @@ -51,7 +51,7 @@ BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM *tmp = 0; - StringCchCopyW (tmp, 8192, L"VeraCrypt " _T(VERSION_STRING)); + StringCchCopyW (tmp, 8192, L"VeraCrypt " _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX)); #ifdef _WIN64 StringCchCatW (tmp, 8192, L" (64-bit)"); #else diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 4480f426..3de37b7c 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -1422,7 +1422,7 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam // Version SendMessage (GetDlgItem (hwndDlg, IDT_ABOUT_VERSION), WM_SETFONT, (WPARAM) hUserBoldFont, 0); - StringCbPrintfW (szTmp, sizeof(szTmp), L"VeraCrypt %s", _T(VERSION_STRING)); + StringCbPrintfW (szTmp, sizeof(szTmp), L"VeraCrypt %s", _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX)); #ifdef _WIN64 StringCbCatW (szTmp, sizeof(szTmp), L" (64-bit)"); #else diff --git a/src/Common/Language.c b/src/Common/Language.c index ba0b6d19..6dbd8b61 100644 --- a/src/Common/Language.c +++ b/src/Common/Language.c @@ -225,7 +225,7 @@ static BOOL LoadLanguageData (int resourceid, BOOL bForceSetPreferredLanguage, B XmlGetAttributeText (xml, "prog-version", attr, sizeof (attr)); // Check version of external language file - if (defaultLangParsed && strcmp (attr, VERSION_STRING) && strcmp (attr, "DEBUG")) + if (defaultLangParsed && strcmp (attr, VERSION_STRING VERSION_STRING_SUFFIX) && strcmp (attr, "DEBUG")) { wchar_t m[2048]; StringCbPrintfW (m, sizeof(m), L"The installed language pack is incompatible with this version of VeraCrypt (the language pack is for VeraCrypt %hs). A newer version may be available at www.idrix.fr.\n\nTo prevent this message from being displayed, do any of the following:\n\n- Select 'Settings' > 'Language'; then select 'English' and click 'OK'.\n\n- Remove or replace the language pack with a compatible version (the language pack may reside e.g. in 'C:\\Program Files\\VeraCrypt' or '%%LOCALAPPDATA%%\\VirtualStore\\Program Files\\VeraCrypt', etc.)", attr); diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h index efa4df63..33dfbf5e 100644 --- a/src/Common/Tcdefs.h +++ b/src/Common/Tcdefs.h @@ -54,6 +54,12 @@ extern unsigned short _rotl16(unsigned short value, unsigned char shift); #define TC_APP_NAME "VeraCrypt" +#ifdef VC_EFI_CUSTOM_MODE +#define VERSION_STRING_SUFFIX "-CustomEFI" +#else +#define VERSION_STRING_SUFFIX "" +#endif + // Version displayed to user #define VERSION_STRING "1.24-Beta1" |