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:
parent
a19228b7f4
commit
13a461831a
1 changed files with 4 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue