RT3669: dgst can only sign/verify one file.

Check arg count and print an error message.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz 2016-09-02 17:34:31 -04:00
parent a19228b7f4
commit 13a461831a

View file

@ -185,6 +185,10 @@ int dgst_main(int argc, char **argv)
}
argc = opt_num_rest();
argv = opt_rest();
if (keyfile != NULL && argc > 1) {
BIO_printf(bio_err, "%s: Can only sign or verify one file.\n", prog);
goto end;
}
if (do_verify && !sigfile) {
BIO_printf(bio_err,