[git] GnuPG - branch, master, updated. gnupg-2.1.21-82-g3681ee7
by Werner Koch
cvs at cvs.gnupg.org
Wed Jul 5 11:59:34 CEST 2017
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 3681ee7dc1e9d8c94fdb046d7be0bbcfeba1cfe9 (commit)
from 139de02b93773615bdd95e04a7f0c1ad73b4f6fb (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 3681ee7dc1e9d8c94fdb046d7be0bbcfeba1cfe9
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jul 5 11:54:45 2017 +0200
agent: Use MAX_PASSPHRASE_LEN (255) also for the loopback.
* agent/call-pinentry.c (agent_get_passphrase): Reduce maximum
passphrase length as conveyed to the loopback to MAX_PASSPHRASE_LEN.
* agent/genkey.c (agent_ask_new_passphrase): Extend the maximum
passphrase as conveyed to the loopback to MAX_PASSPHRASE_LEN.
--
Note that in genkey() max_length is set to MAX_PASSPHRASE_LEN + 1
because in agent_askpin() decrements that value before conveying it to
the loopback.
GnuPG-bug-id: 3254
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 9d8e7f6..cb7997f 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -964,8 +964,8 @@ agent_askpin (ctrl_t ctrl,
size_t size;
*pininfo->pin = 0; /* Reset the PIN. */
- rc = pinentry_loopback(ctrl, "PASSPHRASE", &passphrase, &size,
- pininfo->max_length - 1);
+ rc = pinentry_loopback (ctrl, "PASSPHRASE", &passphrase, &size,
+ pininfo->max_length - 1);
if (rc)
return rc;
@@ -1192,10 +1192,10 @@ agent_get_passphrase (ctrl_t ctrl,
if (ctrl->pinentry_mode == PINENTRY_MODE_LOOPBACK)
{
size_t size;
- size_t len = ASSUAN_LINELENGTH/2;
return pinentry_loopback (ctrl, "PASSPHRASE",
- (unsigned char **)retpass, &size, len);
+ (unsigned char **)retpass, &size,
+ MAX_PASSPHRASE_LEN);
}
return gpg_error (GPG_ERR_NO_PIN_ENTRY);
}
diff --git a/agent/genkey.c b/agent/genkey.c
index 31742a1..a3e37ee 100644
--- a/agent/genkey.c
+++ b/agent/genkey.c
@@ -357,10 +357,10 @@ agent_ask_new_passphrase (ctrl_t ctrl, const char *prompt,
if (ctrl->pinentry_mode == PINENTRY_MODE_LOOPBACK)
{
size_t size;
- size_t len = 100;
unsigned char *buffer;
- err = pinentry_loopback(ctrl, "NEW_PASSPHRASE", &buffer, &size, len);
+ err = pinentry_loopback (ctrl, "NEW_PASSPHRASE", &buffer, &size,
+ MAX_PASSPHRASE_LEN);
if (!err)
{
if (size)
-----------------------------------------------------------------------
Summary of changes:
agent/call-pinentry.c | 8 ++++----
agent/genkey.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list