bcrypt: Default to building with GnuTLS support on macOS, if present.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2018-07-20 14:51:14 +02:00 committed by Alexandre Julliard
parent 1604cdae90
commit 8b8a32f7a8
3 changed files with 4 additions and 5 deletions

View File

@ -815,7 +815,6 @@ void buffer_append_asn1_r_s( struct buffer *buffer, BYTE *r, DWORD r_len, BYTE *
} }
#endif #endif
#if defined(HAVE_GNUTLS_CIPHER_INIT) || defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 #if defined(HAVE_GNUTLS_CIPHER_INIT) || defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
BOOL key_is_symmetric( struct key *key ) BOOL key_is_symmetric( struct key *key )
{ {
@ -1421,14 +1420,14 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
instance = hinst; instance = hinst;
DisableThreadLibraryCalls( hinst ); DisableThreadLibraryCalls( hinst );
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) #ifdef HAVE_GNUTLS_CIPHER_INIT
gnutls_initialize(); gnutls_initialize();
#endif #endif
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
if (reserved) break; if (reserved) break;
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) #ifdef HAVE_GNUTLS_CIPHER_INIT
gnutls_uninitialize(); gnutls_uninitialize();
#endif #endif
break; break;

View File

@ -42,7 +42,7 @@
#include "wine/library.h" #include "wine/library.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) #ifdef HAVE_GNUTLS_CIPHER_INIT
WINE_DEFAULT_DEBUG_CHANNEL(bcrypt); WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
WINE_DECLARE_DEBUG_CHANNEL(winediag); WINE_DECLARE_DEBUG_CHANNEL(winediag);

View File

@ -41,7 +41,7 @@
#include "wine/library.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 #if defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 && !defined(HAVE_GNUTLS_CIPHER_INIT)
WINE_DEFAULT_DEBUG_CHANNEL(bcrypt); WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
NTSTATUS key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULONG size, ULONG flags ) NTSTATUS key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULONG size, ULONG flags )