projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5cb5db
)
RT3669: dgst can only sign/verify one file.
author
Rich Salz
<rsalz@openssl.org>
Fri, 2 Sep 2016 21:34:31 +0000
(17:34 -0400)
committer
Rich Salz
<rsalz@openssl.org>
Tue, 20 Sep 2016 19:48:23 +0000
(15:48 -0400)
Check arg count and print an error message.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit
13a461831ab85ec9f55806ebf2df5ffb7f3f357a
)
apps/dgst.c
patch
|
blob
|
history
diff --git
a/apps/dgst.c
b/apps/dgst.c
index e438b7c8cc35675e101daa75c95e26ddbc98da72..b10b93e5880671aa9a90370101470c7fc8b39802 100644
(file)
--- a/
apps/dgst.c
+++ b/
apps/dgst.c
@@
-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,