mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
msisip: Implement DllRegisterServer/DllUnregisterServer.
This commit is contained in:
parent
8a6c2c2b80
commit
8fbd2c8514
@ -3,7 +3,7 @@ TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = msisip.dll
|
||||
IMPORTS = kernel32
|
||||
IMPORTS = crypt32 kernel32
|
||||
|
||||
C_SRCS = \
|
||||
main.c
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wincrypt.h"
|
||||
#include "mssip.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msisip);
|
||||
@ -43,3 +45,51 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GUID mySubject = { 0x000c10f1, 0x0000, 0x0000,
|
||||
{ 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 }};
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (MSISIP.@)
|
||||
*/
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
static WCHAR msisip[] = { 'M','S','I','S','I','P','.','D','L','L',0 };
|
||||
static WCHAR getSignedDataMsg[] = { 'M','s','i','S','I','P','G','e','t',
|
||||
'S','i','g','n','e','d','D','a','t','a','M','s','g',0 };
|
||||
static WCHAR putSignedDataMsg[] = { 'M','s','i','S','I','P','P','u','t',
|
||||
'S','i','g','n','e','d','D','a','t','a','M','s','g',0 };
|
||||
static WCHAR createIndirectData[] = { 'M','s','i','S','I','P',
|
||||
'C','r','e','a','t','e','I','n','d','i','r','e','c','t','D','a','t','a',
|
||||
0 };
|
||||
static WCHAR verifyIndirectData[] = { 'M','s','i','S','I','P',
|
||||
'V','e','r','i','f','y','I','n','d','i','r','e','c','t','D','a','t','a',
|
||||
0 };
|
||||
static WCHAR removeSignedDataMsg[] = { 'M','s','i','S','I','P','R','e','m',
|
||||
'o','v','e','S','i','g','n','e','d','D','a','t','a','M','s','g', 0 };
|
||||
static WCHAR isMyTypeOfFile[] = { 'M','s','i','S','I','P',
|
||||
'I','s','M','y','T','y','p','e','O','f','F','i','l','e',0 };
|
||||
|
||||
SIP_ADD_NEWPROVIDER prov;
|
||||
|
||||
memset(&prov, 0, sizeof(prov));
|
||||
prov.cbStruct = sizeof(prov);
|
||||
prov.pwszDLLFileName = msisip;
|
||||
prov.pgSubject = &mySubject;
|
||||
prov.pwszGetFuncName = getSignedDataMsg;
|
||||
prov.pwszPutFuncName = putSignedDataMsg;
|
||||
prov.pwszCreateFuncName = createIndirectData;
|
||||
prov.pwszVerifyFuncName = verifyIndirectData;
|
||||
prov.pwszRemoveFuncName = removeSignedDataMsg;
|
||||
prov.pwszIsFunctionNameFmt2 = isMyTypeOfFile;
|
||||
return CryptSIPAddProvider(&prov) ? S_OK : S_FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (MSISIP.@)
|
||||
*/
|
||||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
CryptSIPRemoveProvider(&mySubject);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -4,5 +4,5 @@
|
||||
8 stub MsiSIPRemoveSignedDataMsg
|
||||
9 stub MsiSIPCreateIndirectData
|
||||
10 stub MsiSIPVerifyIndirectData
|
||||
11 stub DllRegisterServer
|
||||
12 stub DllUnregisterServer
|
||||
11 stdcall DllRegisterServer()
|
||||
12 stdcall DllUnregisterServer()
|
||||
|
Loading…
Reference in New Issue
Block a user