configure: Check for gnutls_cipher_init instead of gnutls_hash.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
024a8a0be2
commit
8aa300ba1a
|
@ -11983,16 +11983,16 @@ _ACEOF
|
||||||
fi
|
fi
|
||||||
ac_wine_check_funcs_save_LIBS="$LIBS"
|
ac_wine_check_funcs_save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $GNUTLS_LIBS"
|
LIBS="$LIBS $GNUTLS_LIBS"
|
||||||
for ac_func in gnutls_hash
|
for ac_func in gnutls_cipher_init
|
||||||
do :
|
do :
|
||||||
ac_fn_c_check_func "$LINENO" "gnutls_hash" "ac_cv_func_gnutls_hash"
|
ac_fn_c_check_func "$LINENO" "gnutls_cipher_init" "ac_cv_func_gnutls_cipher_init"
|
||||||
if test "x$ac_cv_func_gnutls_hash" = xyes; then :
|
if test "x$ac_cv_func_gnutls_cipher_init" = xyes; then :
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_GNUTLS_HASH 1
|
#define HAVE_GNUTLS_CIPHER_INIT 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
else
|
else
|
||||||
as_fn_append wine_notices "|libgnutls ${notice_platform}development files too old, bcrypt hashes won't be supported."
|
as_fn_append wine_notices "|libgnutls ${notice_platform}development files too old, bcrypt encryption won't be supported."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -1304,8 +1304,8 @@ then
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>
|
||||||
#include <gnutls/crypto.h>]], [[static typeof(gnutls_mac_get_key_size) *func; if (func) return 0;]])],
|
#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\\}]])
|
[WINE_CHECK_SONAME(gnutls,gnutls_global_init,,[GNUTLS_CFLAGS=""],[$GNUTLS_LIBS],[[libgnutls\\(-deb0\\)\\{0,1\\}]])
|
||||||
WINE_CHECK_LIB_FUNCS(gnutls_hash,[$GNUTLS_LIBS],,
|
WINE_CHECK_LIB_FUNCS(gnutls_cipher_init,[$GNUTLS_LIBS],,
|
||||||
[WINE_NOTICE([libgnutls ${notice_platform}development files too old, bcrypt hashes won't be supported.])])])],
|
[WINE_NOTICE([libgnutls ${notice_platform}development files too old, bcrypt encryption won't be supported.])])])],
|
||||||
[GNUTLS_CFLAGS=""])])
|
[GNUTLS_CFLAGS=""])])
|
||||||
fi
|
fi
|
||||||
WINE_WARNING_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"],
|
WINE_WARNING_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"],
|
||||||
|
|
|
@ -46,7 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
|
||||||
|
|
||||||
static HINSTANCE instance;
|
static HINSTANCE instance;
|
||||||
|
|
||||||
#if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||||
WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||||
|
|
||||||
static void *libgnutls_handle;
|
static void *libgnutls_handle;
|
||||||
|
@ -73,7 +73,7 @@ static BOOL gnutls_initialize(void)
|
||||||
|
|
||||||
if (!(libgnutls_handle = wine_dlopen( SONAME_LIBGNUTLS, RTLD_NOW, NULL, 0 )))
|
if (!(libgnutls_handle = wine_dlopen( SONAME_LIBGNUTLS, RTLD_NOW, NULL, 0 )))
|
||||||
{
|
{
|
||||||
ERR_(winediag)( "failed to load libgnutls, no support for crypto hashes\n" );
|
ERR_(winediag)( "failed to load libgnutls, no support for encryption\n" );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ static void gnutls_uninitialize(void)
|
||||||
wine_dlclose( libgnutls_handle, NULL, 0 );
|
wine_dlclose( libgnutls_handle, NULL, 0 );
|
||||||
libgnutls_handle = NULL;
|
libgnutls_handle = NULL;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_GNUTLS_HASH && !HAVE_COMMONCRYPTO_COMMONDIGEST_H */
|
#endif /* HAVE_GNUTLS_CIPHER_INIT && !HAVE_COMMONCRYPTO_COMMONDIGEST_H */
|
||||||
|
|
||||||
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount,
|
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount,
|
||||||
BCRYPT_ALGORITHM_IDENTIFIER **ppAlgList, ULONG dwFlags)
|
BCRYPT_ALGORITHM_IDENTIFIER **ppAlgList, ULONG dwFlags)
|
||||||
|
@ -685,7 +685,7 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
|
||||||
return BCryptDestroyHash( handle );
|
return BCryptDestroyHash( handle );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||||
struct key
|
struct key
|
||||||
{
|
{
|
||||||
struct object hdr;
|
struct object hdr;
|
||||||
|
@ -1020,14 +1020,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_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||||
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_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||||
gnutls_uninitialize();
|
gnutls_uninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -267,8 +267,8 @@
|
||||||
/* Define to 1 if you have the `getuid' function. */
|
/* Define to 1 if you have the `getuid' function. */
|
||||||
#undef HAVE_GETUID
|
#undef HAVE_GETUID
|
||||||
|
|
||||||
/* Define to 1 if you have the `gnutls_hash' function. */
|
/* Define to 1 if you have the `gnutls_cipher_init' function. */
|
||||||
#undef HAVE_GNUTLS_HASH
|
#undef HAVE_GNUTLS_CIPHER_INIT
|
||||||
|
|
||||||
/* Define if we have the libgphoto2 development environment */
|
/* Define if we have the libgphoto2 development environment */
|
||||||
#undef HAVE_GPHOTO2
|
#undef HAVE_GPHOTO2
|
||||||
|
|
Loading…
Reference in New Issue