dssenh: Register the DSS provider.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c690a31acf
commit
3ae2dd164c
|
@ -4,3 +4,5 @@ EXTRADLLFLAGS = -mno-cygwin
|
|||
|
||||
C_SRCS = \
|
||||
main.c
|
||||
|
||||
RC_SRCS = rsrc.rc
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
HKLM
|
||||
{
|
||||
NoRemove Software
|
||||
{
|
||||
NoRemove Microsoft
|
||||
{
|
||||
NoRemove Cryptography
|
||||
{
|
||||
NoRemove Defaults
|
||||
{
|
||||
NoRemove Provider
|
||||
{
|
||||
ForceRemove 'Microsoft Base DSS Cryptographic Provider'
|
||||
{
|
||||
val 'Image Path' = s '%MODULE%'
|
||||
val 'Type' = d 3
|
||||
}
|
||||
ForceRemove 'Microsoft Base DSS and Diffie-Hellman Cryptographic Provider'
|
||||
{
|
||||
val 'Image Path' = s '%MODULE%'
|
||||
val 'Type' = d 13
|
||||
}
|
||||
ForceRemove 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider'
|
||||
{
|
||||
val 'Image Path' = s '%MODULE%'
|
||||
val 'Type' = d 13
|
||||
}
|
||||
ForceRemove 'Microsoft DH SChannel Cryptographic Provider'
|
||||
{
|
||||
val 'Image Path' = s '%MODULE%'
|
||||
val 'Type' = d 18
|
||||
}
|
||||
}
|
||||
NoRemove 'Provider Types'
|
||||
{
|
||||
ForceRemove 'Type 003'
|
||||
{
|
||||
val 'Name' = s 'Microsoft Base DSS Cryptographic Provider'
|
||||
val 'TypeName' = s 'DSS Signature'
|
||||
}
|
||||
ForceRemove 'Type 013'
|
||||
{
|
||||
val 'Name' = s 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider'
|
||||
val 'TypeName' = s 'DSS Signature with Diffie-Hellman Key Exchange'
|
||||
}
|
||||
ForceRemove 'Type 018'
|
||||
{
|
||||
val 'Name' = s 'Microsoft DH SChannel Cryptographic Provider'
|
||||
val 'TypeName' = s 'Diffie-Hellman SChannel'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,8 +22,13 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wincrypt.h"
|
||||
#include "objbase.h"
|
||||
#include "rpcproxy.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
static HINSTANCE instance;
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(dssenh);
|
||||
|
||||
BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags, PVTableProvStruc vtable )
|
||||
|
@ -106,11 +111,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
|
||||
switch (fdwReason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
break;
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
instance = hinstDLL;
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -120,8 +126,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
*/
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
FIXME("Not implemented.\n");
|
||||
return E_UNEXPECTED;
|
||||
return __wine_register_resources( instance );
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
|
@ -129,6 +134,5 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
*/
|
||||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
FIXME("Not implemented.\n");
|
||||
return E_UNEXPECTED;
|
||||
return __wine_unregister_resources( instance );
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Resources for dssenh
|
||||
*
|
||||
* Copyright 2020 Hans Leidekker for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/* @makedep: dssenh.rgs */
|
||||
1 WINE_REGISTRY dssenh.rgs
|
|
@ -54,7 +54,6 @@ static void test_acquire_context(void)
|
|||
/* cannot acquire along with PROV_RSA_SIG, not compatible */
|
||||
SetLastError(0xdeadbeef);
|
||||
result = CryptAcquireContextA(&hProv, NULL, MS_DEF_DSS_PROV_A, PROV_RSA_SIG, 0);
|
||||
todo_wine
|
||||
ok(!result && GetLastError() == NTE_PROV_TYPE_NO_MATCH,
|
||||
"Expected NTE_PROV_TYPE_NO_MATCH, got %08x\n", GetLastError());
|
||||
|
||||
|
@ -574,7 +573,7 @@ static void test_data_encryption(const struct encrypt_test *tests, int testLen)
|
|||
SetLastError(0xdeadbeef);
|
||||
result = CryptAcquireContextA(
|
||||
&hProv, NULL, MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_VERIFYCONTEXT);
|
||||
if(!result && GetLastError() == NTE_KEYSET_NOT_DEF)
|
||||
if (!result)
|
||||
{
|
||||
skip("DSSENH is currently not available, skipping encryption tests.\n");
|
||||
return;
|
||||
|
@ -665,7 +664,7 @@ static void test_cipher_modes(const struct ciphermode_test *tests, int testLen)
|
|||
SetLastError(0xdeadbeef);
|
||||
result = CryptAcquireContextA(
|
||||
&hProv, NULL, MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_VERIFYCONTEXT);
|
||||
if(!result && GetLastError() == NTE_KEYSET_NOT_DEF)
|
||||
if (!result)
|
||||
{
|
||||
skip("DSSENH is currently not available, skipping block cipher mode tests.\n");
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue