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

card: Implement UID command and print capabilities.

* tools/card-call-scd.c (learn_status_cb): Return the full value for
UIF.  Add info about SM, MCL3, and PD.
* tools/gpg-card.h (struct card_info_s): Add corresponding fields.
* tools/gpg-card.c (list_openpgp): Print capabilities.  Print the
permanent flag for UIF.
(cmd_uif): Implement.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-05-26 16:16:24 +02:00
parent 11f0700282
commit c2a47475ba
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 131 additions and 6 deletions

View file

@ -174,11 +174,16 @@ struct card_info_s
unsigned int ki:1; /* Key import available. */
unsigned int aac:1; /* Algorithm attributes are changeable. */
unsigned int kdf:1; /* KDF object to support PIN hashing available. */
unsigned int bt:1; /* Button for confirmation available. */
unsigned int bt:1; /* Button for confirmation available. */
unsigned int sm:1; /* Secure messaging available. */
unsigned int smalgo:15;/* Secure messaging cipher algorithm. */
unsigned int private_dos:1;/* Support fpr private use DOs. */
unsigned int mcl3:16; /* Max. length for a OpenPGP card cert.3 */
} extcap;
unsigned int status_indicator;
int kdf_do_enabled; /* True if card has a KDF object. */
int uif[3]; /* True if User Interaction Flag is on. */
int uif[3]; /* True if User Interaction Flag is on. */
/* 1 = on, 2 = permanent on. */
};
typedef struct card_info_s *card_info_t;