1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

Fixed backport of libassuan-2 changes.

This commit is contained in:
Werner Koch 2010-02-18 10:45:01 +00:00
parent cb6506e9ac
commit ae4afd61a5
4 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,11 @@
2010-02-18 Werner Koch <wk@g10code.com>
* 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 <wk@g10code.com> 2010-02-17 Werner Koch <wk@g10code.com>
* call-pinentry.c (start_pinentry): Always free OPTSTR. Send * call-pinentry.c (start_pinentry): Always free OPTSTR. Send

View File

@ -406,7 +406,7 @@ start_pinentry (ctrl_t ctrl)
for (idx=0; tbl[idx].key; idx++) 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 ) tbl[idx].key, _(tbl[idx].value)) < 0 )
return unlock_pinentry (out_of_core ()); return unlock_pinentry (out_of_core ());
assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL, assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL,

View File

@ -1897,9 +1897,7 @@ register_commands (assuan_context_t ctx)
if (rc) if (rc)
return rc; return rc;
} }
#ifdef HAVE_ASSUAN_SET_IO_MONITOR
assuan_register_post_cmd_notify (ctx, post_cmd_notify); assuan_register_post_cmd_notify (ctx, post_cmd_notify);
#endif
assuan_register_reset_notify (ctx, reset_notify); assuan_register_reset_notify (ctx, reset_notify);
assuan_register_option_handler (ctx, option_handler); assuan_register_option_handler (ctx, option_handler);
return 0; 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->server_local->use_cache_for_signing = 1;
ctrl->digest.raw_value = 0; ctrl->digest.raw_value = 0;
#ifdef HAVE_ASSUAN_SET_IO_MONITOR
assuan_set_io_monitor (ctx, io_monitor, NULL); assuan_set_io_monitor (ctx, io_monitor, NULL);
#endif
for (;;) for (;;)
{ {

View File

@ -778,7 +778,7 @@ agent_unprotect (const unsigned char *protectedkey, const char *passphrase,
unsigned long s2kcount; unsigned long s2kcount;
const unsigned char *iv; const unsigned char *iv;
const unsigned char *prot_begin; const unsigned char *prot_begin;
unsigned char *cleartext; unsigned char *cleartext = NULL; /* Just to avoid gcc warning. */
unsigned char *final; unsigned char *final;
size_t finallen; size_t finallen;
size_t cutoff, cutlen; size_t cutoff, cutlen;