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/cred.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'examples/cred.c') diff --git a/examples/cred.c b/examples/cred.c index 3e0a30f..6bd0faf 100644 --- a/examples/cred.c +++ b/examples/cred.c @@ -16,14 +16,9 @@ #include #endif -#include "../openbsd-compat/openbsd-compat.h" - #include "fido.h" #include "extern.h" - -#ifdef SIGNAL_EXAMPLE -extern volatile sig_atomic_t got_signal; -#endif +#include "../openbsd-compat/openbsd-compat.h" static const unsigned char cdh[32] = { 0xf9, 0x64, 0x57, 0xe7, 0x2d, 0x97, 0xf6, 0xbb, @@ -192,13 +187,15 @@ main(int argc, char **argv) break; case 'T': #ifndef SIGNAL_EXAMPLE + (void)seconds; errx(1, "-T not supported"); -#endif +#else if (base10(optarg, &seconds) < 0) errx(1, "base10: %s", optarg); if (seconds <= 0 || seconds > 30) errx(1, "-T: %s must be in (0,30]", optarg); break; +#endif case 'e': if (read_blob(optarg, &body, &len) < 0) errx(1, "read_blob: %s", optarg); @@ -318,6 +315,10 @@ main(int argc, char **argv) fido_dev_free(&dev); + /* when verifying, pin implies uv */ + if (pin) + uv = true; + verify_cred(type, fido_cred_fmt(cred), fido_cred_authdata_ptr(cred), fido_cred_authdata_len(cred), fido_cred_x5c_ptr(cred), fido_cred_x5c_len(cred), fido_cred_sig_ptr(cred), -- cgit v1.2.3