summaryrefslogtreecommitdiff
path: root/tools/credman.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-09-20 17:48:15 +0100
committerColin Watson <cjwatson@debian.org>2020-09-20 17:48:15 +0100
commit05fa6dd7724ccfd1c183e6e4bf9d22eb12abea8c (patch)
tree71d3eccc33c93c230b021c72f1fb9cf2247bf6c0 /tools/credman.c
parentb77d6ed4d47acbc836f05be0e9f4abeb104e21ff (diff)
parent173bfbf7886608a4a7abbfac6a42ac4bf4a3432d (diff)
Update upstream source from tag 'upstream/1.5.0'
Update to upstream version '1.5.0' with Debian dir 102fd7ed15b138200444754d256b136933185ec2
Diffstat (limited to 'tools/credman.c')
-rw-r--r--tools/credman.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/tools/credman.c b/tools/credman.c
index 6eda245..ea913bb 100644
--- a/tools/credman.c
+++ b/tools/credman.c
@@ -101,6 +101,7 @@ print_rk(const fido_credman_rk_t *rk, size_t idx)
101 char *id = NULL; 101 char *id = NULL;
102 char *user_id = NULL; 102 char *user_id = NULL;
103 const char *type; 103 const char *type;
104 const char *prot;
104 105
105 if ((cred = fido_credman_rk(rk, idx)) == NULL) 106 if ((cred = fido_credman_rk(rk, idx)) == NULL)
106 errx(1, "fido_credman_rk"); 107 errx(1, "fido_credman_rk");
@@ -109,23 +110,11 @@ print_rk(const fido_credman_rk_t *rk, size_t idx)
109 fido_cred_user_id_len(cred), &user_id) < 0) 110 fido_cred_user_id_len(cred), &user_id) < 0)
110 errx(1, "output error"); 111 errx(1, "output error");
111 112
112 switch (fido_cred_type(cred)) { 113 type = cose_string(fido_cred_type(cred));
113 case COSE_EDDSA: 114 prot = prot_string(fido_cred_prot(cred));
114 type = "eddsa";
115 break;
116 case COSE_ES256:
117 type = "es256";
118 break;
119 case COSE_RS256:
120 type = "rs256";
121 break;
122 default:
123 type = "unknown";
124 break;
125 }
126 115
127 printf("%02u: %s %s (%s) %s\n", (unsigned)idx, id, 116 printf("%02u: %s %s %s %s %s\n", (unsigned)idx, id,
128 fido_cred_display_name(cred), user_id, type); 117 fido_cred_display_name(cred), user_id, type, prot);
129 118
130 free(user_id); 119 free(user_id);
131 free(id); 120 free(id);