Make rsabase.dll self-register.

This commit is contained in:
Juan Lang 2004-03-01 21:20:33 +00:00 committed by Alexandre Julliard
parent 1795994d53
commit 2faaf2265d
3 changed files with 34 additions and 8 deletions

View File

@ -4,7 +4,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = rsabase.dll MODULE = rsabase.dll
IMPORTS = kernel32 IMPORTS = advapi32 kernel32
C_SRCS = \ C_SRCS = \
main.c main.c

View File

@ -32,6 +32,7 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winreg.h"
#include "wincrypt.h" #include "wincrypt.h"
#ifdef HAVE_OPENSSL_SSL_H #ifdef HAVE_OPENSSL_SSL_H
@ -291,12 +292,41 @@ BOOL WINAPI RSA_CPVerifySignature(HCRYPTPROV hProv, HCRYPTHASH hHash, CONST BYTE
return FALSE; return FALSE;
} }
static const WCHAR szRSAKey[] = { 'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\','C','r','y','p','t','o','g','r',
'a','p','h','y','\\','D','e','f','a','u','l','t','s','\\','P','r','o','v',
'i','d','e','r','\\','M','i','c','r','o','s','o','f','t',' ','B','a','s',
'e',' ','C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r',
'o','v','i','d','e','r',' ','v','1','.','0',0 };
/*********************************************************************** /***********************************************************************
* DllRegisterServer (RSABASE.@) * DllRegisterServer (RSABASE.@)
*/ */
HRESULT WINAPI RSABASE_DllRegisterServer() HRESULT WINAPI RSABASE_DllRegisterServer()
{ {
FIXME("\n"); HKEY key;
DWORD dp;
long apiRet = RegCreateKeyExW(HKEY_LOCAL_MACHINE, szRSAKey, 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &dp);
if (apiRet == ERROR_SUCCESS)
{
if (dp == REG_CREATED_NEW_KEY)
{
static const WCHAR szImagePath[] = { 'I','m','a','g','e','P','a',
't','h',0 };
static const WCHAR szRSABase[] = { 'r','s','a','b','a','s','e','.',
'd','l','l',0 };
static const WCHAR szType[] = { 'T','y','p','e',0 };
DWORD type = 1;
RegSetValueExW(key, szImagePath, 0, REG_SZ, (LPBYTE)szRSABase,
(lstrlenW(szRSABase) + 1) * sizeof(WCHAR));
RegSetValueExW(key, szType, 0, REG_DWORD, (LPBYTE)&type,
sizeof(type));
}
RegCloseKey(key);
}
return S_OK; return S_OK;
} }
@ -305,6 +335,6 @@ HRESULT WINAPI RSABASE_DllRegisterServer()
*/ */
HRESULT WINAPI RSABASE_DllUnregisterServer() HRESULT WINAPI RSABASE_DllUnregisterServer()
{ {
FIXME("\n"); RegDeleteKeyW(HKEY_LOCAL_MACHINE, szRSAKey);
return S_OK; return S_OK;
} }

View File

@ -30,7 +30,6 @@ RegisterDlls=RegisterDllsSection
UpdateInis=SystemIni UpdateInis=SystemIni
AddReg=\ AddReg=\
Classes,\ Classes,\
Crypto,\
CurrentVersion,\ CurrentVersion,\
Debugger,\ Debugger,\
Desktop,\ Desktop,\
@ -76,10 +75,6 @@ HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0,,,"OLE Automation"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\0\win32,,,"stdole2.tlb" HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\0\win32,,,"stdole2.tlb"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\FLAGS,,,"0" HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\FLAGS,,,"0"
[Crypto]
HKLM,Software\Microsoft\Cryptography\Defaults\Provider\Microsoft Base Cryptographic Provider v1.0,Image Path,,rsabase.dll
HKLM,Software\Microsoft\Cryptography\Defaults\Provider\Microsoft Base Cryptographic Provider v1.0,Type,0x10001,1
[CurrentVersion] [CurrentVersion]
HKLM,%CurrentVersion%,"CommonFilesDir",,"c:\Program Files\Common Files" HKLM,%CurrentVersion%,"CommonFilesDir",,"c:\Program Files\Common Files"
HKLM,%CurrentVersion%,"FirstInstallDateTime",1,21,81,7c,23 HKLM,%CurrentVersion%,"FirstInstallDateTime",1,21,81,7c,23
@ -1991,6 +1986,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,ole32.dll,1 11,,ole32.dll,1
11,,oleaut32.dll,1 11,,oleaut32.dll,1
11,,quartz.dll,1 11,,quartz.dll,1
11,,rsabase.dll,1
11,,shdocvw.dll,1 11,,shdocvw.dll,1
11,,shell32.dll,1 11,,shell32.dll,1
11,,urlmon.dll,1 11,,urlmon.dll,1