aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-piv.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-01-29 08:30:15 +0000
committerWerner Koch <[email protected]>2019-01-29 08:32:20 +0000
commit9325c92284bb346d11c3591bb2ea88095989361a (patch)
tree7f2b164030bc746bebff089e157fee768b926048 /scd/app-piv.c
parentcard: Make printing of key information more flexible. (diff)
downloadgnupg-9325c92284bb346d11c3591bb2ea88095989361a.tar.gz
gnupg-9325c92284bb346d11c3591bb2ea88095989361a.zip
card: Print keyinfo for PIV cards.
* scd/app-piv.c (do_learn_status): Print CHV-STATUS. * tools/card-tool.h (struct card_info_s): Rename chvretry to chvinfo. * tools/card-call-scd.c (learn_status_cb): Depend CHV-STATUS on app type. * tools/gpg-card-tool.c (list_piv): New. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'scd/app-piv.c')
-rw-r--r--scd/app-piv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/scd/app-piv.c b/scd/app-piv.c
index 011b55229..69f12f43a 100644
--- a/scd/app-piv.c
+++ b/scd/app-piv.c
@@ -569,7 +569,7 @@ send_keypair_and_cert_info (app_t app, ctrl_t ctrl, data_object_t dobj,
}
-/* Handle the LEARN command for OpenPGP. */
+/* Handle the LEARN command. */
static gpg_error_t
do_learn_status (app_t app, ctrl_t ctrl, unsigned int flags)
{
@@ -577,10 +577,13 @@ do_learn_status (app_t app, ctrl_t ctrl, unsigned int flags)
(void)flags;
+ do_getattr (app, ctrl, "CHV-STATUS");
+
for (i=0; data_objects[i].tag; i++)
if (data_objects[i].keypair)
send_keypair_and_cert_info (app, ctrl, data_objects + i, !!(flags & 1));
+
return 0;
}