diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-01-08 07:04:30 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-01-08 07:04:30 +0000 |
commit | 6a558896806347599d70a206676a4850257d8cde (patch) | |
tree | 4ac7f8660e02f45a298373aa4e580e5a3d375b50 /usr.bin/signify | |
parent | 57bcf70cb29e6d0b0c0ba1df4d8fec20a7063b86 (diff) |
fix logic/usage in VERIFYONLY case
okay deraadt@
Diffstat (limited to 'usr.bin/signify')
-rw-r--r-- | usr.bin/signify/signify.c | 13 |
1 files 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 <tedu@openbsd.org> * @@ -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 |