2 * Copyright 2001 Rein Klazes
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.
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.
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
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(wintrust
);
37 /***********************************************************************
38 * DllMain (WINTRUST.@)
40 BOOL WINAPI
DllMain( HINSTANCE inst
, DWORD reason
, LPVOID reserved
)
44 case DLL_WINE_PREATTACH
:
45 return FALSE
; /* prefer native version */
46 case DLL_PROCESS_ATTACH
:
47 DisableThreadLibraryCalls( inst
);
53 /***********************************************************************
54 * CryptCATAdminAcquireContext (WINTRUST.@)
56 BOOL WINAPI
CryptCATAdminAcquireContext(HCATADMIN
* catAdmin
,
57 const GUID
*sysSystem
, DWORD dwFlags
)
59 FIXME("%p %s %lx\n", catAdmin
, debugstr_guid(sysSystem
), dwFlags
);
60 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
64 /***********************************************************************
65 * CryptCATAdminCalcHashFromFileHandle (WINTRUST.@)
67 BOOL WINAPI
CryptCATAdminCalcHashFromFileHandle(HANDLE hFile
, DWORD
* pcbHash
,
68 BYTE
* pbHash
, DWORD dwFlags
)
70 FIXME("%p %p %p %lx\n", hFile
, pcbHash
, pbHash
, dwFlags
);
71 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
75 /***********************************************************************
76 * CryptCATAdminReleaseContext (WINTRUST.@)
78 BOOL WINAPI
CryptCATAdminReleaseContext(HCATADMIN hCatAdmin
, DWORD dwFlags
)
80 FIXME("%p %lx\n", hCatAdmin
, dwFlags
);
81 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
85 /***********************************************************************
86 * WinVerifyTrust (WINTRUST.@)
88 LONG WINAPI
WinVerifyTrust( HWND hwnd
, GUID
*ActionID
, WINTRUST_DATA
* ActionData
)
90 static const GUID gen_verify_v2
= WINTRUST_ACTION_GENERIC_VERIFY_V2
;
92 FIXME("%p %s %p\n", hwnd
, debugstr_guid(ActionID
), ActionData
);
94 /* Trust providers can be found at:
95 * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\CertCheck\
97 * Process Explorer expects a correct implementation, so we
98 * return TRUST_E_PROVIDER_UNKNOWN.
100 * Girotel needs ERROR_SUCCESS.
102 * For now return TRUST_E_PROVIDER_UNKNOWN only when
103 * ActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2.
107 if (IsEqualCLSID(ActionID
, &gen_verify_v2
))
108 return TRUST_E_PROVIDER_UNKNOWN
;
110 return ERROR_SUCCESS
;
113 /***********************************************************************
114 * WinVerifyTrustEx (WINTRUST.@)
116 HRESULT WINAPI
WinVerifyTrustEx( HWND hwnd
, GUID
*ActionID
,
117 WINTRUST_DATA
* ActionData
)
119 FIXME("%p %s %p\n", hwnd
, debugstr_guid(ActionID
), ActionData
);
123 /***********************************************************************
124 * WTHelperGetProvSignerFromChain (WINTRUST.@)
126 CRYPT_PROVIDER_SGNR
* WINAPI
WTHelperGetProvSignerFromChain(
127 CRYPT_PROVIDER_DATA
*pProvData
, DWORD idxSigner
, BOOL fCounterSigner
,
128 DWORD idxCounterSigner
)
130 FIXME("%p %ld %d %ld\n", pProvData
, idxSigner
, fCounterSigner
,
135 /***********************************************************************
136 * WTHelperProvDataFromStateData (WINTRUST.@)
138 CRYPT_PROVIDER_DATA
* WINAPI
WTHelperProvDataFromStateData(HANDLE hStateData
)
140 FIXME("%p\n", hStateData
);
144 /***********************************************************************
145 * WintrustAddActionID (WINTRUST.@)
147 BOOL WINAPI
WintrustAddActionID( GUID
* pgActionID
, DWORD fdwFlags
,
148 CRYPT_REGISTER_ACTIONID
* psProvInfo
)
150 FIXME("%p %lx %p\n", pgActionID
, fdwFlags
, psProvInfo
);
151 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
155 /***********************************************************************
156 * WintrustGetRegPolicyFlags (WINTRUST.@)
158 void WINAPI
WintrustGetRegPolicyFlags( DWORD
* pdwPolicyFlags
)
160 FIXME("%p\n", pdwPolicyFlags
);
164 /***********************************************************************
165 * WintrustSetRegPolicyFlags (WINTRUST.@)
167 BOOL WINAPI
WintrustSetRegPolicyFlags( DWORD dwPolicyFlags
)
169 FIXME("stub: %lx\n", dwPolicyFlags
);
173 /***********************************************************************
174 * DllRegisterServer (WINTRUST.@)
176 HRESULT WINAPI
DllRegisterServer(void)
182 /***********************************************************************
183 * DllUnregisterServer (WINTRUST.@)
185 HRESULT WINAPI
DllUnregisterServer(void)