move more dlls
[reactos.git] / reactos / dll / wintrust / wintrust_main.c
1 /*
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
19 #include "config.h"
20
21 #include <stdarg.h>
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winerror.h"
26 #include "guiddef.h"
27 #include "wintrust.h"
28 #include "mscat.h"
29 #include "objbase.h"
30
31 #include "wine/debug.h"
32
33 WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
34
35 /***********************************************************************
36 * CryptCATAdminAcquireContext (WINTRUST.@)
37 */
38 BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN* catAdmin,
39 const GUID *sysSystem, DWORD dwFlags )
40 {
41 FIXME("%p %s %lx\n", catAdmin, debugstr_guid(sysSystem), dwFlags);
42 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
43 return FALSE;
44 }
45
46 /***********************************************************************
47 * CryptCATAdminCalcHashFromFileHandle (WINTRUST.@)
48 */
49 BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash,
50 BYTE* pbHash, DWORD dwFlags )
51 {
52 FIXME("%p %p %p %lx\n", hFile, pcbHash, pbHash, dwFlags);
53 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
54 return FALSE;
55 }
56
57 /***********************************************************************
58 * CryptCATAdminReleaseContext (WINTRUST.@)
59 */
60 BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
61 {
62 FIXME("%p %lx\n", hCatAdmin, dwFlags);
63 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
64 return FALSE;
65 }
66
67 /***********************************************************************
68 * WinVerifyTrust (WINTRUST.@)
69 */
70 LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, WINTRUST_DATA* ActionData )
71 {
72 static const GUID WINTRUST_ACTION_GENERIC_VERIFY_V2 = { 0xaac56b, 0xcd44, 0x11d0,
73 { 0x8c,0xc2,0x00,0xc0,0x4f,0xc2,0x95,0xee }};
74
75 FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
76
77 /* Trust providers can be found at:
78 * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\CertCheck\
79 *
80 * Process Explorer expects a correct implementation, so we
81 * return TRUST_E_PROVIDER_UNKNOWN.
82 *
83 * Girotel needs ERROR_SUCCESS.
84 *
85 * For now return TRUST_E_PROVIDER_UNKNOWN only when
86 * ActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2.
87 *
88 */
89
90 if (IsEqualCLSID(ActionID, &WINTRUST_ACTION_GENERIC_VERIFY_V2))
91 return TRUST_E_PROVIDER_UNKNOWN;
92
93 return ERROR_SUCCESS;
94 }
95
96 /***********************************************************************
97 * WintrustAddActionID (WINTRUST.@)
98 */
99 BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
100 CRYPT_REGISTER_ACTIONID* psProvInfo)
101 {
102 FIXME("%p %lx %p\n", pgActionID, fdwFlags, psProvInfo);
103 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
104 return FALSE;
105 }
106
107 /***********************************************************************
108 * WintrustGetRegPolicyFlags (WINTRUST.@)
109 */
110 void WINAPI WintrustGetRegPolicyFlags( DWORD* pdwPolicyFlags )
111 {
112 FIXME("%p\n", pdwPolicyFlags);
113 *pdwPolicyFlags = 0;
114 }
115
116 /***********************************************************************
117 * WintrustSetRegPolicyFlags (WINTRUST.@)
118 */
119 BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
120 {
121 FIXME("stub: %lx\n", dwPolicyFlags);
122 return TRUE;
123 }
124
125 /***********************************************************************
126 * DllRegisterServer (WINTRUST.@)
127 */
128 HRESULT WINAPI DllRegisterServer(void)
129 {
130 FIXME("stub\n");
131 return S_OK;
132 }
133
134 /***********************************************************************
135 * DllUnregisterServer (WINTRUST.@)
136 */
137 HRESULT WINAPI DllUnregisterServer(void)
138 {
139 FIXME("stub\n");
140 return S_OK;
141 }