1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-05-21 21:30:48 -05:00
Files
VeraCrypt/src/COMReg/COMReg.cpp
T
Mounir IDRASSI 976bb3767b Windows: Fix MSI traveler disk creation with WHQL-signed drivers
Make MSI-installed VeraCrypt use the IDRIX-signed COMReg package as the
source for traveler files, matching the EXE installer flow. COMReg now
packages the x64 traveler payload, so traveler creation no longer has to
copy the installed x64 driver from appDir\veracrypt.sys and verify it
against a Microsoft WHQL certificate fingerprint.

Keep Microsoft WHQL certificate verification only for the loose portable
driver fallback, where driver files cannot be signed with the IDRIX code
signing certificate. The normal VerifyModuleSignature path now remains
IDRIX-only.

Also validate that an MSI COMReg package actually contains the required
x64 traveler files before reporting success, avoiding partial traveler
directories when the package payload is incomplete.
2026-04-14 18:43:07 +09:00

34 lines
906 B
C++

#include "Tcdefs.h"
#include <windows.h>
#include "SelfExtract.h"
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
wchar_t SetupFilesDir[TC_MAX_PATH];
wchar_t *s;
UNREFERENCED_PARAMETER(hInstance);
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(nCmdShow);
if (lpCmdLine[0] == L'/' && lpCmdLine[1] == L'p')
{
SelfExtractStartupInit();
GetModuleFileName (NULL, SetupFilesDir, ARRAYSIZE (SetupFilesDir));
s = wcsrchr (SetupFilesDir, L'\\');
if (s)
s[1] = 0;
/*
* Create a self-extracting package containing the traveler files.
* The MSI traveler creation path verifies this IDRIX-signed package
* instead of verifying individual WHQL-signed driver files.
*/
MakeSelfExtractingPackage (NULL, SetupFilesDir, FALSE);
}
return 0;
}