aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-02-18 10:45:01 +0000
committerWerner Koch <[email protected]>2010-02-18 10:45:01 +0000
commitae4afd61a5046ab63c8a528f4b4c03cf0f410bbd (patch)
tree85bb61bf912e5279e3dd254216cfa76e4214bce9
parentpreparing a release candidate (diff)
downloadgnupg-ae4afd61a5046ab63c8a528f4b4c03cf0f410bbd.tar.gz
gnupg-ae4afd61a5046ab63c8a528f4b4c03cf0f410bbd.zip
Fixed backport of libassuan-2 changes.gnupg-2.0.15rc1
-rw-r--r--agent/ChangeLog8
-rw-r--r--agent/call-pinentry.c2
-rw-r--r--agent/command.c4
-rw-r--r--agent/protect.c2
4 files changed, 10 insertions, 6 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 29d3f7fef..382910af3 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-18 Werner Koch <[email protected]>
+
+ * protect.c (agent_unprotect): Initialize CLEARTEXT.
+
+ * command.c (register_commands): Unconditionally use
+ assuan_register_post_cmd_notify.
+ (start_command_handler): Undocumented use assuan_set_io_monitor.
+
2010-02-17 Werner Koch <[email protected]>
* call-pinentry.c (start_pinentry): Always free OPTSTR. Send
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 28cf59af8..47fa7261b 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -406,7 +406,7 @@ start_pinentry (ctrl_t ctrl)
for (idx=0; tbl[idx].key; idx++)
{
- if (asprintf (&optstr, "OPTION default-ok=%s",
+ if (asprintf (&optstr, "OPTION default-%s=%s",
tbl[idx].key, _(tbl[idx].value)) < 0 )
return unlock_pinentry (out_of_core ());
assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
diff --git a/agent/command.c b/agent/command.c
index cc9026fcc..81d17d7ba 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1897,9 +1897,7 @@ register_commands (assuan_context_t ctx)
if (rc)
return rc;
}
-#ifdef HAVE_ASSUAN_SET_IO_MONITOR
assuan_register_post_cmd_notify (ctx, post_cmd_notify);
-#endif
assuan_register_reset_notify (ctx, reset_notify);
assuan_register_option_handler (ctx, option_handler);
return 0;
@@ -1962,9 +1960,7 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd)
ctrl->server_local->use_cache_for_signing = 1;
ctrl->digest.raw_value = 0;
-#ifdef HAVE_ASSUAN_SET_IO_MONITOR
assuan_set_io_monitor (ctx, io_monitor, NULL);
-#endif
for (;;)
{
diff --git a/agent/protect.c b/agent/protect.c
index 097a1b36b..d6c964121 100644
--- a/agent/protect.c
+++ b/agent/protect.c
@@ -778,7 +778,7 @@ agent_unprotect (const unsigned char *protectedkey, const char *passphrase,
unsigned long s2kcount;
const unsigned char *iv;
const unsigned char *prot_begin;
- unsigned char *cleartext;
+ unsigned char *cleartext = NULL; /* Just to avoid gcc warning. */
unsigned char *final;
size_t finallen;
size_t cutoff, cutlen;