From 173bfbf7886608a4a7abbfac6a42ac4bf4a3432d Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 20 Sep 2020 16:14:20 +0100 Subject: New upstream version 1.5.0 --- examples/info.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'examples/info.c') 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 @@ * license that can be found in the LICENSE file. */ -#include - #include #include #include #include #include -#include "../openbsd-compat/openbsd-compat.h" - #include "fido.h" +#include "../openbsd-compat/openbsd-compat.h" /* * Pretty-print a device's capabilities flags and return the result. @@ -130,6 +127,26 @@ print_maxmsgsiz(uint64_t maxmsgsiz) printf("maxmsgsiz: %d\n", (int)maxmsgsiz); } +/* + * Auxiliary function to print an authenticator's maximum number of credentials + * in a credential list on stdout. + */ +static void +print_maxcredcntlst(uint64_t maxcredcntlst) +{ + printf("maxcredcntlst: %d\n", (int)maxcredcntlst); +} + +/* + * Auxiliary function to print an authenticator's maximum credential ID length + * on stdout. + */ +static void +print_maxcredidlen(uint64_t maxcredidlen) +{ + printf("maxcredlen: %d\n", (int)maxcredidlen); +} + /* * Auxiliary function to print an authenticator's firmware version on stdout. */ @@ -199,6 +216,12 @@ getinfo(const char *path) /* print maximum message size */ print_maxmsgsiz(fido_cbor_info_maxmsgsiz(ci)); + /* print maximum number of credentials allowed in credential lists */ + print_maxcredcntlst(fido_cbor_info_maxcredcntlst(ci)); + + /* print maximum length of a credential ID */ + print_maxcredidlen(fido_cbor_info_maxcredidlen(ci)); + /* print firmware version */ print_fwversion(fido_cbor_info_fwversion(ci)); -- cgit v1.2.3