diff options
| author | Werner Koch <[email protected]> | 2021-03-30 15:28:45 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2021-03-30 15:28:45 +0000 |
| commit | 0d6f276f61c583d776687029c715b1ee4280e4ed (patch) | |
| tree | 1c8fbd9c7170a6fbbe27e67764b882fb634236a5 /tools/gpg-card.h | |
| parent | scd:p15: Return labels for keys and certificates. (diff) | |
| download | gnupg-0d6f276f61c583d776687029c715b1ee4280e4ed.tar.gz gnupg-0d6f276f61c583d776687029c715b1ee4280e4ed.zip | |
card: Print the key's label if available.
* tools/gpg-card.h (struct key_info_s): Add field 'label'.
* tools/card-call-scd.c (learn_status_cb): Parse KEY-LABEL.
(scd_learn): Always request KEY-LABEL.
* tools/gpg-card.c (nullnone): New.
(list_one_kinfo, list_card): Use it. Print the label.
--
PKCS#15 defines label which help to understand for what a key is
intended. Print them.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpg-card.h')
| -rw-r--r-- | tools/gpg-card.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gpg-card.h b/tools/gpg-card.h index bd4b923e7..b79d12d0d 100644 --- a/tools/gpg-card.h +++ b/tools/gpg-card.h @@ -125,6 +125,9 @@ struct key_info_s const char *keyalgo; enum gcry_pk_algos keyalgo_id; + /* An optional malloced label for the key. */ + char *label; + /* The three next items are mostly useful for OpenPGP cards. */ unsigned char fprlen; /* Use length of the next item. */ unsigned char fpr[32]; /* The binary fingerprint of length FPRLEN. */ |
