diff options
Diffstat (limited to 'tools/token.c')
-rw-r--r-- | tools/token.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/token.c b/tools/token.c index b149208..e65f09f 100644 --- a/tools/token.c +++ b/tools/token.c | |||
@@ -112,6 +112,12 @@ print_maxmsgsiz(uint64_t maxmsgsiz) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | static void | 114 | static void |
115 | print_fwversion(uint64_t fwversion) | ||
116 | { | ||
117 | printf("fwversion: 0x%x\n", (int)fwversion); | ||
118 | } | ||
119 | |||
120 | static void | ||
115 | print_byte_array(const char *label, const uint8_t *ba, size_t len) | 121 | print_byte_array(const char *label, const uint8_t *ba, size_t len) |
116 | { | 122 | { |
117 | if (len == 0) | 123 | if (len == 0) |
@@ -166,7 +172,7 @@ token_info(int argc, char **argv, char *path) | |||
166 | return (credman_print_rk(dev, path, rp_id, cred_id)); | 172 | return (credman_print_rk(dev, path, rp_id, cred_id)); |
167 | if (cred_id || rp_id) | 173 | if (cred_id || rp_id) |
168 | usage(); | 174 | usage(); |
169 | 175 | ||
170 | print_attr(dev); | 176 | print_attr(dev); |
171 | 177 | ||
172 | if (fido_dev_is_fido2(dev) == false) | 178 | if (fido_dev_is_fido2(dev) == false) |
@@ -196,11 +202,14 @@ token_info(int argc, char **argv, char *path) | |||
196 | /* print maximum message size */ | 202 | /* print maximum message size */ |
197 | print_maxmsgsiz(fido_cbor_info_maxmsgsiz(ci)); | 203 | print_maxmsgsiz(fido_cbor_info_maxmsgsiz(ci)); |
198 | 204 | ||
205 | /* print firmware version */ | ||
206 | print_fwversion(fido_cbor_info_fwversion(ci)); | ||
207 | |||
199 | /* print supported pin protocols */ | 208 | /* print supported pin protocols */ |
200 | print_byte_array("pin protocols", fido_cbor_info_protocols_ptr(ci), | 209 | print_byte_array("pin protocols", fido_cbor_info_protocols_ptr(ci), |
201 | fido_cbor_info_protocols_len(ci)); | 210 | fido_cbor_info_protocols_len(ci)); |
202 | 211 | ||
203 | if ((r = fido_dev_get_retry_count(dev, &retrycnt)) != FIDO_OK) | 212 | if (fido_dev_get_retry_count(dev, &retrycnt) != FIDO_OK) |
204 | printf("pin retries: undefined\n"); | 213 | printf("pin retries: undefined\n"); |
205 | else | 214 | else |
206 | printf("pin retries: %d\n", retrycnt); | 215 | printf("pin retries: %d\n", retrycnt); |