From 35e4c3d2aa55e384f083f0baf006b6c58dd3bdb9 Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 8 Jan 2014 07:04:29 +0000 Subject: [PATCH] fix logic/usage in VERIFYONLY case okay deraadt@ --- usr.bin/signify/signify.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c index 3d668188532..72ffdccdc97 100644 --- a/usr.bin/signify/signify.c +++ b/usr.bin/signify/signify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signify.c,v 1.14 2014/01/08 05:00:01 tedu Exp $ */ +/* $OpenBSD: signify.c,v 1.15 2014/01/08 07:04:29 espie Exp $ */ /* * Copyright (c) 2013 Ted Unangst * @@ -70,10 +70,15 @@ static void usage(void) { fprintf(stderr, "usage:" +#ifndef VERIFYONLY "\t%s [-n] -p pubkey -s seckey -G\n" "\t%s [-o output] -s seckey -S input\n" +#endif "\t%s [-o output] -p pubkey -V input\n", - __progname, __progname, __progname); +#ifndef VERIFYONLY + __progname, __progname, +#endif + __progname); exit(1); } @@ -403,7 +408,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; +#ifdef VERIFYONLY + if (verb != VERIFY) +#else if (verb == NONE) +#endif usage(); #ifndef VERIFYONLY -- 2.20.1