[gnome-keyring/gnome-2-32] gpg-agent: Don't try to cache password when symmetric encryption.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/gnome-2-32] gpg-agent: Don't try to cache password when symmetric encryption.
- Date: Mon, 25 Oct 2010 15:00:38 +0000 (UTC)
commit 538371de09c253365eee64c9479ba023b6dc32f1
Author: Daiki Ueno <ueno unixuser org>
Date: Mon Oct 25 14:52:17 2010 +0900
gpg-agent: Don't try to cache password when symmetric encryption.
daemon/gpg-agent/gkd-gpg-agent-ops.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gpg-agent/gkd-gpg-agent-ops.c b/daemon/gpg-agent/gkd-gpg-agent-ops.c
index 69bbbd4..aa99c01 100644
--- a/daemon/gpg-agent/gkd-gpg-agent-ops.c
+++ b/daemon/gpg-agent/gkd-gpg-agent-ops.c
@@ -411,11 +411,12 @@ do_get_password (GP11Session *session, const gchar *keyid, const gchar *errmsg,
guint ttl;
g_assert (GP11_IS_SESSION (session));
- g_assert (keyid);
- password = do_lookup_password (session, keyid);
- if (password != NULL)
- return password;
+ if (keyid != NULL) {
+ password = do_lookup_password (session, keyid);
+ if (password != NULL)
+ return password;
+ }
/* Do we have the keyid? */
prompt = prepare_password_prompt (session, errmsg, prompt_text, description, confirm);
@@ -427,6 +428,11 @@ do_get_password (GP11Session *session, const gchar *keyid, const gchar *errmsg,
password = gku_prompt_get_password (prompt, "password");
g_return_val_if_fail (password, NULL);
+ if (keyid == NULL) {
+ g_object_unref (prompt);
+ return password;
+ }
+
/* Load up the save options */
attrs = gp11_attributes_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]