[Xfce4-commits] <midori:master> Use ca-bundle.crt from res on Windows

Christian Dywan noreply at xfce.org
Tue Jul 10 23:22:01 CEST 2012


Updating branch refs/heads/master
         to 33cede91a75052a130e45cbd8ebd4bea78adb302 (commit)
       from 7a6bc50d0a6608cde790f19a57d247730e51d242 (commit)

commit 33cede91a75052a130e45cbd8ebd4bea78adb302
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Tue Jul 10 23:19:34 2012 +0200

    Use ca-bundle.crt from res on Windows
    
    System-wide certificates don't work.

 midori/main.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 4cbe08a..b020618 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -951,6 +951,7 @@ midori_load_soup_session (gpointer settings)
 {
     SoupSession* session = webkit_get_default_session ();
 
+    #ifndef G_OS_WIN32
     #if defined (HAVE_LIBSOUP_2_37_1)
     g_object_set (session,
                   "ssl-use-system-ca-file", TRUE,
@@ -981,6 +982,17 @@ midori_load_soup_session (gpointer settings)
         g_warning (_("No root certificate file is available. "
                      "SSL certificates cannot be verified."));
     #endif
+    #else /* G_OS_WIN32 */
+    /* We cannot use "ssl-use-system-ca-file" on Windows
+     * some GTLS backend pieces are missing currently.
+     * Instead we specify the bundle we ship ourselves */
+    gchar* certificate_file = midori_app_find_res_filename ("ca-bundle.crt");
+    g_object_set (session,
+                  "ssl-ca-file", certificate_file,
+                  "ssl-strict", FALSE,
+                  NULL);
+    g_free (certificate_file);
+    #endif
 
     #if !WEBKIT_CHECK_VERSION (1, 3, 5)
     /* See http://stevesouders.com/ua/index.php */


More information about the Xfce4-commits mailing list