mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2024-09-12 04:12:44 +02:00
Windows: Restrict supported Windows versions to XP, 10 and 11 because of new requirement on driver code signing.
For now, we are not able to put in place HCK/WLK certification of VeraCrypt driver that is needed for Windows 7, 8 and 8.1.
This commit is contained in:
parent
5426160c94
commit
5f5b8a15fc
2 changed files with 235 additions and 22 deletions
|
@ -3259,8 +3259,8 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
|
||||||
|
|
||||||
RemoteSession = GetSystemMetrics (SM_REMOTESESSION) != 0;
|
RemoteSession = GetSystemMetrics (SM_REMOTESESSION) != 0;
|
||||||
|
|
||||||
// OS version check: from version 1.25, only Windows 8 and newer is supported
|
// OS version check: from version 1.25, only Windows XP, Windows 10 and Windows 11 are supported because of new driver signing requirements
|
||||||
if (!IsOSVersionAtLeast(WIN_8, 0))
|
if (!(IsOSVersionAtLeast(WIN_10, 0) || (nCurrentOS == WIN_XP) || (nCurrentOS == WIN_XP64)))
|
||||||
{
|
{
|
||||||
MessageBoxW (NULL, GetString ("UNSUPPORTED_OS"), lpszTitle, MB_ICONSTOP);
|
MessageBoxW (NULL, GetString ("UNSUPPORTED_OS"), lpszTitle, MB_ICONSTOP);
|
||||||
exit (1);
|
exit (1);
|
||||||
|
@ -3270,26 +3270,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
|
||||||
// Service pack check & warnings about critical MS issues
|
// Service pack check & warnings about critical MS issues
|
||||||
switch (nCurrentOS)
|
switch (nCurrentOS)
|
||||||
{
|
{
|
||||||
case WIN_2000:
|
|
||||||
if (CurrentOSServicePack < 3)
|
|
||||||
Warning ("LARGE_IDE_WARNING_2K", NULL);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DWORD val = 0, size = sizeof(val);
|
|
||||||
HKEY hkey;
|
|
||||||
|
|
||||||
if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\Atapi\\Parameters", 0, KEY_READ, &hkey) == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
if (RegQueryValueExW (hkey, L"EnableBigLba", 0, 0, (LPBYTE) &val, &size) != ERROR_SUCCESS
|
|
||||||
|| val != 1)
|
|
||||||
{
|
|
||||||
Warning ("LARGE_IDE_WARNING_2K_REGISTRY", NULL);
|
|
||||||
}
|
|
||||||
RegCloseKey (hkey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WIN_XP:
|
case WIN_XP:
|
||||||
if (CurrentOSServicePack < 1)
|
if (CurrentOSServicePack < 1)
|
||||||
{
|
{
|
||||||
|
@ -14114,6 +14094,11 @@ BOOL VerifyModuleSignature (const wchar_t* path)
|
||||||
WINTRUST_DATA WVTData = {0};
|
WINTRUST_DATA WVTData = {0};
|
||||||
wchar_t filePath [TC_MAX_PATH + 1024];
|
wchar_t filePath [TC_MAX_PATH + 1024];
|
||||||
|
|
||||||
|
// we check our own authenticode signature only starting from Windows 10 since this is
|
||||||
|
// the minimal supported OS apart from XP where we can't verify SHA256 signatures
|
||||||
|
if (!IsOSAtLeast (WIN_10))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
// Strip quotation marks (if any)
|
// Strip quotation marks (if any)
|
||||||
if (path [0] == L'"')
|
if (path [0] == L'"')
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,6 +84,8 @@ BOOL bDesktopIconStatusDetermined = FALSE;
|
||||||
|
|
||||||
HMODULE volatile SystemRestoreDll = 0;
|
HMODULE volatile SystemRestoreDll = 0;
|
||||||
|
|
||||||
|
extern HMODULE hcrypt32dll;
|
||||||
|
|
||||||
void localcleanup (void)
|
void localcleanup (void)
|
||||||
{
|
{
|
||||||
localcleanupwiz ();
|
localcleanupwiz ();
|
||||||
|
@ -2229,6 +2231,227 @@ void DoUninstall (void *arg)
|
||||||
OutcomePrompt (hwndDlg, bOK);
|
OutcomePrompt (hwndDlg, bOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* IDRIX code signing certificate */
|
||||||
|
|
||||||
|
unsigned char g_pbCodeSignCert[1903] = {
|
||||||
|
0x30, 0x82, 0x07, 0x6B, 0x30, 0x82, 0x05, 0x53, 0xA0, 0x03, 0x02, 0x01,
|
||||||
|
0x02, 0x02, 0x0C, 0x05, 0xA8, 0x0D, 0x83, 0x5C, 0x41, 0x78, 0x8E, 0x65,
|
||||||
|
0x03, 0x28, 0x4C, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
|
||||||
|
0x0D, 0x01, 0x01, 0x0B, 0x05, 0x00, 0x30, 0x5C, 0x31, 0x0B, 0x30, 0x09,
|
||||||
|
0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x42, 0x45, 0x31, 0x19, 0x30,
|
||||||
|
0x17, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x10, 0x47, 0x6C, 0x6F, 0x62,
|
||||||
|
0x61, 0x6C, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x6E, 0x76, 0x2D, 0x73, 0x61,
|
||||||
|
0x31, 0x32, 0x30, 0x30, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x29, 0x47,
|
||||||
|
0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x47, 0x43,
|
||||||
|
0x43, 0x20, 0x52, 0x34, 0x35, 0x20, 0x45, 0x56, 0x20, 0x43, 0x6F, 0x64,
|
||||||
|
0x65, 0x53, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67, 0x20, 0x43, 0x41, 0x20,
|
||||||
|
0x32, 0x30, 0x32, 0x30, 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x31, 0x30, 0x38,
|
||||||
|
0x32, 0x32, 0x32, 0x30, 0x31, 0x30, 0x34, 0x32, 0x5A, 0x17, 0x0D, 0x32,
|
||||||
|
0x32, 0x30, 0x32, 0x31, 0x31, 0x31, 0x32, 0x31, 0x36, 0x31, 0x38, 0x5A,
|
||||||
|
0x30, 0x81, 0xD0, 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x03, 0x55, 0x04, 0x0F,
|
||||||
|
0x0C, 0x14, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x20, 0x4F, 0x72,
|
||||||
|
0x67, 0x61, 0x6E, 0x69, 0x7A, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x31, 0x14,
|
||||||
|
0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x05, 0x13, 0x0B, 0x34, 0x39, 0x30,
|
||||||
|
0x20, 0x30, 0x30, 0x30, 0x20, 0x36, 0x31, 0x39, 0x31, 0x13, 0x30, 0x11,
|
||||||
|
0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x3C, 0x02, 0x01,
|
||||||
|
0x03, 0x13, 0x02, 0x46, 0x52, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55,
|
||||||
|
0x04, 0x06, 0x13, 0x02, 0x46, 0x52, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03,
|
||||||
|
0x55, 0x04, 0x08, 0x13, 0x0D, 0x69, 0x6C, 0x65, 0x2D, 0x64, 0x65, 0x2D,
|
||||||
|
0x46, 0x72, 0x61, 0x6E, 0x63, 0x65, 0x31, 0x0E, 0x30, 0x0C, 0x06, 0x03,
|
||||||
|
0x55, 0x04, 0x07, 0x13, 0x05, 0x50, 0x61, 0x72, 0x69, 0x73, 0x31, 0x25,
|
||||||
|
0x30, 0x23, 0x06, 0x03, 0x55, 0x04, 0x09, 0x13, 0x1C, 0x39, 0x20, 0x72,
|
||||||
|
0x75, 0x65, 0x20, 0x64, 0x75, 0x20, 0x44, 0x6F, 0x63, 0x74, 0x65, 0x75,
|
||||||
|
0x72, 0x20, 0x47, 0x65, 0x72, 0x6D, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x65,
|
||||||
|
0x65, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x0A,
|
||||||
|
0x49, 0x44, 0x52, 0x49, 0x58, 0x20, 0x53, 0x41, 0x52, 0x4C, 0x31, 0x13,
|
||||||
|
0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0A, 0x49, 0x44, 0x52,
|
||||||
|
0x49, 0x58, 0x20, 0x53, 0x41, 0x52, 0x4C, 0x30, 0x82, 0x02, 0x22, 0x30,
|
||||||
|
0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01,
|
||||||
|
0x05, 0x00, 0x03, 0x82, 0x02, 0x0F, 0x00, 0x30, 0x82, 0x02, 0x0A, 0x02,
|
||||||
|
0x82, 0x02, 0x01, 0x00, 0xCF, 0x50, 0x72, 0x0E, 0x92, 0x17, 0xCF, 0xD4,
|
||||||
|
0xC9, 0xDC, 0x6B, 0x59, 0x54, 0x34, 0x12, 0x96, 0x11, 0x9C, 0xE3, 0xF4,
|
||||||
|
0x23, 0xA5, 0x70, 0x3B, 0x48, 0x24, 0xD8, 0xCA, 0x2D, 0x01, 0xDF, 0x4E,
|
||||||
|
0x4E, 0x6C, 0xBD, 0xEC, 0x26, 0x1E, 0x8E, 0xF7, 0x13, 0xD3, 0xBE, 0x5F,
|
||||||
|
0x47, 0xEB, 0xFF, 0x71, 0x1B, 0xAD, 0xB7, 0xC6, 0xB5, 0x36, 0x58, 0x1A,
|
||||||
|
0x26, 0xF7, 0xFE, 0x20, 0x9C, 0xF6, 0x1E, 0xCC, 0x2D, 0x9E, 0xD3, 0xDE,
|
||||||
|
0x2A, 0xF6, 0x2A, 0x10, 0xE1, 0xE5, 0x71, 0x9A, 0x16, 0x87, 0x23, 0xB9,
|
||||||
|
0xC6, 0x6C, 0xE5, 0x02, 0x68, 0x88, 0x3F, 0xAE, 0x54, 0xA3, 0xEF, 0x0A,
|
||||||
|
0x6A, 0x03, 0xDD, 0xAC,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0x21, 0x48, 0xE0, 0x20, 0xAC, 0xEA, 0x20, 0xA8, 0xBB,
|
||||||
|
0xA9, 0x21, 0xCA, 0xFE, 0x70, 0x82, 0x11, 0xB5, 0xEB, 0xD2, 0x61, 0x7C,
|
||||||
|
0xB0, 0xD7, 0xFF, 0x58, 0x25, 0xA1, 0xEA, 0x94, 0x5E, 0x93, 0x08, 0x3D,
|
||||||
|
0xB4, 0xCC, 0x99, 0x77, 0xF5, 0xE6, 0x13, 0x34, 0xA2, 0x0E, 0x2D, 0x44,
|
||||||
|
0x59, 0x0F, 0xA3, 0xEA, 0x50, 0x2A, 0xE8, 0xDE, 0x39, 0xA0, 0x09, 0x77,
|
||||||
|
0xFF, 0x0B, 0x59, 0x7D, 0x9B, 0x05, 0x18, 0xC3, 0xBD, 0x1D, 0x0B, 0x06,
|
||||||
|
0xFA, 0xC8, 0x1F, 0x95, 0x25, 0x4A, 0x07, 0x3D, 0x86, 0x70, 0x2A, 0x9C,
|
||||||
|
0xB1, 0x66, 0xD6, 0x5B, 0x61, 0xE9, 0xDF, 0x46, 0x9F, 0x87, 0x7A, 0xC5,
|
||||||
|
0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x82, 0x01, 0xB6, 0x30, 0x82, 0x01,
|
||||||
|
0xB2, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04,
|
||||||
|
0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x81, 0x9F, 0x06, 0x08, 0x2B, 0x06,
|
||||||
|
0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x81, 0x92, 0x30, 0x81, 0x8F,
|
||||||
|
0x30, 0x4C, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02,
|
||||||
|
0x86, 0x40, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x73, 0x65, 0x63,
|
||||||
|
0x75, 0x72, 0x65, 0x2E, 0x67, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x73, 0x69,
|
||||||
|
0x67, 0x6E, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x63, 0x61, 0x63, 0x65, 0x72,
|
||||||
|
0x74, 0x2F, 0x67, 0x73, 0x67, 0x63, 0x63, 0x72, 0x34, 0x35, 0x65, 0x76,
|
||||||
|
0x63, 0x6F, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6E, 0x63, 0x61, 0x32, 0x30,
|
||||||
|
0x32, 0x30, 0x2E, 0x63, 0x72, 0x74, 0x30, 0x3F, 0x06, 0x08, 0x2B, 0x06,
|
||||||
|
0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x33, 0x68, 0x74, 0x74, 0x70,
|
||||||
|
0x3A, 0x2F, 0x2F, 0x6F, 0x63, 0x73, 0x70, 0x2E, 0x67, 0x6C, 0x6F, 0x62,
|
||||||
|
0x61, 0x6C, 0x73, 0x69, 0x67, 0x6E, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x67,
|
||||||
|
0x73, 0x67, 0x63, 0x63, 0x72, 0x34, 0x35, 0x65, 0x76, 0x63, 0x6F, 0x64,
|
||||||
|
0x65, 0x73, 0x69, 0x67, 0x6E, 0x63, 0x61, 0x32, 0x30, 0x32, 0x30, 0x30,
|
||||||
|
0x55, 0x06, 0x03, 0x55, 0x1D, 0x20, 0x04, 0x4E, 0x30, 0x4C, 0x30, 0x41,
|
||||||
|
0x06, 0x09, 0x2B, 0x06, 0x01, 0x04, 0x01, 0xA0, 0x32, 0x01, 0x02, 0x30,
|
||||||
|
0x34, 0x30, 0x32, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02,
|
||||||
|
0x01, 0x16, 0x26, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A, 0x2F, 0x2F, 0x77,
|
||||||
|
0x77, 0x77, 0x2E, 0x67, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x73, 0x69, 0x67,
|
||||||
|
0x6E, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x72, 0x65, 0x70, 0x6F, 0x73, 0x69,
|
||||||
|
0x74, 0x6F, 0x72, 0x79, 0x2F, 0x30, 0x07, 0x06, 0x05, 0x67, 0x81, 0x0C,
|
||||||
|
0x01, 0x03, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x02, 0x30,
|
||||||
|
0x00, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1D, 0x1F, 0x04, 0x40, 0x30, 0x3E,
|
||||||
|
0x30, 0x3C, 0xA0, 0x3A, 0xA0, 0x38, 0x86, 0x36, 0x68, 0x74, 0x74, 0x70,
|
||||||
|
0x3A, 0x2F, 0x2F, 0x63, 0x72, 0x6C, 0x2E, 0x67, 0x6C, 0x6F, 0x62, 0x61,
|
||||||
|
0x6C, 0x73, 0x69, 0x67, 0x6E, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x67, 0x73,
|
||||||
|
0x67, 0x63, 0x63, 0x72, 0x34, 0x35, 0x65, 0x76, 0x63, 0x6F, 0x64, 0x65,
|
||||||
|
0x73, 0x69, 0x67, 0x6E, 0x63, 0x61, 0x32, 0x30, 0x32, 0x30, 0x2E, 0x63,
|
||||||
|
0x72, 0x6C, 0x30, 0x13, 0x06, 0x03, 0x55, 0x1D, 0x25, 0x04, 0x0C, 0x30,
|
||||||
|
0x0A, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x03, 0x30,
|
||||||
|
0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14,
|
||||||
|
0x25, 0x9D, 0xD0, 0xFC, 0x59, 0x09, 0x86, 0x63, 0xC5, 0xEC, 0xF3, 0xB1,
|
||||||
|
0x13, 0x3B, 0x57, 0x1C, 0x03, 0x92, 0x36, 0x11, 0x30, 0x1D, 0x06, 0x03,
|
||||||
|
0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0xC5, 0xF3, 0x73, 0xA9, 0x87,
|
||||||
|
0x58, 0x4F, 0x1B, 0xA4, 0xDC, 0x5B, 0x2C, 0xA3, 0x6B, 0xBB, 0x6B, 0x16,
|
||||||
|
0xE7, 0xE1, 0x1F, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
|
||||||
|
0x0D, 0x01, 0x01, 0x0B, 0x05, 0x00, 0x03, 0x82, 0x02, 0x01, 0x00, 0x54,
|
||||||
|
0x89, 0x65, 0x0A, 0x7D, 0xF1, 0x7D, 0xF5, 0x7A, 0xE8, 0x50, 0x92, 0xF4,
|
||||||
|
0xEC, 0xF0, 0x38, 0x3B, 0xC5, 0x29, 0x26, 0x9F, 0x9C, 0x88, 0x62, 0x19,
|
||||||
|
0x58, 0x77, 0xA3, 0x59, 0xD5, 0x78, 0xD0, 0xF0, 0x78, 0x9C, 0xF1, 0x35,
|
||||||
|
0xBB, 0xA7, 0x72, 0x68, 0x3A, 0xAD, 0x84, 0xC2, 0x94, 0xA0, 0xD4, 0x19,
|
||||||
|
0x2E, 0x82, 0xED, 0x2C, 0x22, 0xCB, 0x6C, 0x9E, 0x07, 0x18, 0x80, 0xA4,
|
||||||
|
0x96, 0x1A, 0x9A, 0x85, 0x04, 0x51, 0x9F, 0x3C, 0x02, 0x8D, 0xB0, 0x9A,
|
||||||
|
0x7A, 0x8D, 0x4C, 0x80, 0x76, 0x83, 0x0D, 0xD6, 0x9F, 0xD8, 0x94, 0x92,
|
||||||
|
0xC4, 0x9F, 0x3B, 0x0C, 0x4A, 0x10, 0xBD, 0xEC, 0xAE, 0xA0, 0xC8, 0x33,
|
||||||
|
0x14, 0x17, 0x45, 0x12, 0xFF, 0x21, 0x8D, 0xCF, 0x6F, 0x01, 0xA9, 0x6D,
|
||||||
|
0xE3, 0x7E, 0x3E, 0xDD, 0xBB, 0x32, 0xC9, 0x28, 0x9D, 0xC2, 0xD4, 0x49,
|
||||||
|
0x11, 0x97, 0xF6, 0xBA, 0x4D, 0x8E, 0xD2, 0x79, 0x64, 0x4C, 0x83, 0x81,
|
||||||
|
0xDD, 0x63, 0xE8, 0x8E, 0x4B, 0xE3, 0x7D, 0x63, 0xB8, 0x44, 0x2F, 0x87,
|
||||||
|
0x76, 0x46, 0x9B, 0x3E, 0x7E, 0x34, 0x09, 0x59, 0x0E, 0xE1, 0x44, 0xE7,
|
||||||
|
0x37, 0xF1, 0x24, 0xBA, 0xBD, 0xDC, 0xD7, 0x27, 0xF8, 0x50, 0x19, 0xCD,
|
||||||
|
0xA5, 0x8D, 0x74, 0x91, 0x83, 0xF3, 0xF0, 0xEB, 0x93, 0x54, 0xA5, 0x18,
|
||||||
|
0x66, 0x6B, 0x23, 0x53, 0xFE, 0x40, 0x9E, 0x07, 0xB2, 0xFE, 0xED, 0x4D,
|
||||||
|
0x1F, 0xC0, 0x7E, 0x6B, 0xE4, 0x59, 0xA1, 0x66, 0xEF, 0x42, 0x53, 0xA3,
|
||||||
|
0xEC, 0xBA, 0xC1, 0x1C, 0xBF, 0xEA, 0x67, 0xED, 0xA9, 0x03, 0xD7, 0xB3,
|
||||||
|
0xB4, 0xEB, 0x25, 0x31, 0x2B, 0x2B, 0x53, 0x24, 0x16, 0x8E, 0x87, 0xAF,
|
||||||
|
0x0F, 0x71, 0xC0, 0x6D, 0xF3, 0x18, 0x39, 0xF7, 0x0C, 0x92, 0x46, 0x7B,
|
||||||
|
0xE9, 0x40, 0x70, 0x2E, 0x70, 0x4B, 0x34, 0xC9, 0x16, 0xD1, 0x31, 0xFF,
|
||||||
|
0xB9, 0x64, 0xCD, 0x78, 0x5B, 0x50, 0x4A, 0x71, 0xB5, 0xE6, 0xBA, 0x79,
|
||||||
|
0x18, 0x05, 0x17, 0xCB, 0x8B, 0x38, 0x88, 0xAE, 0x2D, 0xA0, 0xC3, 0x7D,
|
||||||
|
0x76, 0x7C, 0x49, 0x55, 0x6D, 0x52, 0x10, 0xCA, 0xC1, 0xBC, 0x72, 0x86,
|
||||||
|
0xB4, 0x54, 0xDC, 0x3A, 0xC9, 0x97, 0xD9, 0x28, 0xF4, 0x05, 0x85, 0xE9,
|
||||||
|
0x7D, 0x13, 0x1E, 0x8D, 0x2E, 0xAA, 0xC9, 0xAC, 0x27, 0x5C, 0x4A, 0x26,
|
||||||
|
0xCB, 0x37, 0xB0, 0x98, 0xCF, 0x46, 0x00, 0xF3, 0x9B, 0xF9, 0x21, 0xF3,
|
||||||
|
0x5A, 0x71, 0x96, 0x92, 0x42, 0xD7, 0xCB, 0xE7, 0x83, 0xBE, 0xF0, 0x7A,
|
||||||
|
0x71, 0x34, 0x3B, 0xD0, 0x8E, 0xA1, 0xDF, 0x41, 0x04, 0x01, 0x85, 0x63,
|
||||||
|
0x24, 0x0E, 0x7E, 0xB2, 0x7C, 0xBA, 0x4A, 0xDA, 0x78, 0xD8, 0x9C, 0xED,
|
||||||
|
0x07, 0x3B, 0x40, 0x53, 0x05, 0x0A, 0xE8, 0xA7, 0x11, 0xBC, 0xDE, 0xF4,
|
||||||
|
0xB8, 0x5C, 0xD9, 0xAD, 0x48, 0x15, 0xE2, 0x40, 0x2E, 0xD6, 0x84, 0xD0,
|
||||||
|
0xAB, 0x8E, 0xF6, 0x18, 0x95, 0xF1, 0x17, 0x5A, 0xC0, 0x82, 0x12, 0x94,
|
||||||
|
0x8B, 0x0B, 0xDE, 0x7D, 0x42, 0xF4, 0xE2, 0x15, 0x17, 0x8D, 0xC1, 0x26,
|
||||||
|
0x2D, 0xAF, 0x76, 0xCD, 0xA3, 0x42, 0x73, 0x25, 0x61, 0x27, 0xB4, 0xD1,
|
||||||
|
0x0A, 0x10, 0x5E, 0xB9, 0x05, 0x3A, 0x3A, 0x56, 0x87, 0x3A, 0xDB, 0x33,
|
||||||
|
0xC6, 0xDA, 0xBB, 0x64, 0x98, 0xAB, 0x1C, 0xAA, 0x90, 0x1D, 0xA1, 0x61,
|
||||||
|
0x62, 0xB6, 0x2B, 0xEB, 0x2B, 0xD4, 0x8D, 0x74, 0xB4, 0x5C, 0x96, 0xB1,
|
||||||
|
0x06, 0xD8, 0xE3, 0xCE, 0x36, 0xA8, 0x92, 0x2B, 0xE5, 0x37, 0xD3, 0x35,
|
||||||
|
0xDB, 0xBD, 0x1D, 0x72, 0x4F, 0x67, 0x9F, 0x6C, 0xCC, 0xAD, 0x4C, 0x50,
|
||||||
|
0xEE, 0x76, 0xA5, 0x5E, 0x01, 0x3E, 0x3D, 0x9E, 0x17, 0x1F, 0xF8, 0xC6,
|
||||||
|
0x6D, 0x56, 0x18, 0x9F, 0x27, 0xCF, 0xC8, 0x9E, 0x09, 0x30, 0x25, 0xC3,
|
||||||
|
0xB3, 0xFA, 0x04, 0xE0, 0x37, 0x4D, 0xD7
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef PCCERT_CONTEXT (WINAPI *CertCreateCertificateContextType)(
|
||||||
|
__in DWORD dwCertEncodingType,
|
||||||
|
__in_bcount(cbCertEncoded) const BYTE *pbCertEncoded,
|
||||||
|
__in DWORD cbCertEncoded
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef HCERTSTORE (WINAPI *CertOpenStoreType)(
|
||||||
|
__in LPCSTR lpszStoreProvider,
|
||||||
|
__in DWORD dwEncodingType,
|
||||||
|
__in_opt HCRYPTPROV_LEGACY hCryptProv,
|
||||||
|
__in DWORD dwFlags,
|
||||||
|
__in_opt const void *pvPara
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef BOOL (WINAPI *CertAddCertificateContextToStoreType)(
|
||||||
|
__in_opt HCERTSTORE hCertStore,
|
||||||
|
__in PCCERT_CONTEXT pCertContext,
|
||||||
|
__in DWORD dwAddDisposition,
|
||||||
|
__deref_opt_out PCCERT_CONTEXT *ppStoreContext
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef BOOL (WINAPI *CertCloseStoreType)(
|
||||||
|
__in_opt HCERTSTORE hCertStore,
|
||||||
|
__in DWORD dwFlags
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef BOOL (WINAPI *CertFreeCertificateContextType)(
|
||||||
|
__in_opt PCCERT_CONTEXT pCertContext
|
||||||
|
);
|
||||||
|
|
||||||
|
void AddCertificateToTrustedPublisher ()
|
||||||
|
{
|
||||||
|
// load crypt32.dll functions dynamically to avoid linking to them since they are used only on Windows XP
|
||||||
|
CertCreateCertificateContextType CertCreateCertificateContextFn = (CertCreateCertificateContextType) GetProcAddress(hcrypt32dll, "CertCreateCertificateContext");
|
||||||
|
CertOpenStoreType CertOpenStoreFn = (CertOpenStoreType) GetProcAddress(hcrypt32dll, "CertOpenStore");
|
||||||
|
CertAddCertificateContextToStoreType CertAddCertificateContextToStoreFn = (CertAddCertificateContextToStoreType) GetProcAddress(hcrypt32dll, "CertAddCertificateContextToStore");
|
||||||
|
CertCloseStoreType CertCloseStoreFn = (CertCloseStoreType) GetProcAddress(hcrypt32dll, "CertCloseStore");
|
||||||
|
CertFreeCertificateContextType CertFreeCertificateContextFn = (CertFreeCertificateContextType) GetProcAddress(hcrypt32dll, "CertFreeCertificateContext");
|
||||||
|
|
||||||
|
if (CertCreateCertificateContextFn && CertOpenStoreFn && CertAddCertificateContextToStoreFn && CertCloseStoreFn && CertFreeCertificateContextFn)
|
||||||
|
{
|
||||||
|
PCCERT_CONTEXT pCodeSignCert = CertCreateCertificateContextFn(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, g_pbCodeSignCert, sizeof (g_pbCodeSignCert));
|
||||||
|
if (pCodeSignCert)
|
||||||
|
{
|
||||||
|
DWORD dwFlags = CERT_SYSTEM_STORE_LOCAL_MACHINE;
|
||||||
|
HCERTSTORE hStore = CertOpenStoreFn(CERT_STORE_PROV_SYSTEM, PKCS_7_ASN_ENCODING|X509_ASN_ENCODING,
|
||||||
|
NULL, dwFlags, L"TrustedPublisher");
|
||||||
|
if (hStore)
|
||||||
|
{
|
||||||
|
CertAddCertificateContextToStoreFn(hStore, pCodeSignCert, CERT_STORE_ADD_NEW, NULL);
|
||||||
|
CertCloseStoreFn(hStore, 0);
|
||||||
|
}
|
||||||
|
CertFreeCertificateContextFn(pCodeSignCert);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DoInstall (void *arg)
|
void DoInstall (void *arg)
|
||||||
{
|
{
|
||||||
HWND hwndDlg = (HWND) arg;
|
HWND hwndDlg = (HWND) arg;
|
||||||
|
@ -2318,6 +2541,11 @@ void DoInstall (void *arg)
|
||||||
|
|
||||||
UpdateProgressBarProc(50);
|
UpdateProgressBarProc(50);
|
||||||
|
|
||||||
|
if ((nCurrentOS == WIN_XP) || (nCurrentOS == WIN_XP64))
|
||||||
|
{
|
||||||
|
AddCertificateToTrustedPublisher();
|
||||||
|
}
|
||||||
|
|
||||||
// Remove deprecated
|
// Remove deprecated
|
||||||
DoServiceUninstall (hwndDlg, L"VeraCryptService");
|
DoServiceUninstall (hwndDlg, L"VeraCryptService");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue