[seahorse] When changing a PGP key's passpharse, ask for confirmation.



commit 9335671cc5fc6e626dbb322b8894ffded7ce7ddb
Author: Stef Walter <stefw collabora co uk>
Date:   Thu Mar 10 16:34:09 2011 +0100

    When changing a PGP key's passpharse, ask for confirmation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=638350

 pgp/seahorse-gpgme-source.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/pgp/seahorse-gpgme-source.c b/pgp/seahorse-gpgme-source.c
index 56728e7..a1554ff 100644
--- a/pgp/seahorse-gpgme-source.c
+++ b/pgp/seahorse-gpgme-source.c
@@ -88,10 +88,13 @@ passphrase_get (gconstpointer dummy, const gchar *passphrase_hint,
     gchar *label = NULL;
     gchar *errmsg = NULL;
     const gchar *pass;
-    
-    if (passphrase_info && strlen(passphrase_info) < 16)
+    gboolean confirm = FALSE;
+
+    if (passphrase_info && strlen(passphrase_info) < 16) {
         flags |= SEAHORSE_PASS_NEW;
-    
+        confirm = TRUE;
+    }
+
     if (passphrase_hint)
         split_uid = g_strsplit (passphrase_hint, " ", 2);
 
@@ -113,7 +116,7 @@ passphrase_get (gconstpointer dummy, const gchar *passphrase_hint,
     g_strfreev (split_uid);
 
     dialog = seahorse_passphrase_prompt_show (NULL, errmsg ? errmsg : label, 
-                                              NULL, NULL, FALSE);
+                                              NULL, NULL, confirm);
     g_free (label);
     g_free (errmsg);
     



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]