[banshee] libossifer: Fix certificate validation with libsoup 2.38 (bgo#673037)



commit 5e328f168223e0219bb3dc0c42b5235cff8eaa92
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Tue Apr 3 20:49:07 2012 +0200

    libossifer: Fix certificate validation with libsoup 2.38 (bgo#673037)
    
    Libsoup 2.38 added a new SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE property,
    which tells it to use the default system CA database. If we don't set
    it, all SSL validations fail.

 build/m4/banshee/libwebkit.m4                      |    7 +++++++
 .../libossifer/ossifer-session.c                   |    6 ++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/build/m4/banshee/libwebkit.m4 b/build/m4/banshee/libwebkit.m4
index 6c8c6eb..d1f81c8 100644
--- a/build/m4/banshee/libwebkit.m4
+++ b/build/m4/banshee/libwebkit.m4
@@ -16,6 +16,13 @@ AC_DEFUN([BANSHEE_CHECK_LIBWEBKIT],
 		AC_SUBST(LIBWEBKIT_CFLAGS)
 		AM_CONDITIONAL(HAVE_LIBWEBKIT, [test x$have_libwebkit = xyes])
 
+		PKG_CHECK_MODULES(LIBSOUP_2_38,
+			libsoup-gnome-2.4 >= 2.38,
+			have_libsoup_2_28=yes, have_libsoup_2_28=no)
+		if test x$have_libsoup_2_28 = xyes; then
+			AC_DEFINE(HAVE_LIBSOUP_2_38, 1, [libsoup-gnome-2.4 >= 2.38 detected])
+		fi
+
 		have_libsoup_gnome=no
 		PKG_CHECK_MODULES(LIBSOUP_GNOME,
 			libsoup-gnome-2.4 >= $SOUP_GNOME_MIN_VERSION,
diff --git a/src/Core/Banshee.WebBrowser/libossifer/ossifer-session.c b/src/Core/Banshee.WebBrowser/libossifer/ossifer-session.c
index 328a8d5..64e0215 100644
--- a/src/Core/Banshee.WebBrowser/libossifer/ossifer-session.c
+++ b/src/Core/Banshee.WebBrowser/libossifer/ossifer-session.c
@@ -50,6 +50,12 @@ ossifer_session_initialize (const gchar *cookie_db_path,
 
     session = webkit_get_default_session ();
 
+#ifdef HAVE_LIBSOUP_2_38
+    g_object_set (session,
+                  SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
+                  NULL);
+#endif
+
 #ifdef HAVE_LIBSOUP_GNOME
     path = g_strdup_printf ("%s.sqlite", cookie_db_path);
     cookie_jar = soup_cookie_jar_sqlite_new (path, FALSE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]