summaryrefslogtreecommitdiff
path: root/tools/credman.c
diff options
context:
space:
mode:
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);