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

gpgsm: Extend --learn-card by an optional s/n argument.

* agent/command.c (cmd_learn): Allow for s/n argument.
* agent/learncard.c (agent_handle_learn): Ditto.
* agent/call-scd.c (agent_card_learn): Ditto.  Pass it on to scd.

* scd/command.c (cmd_switchcard): Factor most code out to ...
(switchcard_core): new.
(cmd_learn): Add option --demand to specify a s/n.

* sm/gpgsm.c (main): Allow a s/n argument for --learn-card.
--

This help Kleopatra to get a stable certificate listing.
GnuPG-bug-id: 7379
This commit is contained in:
Werner Koch 2025-03-17 17:37:08 +01:00
parent 5420c4ebde
commit f463586a96
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
9 changed files with 99 additions and 39 deletions

View file

@ -291,11 +291,12 @@ Import the certificates from the PEM or binary encoded files as well as
from signed-only messages. This command may also be used to import a
secret key from a PKCS#12 file.
@item --learn-card
@item --learn-card [@var{serialno}]
@opindex learn-card
Read information about the private keys from the smartcard and import
the certificates from there. This command utilizes the @command{gpg-agent}
and in turn the @command{scdaemon}.
Read information about the private keys from the current smartcard and import
the certificates from there. This command utilizes @command{gpg-agent}
and in turn @command{scdaemon}. If @var{serialno} is provided the
system first makes that card the current one.
@item --change-passphrase @var{user_id}
@opindex change-passphrase