pidgin: 73c00fbb: Use _set_default_priority on gnutls vers...
elb at pidgin.im
elb at pidgin.im
Sun Mar 1 16:05:28 EST 2009
-----------------------------------------------------------------
Revision: 73c00fbbe95951b367f8bf73b5154cd5a158529b
Ancestor: c84a41f40179331c218ac05005ce7805129049e5
Author: elb at pidgin.im
Date: 2009-03-01T20:56:20
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/73c00fbbe95951b367f8bf73b5154cd5a158529b
Modified files:
configure.ac libpurple/plugins/ssl/ssl-gnutls.c
ChangeLog:
Use _set_default_priority on gnutls versions lacking _priority_set_direct.
Versions of gnutls prior to 2.2.0 do not have gnutls_priority_set_direct.
This fixes a compilation issue in c84a41f40179331c218ac05005ce7805129049e5
on such systems. This should not represent a regression from 2.5.4 on
systems without gnutls 2.2.0 or newer.
Fixes #8526
-------------- next part --------------
============================================================
--- configure.ac ec5c144f336c73ff94b9319402e6b771f948b1fd
+++ configure.ac 34cd8e80fba5f03414143036e6fad4451e4ad5c2
@@ -1702,6 +1702,22 @@ AC_SUBST(GNUTLS_LIBS)
AC_SUBST(GNUTLS_CFLAGS)
AC_SUBST(GNUTLS_LIBS)
+if test "x$enable_gnutls" = "xyes"; then
+ AC_MSG_CHECKING(for gnutls_priority_set_direct)
+ LIBS_save="$LIBS"
+ LIBS="$LIBS $GNUTLS_LIBS"
+ CPPFLAGS_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <gnutls/gnutls.h>],
+ [gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL);])],
+ [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
+ [Define if your gnutls has gnutls_priority_set_direct and friends])
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+ CPPFLAGS="$CPPFLAGS_save"
+ LIBS="$LIBS_save"
+fi
+
AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
============================================================
--- libpurple/plugins/ssl/ssl-gnutls.c 9f036d72d3d1c8cc2629efa68f609bc8794ff6a0
+++ libpurple/plugins/ssl/ssl-gnutls.c ce0df9a22155d3618995fbc89a367403de0a1360
@@ -256,9 +256,13 @@ ssl_gnutls_connect(PurpleSslConnection *
gsc->private_data = gnutls_data;
gnutls_init(&gnutls_data->session, GNUTLS_CLIENT);
+#ifdef HAVE_GNUTLS_PRIORITY_FUNCS
if (gnutls_priority_set_direct(gnutls_data->session,
"NORMAL:%SSL3_RECORD_VERSION", NULL))
gnutls_priority_set_direct(gnutls_data->session, "NORMAL", NULL);
+#else
+ gnutls_set_default_priority(gnutls_data->session);
+#endif
gnutls_certificate_type_set_priority(gnutls_data->session,
cert_type_priority);
More information about the Commits
mailing list