ReactOS 0.4.16-dev-889-g9563c07
mssign32_main.c
Go to the documentation of this file.
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
33
35{
36 switch(reason)
37 {
38#ifndef __REACTOS__
39 case DLL_WINE_PREATTACH:
40 return FALSE; /* prefer native version */
41#endif
44 break;
45 }
46 return TRUE;
47}
48
49
50HRESULT WINAPI PvkGetCryptProv(HWND hwnd, LPCWSTR pwszCaption, LPCWSTR pwszCapiProvider,
51 DWORD dwProviderType, LPCWSTR pwszPvkFile, LPCWSTR pwszKeyContainerName,
52 DWORD *pdwKeySpec, LPWSTR *ppwszTmpContainer, HCRYPTPROV *phCryptProv)
53{
54 FIXME("%p %s %s %d %s %s %p %p %p stub\n", hwnd, debugstr_w(pwszCaption), debugstr_w(pwszCapiProvider),
55 dwProviderType, debugstr_w(pwszPvkFile), debugstr_w(pwszKeyContainerName),
56 pdwKeySpec, ppwszTmpContainer, phCryptProv);
57
58 return E_FAIL;
59}
60
62 BYTE *pbData, DWORD cbData, HWND hwndOwner, LPCWSTR pwszKeyName,
63 DWORD *pdwKeySpec, HCRYPTPROV *phCryptProv, LPWSTR *ppwszTmpContainer)
64{
65 FIXME("%s %d %p %d %p %s %p %p %p stub\n", debugstr_w(pwszProvName), dwProvType,
66 pbData, cbData, hwndOwner, debugstr_w(pwszKeyName), pdwKeySpec,
67 phCryptProv, ppwszTmpContainer);
68
69 return FALSE;
70}
71
72void WINAPI PvkFreeCryptProv(HCRYPTPROV hProv, LPCWSTR pwszCapiProvider, DWORD dwProviderType,
73 LPWSTR pwszTmpContainer)
74{
75 FIXME("%08lx %s %d %s stub\n", hProv, debugstr_w(pwszCapiProvider), dwProviderType,
76 debugstr_w(pwszTmpContainer));
77}
78
80 SIGNER_SIGNATURE_INFO *signature_info, SIGNER_PROVIDER_INFO *provider_info,
81 const WCHAR *http_time_stamp, CRYPT_ATTRIBUTES *request, void *sip_data,
82 SIGNER_CONTEXT **signer_context)
83{
84 FIXME("%x %p %p %p %p %s %p %p %p stub\n", flags, subject_info, signer_cert, signature_info, provider_info,
85 wine_dbgstr_w(http_time_stamp), request, sip_data, signer_cert);
86 return E_NOTIMPL;
87}
88
90{
91 heap_free(signer_context);
92 return S_OK;
93}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
#define wine_dbgstr_w
Definition: kernel32.h:34
static HINSTANCE hinst
Definition: edit.c:551
static HCRYPTPROV hProv
Definition: rsaenh.c:32
void WINAPI PvkFreeCryptProv(HCRYPTPROV hProv, LPCWSTR pwszCapiProvider, DWORD dwProviderType, LPWSTR pwszTmpContainer)
Definition: mssign32_main.c:72
HRESULT WINAPI PvkGetCryptProv(HWND hwnd, LPCWSTR pwszCaption, LPCWSTR pwszCapiProvider, DWORD dwProviderType, LPCWSTR pwszPvkFile, LPCWSTR pwszKeyContainerName, DWORD *pdwKeySpec, LPWSTR *ppwszTmpContainer, HCRYPTPROV *phCryptProv)
Definition: mssign32_main.c:50
BOOL WINAPI PvkPrivateKeyAcquireContextFromMemory(LPCWSTR pwszProvName, DWORD dwProvType, BYTE *pbData, DWORD cbData, HWND hwndOwner, LPCWSTR pwszKeyName, DWORD *pdwKeySpec, HCRYPTPROV *phCryptProv, LPWSTR *ppwszTmpContainer)
Definition: mssign32_main.c:61
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID lpv)
Definition: mssign32_main.c:34
HRESULT WINAPI SignerSignEx(DWORD flags, SIGNER_SUBJECT_INFO *subject_info, SIGNER_CERT *signer_cert, SIGNER_SIGNATURE_INFO *signature_info, SIGNER_PROVIDER_INFO *provider_info, const WCHAR *http_time_stamp, CRYPT_ATTRIBUTES *request, void *sip_data, SIGNER_CONTEXT **signer_context)
Definition: mssign32_main.c:79
HRESULT WINAPI SignerFreeSignerContext(SIGNER_CONTEXT *signer_context)
Definition: mssign32_main.c:89
Definition: tftpd.h:86
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
Definition: wincrypt.h:4201
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WINAPI
Definition: msvc.h:6
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193