[git] GnuPG - branch, master, updated. gnupg-2.2.7-225-g4ed941f

by NIIBE Yutaka cvs at cvs.gnupg.org
Fri Oct 12 04:55:47 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  4ed941ff26783c4fabfe2079029f8e436eb7e340 (commit)
      from  7a5a4c4cac8709f7c413e94cd0b40f4123baa1e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4ed941ff26783c4fabfe2079029f8e436eb7e340
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Oct 12 11:36:59 2018 +0900

    agent: Fix message for ACK button.
    
    * agent/divert-scd.c (getpin_cb): Display correct message.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/agent/divert-scd.c b/agent/divert-scd.c
index ad9b9ee..baa1cc3 100644
--- a/agent/divert-scd.c
+++ b/agent/divert-scd.c
@@ -276,27 +276,49 @@ getpin_cb (void *opaque, const char *desc_text, const char *info,
         }
       else if (maxbuf == 1)  /* Open the pinentry. */
         {
-          if (info && strcmp (info, "--ack") != 0)
+          if (info)
             {
-              char *desc, *desc2;
+              char *desc;
+              const char *desc2;
 
-              if ( asprintf (&desc,
-                             L_("%s%%0A%%0AUse the reader's pinpad for input."),
-                             info) < 0 )
-                rc = gpg_error_from_syserror ();
+              if (!strcmp (info, "--ack"))
+                {
+                  desc2 = L_("Push ACK button on card/token.");
+
+                  if (desc_text)
+                    {
+                      desc = strconcat (desc_text,
+                                        has_percent0A_suffix (desc_text)
+                                        ? "%0A" : "%0A%0A",
+                                        desc2, NULL);
+                      desc2 = NULL;
+                    }
+                  else
+                    desc = NULL;
+                }
               else
                 {
-                  /* Prepend DESC_TEXT to INFO.  */
+                  desc2 = NULL;
+
                   if (desc_text)
-                    desc2 = strconcat (desc_text,
-                                       has_percent0A_suffix (desc_text)
-                                       ? "%0A" : "%0A%0A",
-                                       desc, NULL);
+                    desc = strconcat (desc_text,
+                                      has_percent0A_suffix (desc_text)
+                                      ? "%0A" : "%0A%0A",
+                                      info, "%0A%0A",
+                                      L_("Use the reader's pinpad for input."),
+                                      NULL);
                   else
-                    desc2 = NULL;
+                    desc = strconcat (info, "%0A%0A",
+                                      L_("Use the reader's pinpad for input."),
+                                      NULL);
+                }
+
+              if (!desc2 && !desc)
+                rc = gpg_error_from_syserror ();
+              else
+                {
                   rc = agent_popup_message_start (ctrl,
                                                   desc2? desc2:desc, NULL);
-                  xfree (desc2);
                   xfree (desc);
                 }
             }

-----------------------------------------------------------------------

Summary of changes:
 agent/divert-scd.c | 48 +++++++++++++++++++++++++++++++++++-------------
 1 file changed, 35 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list