[svn] GnuPG - r4302 - trunk/agent

svn author wk cvs at cvs.gnupg.org
Mon Oct 16 19:36:45 CEST 2006


Author: wk
Date: 2006-10-16 19:36:44 +0200 (Mon, 16 Oct 2006)
New Revision: 4302

Modified:
   trunk/agent/ChangeLog
   trunk/agent/call-pinentry.c
   trunk/agent/protect-tool.c
   trunk/agent/trustlist.c
Log:
Allow to cancel marktrusted.


Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog	2006-10-16 17:33:03 UTC (rev 4301)
+++ trunk/agent/ChangeLog	2006-10-16 17:36:44 UTC (rev 4302)
@@ -1,3 +1,13 @@
+2006-10-16  Werner Koch  <wk at g10code.com>
+
+	* call-pinentry.c (agent_get_confirmation): Map Cancel code here too.
+	* trustlist.c (agent_marktrusted): Return Cancel instead of
+	Not_Confirmed for the first question.
+
+2006-10-12  Werner Koch  <wk at g10code.com>
+
+	* protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET.
+
 2006-10-06  Werner Koch  <wk at g10code.com>
 
 	* Makefile.am (AM_CFLAGS): Use PTH version of libassuan.

Modified: trunk/agent/call-pinentry.c
===================================================================
--- trunk/agent/call-pinentry.c	2006-10-16 17:33:03 UTC (rev 4301)
+++ trunk/agent/call-pinentry.c	2006-10-16 17:36:44 UTC (rev 4302)
@@ -582,6 +582,9 @@
     }
 
   rc = assuan_transact (entry_ctx, "CONFIRM", NULL, NULL, NULL, NULL, NULL, NULL);
+  if (rc && gpg_err_source (rc) && gpg_err_code (rc) == GPG_ERR_ASS_CANCELED)
+    rc = gpg_err_make (gpg_err_source (rc), GPG_ERR_CANCELED);
+
   return unlock_pinentry (rc);
 }
 

Modified: trunk/agent/protect-tool.c
===================================================================
--- trunk/agent/protect-tool.c	2006-10-16 17:33:03 UTC (rev 4301)
+++ trunk/agent/protect-tool.c	2006-10-16 17:36:44 UTC (rev 4302)
@@ -1170,7 +1170,7 @@
   char *pw;
   int err;
   const char *desc;
-#ifdef HAVE_LANGINFO_CODESET
+#ifdef ENABLE_NLS
   char *orig_codeset = NULL;
 #endif
   int error_msgno;

Modified: trunk/agent/trustlist.c
===================================================================
--- trunk/agent/trustlist.c	2006-10-16 17:33:03 UTC (rev 4301)
+++ trunk/agent/trustlist.c	2006-10-16 17:36:44 UTC (rev 4302)
@@ -479,9 +479,15 @@
      button is "the default "Cancel" of the Pinentry. */
   err = agent_get_confirmation (ctrl, desc, _("Correct"), NULL);
   free (desc);
+  /* If the user did not confirmed this, we return cancel here so that
+     gpgsm may stop asking further questions.  We won't do this for
+     the second question of course. */
   if (err)
-    return err;
+    return (gpg_err_code (err) == GPG_ERR_NOT_CONFIRMED ? 
+            gpg_err_make (gpg_err_source (err), GPG_ERR_CANCELED) : err);
 
+
+
   if (asprintf (&desc,
                 /* TRANSLATORS: This prompt is shown by the Pinentry
                    and has one special property: A "%%0A" is used by




More information about the Gnupg-commits mailing list