summaryrefslogtreecommitdiff
path: root/examples/info.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 /examples/info.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 'examples/info.c')
-rw-r--r--examples/info.c31
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 */
134static void
135print_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 */
144static void
145print_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 */
136static void 153static 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