Commit 3caa3331 authored by Alexandre Julliard's avatar Alexandre Julliard

bcrypt: Use standard dlopen() instead of the libwine wrappers.

parent 149e03c7
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h" #include "wine/heap.h"
#include "wine/library.h"
#include "wine/unicode.h" #include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(bcrypt); WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h" #include "wine/heap.h"
#include "wine/library.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#ifdef HAVE_GNUTLS_CIPHER_INIT #ifdef HAVE_GNUTLS_CIPHER_INIT
...@@ -180,14 +179,14 @@ BOOL gnutls_initialize(void) ...@@ -180,14 +179,14 @@ BOOL gnutls_initialize(void)
{ {
int ret; int ret;
if (!(libgnutls_handle = wine_dlopen( SONAME_LIBGNUTLS, RTLD_NOW, NULL, 0 ))) if (!(libgnutls_handle = dlopen( SONAME_LIBGNUTLS, RTLD_NOW )))
{ {
ERR_(winediag)( "failed to load libgnutls, no support for encryption\n" ); ERR_(winediag)( "failed to load libgnutls, no support for encryption\n" );
return FALSE; return FALSE;
} }
#define LOAD_FUNCPTR(f) \ #define LOAD_FUNCPTR(f) \
if (!(p##f = wine_dlsym( libgnutls_handle, #f, NULL, 0 ))) \ if (!(p##f = dlsym( libgnutls_handle, #f ))) \
{ \ { \
ERR( "failed to load %s\n", #f ); \ ERR( "failed to load %s\n", #f ); \
goto fail; \ goto fail; \
...@@ -209,12 +208,12 @@ BOOL gnutls_initialize(void) ...@@ -209,12 +208,12 @@ BOOL gnutls_initialize(void)
LOAD_FUNCPTR(gnutls_pubkey_init); LOAD_FUNCPTR(gnutls_pubkey_init);
#undef LOAD_FUNCPTR #undef LOAD_FUNCPTR
if (!(pgnutls_cipher_tag = wine_dlsym( libgnutls_handle, "gnutls_cipher_tag", NULL, 0 ))) if (!(pgnutls_cipher_tag = dlsym( libgnutls_handle, "gnutls_cipher_tag" )))
{ {
WARN("gnutls_cipher_tag not found\n"); WARN("gnutls_cipher_tag not found\n");
pgnutls_cipher_tag = compat_gnutls_cipher_tag; pgnutls_cipher_tag = compat_gnutls_cipher_tag;
} }
if (!(pgnutls_cipher_add_auth = wine_dlsym( libgnutls_handle, "gnutls_cipher_add_auth", NULL, 0 ))) if (!(pgnutls_cipher_add_auth = dlsym( libgnutls_handle, "gnutls_cipher_add_auth" )))
{ {
WARN("gnutls_cipher_add_auth not found\n"); WARN("gnutls_cipher_add_auth not found\n");
pgnutls_cipher_add_auth = compat_gnutls_cipher_add_auth; pgnutls_cipher_add_auth = compat_gnutls_cipher_add_auth;
...@@ -225,47 +224,47 @@ BOOL gnutls_initialize(void) ...@@ -225,47 +224,47 @@ BOOL gnutls_initialize(void)
pgnutls_perror( ret ); pgnutls_perror( ret );
goto fail; goto fail;
} }
if (!(pgnutls_pubkey_import_ecc_raw = wine_dlsym( libgnutls_handle, "gnutls_pubkey_import_ecc_raw", NULL, 0 ))) if (!(pgnutls_pubkey_import_ecc_raw = dlsym( libgnutls_handle, "gnutls_pubkey_import_ecc_raw" )))
{ {
WARN("gnutls_pubkey_import_ecc_raw not found\n"); WARN("gnutls_pubkey_import_ecc_raw not found\n");
pgnutls_pubkey_import_ecc_raw = compat_gnutls_pubkey_import_ecc_raw; pgnutls_pubkey_import_ecc_raw = compat_gnutls_pubkey_import_ecc_raw;
} }
if (!(pgnutls_privkey_export_rsa_raw = wine_dlsym( libgnutls_handle, "gnutls_privkey_export_rsa_raw", NULL, 0 ))) if (!(pgnutls_privkey_export_rsa_raw = dlsym( libgnutls_handle, "gnutls_privkey_export_rsa_raw" )))
{ {
WARN("gnutls_privkey_export_rsa_raw not found\n"); WARN("gnutls_privkey_export_rsa_raw not found\n");
pgnutls_privkey_export_rsa_raw = compat_gnutls_privkey_export_rsa_raw; pgnutls_privkey_export_rsa_raw = compat_gnutls_privkey_export_rsa_raw;
} }
if (!(pgnutls_privkey_export_ecc_raw = wine_dlsym( libgnutls_handle, "gnutls_privkey_export_ecc_raw", NULL, 0 ))) if (!(pgnutls_privkey_export_ecc_raw = dlsym( libgnutls_handle, "gnutls_privkey_export_ecc_raw" )))
{ {
WARN("gnutls_privkey_export_ecc_raw not found\n"); WARN("gnutls_privkey_export_ecc_raw not found\n");
pgnutls_privkey_export_ecc_raw = compat_gnutls_privkey_export_ecc_raw; pgnutls_privkey_export_ecc_raw = compat_gnutls_privkey_export_ecc_raw;
} }
if (!(pgnutls_privkey_import_ecc_raw = wine_dlsym( libgnutls_handle, "gnutls_privkey_import_ecc_raw", NULL, 0 ))) if (!(pgnutls_privkey_import_ecc_raw = dlsym( libgnutls_handle, "gnutls_privkey_import_ecc_raw" )))
{ {
WARN("gnutls_privkey_import_ecc_raw not found\n"); WARN("gnutls_privkey_import_ecc_raw not found\n");
pgnutls_privkey_import_ecc_raw = compat_gnutls_privkey_import_ecc_raw; pgnutls_privkey_import_ecc_raw = compat_gnutls_privkey_import_ecc_raw;
} }
if (!(pgnutls_pk_to_sign = wine_dlsym( libgnutls_handle, "gnutls_pk_to_sign", NULL, 0 ))) if (!(pgnutls_pk_to_sign = dlsym( libgnutls_handle, "gnutls_pk_to_sign" )))
{ {
WARN("gnutls_pk_to_sign not found\n"); WARN("gnutls_pk_to_sign not found\n");
pgnutls_pk_to_sign = compat_gnutls_pk_to_sign; pgnutls_pk_to_sign = compat_gnutls_pk_to_sign;
} }
if (!(pgnutls_pubkey_verify_hash2 = wine_dlsym( libgnutls_handle, "gnutls_pubkey_verify_hash2", NULL, 0 ))) if (!(pgnutls_pubkey_verify_hash2 = dlsym( libgnutls_handle, "gnutls_pubkey_verify_hash2" )))
{ {
WARN("gnutls_pubkey_verify_hash2 not found\n"); WARN("gnutls_pubkey_verify_hash2 not found\n");
pgnutls_pubkey_verify_hash2 = compat_gnutls_pubkey_verify_hash2; pgnutls_pubkey_verify_hash2 = compat_gnutls_pubkey_verify_hash2;
} }
if (!(pgnutls_pubkey_import_rsa_raw = wine_dlsym( libgnutls_handle, "gnutls_pubkey_import_rsa_raw", NULL, 0 ))) if (!(pgnutls_pubkey_import_rsa_raw = dlsym( libgnutls_handle, "gnutls_pubkey_import_rsa_raw" )))
{ {
WARN("gnutls_pubkey_import_rsa_raw not found\n"); WARN("gnutls_pubkey_import_rsa_raw not found\n");
pgnutls_pubkey_import_rsa_raw = compat_gnutls_pubkey_import_rsa_raw; pgnutls_pubkey_import_rsa_raw = compat_gnutls_pubkey_import_rsa_raw;
} }
if (!(pgnutls_privkey_generate = wine_dlsym( libgnutls_handle, "gnutls_privkey_generate", NULL, 0 ))) if (!(pgnutls_privkey_generate = dlsym( libgnutls_handle, "gnutls_privkey_generate" )))
{ {
WARN("gnutls_privkey_generate not found\n"); WARN("gnutls_privkey_generate not found\n");
pgnutls_privkey_generate = compat_gnutls_privkey_generate; pgnutls_privkey_generate = compat_gnutls_privkey_generate;
} }
if (!(pgnutls_decode_rs_value = wine_dlsym( libgnutls_handle, "gnutls_decode_rs_value", NULL, 0 ))) if (!(pgnutls_decode_rs_value = dlsym( libgnutls_handle, "gnutls_decode_rs_value" )))
{ {
WARN("gnutls_decode_rs_value not found\n"); WARN("gnutls_decode_rs_value not found\n");
pgnutls_decode_rs_value = compat_gnutls_decode_rs_value; pgnutls_decode_rs_value = compat_gnutls_decode_rs_value;
...@@ -280,7 +279,7 @@ BOOL gnutls_initialize(void) ...@@ -280,7 +279,7 @@ BOOL gnutls_initialize(void)
return TRUE; return TRUE;
fail: fail:
wine_dlclose( libgnutls_handle, NULL, 0 ); dlclose( libgnutls_handle );
libgnutls_handle = NULL; libgnutls_handle = NULL;
return FALSE; return FALSE;
} }
...@@ -288,7 +287,7 @@ fail: ...@@ -288,7 +287,7 @@ fail:
void gnutls_uninitialize(void) void gnutls_uninitialize(void)
{ {
pgnutls_global_deinit(); pgnutls_global_deinit();
wine_dlclose( libgnutls_handle, NULL, 0 ); dlclose( libgnutls_handle );
libgnutls_handle = NULL; libgnutls_handle = NULL;
} }
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h" #include "wine/heap.h"
#include "wine/library.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#if defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 && !defined(HAVE_GNUTLS_CIPHER_INIT) #if defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 && !defined(HAVE_GNUTLS_CIPHER_INIT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment