urlmon/tests: Fix timeout for tests on win9x.
[wine] / dlls / cryptdlg / main.c
1 /*
2  * Copyright 2008 Maarten Lankhorst
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 "wincrypt.h"
26 #include "wintrust.h"
27 #include "wine/debug.h"
28
29 WINE_DEFAULT_DEBUG_CHANNEL(cryptdlg);
30
31 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
32 {
33     TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
34
35     switch (fdwReason)
36     {
37         case DLL_WINE_PREATTACH:
38             return FALSE;    /* prefer native version */
39         case DLL_PROCESS_ATTACH:
40             DisableThreadLibraryCalls(hinstDLL);
41             break;
42         case DLL_PROCESS_DETACH:
43             break;
44         default:
45             break;
46     }
47     return TRUE;
48 }
49
50 /***********************************************************************
51  *              GetFriendlyNameOfCertA (CRYPTDLG.@)
52  */
53 DWORD GetFriendlyNameOfCertA(PCCERT_CONTEXT pccert, LPSTR pchBuffer,
54                              DWORD cchBuffer)
55 {
56     return CertGetNameStringA(pccert, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL,
57      pchBuffer, cchBuffer);
58 }
59
60 /***********************************************************************
61  *              GetFriendlyNameOfCertW (CRYPTDLG.@)
62  */
63 DWORD GetFriendlyNameOfCertW(PCCERT_CONTEXT pccert, LPWSTR pchBuffer,
64                              DWORD cchBuffer)
65 {
66     return CertGetNameStringW(pccert, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL,
67      pchBuffer, cchBuffer);
68 }
69
70 /***********************************************************************
71  *              CertTrustInit (CRYPTDLG.@)
72  */
73 HRESULT WINAPI CertTrustInit(CRYPT_PROVIDER_DATA *pProvData)
74 {
75     FIXME("(%p)\n", pProvData);
76     return E_NOTIMPL;
77 }
78
79 /***********************************************************************
80  *              CertTrustCertPolicy (CRYPTDLG.@)
81  */
82 BOOL WINAPI CertTrustCertPolicy(CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner)
83 {
84     FIXME("(%p, %d, %s, %d)\n", pProvData, idxSigner, fCounterSignerChain ? "TRUE" : "FALSE", idxCounterSigner);
85     return FALSE;
86 }
87
88 /***********************************************************************
89  *              CertTrustCleanup (CRYPTDLG.@)
90  */
91 HRESULT WINAPI CertTrustCleanup(CRYPT_PROVIDER_DATA *pProvData)
92 {
93     FIXME("(%p)\n", pProvData);
94     return E_NOTIMPL;
95 }
96
97 /***********************************************************************
98  *              CertTrustFinalPolicy (CRYPTDLG.@)
99  */
100 HRESULT WINAPI CertTrustFinalPolicy(CRYPT_PROVIDER_DATA *pProvData)
101 {
102     FIXME("(%p)\n", pProvData);
103     return E_NOTIMPL;
104 }