1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: Fix "generate" command in --card-edit.

* g10/card-util.c (get_info_for_key_operation): Get the APPTYPE before
testing for it.

* g10/card-util.c (current_card_status): Always try to update the
shadow keys.
* g10/call-agent.c (agent_scd_getattr): Handle $AUTHKEYID.
--

The first part fixed a regression introduced today.
GnuPG-bug-id: 5100

The second part is usually not required because our ssh-agent code
anyway looks for the OpenPGP.3 key.  However, this helps to put the
Display S/N into the shadow key so that we get a better prompt to
insert the card.
This commit is contained in:
Werner Koch 2022-08-16 13:23:50 +02:00
parent 2d23a72690
commit 914ee72475
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 10 additions and 1 deletions

View file

@ -1104,6 +1104,9 @@ agent_scd_getattr (const char *name, struct agent_card_info_s *info)
if (info->fpr2valid)
assuan_transact (agent_ctx, "READKEY --card --no-data -- $ENCRKEYID",
NULL, NULL, NULL, NULL, NULL, NULL);
if (info->fpr3valid)
assuan_transact (agent_ctx, "READKEY --card --no-data -- $AUTHKEYID",
NULL, NULL, NULL, NULL, NULL, NULL);
}
return rc;