aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2011-11-30 17:20:40 +0800
committerDan Winship <danw@gnome.org>2011-11-30 17:20:40 +0800
commit1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6 (patch)
tree784be879b3823b30e6105eac3e344bddcf444090 /embed
parentd1d329e512877f34d2109e65a267c883e0c87b06 (diff)
downloadgsoc2013-epiphany-1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6.tar
gsoc2013-epiphany-1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6.tar.gz
gsoc2013-epiphany-1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6.tar.bz2
gsoc2013-epiphany-1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6.tar.lz
gsoc2013-epiphany-1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6.tar.xz
gsoc2013-epiphany-1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6.tar.zst
gsoc2013-epiphany-1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6.zip
Use SoupSession:ssl-use-system-ca-file property
Rather than copying glib-networking's logic for finding the system trusted CA file and then telling libsoup to use it, just use the new ssl-use-system-ca-file property. https://bugzilla.gnome.org/show_bug.cgi?id=633109
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-single.c16
-rw-r--r--embed/ephy-web-view.c4
2 files changed, 4 insertions, 16 deletions
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index 547f49283..74359ecbc 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -473,19 +473,11 @@ ephy_embed_single_initialize (EphyEmbedSingle *single)
session = webkit_get_default_session ();
-#ifdef GTLS_SYSTEM_CA_FILE
/* Check SSL certificates */
-
- if (g_file_test (GTLS_SYSTEM_CA_FILE, G_FILE_TEST_EXISTS)) {
- g_object_set (session,
- SOUP_SESSION_SSL_CA_FILE, GTLS_SYSTEM_CA_FILE,
- SOUP_SESSION_SSL_STRICT, FALSE,
- NULL);
- } else {
- g_warning (_("CA Certificates file we should use was not found, "\
- "all SSL sites will be considered to have a broken certificate."));
- }
-#endif
+ g_object_set (session,
+ SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
+ SOUP_SESSION_SSL_STRICT, FALSE,
+ NULL);
/* Store cookies in moz-compatible SQLite format */
filename = g_build_filename (ephy_dot_dir (), "cookies.sqlite", NULL);
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index cc5e61ecc..e55dfdc7d 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1861,7 +1861,6 @@ load_status_cb (WebKitWebView *web_view,
ephy_web_view_set_title (view, NULL);
-#ifdef GTLS_SYSTEM_CA_FILE
if (uri && g_str_has_prefix (uri, "https")) {
WebKitWebFrame *frame;
WebKitWebDataSource *source;
@@ -1880,9 +1879,6 @@ load_status_cb (WebKitWebView *web_view,
security_level = EPHY_WEB_VIEW_STATE_IS_BROKEN;
} else
security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN;
-#else
- security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN;
-#endif
ephy_web_view_set_security_level (EPHY_WEB_VIEW (web_view), security_level);
}