shell32: Add missing '\n' to Wine trace.
[wine] / dlls / 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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 "softpub.h"
29 #include "mscat.h"
30 #include "objbase.h"
31
32 #include "wine/debug.h"
33
34 WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
35
36
37 /***********************************************************************
38  *              DllMain  (WINTRUST.@)
39  */
40 BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
41 {
42     switch(reason)
43     {
44     case DLL_WINE_PREATTACH:
45         return FALSE;  /* prefer native version */
46     case DLL_PROCESS_ATTACH:
47         DisableThreadLibraryCalls( inst );
48         break;
49     }
50     return TRUE;
51 }
52
53 /***********************************************************************
54  *              TrustIsCertificateSelfSigned (WINTRUST.@)
55  */
56 BOOL WINAPI TrustIsCertificateSelfSigned( PCCERT_CONTEXT cert )
57 {
58     BOOL ret;
59
60     TRACE("%p\n", cert);
61     ret = CertCompareCertificateName(cert->dwCertEncodingType,
62      &cert->pCertInfo->Subject, &cert->pCertInfo->Issuer);
63     return ret;
64 }
65
66 /***********************************************************************
67  *              WinVerifyTrust (WINTRUST.@)
68  *
69  * Verifies an object by calling the specified trust provider.
70  *
71  * PARAMS
72  *   hwnd       [I] Handle to a caller window.
73  *   ActionID   [I] Pointer to a GUID that identifies the action to perform.
74  *   ActionData [I] Information used by the trust provider to verify the object.
75  *
76  * RETURNS
77  *   Success: Zero.
78  *   Failure: A TRUST_E_* error code.
79  *
80  * NOTES
81  *   Trust providers can be found at:
82  *   HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\
83  */
84 LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, LPVOID ActionData )
85 {
86     FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
87     return ERROR_SUCCESS;
88 }
89
90 /***********************************************************************
91  *              WinVerifyTrustEx (WINTRUST.@)
92  */
93 HRESULT WINAPI WinVerifyTrustEx( HWND hwnd, GUID *ActionID,
94  WINTRUST_DATA* ActionData )
95 {
96     FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
97     return S_OK;
98 }
99
100 /***********************************************************************
101  *              WTHelperGetProvSignerFromChain (WINTRUST.@)
102  */
103 CRYPT_PROVIDER_SGNR * WINAPI WTHelperGetProvSignerFromChain(
104  CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner,
105  DWORD idxCounterSigner)
106 {
107     FIXME("%p %d %d %d\n", pProvData, idxSigner, fCounterSigner,
108      idxCounterSigner);
109     return NULL;
110 }
111
112 /***********************************************************************
113  *              WTHelperProvDataFromStateData (WINTRUST.@)
114  */
115 CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData)
116 {
117     FIXME("%p\n", hStateData);
118     return NULL;
119 }
120
121 /***********************************************************************
122  *              WintrustLoadFunctionPointers (WINTRUST.@)
123  */
124 BOOL WINAPI WintrustLoadFunctionPointers( GUID* pgActionID,
125                                           CRYPT_PROVIDER_FUNCTIONS* pPfns )
126 {
127     FIXME("%s %p\n", debugstr_guid(pgActionID), pPfns);
128     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
129     return FALSE;
130 }
131
132 /***********************************************************************
133  *              WintrustGetRegPolicyFlags (WINTRUST.@)
134  */
135 void WINAPI WintrustGetRegPolicyFlags( DWORD* pdwPolicyFlags )
136 {
137     FIXME("%p\n", pdwPolicyFlags);
138     *pdwPolicyFlags = 0;
139 }
140
141 /***********************************************************************
142  *              WintrustSetRegPolicyFlags (WINTRUST.@)
143  */
144 BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
145 {
146     FIXME("stub: %x\n", dwPolicyFlags);
147     return TRUE;
148 }