mirror of
https://github.com/openssl/openssl.git
synced 2024-12-17 05:53:49 +08:00
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
@ -185,6 +185,10 @@ int dgst_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
argc = opt_num_rest();
|
argc = opt_num_rest();
|
||||||
argv = opt_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) {
|
if (do_verify && !sigfile) {
|
||||||
BIO_printf(bio_err,
|
BIO_printf(bio_err,
|
||||||
|
Loading…
Reference in New Issue
Block a user