diff --git a/CMakeLists.txt b/CMakeLists.txt index a9fc31a..6003971 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 2.8) project(minisign C) +option(VERIFY_ONLY "verify-only" OFF) + include(CheckLibraryExists) find_library(LIB_SODIUM NAMES sodium REQUIRED) diff --git a/src/minisign.c b/src/minisign.c index cbd424f..5d30316 100644 --- a/src/minisign.c +++ b/src/minisign.c @@ -30,22 +30,28 @@ static void usage(void) { puts("Usage:\n" -#ifndef VERIFY_ONLY "minisign -G -p pubkey -s seckey [-c untrusted_comment]\n" +#ifndef VERIFY_ONLY "minisign -S -s seckey -m file [-x sigfile] [-c untrusted_comment] [-t trusted_comment]\n" -#endif "minisign -V -p pubkey -m file [-x sigfile] [-q]\n" +#endif "\n" +#ifndef VERIFY_ONLY "-G generate a new key pair\n" "-S sign a file\n" +#endif "-V verify that a signature is valid for a given file\n" "-m file to sign/verify\n" "-p public key file (default: ./minisign.pub)\n" +#ifndef VERIFY_ONLY "-s secret key file (default: ./minisign.key)\n" +#endif "-x signature file (default: .minisig)\n" +#ifndef VERIFY_ONLY "-c add a one-line untrusted comment\n" "-t add a one-line trusted comment\n" - "-q quiet mode, suppress output\n" +#endif + "-q quiet mode, suppress output\n" ); exit(1); }