Hans Leidekker : configure: Check for gnutls_cipher_init instead of gnutls_hash.

Alexandre Julliard julliard at winehq.org
Wed Aug 16 09:06:26 CDT 2017


Module: wine
Branch: master
Commit: 8aa300ba1a6acdb564b6c8010d0e6d32e69d9733
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8aa300ba1a6acdb564b6c8010d0e6d32e69d9733

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Aug 16 11:23:49 2017 +0200

configure: Check for gnutls_cipher_init instead of gnutls_hash.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure                 | 10 +++++-----
 configure.ac              |  4 ++--
 dlls/bcrypt/bcrypt_main.c | 12 ++++++------
 include/config.h.in       |  4 ++--
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/configure b/configure
index fd8d393..82ecc1c 100755
--- a/configure
+++ b/configure
@@ -11983,16 +11983,16 @@ _ACEOF
 fi
                  ac_wine_check_funcs_save_LIBS="$LIBS"
 LIBS="$LIBS $GNUTLS_LIBS"
-for ac_func in gnutls_hash
+for ac_func in gnutls_cipher_init
 do :
-  ac_fn_c_check_func "$LINENO" "gnutls_hash" "ac_cv_func_gnutls_hash"
-if test "x$ac_cv_func_gnutls_hash" = xyes; then :
+  ac_fn_c_check_func "$LINENO" "gnutls_cipher_init" "ac_cv_func_gnutls_cipher_init"
+if test "x$ac_cv_func_gnutls_cipher_init" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_GNUTLS_HASH 1
+#define HAVE_GNUTLS_CIPHER_INIT 1
 _ACEOF
 
 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
 done
 
diff --git a/configure.ac b/configure.ac
index 7d52b24..4796492 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1304,8 +1304,8 @@ then
             [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;]])],
                 [WINE_CHECK_SONAME(gnutls,gnutls_global_init,,[GNUTLS_CFLAGS=""],[$GNUTLS_LIBS],[[libgnutls\\(-deb0\\)\\{0,1\\}]])
-                 WINE_CHECK_LIB_FUNCS(gnutls_hash,[$GNUTLS_LIBS],,
-                                      [WINE_NOTICE([libgnutls ${notice_platform}development files too old, bcrypt hashes won't be supported.])])])],
+                 WINE_CHECK_LIB_FUNCS(gnutls_cipher_init,[$GNUTLS_LIBS],,
+                                      [WINE_NOTICE([libgnutls ${notice_platform}development files too old, bcrypt encryption won't be supported.])])])],
             [GNUTLS_CFLAGS=""])])
 fi
 WINE_WARNING_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"],
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index d1f0e44..7a93515 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -46,7 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
 
 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);
 
 static void *libgnutls_handle;
@@ -73,7 +73,7 @@ static BOOL gnutls_initialize(void)
 
     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;
     }
 
@@ -121,7 +121,7 @@ static void gnutls_uninitialize(void)
     wine_dlclose( libgnutls_handle, NULL, 0 );
     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,
                                      BCRYPT_ALGORITHM_IDENTIFIER **ppAlgList, ULONG dwFlags)
@@ -685,7 +685,7 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
     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 object      hdr;
@@ -1020,14 +1020,14 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
     case DLL_PROCESS_ATTACH:
         instance = 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();
 #endif
         break;
 
     case DLL_PROCESS_DETACH:
         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();
 #endif
         break;
diff --git a/include/config.h.in b/include/config.h.in
index c27fa80..b0b5925 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -267,8 +267,8 @@
 /* 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 to 1 if you have the `gnutls_cipher_init' function. */
+#undef HAVE_GNUTLS_CIPHER_INIT
 
 /* Define if we have the libgphoto2 development environment */
 #undef HAVE_GPHOTO2




More information about the wine-cvs mailing list