2002-03-10 00:29:33 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2001 Rein Klazes
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-10 00:29:33 +01:00
|
|
|
*/
|
|
|
|
|
2001-04-16 21:36:12 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2001-04-16 21:36:12 +02:00
|
|
|
#include "windef.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winbase.h"
|
2001-04-16 21:36:12 +02:00
|
|
|
#include "winerror.h"
|
|
|
|
#include "guiddef.h"
|
2004-10-21 23:00:29 +02:00
|
|
|
#include "wintrust.h"
|
2006-03-22 05:46:02 +01:00
|
|
|
#include "softpub.h"
|
2004-10-21 23:00:29 +02:00
|
|
|
#include "mscat.h"
|
2005-12-07 12:51:39 +01:00
|
|
|
#include "objbase.h"
|
2001-04-16 21:36:12 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2001-04-16 21:36:12 +02:00
|
|
|
|
2004-02-26 06:30:54 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
|
2001-04-16 21:36:12 +02:00
|
|
|
|
2006-03-21 16:18:24 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllMain (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
|
|
|
{
|
|
|
|
switch(reason)
|
|
|
|
{
|
|
|
|
case DLL_WINE_PREATTACH:
|
|
|
|
return FALSE; /* prefer native version */
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
DisableThreadLibraryCalls( inst );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2004-10-18 23:19:46 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* CryptCATAdminAcquireContext (WINTRUST.@)
|
|
|
|
*/
|
2004-10-21 23:00:29 +02:00
|
|
|
BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN* catAdmin,
|
|
|
|
const GUID *sysSystem, DWORD dwFlags )
|
2004-10-18 23:19:46 +02:00
|
|
|
{
|
|
|
|
FIXME("%p %s %lx\n", catAdmin, debugstr_guid(sysSystem), dwFlags);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2005-06-05 19:53:48 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* CryptCATAdminCalcHashFromFileHandle (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash,
|
|
|
|
BYTE* pbHash, DWORD dwFlags )
|
|
|
|
{
|
|
|
|
FIXME("%p %p %p %lx\n", hFile, pcbHash, pbHash, dwFlags);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2005-02-23 13:43:12 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* CryptCATAdminReleaseContext (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
|
|
|
|
{
|
|
|
|
FIXME("%p %lx\n", hCatAdmin, dwFlags);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2001-04-25 21:54:21 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WinVerifyTrust (WINTRUST.@)
|
|
|
|
*/
|
2004-10-21 23:00:29 +02:00
|
|
|
LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, WINTRUST_DATA* ActionData )
|
2001-04-16 21:36:12 +02:00
|
|
|
{
|
2006-03-22 05:46:02 +01:00
|
|
|
static const GUID gen_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2;
|
2005-09-12 12:10:36 +02:00
|
|
|
|
2005-07-15 11:54:34 +02:00
|
|
|
FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
|
|
|
|
|
|
|
|
/* Trust providers can be found at:
|
|
|
|
* HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\CertCheck\
|
|
|
|
*
|
2005-09-12 12:10:36 +02:00
|
|
|
* Process Explorer expects a correct implementation, so we
|
|
|
|
* return TRUST_E_PROVIDER_UNKNOWN.
|
|
|
|
*
|
|
|
|
* Girotel needs ERROR_SUCCESS.
|
|
|
|
*
|
|
|
|
* For now return TRUST_E_PROVIDER_UNKNOWN only when
|
|
|
|
* ActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2.
|
|
|
|
*
|
2005-07-15 11:54:34 +02:00
|
|
|
*/
|
|
|
|
|
2006-03-22 05:46:02 +01:00
|
|
|
if (IsEqualCLSID(ActionID, &gen_verify_v2))
|
2005-09-12 12:10:36 +02:00
|
|
|
return TRUST_E_PROVIDER_UNKNOWN;
|
|
|
|
|
|
|
|
return ERROR_SUCCESS;
|
2001-04-16 21:36:12 +02:00
|
|
|
}
|
2005-06-01 21:49:41 +02:00
|
|
|
|
2006-02-18 15:50:01 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WinVerifyTrustEx (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI WinVerifyTrustEx( HWND hwnd, GUID *ActionID,
|
|
|
|
WINTRUST_DATA* ActionData )
|
|
|
|
{
|
|
|
|
FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WTHelperGetProvSignerFromChain (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
CRYPT_PROVIDER_SGNR * WINAPI WTHelperGetProvSignerFromChain(
|
|
|
|
CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner,
|
|
|
|
DWORD idxCounterSigner)
|
|
|
|
{
|
|
|
|
FIXME("%p %ld %d %ld\n", pProvData, idxSigner, fCounterSigner,
|
|
|
|
idxCounterSigner);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WTHelperProvDataFromStateData (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData)
|
|
|
|
{
|
|
|
|
FIXME("%p\n", hStateData);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2005-06-01 21:49:41 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WintrustAddActionID (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
|
|
|
|
CRYPT_REGISTER_ACTIONID* psProvInfo)
|
|
|
|
{
|
|
|
|
FIXME("%p %lx %p\n", pgActionID, fdwFlags, psProvInfo);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2005-09-16 20:44:26 +02:00
|
|
|
* WintrustGetRegPolicyFlags (WINTRUST.@)
|
2005-06-01 21:49:41 +02:00
|
|
|
*/
|
|
|
|
void WINAPI WintrustGetRegPolicyFlags( DWORD* pdwPolicyFlags )
|
|
|
|
{
|
|
|
|
FIXME("%p\n", pdwPolicyFlags);
|
|
|
|
*pdwPolicyFlags = 0;
|
|
|
|
}
|
2005-09-16 20:44:26 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WintrustSetRegPolicyFlags (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
|
|
|
|
{
|
|
|
|
FIXME("stub: %lx\n", dwPolicyFlags);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllRegisterServer (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllRegisterServer(void)
|
|
|
|
{
|
|
|
|
FIXME("stub\n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllUnregisterServer (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllUnregisterServer(void)
|
|
|
|
{
|
|
|
|
FIXME("stub\n");
|
|
|
|
return S_OK;
|
|
|
|
}
|