mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Merge branch 'STABLE-BRANCH-2-4'
-- Fixed conflicts in NEWS g10/encrypt.c sm/encrypt.c sm/sign.c
This commit is contained in:
commit
2764ee309a
38 changed files with 1149 additions and 370 deletions
|
@ -1996,7 +1996,7 @@ agent_get_passphrase (const char *cache_id,
|
|||
char *arg4 = NULL;
|
||||
membuf_t data;
|
||||
struct default_inq_parm_s dfltparm;
|
||||
int have_newsymkey;
|
||||
int have_newsymkey, wasconf;
|
||||
|
||||
memset (&dfltparm, 0, sizeof dfltparm);
|
||||
|
||||
|
@ -2048,10 +2048,14 @@ agent_get_passphrase (const char *cache_id,
|
|||
xfree (arg4);
|
||||
|
||||
init_membuf_secure (&data, 64);
|
||||
wasconf = assuan_get_flag (agent_ctx, ASSUAN_CONFIDENTIAL);
|
||||
assuan_begin_confidential (agent_ctx);
|
||||
rc = assuan_transact (agent_ctx, line,
|
||||
put_membuf_cb, &data,
|
||||
default_inq_cb, &dfltparm,
|
||||
NULL, NULL);
|
||||
if (!wasconf)
|
||||
assuan_end_confidential (agent_ctx);
|
||||
|
||||
if (rc)
|
||||
xfree (get_membuf (&data, NULL));
|
||||
|
|
|
@ -393,6 +393,23 @@ keydb_get_keyblock (KEYDB_HANDLE hd, kbnode_t *ret_kb)
|
|||
}
|
||||
|
||||
|
||||
/* Default status callback used to show diagnostics from the keyboxd */
|
||||
static gpg_error_t
|
||||
keydb_default_status_cb (void *opaque, const char *line)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
(void)opaque;
|
||||
|
||||
if ((s = has_leading_keyword (line, "NOTE")))
|
||||
log_info (_("Note: %s\n"), s);
|
||||
else if ((s = has_leading_keyword (line, "WARNING")))
|
||||
log_info (_("WARNING: %s\n"), s);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Communication object for STORE commands. */
|
||||
struct store_parm_s
|
||||
|
@ -472,7 +489,8 @@ keydb_update_keyblock (ctrl_t ctrl, KEYDB_HANDLE hd, kbnode_t kb)
|
|||
err = assuan_transact (hd->kbl->ctx, "STORE --update",
|
||||
NULL, NULL,
|
||||
store_inq_cb, &parm,
|
||||
NULL, NULL);
|
||||
keydb_default_status_cb, hd);
|
||||
|
||||
|
||||
leave:
|
||||
iobuf_close (iobuf);
|
||||
|
@ -523,7 +541,7 @@ keydb_insert_keyblock (KEYDB_HANDLE hd, kbnode_t kb)
|
|||
err = assuan_transact (hd->kbl->ctx, "STORE --insert",
|
||||
NULL, NULL,
|
||||
store_inq_cb, &parm,
|
||||
NULL, NULL);
|
||||
keydb_default_status_cb, hd);
|
||||
|
||||
leave:
|
||||
iobuf_close (iobuf);
|
||||
|
@ -569,7 +587,7 @@ keydb_delete_keyblock (KEYDB_HANDLE hd)
|
|||
err = assuan_transact (hd->kbl->ctx, line,
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
NULL, NULL);
|
||||
keydb_default_status_cb, hd);
|
||||
|
||||
leave:
|
||||
return err;
|
||||
|
@ -656,6 +674,8 @@ search_status_cb (void *opaque, const char *line)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
err = keydb_default_status_cb (opaque, line);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -4794,7 +4794,7 @@ fail:
|
|||
/*
|
||||
* Ask for a new additional decryption subkey and add it to the key
|
||||
* block. Returns true if the keyblock was changed and false
|
||||
* otherwise. If ADSKFPR is not NULL, this fucntion has been called
|
||||
* otherwise. If ADSKFPR is not NULL, this function has been called
|
||||
* by quick_addadsk and gives the fingerprint of the to be added key.
|
||||
*/
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue