blob: 76912b3902d169256f7b78d4a129a27f0febc228 [file] [log] [blame]
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00001/*
2 * Copyright 2001 Rein Klazes
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
Rein Klazes2a4c68b2001-04-16 19:36:12 +000019#include "config.h"
20
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000021#include <stdarg.h>
22
Rein Klazes2a4c68b2001-04-16 19:36:12 +000023#include "windef.h"
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000024#include "winbase.h"
Rein Klazes2a4c68b2001-04-16 19:36:12 +000025#include "winerror.h"
26#include "guiddef.h"
Francois Gouget85ae2552004-10-21 21:00:29 +000027#include "wintrust.h"
28#include "mscat.h"
Rein Klazes2a4c68b2001-04-16 19:36:12 +000029
Alexandre Julliard0799c1a2002-03-09 23:29:33 +000030#include "wine/debug.h"
Rein Klazes2a4c68b2001-04-16 19:36:12 +000031
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +000032WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
Rein Klazes2a4c68b2001-04-16 19:36:12 +000033
Patrik Stridvallb3086a72001-04-25 19:54:21 +000034/***********************************************************************
Stefan Leichter63289cd2004-10-18 21:19:46 +000035 * CryptCATAdminAcquireContext (WINTRUST.@)
36 */
Francois Gouget85ae2552004-10-21 21:00:29 +000037BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN* catAdmin,
38 const GUID *sysSystem, DWORD dwFlags )
Stefan Leichter63289cd2004-10-18 21:19:46 +000039{
40 FIXME("%p %s %lx\n", catAdmin, debugstr_guid(sysSystem), dwFlags);
41 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
42 return FALSE;
43}
44
45/***********************************************************************
Paul Vriens0aec9902005-06-05 17:53:48 +000046 * CryptCATAdminCalcHashFromFileHandle (WINTRUST.@)
47 */
48BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash,
49 BYTE* pbHash, DWORD dwFlags )
50{
51 FIXME("%p %p %p %lx\n", hFile, pcbHash, pbHash, dwFlags);
52 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
53 return FALSE;
54}
55
56/***********************************************************************
Michael Stefaniuca7400452005-02-23 12:43:12 +000057 * CryptCATAdminReleaseContext (WINTRUST.@)
58 */
59BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
60{
61 FIXME("%p %lx\n", hCatAdmin, dwFlags);
62 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
63 return FALSE;
64}
65
66/***********************************************************************
Patrik Stridvallb3086a72001-04-25 19:54:21 +000067 * WinVerifyTrust (WINTRUST.@)
68 */
Francois Gouget85ae2552004-10-21 21:00:29 +000069LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, WINTRUST_DATA* ActionData )
Rein Klazes2a4c68b2001-04-16 19:36:12 +000070{
Paul Vriens90215e82005-09-12 10:10:36 +000071 static const GUID WINTRUST_ACTION_GENERIC_VERIFY_V2 = { 0xaac56b, 0xcd44, 0x11d0,
72 { 0x8c,0xc2,0x00,0xc0,0x4f,0xc2,0x95,0xee }};
73
Paul Vriensa221e0e2005-07-15 09:54:34 +000074 FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
75
76 /* Trust providers can be found at:
77 * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\CertCheck\
78 *
Paul Vriens90215e82005-09-12 10:10:36 +000079 * Process Explorer expects a correct implementation, so we
80 * return TRUST_E_PROVIDER_UNKNOWN.
81 *
82 * Girotel needs ERROR_SUCCESS.
83 *
84 * For now return TRUST_E_PROVIDER_UNKNOWN only when
85 * ActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2.
86 *
Paul Vriensa221e0e2005-07-15 09:54:34 +000087 */
88
Paul Vriens90215e82005-09-12 10:10:36 +000089 if (IsEqualCLSID(ActionID, &WINTRUST_ACTION_GENERIC_VERIFY_V2))
90 return TRUST_E_PROVIDER_UNKNOWN;
91
92 return ERROR_SUCCESS;
Rein Klazes2a4c68b2001-04-16 19:36:12 +000093}
Mike McCormack632ee622005-06-01 19:49:41 +000094
95/***********************************************************************
96 * WintrustAddActionID (WINTRUST.@)
97 */
98BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
99 CRYPT_REGISTER_ACTIONID* psProvInfo)
100{
101 FIXME("%p %lx %p\n", pgActionID, fdwFlags, psProvInfo);
102 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
103 return FALSE;
104}
105
106/***********************************************************************
Stefan Leichterb7819c22005-09-16 18:44:26 +0000107 * WintrustGetRegPolicyFlags (WINTRUST.@)
Mike McCormack632ee622005-06-01 19:49:41 +0000108 */
109void WINAPI WintrustGetRegPolicyFlags( DWORD* pdwPolicyFlags )
110{
111 FIXME("%p\n", pdwPolicyFlags);
112 *pdwPolicyFlags = 0;
113}
Stefan Leichterb7819c22005-09-16 18:44:26 +0000114
115/***********************************************************************
116 * WintrustSetRegPolicyFlags (WINTRUST.@)
117 */
118BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
119{
120 FIXME("stub: %lx\n", dwPolicyFlags);
121 return TRUE;
122}
123
124/***********************************************************************
125 * DllRegisterServer (WINTRUST.@)
126 */
127HRESULT WINAPI DllRegisterServer(void)
128{
129 FIXME("stub\n");
130 return S_OK;
131}
132
133/***********************************************************************
134 * DllUnregisterServer (WINTRUST.@)
135 */
136HRESULT WINAPI DllUnregisterServer(void)
137{
138 FIXME("stub\n");
139 return S_OK;
140}