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

Windows: implement internal verification of Authenticode digital signature for all modules to protect against simple binaries tampering.

This commit is contained in:
Mounir IDRASSI
2018-04-16 00:23:05 +02:00
parent 9e36039630
commit 0a737c8c87
5 changed files with 231 additions and 26 deletions

View File

@@ -1051,7 +1051,7 @@ err:
FindClose (h);
}
SetCurrentDirectory (SetupFilesDir);
}
@@ -2571,7 +2571,18 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
#ifndef PORTABLE
SetInstallationPath (NULL);
#endif
if (!bUninstall)
if (bUninstall)
{
wchar_t path [TC_MAX_PATH];
GetModuleFileName (NULL, path, ARRAYSIZE (path));
if (!VerifyModuleSignature (path))
{
Error ("DIST_PACKAGE_CORRUPTED", NULL);
exit (1);
}
}
else
{
if (IsSelfExtractingPackage())
{