2002-03-09 23:29:33 +00: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 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-09 23:29:33 +00:00
|
|
|
*/
|
|
|
|
|
2001-04-16 19:36:12 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2001-04-16 19:36:12 +00:00
|
|
|
#include "windef.h"
|
2003-09-05 23:08:26 +00:00
|
|
|
#include "winbase.h"
|
2001-04-16 19:36:12 +00:00
|
|
|
#include "winerror.h"
|
|
|
|
#include "guiddef.h"
|
2004-10-21 21:00:29 +00:00
|
|
|
#include "wintrust.h"
|
2006-03-22 04:46:02 +00:00
|
|
|
#include "softpub.h"
|
2004-10-21 21:00:29 +00:00
|
|
|
#include "mscat.h"
|
2005-12-07 11:51:39 +00:00
|
|
|
#include "objbase.h"
|
2001-04-16 19:36:12 +00:00
|
|
|
|
2002-03-09 23:29:33 +00:00
|
|
|
#include "wine/debug.h"
|
2001-04-16 19:36:12 +00:00
|
|
|
|
2004-02-26 05:30:54 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
|
2001-04-16 19:36:12 +00:00
|
|
|
|
2006-03-21 15:18:24 +00: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;
|
|
|
|
}
|
|
|
|
|
2006-08-02 00:20:33 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* TrustIsCertificateSelfSigned (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI TrustIsCertificateSelfSigned( PCCERT_CONTEXT cert )
|
|
|
|
{
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
TRACE("%p\n", cert);
|
|
|
|
ret = CertCompareCertificateName(cert->dwCertEncodingType,
|
|
|
|
&cert->pCertInfo->Subject, &cert->pCertInfo->Issuer);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2001-04-25 19:54:21 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* WinVerifyTrust (WINTRUST.@)
|
2006-08-23 08:40:06 +00:00
|
|
|
*
|
|
|
|
* Verifies an object by calling the specified trust provider.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hwnd [I] Handle to a caller window.
|
|
|
|
* ActionID [I] Pointer to a GUID that identifies the action to perform.
|
|
|
|
* ActionData [I] Information used by the trust provider to verify the object.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Zero.
|
|
|
|
* Failure: A TRUST_E_* error code.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Trust providers can be found at:
|
|
|
|
* HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\
|
2001-04-25 19:54:21 +00:00
|
|
|
*/
|
2006-09-07 18:02:35 +00:00
|
|
|
LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, LPVOID ActionData )
|
2001-04-16 19:36:12 +00:00
|
|
|
{
|
2005-07-15 09:54:34 +00:00
|
|
|
FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
|
2005-09-12 10:10:36 +00:00
|
|
|
return ERROR_SUCCESS;
|
2001-04-16 19:36:12 +00:00
|
|
|
}
|
2005-06-01 19:49:41 +00:00
|
|
|
|
2006-02-18 14:50:01 +00: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)
|
|
|
|
{
|
2006-10-04 10:22:58 +00:00
|
|
|
FIXME("%p %d %d %d\n", pProvData, idxSigner, fCounterSigner,
|
2006-02-18 14:50:01 +00:00
|
|
|
idxCounterSigner);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WTHelperProvDataFromStateData (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData)
|
|
|
|
{
|
|
|
|
FIXME("%p\n", hStateData);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2006-08-15 14:47:04 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* WintrustLoadFunctionPointers (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI WintrustLoadFunctionPointers( GUID* pgActionID,
|
|
|
|
CRYPT_PROVIDER_FUNCTIONS* pPfns )
|
|
|
|
{
|
|
|
|
FIXME("%s %p\n", debugstr_guid(pgActionID), pPfns);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2005-06-01 19:49:41 +00:00
|
|
|
/***********************************************************************
|
2005-09-16 18:44:26 +00:00
|
|
|
* WintrustGetRegPolicyFlags (WINTRUST.@)
|
2005-06-01 19:49:41 +00:00
|
|
|
*/
|
|
|
|
void WINAPI WintrustGetRegPolicyFlags( DWORD* pdwPolicyFlags )
|
|
|
|
{
|
|
|
|
FIXME("%p\n", pdwPolicyFlags);
|
|
|
|
*pdwPolicyFlags = 0;
|
|
|
|
}
|
2005-09-16 18:44:26 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WintrustSetRegPolicyFlags (WINTRUST.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
|
|
|
|
{
|
2006-10-04 10:22:58 +00:00
|
|
|
FIXME("stub: %x\n", dwPolicyFlags);
|
2005-09-16 18:44:26 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|