1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-07 00:04:57 +03:00

Add the warning message if KB3033929 is not installed in Windows 7 / Server 2008 R2.

This commit is contained in:
Daiyuu Nobori
2019-06-30 01:20:52 +09:00
parent 2da6e4c491
commit 9c227f3480
9 changed files with 75 additions and 0 deletions

View File

@ -1717,6 +1717,59 @@ HANDLE MsCreateUserToken()
return hNewToken;
}
// Check whether SHA-2 kernel mode signature is supported
bool MsIsSha2KernelModeSignatureSupported()
{
HINSTANCE hDll;
bool ret = false;
if (MsIsWindows8())
{
return true;
}
hDll = LoadLibrary("Wintrust.dll");
if (hDll == NULL)
{
return false;
}
if (GetProcAddress(hDll, "CryptCATAdminAcquireContext2") != NULL)
{
ret = true;
}
FreeLibrary(hDll);
return ret;
}
// Check whether KB3033929 is required
bool MsIsKB3033929RequiredAndMissing()
{
OS_INFO *info = GetOsInfo();
if (info == NULL)
{
return false;
}
if (OS_IS_WINDOWS_NT(info->OsType))
{
if (GET_KETA(info->OsType, 100) == 6)
{
if (MsIsX64())
{
if (MsIsSha2KernelModeSignatureSupported() == false)
{
return true;
}
}
}
}
return false;
}
// Check the digital signature of the file
bool MsCheckFileDigitalSignatureW(HWND hWnd, wchar_t *name, bool *danger)