mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent, sm: Set CTX after start_agent.
* g10/call-agent.c (agent_keytocard): Assign parm.ctx after start_agent. * sm/call-agent.c (gpgsm_agent_pksign, gpgsm_scd_pksign) (gpgsm_agent_readkey, gpgsm_agent_scd_serialno) (gpgsm_agent_scd_keypairinfo, gpgsm_agent_marktrusted) (gpgsm_agent_passwd, gpgsm_agent_get_confirmation) (gpgsm_agent_ask_passphrase, gpgsm_agent_keywrap_key) (gpgsm_agent_export_key): Likewise. -- Reported-by: Rainer Perske GnuPG-bug-id: 2699 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
836b723631
commit
4e4843e735
2 changed files with 31 additions and 12 deletions
|
@ -829,7 +829,6 @@ agent_keytocard (const char *hexgrip, int keyno, int force,
|
|||
struct default_inq_parm_s parm;
|
||||
|
||||
memset (&parm, 0, sizeof parm);
|
||||
parm.ctx = agent_ctx;
|
||||
|
||||
snprintf (line, DIM(line)-1, "KEYTOCARD %s%s %s OPENPGP.%d %s",
|
||||
force?"--force ": "", hexgrip, serialno, keyno, timestamp);
|
||||
|
@ -838,6 +837,7 @@ agent_keytocard (const char *hexgrip, int keyno, int force,
|
|||
rc = start_agent (NULL, 1);
|
||||
if (rc)
|
||||
return rc;
|
||||
parm.ctx = agent_ctx;
|
||||
|
||||
rc = assuan_transact (agent_ctx, line, NULL, NULL, default_inq_cb, &parm,
|
||||
NULL, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue