[CRT] Remove useless #undef abort from process.h
[reactos.git] / dll / win32 / mssign32 / mssign32_main.c
1 /*
2 * MSSIGN32 implementation
3 *
4 * Copyright 2009 Austin English
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #include <stdarg.h>
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "wincrypt.h"
26
27 #include "wine/debug.h"
28 #include "wine/heap.h"
29
30 #include "mssign32_private.h"
31
32 WINE_DEFAULT_DEBUG_CHANNEL(mssign);
33
34 BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv )
35 {
36 switch(reason)
37 {
38 case DLL_WINE_PREATTACH:
39 return FALSE; /* prefer native version */
40 case DLL_PROCESS_ATTACH:
41 DisableThreadLibraryCalls( hinst );
42 break;
43 }
44 return TRUE;
45 }
46
47
48 HRESULT WINAPI PvkGetCryptProv(HWND hwnd, LPCWSTR pwszCaption, LPCWSTR pwszCapiProvider,
49 DWORD dwProviderType, LPCWSTR pwszPvkFile, LPCWSTR pwszKeyContainerName,
50 DWORD *pdwKeySpec, LPWSTR *ppwszTmpContainer, HCRYPTPROV *phCryptProv)
51 {
52 FIXME("%p %s %s %d %s %s %p %p %p stub\n", hwnd, debugstr_w(pwszCaption), debugstr_w(pwszCapiProvider),
53 dwProviderType, debugstr_w(pwszPvkFile), debugstr_w(pwszKeyContainerName),
54 pdwKeySpec, ppwszTmpContainer, phCryptProv);
55
56 return E_FAIL;
57 }
58
59 BOOL WINAPI PvkPrivateKeyAcquireContextFromMemory(LPCWSTR pwszProvName, DWORD dwProvType,
60 BYTE *pbData, DWORD cbData, HWND hwndOwner, LPCWSTR pwszKeyName,
61 DWORD *pdwKeySpec, HCRYPTPROV *phCryptProv, LPWSTR *ppwszTmpContainer)
62 {
63 FIXME("%s %d %p %d %p %s %p %p %p stub\n", debugstr_w(pwszProvName), dwProvType,
64 pbData, cbData, hwndOwner, debugstr_w(pwszKeyName), pdwKeySpec,
65 phCryptProv, ppwszTmpContainer);
66
67 return FALSE;
68 }
69
70 void WINAPI PvkFreeCryptProv(HCRYPTPROV hProv, LPCWSTR pwszCapiProvider, DWORD dwProviderType,
71 LPWSTR pwszTmpContainer)
72 {
73 FIXME("%08lx %s %d %s stub\n", hProv, debugstr_w(pwszCapiProvider), dwProviderType,
74 debugstr_w(pwszTmpContainer));
75 }
76
77 HRESULT WINAPI SignerSignEx(DWORD flags, SIGNER_SUBJECT_INFO *subject_info, SIGNER_CERT *signer_cert,
78 SIGNER_SIGNATURE_INFO *signature_info, SIGNER_PROVIDER_INFO *provider_info,
79 const WCHAR *http_time_stamp, CRYPT_ATTRIBUTES *request, void *sip_data,
80 SIGNER_CONTEXT **signer_context)
81 {
82 FIXME("%x %p %p %p %p %s %p %p %p stub\n", flags, subject_info, signer_cert, signature_info, provider_info,
83 wine_dbgstr_w(http_time_stamp), request, sip_data, signer_cert);
84 return E_NOTIMPL;
85 }
86
87 HRESULT WINAPI SignerFreeSignerContext(SIGNER_CONTEXT *signer_context)
88 {
89 heap_free(signer_context);
90 return S_OK;
91 }