[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-41-gecda654
by Ben Kibbey
cvs at cvs.gnupg.org
Sat Feb 4 01:13:56 CET 2012
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 ecda65498ac60dfde50fbbc71cd0cc321d7175a9 (commit)
from 3f7788f2e035eb939abb27b3a53854ec0fc6178c (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 ecda65498ac60dfde50fbbc71cd0cc321d7175a9
Author: Ben Kibbey <bjk at luxsci.net>
Date: Fri Feb 3 17:50:22 2012 -0500
Also let GENKEY and PKDECRYPT send the INQUIRE_MAXLEN status message.
* agent/command.c (cmd_pkdecrypt): Send the INQUIRE_MAXLEN status
message before doing the inquire.
(cmd_genkey): Ditto.
diff --git a/agent/command.c b/agent/command.c
index 732046c..c673662 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -855,12 +855,16 @@ cmd_pkdecrypt (assuan_context_t ctx, char *line)
unsigned char *value;
size_t valuelen;
membuf_t outbuf;
+ char buf[50];
(void)line;
/* First inquire the data to decrypt */
- rc = assuan_inquire (ctx, "CIPHERTEXT",
- &value, &valuelen, MAXLEN_CIPHERTEXT);
+ snprintf (buf, sizeof (buf), "%u", MAXLEN_CIPHERTEXT);
+ rc = assuan_write_status (ctx, "INQUIRE_MAXLEN", buf);
+ if (!rc)
+ rc = assuan_inquire (ctx, "CIPHERTEXT",
+ &value, &valuelen, MAXLEN_CIPHERTEXT);
if (rc)
return rc;
@@ -908,6 +912,7 @@ cmd_genkey (assuan_context_t ctx, char *line)
char *cache_nonce = NULL;
int opt_preset;
char *p;
+ char buf[50];
opt_preset = has_option (line, "--preset");
no_protection = has_option (line, "--no-protection");
@@ -921,7 +926,10 @@ cmd_genkey (assuan_context_t ctx, char *line)
cache_nonce = xtrystrdup (line);
/* First inquire the parameters */
- rc = assuan_inquire (ctx, "KEYPARAM", &value, &valuelen, MAXLEN_KEYPARAM);
+ snprintf (buf, sizeof (buf), "%u", MAXLEN_KEYPARAM);
+ rc = assuan_write_status (ctx, "INQUIRE_MAXLEN", buf);
+ if (!rc)
+ rc = assuan_inquire (ctx, "KEYPARAM", &value, &valuelen, MAXLEN_KEYPARAM);
if (rc)
return rc;
-----------------------------------------------------------------------
Summary of changes:
agent/command.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list