bcrypt: Ensure we have gnutls_hash() available.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
88ea4c520b
commit
625801ed7e
|
@ -11595,6 +11595,22 @@ CPPFLAGS=$ac_save_CPPFLAGS
|
|||
test -z "$GNUTLS_CFLAGS" || GNUTLS_CFLAGS=`echo " $GNUTLS_CFLAGS" | sed 's/ -I\([^/]\)/ -I\$(top_builddir)\/\1/g'`
|
||||
test -z "$GNUTLS_LIBS" || GNUTLS_LIBS=`echo " $GNUTLS_LIBS" | sed 's/ -L\([^/]\)/ -L\$(top_builddir)\/\1/g'`
|
||||
|
||||
ac_wine_check_funcs_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $GNUTLS_LIBS"
|
||||
for ac_func in gnutls_hash
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "gnutls_hash" "ac_cv_func_gnutls_hash"
|
||||
if test "x$ac_cv_func_gnutls_hash" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_GNUTLS_HASH 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
as_fn_append wine_notices "|libgnutls ${notice_platform}development files too old, no bcrypt hash support."
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$ac_wine_check_funcs_save_LIBS"
|
||||
fi
|
||||
if test "x$ac_cv_lib_soname_gnutls" = "x"; then :
|
||||
case "x$with_gnutls" in
|
||||
|
|
|
@ -1270,6 +1270,8 @@ then
|
|||
#include <gnutls/crypto.h>]], [[static typeof(gnutls_mac_get_key_size) *func; if (func) return 0;]])],
|
||||
[WINE_CHECK_SONAME(gnutls,gnutls_global_init,,[GNUTLS_CFLAGS=""],[$GNUTLS_LIBS],[[libgnutls\\(-deb0\\)\\{0,1\\}]])])],
|
||||
[GNUTLS_CFLAGS=""])])
|
||||
WINE_CHECK_LIB_FUNCS(gnutls_hash,[$GNUTLS_LIBS],,
|
||||
[WINE_NOTICE([libgnutls ${notice_platform}development files too old, no bcrypt hash support.])])
|
||||
fi
|
||||
WINE_WARNING_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"],
|
||||
[libgnutls ${notice_platform}development files not found, no schannel support.])
|
||||
|
|
|
@ -43,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
|
|||
|
||||
static HINSTANCE instance;
|
||||
|
||||
#if defined(SONAME_LIBGNUTLS) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
#if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
|
||||
static void *libgnutls_handle;
|
||||
|
@ -116,7 +116,7 @@ static void gnutls_uninitialize(void)
|
|||
wine_dlclose( libgnutls_handle, NULL, 0 );
|
||||
libgnutls_handle = NULL;
|
||||
}
|
||||
#endif /* SONAME_LIBGNUTLS && !HAVE_COMMONCRYPTO_COMMONDIGEST_H */
|
||||
#endif /* HAVE_GNUTLS_HASH && !HAVE_COMMONCRYPTO_COMMONDIGEST_H */
|
||||
|
||||
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount,
|
||||
BCRYPT_ALGORITHM_IDENTIFIER **ppAlgList, ULONG dwFlags)
|
||||
|
@ -338,7 +338,7 @@ static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size )
|
|||
}
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
#elif defined(SONAME_LIBGNUTLS)
|
||||
#elif defined(HAVE_GNUTLS_HASH)
|
||||
struct hash
|
||||
{
|
||||
struct object hdr;
|
||||
|
@ -642,14 +642,14 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|||
case DLL_PROCESS_ATTACH:
|
||||
instance = hinst;
|
||||
DisableThreadLibraryCalls( hinst );
|
||||
#if defined(SONAME_LIBGNUTLS) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
#if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
gnutls_initialize();
|
||||
#endif
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (reserved) break;
|
||||
#if defined(SONAME_LIBGNUTLS) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
#if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
gnutls_uninitialize();
|
||||
#endif
|
||||
break;
|
||||
|
|
|
@ -228,6 +228,9 @@
|
|||
/* Define to 1 if you have the `getuid' function. */
|
||||
#undef HAVE_GETUID
|
||||
|
||||
/* Define to 1 if you have the `gnutls_hash' function. */
|
||||
#undef HAVE_GNUTLS_HASH
|
||||
|
||||
/* Define if we have the libgphoto2 development environment */
|
||||
#undef HAVE_GPHOTO2
|
||||
|
||||
|
|
Loading…
Reference in New Issue