1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

secur32: Use the Unix call helpers.

This commit is contained in:
Alexandre Julliard 2022-11-25 10:16:06 +01:00
parent e9c065e590
commit f82dc3d7c4
3 changed files with 4 additions and 17 deletions

View File

@ -40,9 +40,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
static unixlib_handle_t gnutls_handle;
#define GNUTLS_CALL( func, params ) __wine_unix_call( gnutls_handle, unix_ ## func, params )
#define GNUTLS_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
#define SCHAN_INVALID_HANDLE ~0UL
@ -1685,15 +1683,10 @@ void SECUR32_initSchannelSP(void)
};
SecureProvider *provider;
if (!gnutls_handle)
if (__wine_init_unix_call() || GNUTLS_CALL( process_attach, NULL ))
{
if (NtQueryVirtualMemory( GetCurrentProcess(), hsecur32, MemoryWineUnixFuncs,
&gnutls_handle, sizeof(gnutls_handle), NULL ) ||
GNUTLS_CALL( process_attach, NULL ))
{
ERR( "no schannel support, expect problems\n" );
return;
}
ERR( "no schannel support, expect problems\n" );
return;
}
schan_handle_table = malloc(64 * sizeof(*schan_handle_table));
@ -1751,5 +1744,4 @@ void SECUR32_deinitSchannelSP(void)
}
free(schan_handle_table);
GNUTLS_CALL( process_detach, NULL );
gnutls_handle = 0;
}

View File

@ -40,8 +40,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
HINSTANCE hsecur32;
/**
* Type definitions
*/
@ -1183,7 +1181,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
switch (reason)
{
case DLL_PROCESS_ATTACH:
hsecur32 = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
SECUR32_initializeProviders();
break;

View File

@ -26,8 +26,6 @@
#include "schannel.h"
#include "wine/list.h"
extern HINSTANCE hsecur32 DECLSPEC_HIDDEN;
typedef struct _SecureProvider
{
struct list entry;