From: Richard Levitte Date: Tue, 20 Sep 2016 19:41:58 +0000 (+0200) Subject: RT4669: dgst can only sign/verify one file X-Git-Tag: OpenSSL_1_0_2i~15 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a5e55f62975c0f978eb348763a1de0cd923f0d77;p=oweals%2Fopenssl.git RT4669: dgst can only sign/verify one file Check arg count and print an error message. Reviewed-by: Rich Salz --- diff --git a/apps/dgst.c b/apps/dgst.c index 95e5fa3fc7..26afcd7b30 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -243,6 +243,11 @@ int MAIN(int argc, char **argv) argv++; } + if (keyfile != NULL && argc > 1) { + BIO_printf(bio_err, "Can only sign or verify one file\n"); + goto end; + } + if (do_verify && !sigfile) { BIO_printf(bio_err, "No signature to verify: use the -signature option\n");