You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
827 B
36 lines
827 B
// Copyright (c) 1998 - 1999 Microsoft Corporation
|
|
|
|
#include "stdafx.h"
|
|
|
|
#define MemAlloc malloc // for certfy.inc
|
|
#define MemFree free
|
|
|
|
#include "../../tscert/inc/pubblob.h" // needed by certvfy.inc
|
|
#include "../../tscert/inc/certvfy.inc" // VerifyFile()
|
|
|
|
|
|
BOOL FileExists (char *pszFullNameAndPath); // from tstst.cpp
|
|
|
|
BOOL CheckifBinaryisSigned(TCHAR *szFile)
|
|
{
|
|
USES_CONVERSION;
|
|
TCHAR szFullFile[MAX_PATH +1];
|
|
RTL_CRITICAL_SECTION VfyLock;
|
|
|
|
if (ExpandEnvironmentStrings(szFile, szFullFile, MAX_PATH))
|
|
{
|
|
if (FileExists(T2A(szFullFile)))
|
|
{
|
|
RtlInitializeCriticalSection( &VfyLock );
|
|
|
|
if ( VerifyFile( T2W(szFullFile), &VfyLock ) )
|
|
{
|
|
return TRUE;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
return FALSE;
|
|
}
|
|
|