ReactOS  0.4.14-dev-552-g2fad488
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  case DLL_WINE_PREATTACH:
39  return FALSE; /* prefer native version */
40  case DLL_PROCESS_ATTACH:
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 
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 
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 
88 {
89  heap_free(signer_context);
90  return S_OK;
91 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
#define E_FAIL
Definition: ddrawi.h:102
static HCRYPTPROV hProv
Definition: rsaenh.c:32
void WINAPI PvkFreeCryptProv(HCRYPTPROV hProv, LPCWSTR pwszCapiProvider, DWORD dwProviderType, LPWSTR pwszTmpContainer)
Definition: mssign32_main.c:70
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
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:59
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:77
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
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:48
GLbitfield flags
Definition: glext.h:7161
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
unsigned char BYTE
Definition: mem.h:68
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID lpv)
Definition: mssign32_main.c:34
#define S_OK
Definition: intsafe.h:59
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT WINAPI SignerFreeSignerContext(SIGNER_CONTEXT *signer_context)
Definition: mssign32_main.c:87
Definition: tftpd.h:85
static HINSTANCE hinst
Definition: edit.c:551
WCHAR * LPWSTR
Definition: xmlstorage.h:184
WINE_DEFAULT_DEBUG_CHANNEL(mssign)
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
Definition: wincrypt.h:4201