aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2013-02-19 19:31:24 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2013-03-05 14:15:55 +0800
commite6f502ec76f1f51360338e56962f489744375bd3 (patch)
treee8fc77f5a4216a79e13f498d6047669570887a53
parent44bece7cc9da469292c6565e7e33d5be6eed0be2 (diff)
downloadgsoc2013-epiphany-e6f502ec76f1f51360338e56962f489744375bd3.tar
gsoc2013-epiphany-e6f502ec76f1f51360338e56962f489744375bd3.tar.gz
gsoc2013-epiphany-e6f502ec76f1f51360338e56962f489744375bd3.tar.bz2
gsoc2013-epiphany-e6f502ec76f1f51360338e56962f489744375bd3.tar.lz
gsoc2013-epiphany-e6f502ec76f1f51360338e56962f489744375bd3.tar.xz
gsoc2013-epiphany-e6f502ec76f1f51360338e56962f489744375bd3.tar.zst
gsoc2013-epiphany-e6f502ec76f1f51360338e56962f489744375bd3.zip
ephy-profile-migrator: migrate to libsecret
Use libsecret to store http-authentication data in one of the early migrators. https://bugzilla.gnome.org/show_bug.cgi?id=679918
-rw-r--r--configure.ac2
-rw-r--r--lib/ephy-profile-migrator.c23
2 files changed, 11 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 1f51c4c1d..0e6300ebd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,7 +86,6 @@ LIBXSLT_REQUIRED=1.1.7
WEBKIT_GTK_REQUIRED=1.11.5
LIBSOUP_REQUIRED=2.41.3
GNOME_DESKTOP_REQUIRED=2.91.2
-GNOME_KEYRING_REQUIRED=2.26.0
LIBSECRET_REQUIRED=0.14
GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=0.0.1
LIBNOTIFY_REQUIRED=0.5.1
@@ -130,7 +129,6 @@ PKG_CHECK_MODULES([DEPENDENCIES], [
libsoup-2.4 >= $LIBSOUP_REQUIRED
libsecret-1 >= $LIBSECRET_REQUIRED
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED
- gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED
gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED
libnotify >= $LIBNOTIFY_REQUIRED
sqlite3
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index 43f36a781..7c0ea82da 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -46,7 +46,7 @@
#include <fcntl.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#include <gnome-keyring.h>
+#include <libsecret/secret.h>
#include <libsoup/soup.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -252,7 +252,6 @@ parse_and_decrypt_signons (const char *signons,
char *password = NULL;
char *form_username = NULL;
char *form_password = NULL;
- guint32 item_id;
/* The username */
if (handle_forms) {
@@ -308,16 +307,16 @@ parse_and_decrypt_signons (const char *signons,
username && password &&
!g_str_equal (username, "") &&
form_username == NULL && form_password == NULL) {
- gnome_keyring_set_network_password_sync (NULL,
- username,
- realm,
- uri->host,
- NULL,
- uri->scheme,
- NULL,
- uri->port,
- password,
- &item_id);
+ char *u = soup_uri_to_string (uri, FALSE);
+ secret_password_store_sync (SECRET_SCHEMA_COMPAT_NETWORK,
+ SECRET_COLLECTION_DEFAULT,
+ u, password, NULL, NULL,
+ "user", username,
+ "domain", realm,
+ "server", uri->host,
+ "protocol", uri->scheme,
+ "port", (gint)uri->port,
+ NULL);
}
g_free (username);