diff options
Diffstat (limited to 'examples/info.c')
-rw-r--r-- | examples/info.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/examples/info.c b/examples/info.c index ef0d97e..d81de85 100644 --- a/examples/info.c +++ b/examples/info.c | |||
@@ -4,17 +4,14 @@ | |||
4 | * license that can be found in the LICENSE file. | 4 | * license that can be found in the LICENSE file. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <openssl/ec.h> | ||
8 | |||
9 | #include <stdbool.h> | 7 | #include <stdbool.h> |
10 | #include <stdint.h> | 8 | #include <stdint.h> |
11 | #include <stdio.h> | 9 | #include <stdio.h> |
12 | #include <stdlib.h> | 10 | #include <stdlib.h> |
13 | #include <string.h> | 11 | #include <string.h> |
14 | 12 | ||
15 | #include "../openbsd-compat/openbsd-compat.h" | ||
16 | |||
17 | #include "fido.h" | 13 | #include "fido.h" |
14 | #include "../openbsd-compat/openbsd-compat.h" | ||
18 | 15 | ||
19 | /* | 16 | /* |
20 | * Pretty-print a device's capabilities flags and return the result. | 17 | * Pretty-print a device's capabilities flags and return the result. |
@@ -131,6 +128,26 @@ print_maxmsgsiz(uint64_t maxmsgsiz) | |||
131 | } | 128 | } |
132 | 129 | ||
133 | /* | 130 | /* |
131 | * Auxiliary function to print an authenticator's maximum number of credentials | ||
132 | * in a credential list on stdout. | ||
133 | */ | ||
134 | static void | ||
135 | print_maxcredcntlst(uint64_t maxcredcntlst) | ||
136 | { | ||
137 | printf("maxcredcntlst: %d\n", (int)maxcredcntlst); | ||
138 | } | ||
139 | |||
140 | /* | ||
141 | * Auxiliary function to print an authenticator's maximum credential ID length | ||
142 | * on stdout. | ||
143 | */ | ||
144 | static void | ||
145 | print_maxcredidlen(uint64_t maxcredidlen) | ||
146 | { | ||
147 | printf("maxcredlen: %d\n", (int)maxcredidlen); | ||
148 | } | ||
149 | |||
150 | /* | ||
134 | * Auxiliary function to print an authenticator's firmware version on stdout. | 151 | * Auxiliary function to print an authenticator's firmware version on stdout. |
135 | */ | 152 | */ |
136 | static void | 153 | static void |
@@ -199,6 +216,12 @@ getinfo(const char *path) | |||
199 | /* print maximum message size */ | 216 | /* print maximum message size */ |
200 | print_maxmsgsiz(fido_cbor_info_maxmsgsiz(ci)); | 217 | print_maxmsgsiz(fido_cbor_info_maxmsgsiz(ci)); |
201 | 218 | ||
219 | /* print maximum number of credentials allowed in credential lists */ | ||
220 | print_maxcredcntlst(fido_cbor_info_maxcredcntlst(ci)); | ||
221 | |||
222 | /* print maximum length of a credential ID */ | ||
223 | print_maxcredidlen(fido_cbor_info_maxcredidlen(ci)); | ||
224 | |||
202 | /* print firmware version */ | 225 | /* print firmware version */ |
203 | print_fwversion(fido_cbor_info_fwversion(ci)); | 226 | print_fwversion(fido_cbor_info_fwversion(ci)); |
204 | 227 | ||