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:
6180c0f
)
RT4669: dgst can only sign/verify one file
author
Richard Levitte
<levitte@openssl.org>
Tue, 20 Sep 2016 19:41:58 +0000
(21:41 +0200)
committer
Richard Levitte
<levitte@openssl.org>
Tue, 20 Sep 2016 19:56:04 +0000
(21:56 +0200)
Check arg count and print an error message.
Reviewed-by: Rich Salz <rsalz@openssl.org>
apps/dgst.c
patch
|
blob
|
history
diff --git
a/apps/dgst.c
b/apps/dgst.c
index 95e5fa3fc7b7d5cb9f4230f5c9dd3cb71492dba3..26afcd7b30baf1643e85edef0e3e045d346d5f9c 100644
(file)
--- 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");