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 --- tools/assert_verify.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'tools/assert_verify.c') diff --git a/tools/assert_verify.c b/tools/assert_verify.c index ccff57a..fb96b65 100644 --- a/tools/assert_verify.c +++ b/tools/assert_verify.c @@ -175,16 +175,8 @@ assert_verify(int argc, char **argv) in_f = open_read(in_path); - if (argc > 1) { - if (strcmp(argv[1], "es256") == 0) - type = COSE_ES256; - else if (strcmp(argv[1], "rs256") == 0) - type = COSE_RS256; - else if (strcmp(argv[1], "eddsa") == 0) - type = COSE_EDDSA; - else - errx(1, "unknown type %s", argv[1]); - } + if (argc > 1 && cose_type(argv[1], &type) < 0) + errx(1, "unknown type %s", argv[1]); fido_init((flags & FLAG_DEBUG) ? FIDO_DEBUG : 0); -- cgit v1.2.3