diff options
author | Gustavo Noronha Silva <gns@gnome.org> | 2010-02-19 00:30:49 +0800 |
---|---|---|
committer | Gustavo Noronha Silva <gns@gnome.org> | 2010-02-23 02:57:11 +0800 |
commit | 3e0f7dea754381c5ad11a06ccc62eb153382b498 (patch) | |
tree | 35942df25ac30024cf38d1e5c73961db128f40d9 /embed/ephy-embed-single.c | |
parent | a5858387b3bba793a65d8bd262e122604529045f (diff) | |
download | gsoc2013-epiphany-3e0f7dea754381c5ad11a06ccc62eb153382b498.tar.gz gsoc2013-epiphany-3e0f7dea754381c5ad11a06ccc62eb153382b498.tar.zst gsoc2013-epiphany-3e0f7dea754381c5ad11a06ccc62eb153382b498.zip |
Report broken certs through the padlock icon
This uses a new feature in libsoup that reports through a
SoupMessageFlag whether the message is talking to a server that has a
trusted server.
Bug #600663
Diffstat (limited to 'embed/ephy-embed-single.c')
-rw-r--r-- | embed/ephy-embed-single.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index 44efecaed..8c05532df 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -39,6 +39,7 @@ #endif #include <webkit/webkit.h> +#include <glib/gi18n.h> #include <libsoup/soup-gnome.h> #include <gnome-keyring.h> @@ -481,6 +482,20 @@ 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, + "ignore-ssl-cert-errors", TRUE, + 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 + /* Store cookies in moz-compatible SQLite format */ filename = g_build_filename (ephy_dot_dir (), "cookies.sqlite", NULL); jar = soup_cookie_jar_sqlite_new (filename, FALSE); |