mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Update shadow-keys with --card-status also for non-openpgp cards.
* agent/command.c (cmd_readkey): Also allow for $AUTHKEYID in card mode. * g10/call-agent.c (agent_update_shadow_keys): new. * g10/card-util.c (current_card_status): Call it.
This commit is contained in:
parent
755920d433
commit
2d23a72690
4 changed files with 32 additions and 2 deletions
|
@ -1414,6 +1414,29 @@ agent_scd_readkey (const char *keyrefstr, gcry_sexp_t *r_result)
|
|||
}
|
||||
|
||||
|
||||
/* This can be called for a quick and dirty update/creation of the
|
||||
* shadow key stubs. */
|
||||
gpg_error_t
|
||||
agent_update_shadow_keys (void)
|
||||
{
|
||||
gpg_error_t err;
|
||||
|
||||
err = start_agent (NULL, 1);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
assuan_transact (agent_ctx, "READKEY --card --no-data -- $SIGNKEYID",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
assuan_transact (agent_ctx, "READKEY --card --no-data -- $ENCRKEYID",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
assuan_transact (agent_ctx, "READKEY --card --no-data -- $AUTHKEYID",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
struct card_cardlist_parm_s {
|
||||
int error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue