[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.12-7-g80a08b6
by NIIBE Yutaka
cvs at cvs.gnupg.org
Wed Dec 19 02:06:09 CET 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, STABLE-BRANCH-2-2 has been updated
via 80a08b655f8f5e7a7d78b766f1770fd474081a48 (commit)
from 21fc089148678f59edb02e0e16bed65b709fb972 (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 80a08b655f8f5e7a7d78b766f1770fd474081a48
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.
--
Cherry-picked master commit of:
4ed941ff26783c4fabfe2079029f8e436eb7e340
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/agent/divert-scd.c b/agent/divert-scd.c
index e51aa54..d933779 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